/* =======================================================================
   AFV.Next — Design System
   Tokens: UpSoftware brand teal/green gradient + Inter + Saira
   ======================================================================= */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Saira:ital,wght@0,400;0,600;0,700;0,800;0,900;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Brand tokens ── */
:root {
  /* Teal/Green gradient — brand signature */
  --up-teal-900: #14403D;
  --up-teal-800: #1F5F5B;
  --up-teal-700: #266E65;
  --up-teal-600: #2E8B7E;
  --up-teal-500: #3BA893;
  --up-teal-400: #55C29F;
  --up-teal-300: #7ED6A5;
  --up-teal-200: #A5E4BF;
  --up-teal-100: #CFF0D9;

  /* Gradients */
  --grad:         linear-gradient(135deg, #14403D 0%, #1F5F5B 30%, #2E8B7E 66%, #7ED6A5 100%);
  --grad-chip:    linear-gradient(120deg, #1F5F5B 0%, #2E8B7E 60%, #7ED6A5 100%);
  --grad-sidebar: linear-gradient(178deg,#15252E 0%,#11202B 60%,#0E1B24 100%);
  --grad-login:   linear-gradient(150deg,#0E2F2C 0%,#15403B 42%,#1F5F5B 100%);

  /* Accent */
  --accent:       var(--up-teal-600);
  --accent-deep:  var(--up-teal-800);
  --accent-soft:  var(--up-teal-100);
  --on-accent:    #fff;

  /* Typography */
  --font-display: "Saira", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Motion */
  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast:  120ms;
  --dur-base:  200ms;
  --dur-slow:  320ms;

  /* Radii */
  --r-card:    16px;
  --r-control: 12px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(10,20,40,.06);
  --shadow-sm: 0 2px 6px rgba(10,20,40,.08);
  --shadow-md: 0 6px 18px rgba(10,20,40,.10);
  --shadow-lg: 0 14px 36px rgba(10,20,40,.14);
  --shadow-brand: 0 18px 40px rgba(46,139,126,.28);
}

/* ── Light theme (default) ── */
:root, [data-theme="light"] {
  --app-bg:           #EEF2F3;
  --app-surface:      #FFFFFF;
  --app-surface-2:    #F5F7F8;
  --app-surface-sunk: #EAF0F1;
  --app-border:       #E4E9EB;
  --app-border-strong:#D3DADD;
  --app-text:         #16202B;
  --app-text-muted:   #51606B;
  --app-text-subtle:  #8A98A2;
  --app-shadow:       0 1px 2px rgba(16,32,43,.05), 0 6px 18px rgba(16,32,43,.06);
  --skel:             linear-gradient(90deg,#eef1f3 25%,#e2e8ea 37%,#eef1f3 63%);
  color-scheme: light;
}

/* ── Dark theme ── */
[data-theme="dark"] {
  --app-bg:           #0E1322;
  --app-surface:      #1A2236;
  --app-surface-2:    #141B2C;
  --app-surface-sunk: rgba(16,22,36,.57);
  --app-border:       rgba(255,255,255,.08);
  --app-border-strong:rgba(255,255,255,.16);
  --app-text:         #EAF0F4;
  --app-text-muted:   #9FB0BF;
  --app-text-subtle:  #6B7C8B;
  --app-shadow:       0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --skel:             linear-gradient(90deg,#1a2236 25%,#243049 37%,#1a2236 63%);
  --accent-soft:      rgba(126,214,165,.14);
  color-scheme: dark;
}

/* =======================================================================
   RESET
   ======================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--app-text);
  background: var(--app-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
h1,h2,h3,h4,h5,h6,p { margin: 0; }
button { font-family: inherit; }

/* =======================================================================
   PORTAL LAYOUT (sidebar + content)
   ======================================================================= */
#afv-root {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ── */
.afv-sidebar {
  width: 246px;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--grad-sidebar);
  border-right: 1px solid rgba(255,255,255,.07);
  display: flex;
  flex-direction: column;
  transition: width var(--dur-base) var(--ease-out);
  z-index: 50;
  overflow: hidden;
}
.afv-sidebar[data-collapsed="true"] { width: 74px; }

/* ── Brand zone ── */
.afv-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px;
  justify-content: space-between;
  min-height: 70px;
  flex-shrink: 0;
}
.afv-sidebar[data-collapsed="true"] .afv-sidebar-brand {
  padding: 18px 0;
  justify-content: center;
}
.afv-sidebar-logo-chip {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--grad-chip);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-style: italic;
  font-weight: 900; font-size: 18px; flex-shrink: 0;
}
.afv-sidebar-wordmark { line-height: 1; }
.afv-sidebar-wordmark .name {
  color: #fff; font-family: var(--font-display); font-style: italic;
  font-weight: 900; font-size: 18px;
}
.afv-sidebar-wordmark .name span { color: #7ED6A5; }
.afv-sidebar-wordmark .sub {
  color: rgba(255,255,255,.4); font-size: 9.5px; font-weight: 600;
  letter-spacing: .12em; margin-top: 2px;
}
.afv-sidebar[data-collapsed="true"] .afv-sidebar-wordmark,
.afv-sidebar[data-collapsed="true"] .afv-sidebar-toggle { display: none; }
.afv-sidebar-toggle {
  border: none; background: rgba(255,255,255,.07); color: rgba(255,255,255,.6);
  width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out);
}
.afv-sidebar-toggle:hover { background: rgba(255,255,255,.13); }

/* ── New order CTA ── */
.afv-sidebar-cta {
  padding: 0 16px 10px;
  flex-shrink: 0;
}
.afv-sidebar[data-collapsed="true"] .afv-sidebar-cta { padding: 0 14px 8px; }
.afv-btn-grad {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: #fff; border: none; cursor: pointer;
  font-weight: 700; font-size: 14px; border-radius: 13px;
  box-shadow: var(--shadow-brand);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  height: 44px; width: 100%;
}
.afv-btn-grad:active { transform: scale(.975); }
.afv-btn-grad:hover { box-shadow: 0 22px 48px rgba(46,139,126,.36); }

/* ── Navigation ── */
.afv-nav {
  flex: 1;
  padding: 6px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.afv-nav::-webkit-scrollbar { width: 0; }
.afv-sidebar[data-collapsed="true"] .afv-nav { padding: 6px 14px; }

.afv-nav-group {
  color: rgba(255,255,255,.32);
  font-size: 10px; font-weight: 700;
  letter-spacing: .13em;
  padding: 10px 6px 6px;
  white-space: nowrap;
}
.afv-sidebar[data-collapsed="true"] .afv-nav-group { display: none; }
.afv-nav-divider {
  height: 1px; background: rgba(255,255,255,.08);
  margin: 8px 4px;
}

.afv-navitem {
  display: flex; align-items: center; gap: 12px;
  width: 100%; border: none; cursor: pointer;
  padding: 11px 13px; border-radius: 12px;
  background: transparent;
  color: rgba(255,255,255,.72);
  font-weight: 600; font-size: 14px;
  text-align: left; position: relative;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.afv-sidebar[data-collapsed="true"] .afv-navitem {
  padding: 11px; justify-content: center;
}
.afv-navitem[data-on="true"] {
  background: rgba(255,255,255,.09);
  color: rgba(255,255,255,.9);
  font-weight: 700;
}
.afv-navitem[data-on="true"]::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 3px;
  background: var(--accent);
}
.afv-navitem:hover:not([data-on="true"]) { background: rgba(255,255,255,.06); }
.afv-navitem[data-on="true"]:hover { background: rgba(255,255,255,.14); }
.afv-navitem[data-accent="true"] { color: var(--accent); }
.afv-navitem-label {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.afv-sidebar[data-collapsed="true"] .afv-navitem-label { display: none; }

/* ── User footer ── */
.afv-sidebar-user {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 12px 16px;
  flex-shrink: 0;
}
.afv-sidebar[data-collapsed="true"] .afv-sidebar-user { padding: 12px 14px; }
.afv-sidebar-user-inner {
  display: flex; align-items: center; gap: 10px;
}
.afv-avatar {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad-chip);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px;
  letter-spacing: -.01em; flex-shrink: 0;
}
.afv-sidebar-user-info { flex: 1; min-width: 0; }
.afv-sidebar-user-info .name {
  color: #fff; font-weight: 700; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.afv-sidebar-user-info .sub {
  color: rgba(255,255,255,.45); font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.afv-sidebar[data-collapsed="true"] .afv-sidebar-user-info { display: none; }
.afv-user-logout {
  border: none; background: rgba(255,255,255,.07); color: rgba(255,255,255,.6);
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out);
}
.afv-user-logout:hover { background: rgba(255,255,255,.14); }

/* collapsed toggle at bottom */
.afv-sidebar-expand-btn {
  display: none; margin-top: 10px; border: none;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.6);
  width: 100%; height: 32px; border-radius: 9px;
  align-items: center; justify-content: center; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.afv-sidebar[data-collapsed="true"] .afv-sidebar-expand-btn { display: flex; }
.afv-sidebar-expand-btn:hover { background: rgba(255,255,255,.14); }

/* ── Content area ── */
#afv-content {
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
}

/* ── Mobile top bar ── */
.afv-mobilebar {
  display: none;
  position: sticky; top: 0; z-index: 55;
  height: 56px;
  background: var(--grad-sidebar);
  align-items: center; gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.afv-mobilebar-wordmark {
  color: #fff; font-family: var(--font-display); font-style: italic;
  font-weight: 900; font-size: 17px;
}
.afv-mobilebar-wordmark span { color: #7ED6A5; }
.afv-mobilebar-screen { color: rgba(255,255,255,.5); font-size: 13px; font-weight: 600; }
.afv-mobilebar-btn {
  border: none; background: rgba(255,255,255,.08); color: #fff;
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* Mobile drawer overlay */
.afv-drawer-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8,14,24,.5);
  animation: afvFade .2s ease both;
}
.afv-drawer {
  width: 270px; height: 100%;
  background: var(--grad-sidebar);
  display: flex; flex-direction: column;
  animation: afvDrawerIn .28s var(--ease-out) both;
}
.afv-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px;
}
.afv-drawer-close {
  border: none; background: rgba(255,255,255,.08); color: #fff;
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ── Screen panel ── position:absolute+inset:0 garante altura definida para scroll */
.afv-screen-panel {
  display: none;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.afv-screen-panel.active { display: block; }

/* ── Screen header ── */
.afv-screen-header {
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  padding: 18px 24px 14px;
  flex-shrink: 0;
}
.afv-screen-header h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 22px;
  color: var(--app-text);
  letter-spacing: -.01em;
}
.afv-screen-body { flex: 1; padding: 20px 24px; }

/* =======================================================================
   COMPONENTS
   ======================================================================= */

/* Card */
.afv-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--r-card);
  box-shadow: var(--app-shadow);
}

/* Inputs */
.afv-input {
  width: 100%; font-family: var(--font-body); font-size: 15px;
  padding: 13px 14px;
  border: 1.5px solid var(--app-border-strong);
  border-radius: var(--r-control);
  background: var(--app-surface);
  color: var(--app-text); outline: none;
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.afv-input::placeholder { color: var(--app-text-subtle); }
.afv-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Buttons */
.afv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; padding: 14px 18px;
  border-radius: var(--r-control);
  border: 1.5px solid transparent;
  cursor: pointer; user-select: none;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-base) var(--ease-out);
}
.afv-btn:active { transform: scale(.975); }
.afv-btn-primary { background: var(--accent); color: #fff; }
.afv-btn-primary:hover { background: var(--accent-deep); }
.afv-btn-outline {
  background: var(--app-surface); color: var(--app-text);
  border-color: var(--app-border-strong);
}
.afv-btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.afv-btn-ghost { background: transparent; color: var(--accent); }
.afv-btn-soft { background: var(--accent-soft); color: var(--accent); }
.afv-btn-block { width: 100%; }
.afv-btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Chip / Badge */
.afv-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.afv-eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.afv-display {
  font-family: var(--font-display); font-style: italic;
  font-weight: 900; letter-spacing: -.01em;
}

/* Table overrides for new design */
.afv-table-wrap {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--app-shadow);
}
.afv-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.afv-table thead tr {
  background: var(--app-surface-2);
  border-bottom: 1px solid var(--app-border);
}
.afv-table th {
  text-align: left; padding: 10px 14px;
  font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--app-text-muted);
}
.afv-table td {
  padding: 11px 14px; color: var(--app-text);
  border-bottom: 1px solid var(--app-border);
  vertical-align: middle;
}
.afv-table tbody tr:last-child td { border-bottom: none; }
.afv-table tbody tr:hover { background: var(--app-surface-2); cursor: pointer; }

/* Toolbar / Search bar */
.afv-toolbar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px; flex-wrap: wrap;
}

/* Skeleton */
.afv-skel {
  background: var(--skel);
  background-size: 200% 100%;
  animation: afvShimmer 1.3s infinite linear;
  border-radius: 8px;
}

/* Animations */
@keyframes afvFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes afvFade   { from { opacity: 0; } to { opacity: 1; } }
@keyframes afvDrawerIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes afvShimmer { to { background-position: -200% 0; } }
@keyframes afvSpin { to { transform: rotate(360deg); } }

/* Animation gate — resting state is visible */
html:not([data-anim-ready]) .afv-fade-up,
html:not([data-anim-ready]) .afv-fade {
  animation: none !important; opacity: 1 !important; transform: none !important;
}
.afv-fade-up { animation: afvFadeUp var(--dur-slow) var(--ease-out) both; }
.afv-fade    { animation: afvFade var(--dur-base) var(--ease-out) both; }
.afv-spin    { animation: afvSpin 1s linear infinite; }

/* Scrollbar (desktop) */
#afv-content ::-webkit-scrollbar { width: 8px; height: 8px; }
#afv-content ::-webkit-scrollbar-thumb {
  background: var(--app-border-strong); border-radius: 6px;
  border: 2px solid transparent; background-clip: padding-box;
}

/* Theme toggle button */
.afv-theme-toggle {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--app-surface); border: 1px solid var(--app-border);
  color: var(--app-text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: background var(--dur-base) var(--ease-out);
}
.afv-theme-toggle:hover { background: var(--app-surface-2); color: var(--app-text); }

/* =======================================================================
   RESPONSIVE — mobile (< 768px)
   ======================================================================= */
@media (max-width: 767px) {
  .afv-sidebar { display: none; }
  .afv-mobilebar { display: flex; }
  .afv-drawer-overlay.open { display: block; }
  #afv-root { flex-direction: column; }
  #afv-content { height: calc(100vh - 56px); }
  .afv-screen-body { padding: 14px; }
}

/* =======================================================================
   COMPAT — override old styles so modules funcionam sem alteração
   ======================================================================= */

/* Map old utility classes to new tokens */
.btn-primary  { background: var(--accent); color: #fff; border: none;
                border-radius: var(--r-control); padding: 9px 18px;
                font-weight: 600; cursor: pointer; font-size: 14px; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-secondary { background: var(--app-surface); color: var(--app-text);
                 border: 1.5px solid var(--app-border-strong);
                 border-radius: var(--r-control); padding: 8px 14px;
                 font-weight: 600; cursor: pointer; font-size: 13.5px; }

.frm-label  { display: block; font-size: 11px; color: var(--app-text-muted);
              font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
              margin-bottom: 5px; }
.frm-input  { width: 100%; padding: 10px 12px;
              border: 1.5px solid var(--app-border-strong);
              border-radius: var(--r-control);
              font-size: 14px; outline: none; background: var(--app-surface);
              color: var(--app-text);
              transition: border-color var(--dur-base) var(--ease-out); font-family: inherit; }
.frm-input:focus  { border-color: var(--accent); }
.frm-readonly     { background: var(--app-surface-2); }

/* Data tables from existing modules */
.table-wrap {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--app-shadow);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead tr { background: var(--app-surface-2); border-bottom: 2px solid var(--app-border); }
.data-table th {
  text-align: left; padding: 10px 12px; font-weight: 700;
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--app-text-muted); white-space: nowrap;
}
.data-table td { padding: 10px 12px; color: var(--app-text); border-bottom: 1px solid var(--app-border); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--app-surface-2); cursor: pointer; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.center { text-align: center; }

/* Badges */
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-verde    { background: var(--up-teal-100); color: var(--up-teal-700); }
.badge-vermelho { background: #fdecea; color: #c0392b; }
.badge-laranja  { background: #fef3e2; color: #d67c1c; }
.badge-azul     { background: var(--accent-soft); color: var(--accent); }
.badge-cinza    { background: var(--app-surface-2); color: var(--app-text-muted); }
.badge-roxo     { background: #f3e8fb; color: #6c3483; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.page-info  { font-size: 13px; color: var(--app-text-muted); }
.btn-page   { padding: 6px 14px; background: var(--app-surface); border: 1.5px solid var(--app-border-strong); border-radius: 10px; font-size: 13px; cursor: pointer; color: var(--app-text); transition: border-color var(--dur-fast) var(--ease-out); }
.btn-page:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-page:disabled { opacity: .4; cursor: default; }

/* Module toolbar */
.mod-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.mod-toolbar input[type=text], .mod-toolbar input[type=date], .mod-toolbar select {
  padding: 9px 12px; border: 1.5px solid var(--app-border-strong);
  border-radius: var(--r-control); font-size: 13.5px; outline: none;
  background: var(--app-surface); color: var(--app-text);
  font-family: inherit;
  transition: border-color var(--dur-base) var(--ease-out);
}
.mod-toolbar input:focus, .mod-toolbar select:focus { border-color: var(--accent); }

/* Loading / empty rows */
.loading-row td, .empty-row td {
  text-align: center; padding: 36px !important;
  color: var(--app-text-subtle); font-size: 14px;
}
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 3px solid var(--app-border); border-top-color: var(--accent);
  border-radius: 50%; animation: afvSpin .7s linear infinite;
  vertical-align: middle; margin-right: 8px;
}

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 1000;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.aberto { display: flex; }
.modal {
  background: var(--app-surface);
  border-radius: 18px; box-shadow: 0 30px 70px rgba(8,20,18,.35);
  width: 100%; max-width: 780px; max-height: 88vh;
  display: flex; flex-direction: column;
  animation: afvFadeUp .25s var(--ease-out) both;
}
.modal.modal-lg { max-width: 960px; }
.modal-header {
  padding: 16px 20px; border-bottom: 1px solid var(--app-border);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.modal-header h3 { font-size: 16px; color: var(--app-text); font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: var(--app-text-muted); padding: 2px 6px; border-radius: 6px; line-height: 1;
}
.modal-close:hover { background: var(--app-surface-2); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-tabs {
  display: flex; border-bottom: 2px solid var(--app-border);
  padding: 0 16px; flex-wrap: wrap;
}
.modal-tab {
  padding: 9px 18px; font-size: 13px; cursor: pointer;
  color: var(--app-text-muted); border-bottom: 2px solid transparent;
  margin-bottom: -2px; white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}
.modal-tab:hover { color: var(--accent); }
.modal-tab.ativo { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); }
.modal-tab-panel { display: none; }
.modal-tab-panel.ativo { display: block; }

/* Info grid in modals */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin-bottom: 20px; }
.info-grid.cols3 { grid-template-columns: 1fr 1fr 1fr; }
.info-item label { display: block; font-size: 11px; color: var(--app-text-subtle); text-transform: uppercase; font-weight: 700; margin-bottom: 2px; letter-spacing: .08em; }
.info-item span { font-size: 14px; color: var(--app-text); }
.section-title { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin: 20px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--app-border); }
.section-title:first-child { margin-top: 0; }

/* Dropdown */
.dropdown-menu { position: fixed; background: var(--app-surface); border: 1px solid var(--app-border-strong); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 2000; min-width: 160px; padding: 4px 0; }
.dropdown-item { display: flex; align-items: center; gap: 9px; padding: 9px 14px; font-size: 13.5px; color: var(--app-text); cursor: pointer; white-space: nowrap; transition: background var(--dur-fast) var(--ease-out); }
.dropdown-item:hover { background: var(--app-surface-2); color: var(--accent); }
.di-icon { font-size: 15px; }

/* Ações button in tables */
.btn-acoes {
  padding: 4px 12px; background: var(--accent); color: #fff;
  border: none; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.btn-acoes:hover { background: var(--accent-deep); }

/* Pedido toolbar / tabs */
.ped-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 0 12px; flex-wrap: wrap; }
.btn-toolbar { padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; border: 1.5px solid transparent; transition: all var(--dur-fast) var(--ease-out); }
.btn-toolbar-primary { background: var(--accent); color: #fff; }
.btn-toolbar-primary:hover { background: var(--accent-deep); }
.btn-toolbar-gray { background: var(--app-surface-2); color: var(--app-text-muted); border-color: var(--app-border-strong); }
.btn-toolbar-gray:hover { border-color: var(--accent); color: var(--accent); }
.btn-toolbar-dark { background: var(--app-surface); color: var(--app-text); border-color: var(--app-border-strong); }
.btn-toolbar:disabled { opacity: .4; cursor: default; pointer-events: none; }

.ped-tabs { display: flex; background: var(--accent); padding: 0 8px; gap: 2px; border-radius: 10px 10px 0 0; }
.ped-tab { padding: 9px 18px; cursor: pointer; font-size: 13px; color: rgba(255,255,255,.7); border-radius: 6px 6px 0 0; border-bottom: 2px solid transparent; white-space: nowrap; transition: all var(--dur-fast) var(--ease-out); }
.ped-tab:hover { color: #fff; background: rgba(255,255,255,.1); }
.ped-tab.ativo { background: var(--app-surface); color: var(--accent); font-weight: 700; }
.ped-panel { display: none; padding: 16px 0; }
.ped-panel.ativo { display: block; }

/* Agenda tabs */
.ag-tab { padding: 8px 14px; cursor: pointer; font-size: 13px; color: rgba(255,255,255,.7); border-radius: 6px; white-space: nowrap; transition: all var(--dur-fast) var(--ease-out); border: none; background: transparent; }
.ag-tab:hover { color: #fff; background: rgba(255,255,255,.1); }
.ag-tab.ativo { background: var(--app-surface); color: var(--accent); font-weight: 700; }
.ag-panel { display: none; }
.ag-panel.ativo { display: block; }

/* Não venda / Pré-cadastro inline tabs */
.nv-tab, .pc-tab { padding: 8px 16px; cursor: pointer; font-size: 13px; color: rgba(255,255,255,.7); border: none; background: transparent; white-space: nowrap; border-radius: 6px 6px 0 0; }
.nv-tab.ativo, .pc-tab.ativo { background: var(--app-surface); color: var(--accent); font-weight: 700; }
.nv-panel, .pc-panel { display: none; padding-top: 12px; }
.nv-panel.ativo, .pc-panel.ativo { display: block; }

/* Dot indicators */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-verde { background: var(--up-teal-600); }
.dot-vermelho { background: #c0392b; }

/* ── Module cards (home dashboard — fiel ao AFV.Next) ── */
.afv-modcard {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  font-family: var(--font-body);
}
.afv-modcard:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(46,139,126,.12);
}
.afv-modcard:active { transform: scale(.98); }
.afv-modicon {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.afv-modlabel { font-weight: 700; font-size: 12.5px; color: var(--app-text); line-height: 1.1; }
.afv-modsub   { font-size: 10px; color: var(--app-text-subtle); margin-top: 1px; }

/* ── Clientes split layout ─────────────────────────────────────────────────── */
.cli-split {
  display: flex;
  height: 100%;
  overflow: hidden;
}
.cli-list-col {
  width: 360px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--app-border);
  overflow: hidden;
}
.cli-detail-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cli-list-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 10px;
  flex-shrink: 0;
}
.cli-list-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 22px;
  color: var(--app-text);
}
.cli-list-sub {
  font-size: 11.5px;
  color: var(--app-text-subtle);
  margin-top: 2px;
}
.cli-hdr-btn {
  width: 32px; height: 32px;
  border: 1.5px solid var(--app-border);
  border-radius: 9px;
  background: transparent;
  color: var(--app-text-subtle);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cli-hdr-btn:hover { background: var(--app-surface-2); }
.cli-search-wrap {
  position: relative;
  padding: 0 14px 10px;
  flex-shrink: 0;
}
.cli-search-icon {
  position: absolute;
  left: 26px; top: 50%; transform: translateY(-60%);
  color: var(--app-text-muted);
  pointer-events: none;
}
.cli-search-input {
  width: 100%; height: 36px;
  border: 1.5px solid var(--app-border);
  border-radius: 10px;
  padding: 0 12px 0 34px;
  font-size: 13px;
  background: var(--app-surface);
  color: var(--app-text);
  box-sizing: border-box;
}
.cli-search-input:focus { outline: none; border-color: var(--accent); }
.cli-ftabs {
  display: flex;
  gap: 5px;
  padding: 0 14px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.cli-ftabs::-webkit-scrollbar { display: none; }
.cli-ftab {
  padding: 4px 12px;
  border-radius: 20px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  background: var(--app-surface-2);
  color: var(--app-text-subtle);
  transition: background .13s, color .13s;
}
.cli-ftab.ativo { background: var(--accent); color: #fff; }
.cli-ftab:hover:not(.ativo) { background: var(--app-border); }
.cli-cards {
  flex: 1;
  overflow-y: auto;
  padding: 2px 14px 6px;
  scrollbar-width: thin;
}
.cli-card {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1.5px solid var(--app-border);
  background: var(--app-surface);
  margin-bottom: 7px;
  cursor: pointer;
  transition: border-color .13s, background .13s;
}
.cli-card:hover { border-color: var(--accent); }
.cli-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.cli-avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--grad-chip);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
}
.cli-card-body { flex: 1; min-width: 0; }
.cli-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.cli-card-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--app-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.cli-card-rs {
  font-size: 11px;
  color: var(--app-text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cli-card-meta {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}
.cli-meta-item {
  font-size: 11px;
  color: var(--app-text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}
.cli-badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.cli-badge-positivado { background: #d1f5e3; color: #1a7a44; }
.cli-badge-apositivar { background: #e8f0fb; color: #1a56cc; }
.cli-badge-emrisco    { background: #fff3cd; color: #856404; }
.cli-badge-inativo    { background: #fde8e8; color: #c0392b; }
.cli-pag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid var(--app-border);
  flex-shrink: 0;
}
/* Empty state */
.cli-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
}
/* Detail panel */
.cli-detalhe-wrap {
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.cli-det-hdr {
  background: var(--grad-sidebar);
  padding: 18px 18px 14px;
  flex-shrink: 0;
  position: relative;
}
.cli-det-hdr-top {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.cli-det-avatar {
  width: 50px; height: 50px;
  border-radius: 14px;
  background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: 18px;
  flex-shrink: 0;
}
.cli-det-nome {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: 16px;
  color: #fff;
  line-height: 1.2;
}
.cli-det-cnpj {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  margin-top: 3px;
}
.cli-det-menu {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  border: none;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
}
.cli-det-menu:hover { background: rgba(255,255,255,.18); }
.cli-det-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cli-det-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,.13);
  color: #fff;
}
.cli-det-badge-ok { background: rgba(26,156,89,.45); }
.cli-det-badge-warn { background: rgba(180,120,20,.45); }
/* Action row */
.cli-det-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--app-border);
  flex-shrink: 0;
}
.cli-act-novo {
  flex: 1;
  height: 38px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: opacity .13s;
}
.cli-act-novo:hover { opacity: .87; }
.cli-act-icon {
  width: 48px; height: 38px;
  border: 1.5px solid var(--app-border);
  border-radius: 10px;
  background: transparent;
  color: var(--app-text-subtle);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: border-color .13s, color .13s;
  flex-shrink: 0;
}
.cli-act-icon:hover { border-color: var(--accent); color: var(--accent); }
.cli-act-icon:disabled { opacity: .35; cursor: default; pointer-events: none; }
.cli-act-icon span { font-size: 9px; font-weight: 600; }
/* Detail tabs */
.cli-dtabs {
  display: flex;
  border-bottom: 2px solid var(--app-border);
  padding: 0 16px;
  flex-shrink: 0;
}
.cli-dtab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--app-text-subtle);
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  transition: color .13s;
}
.cli-dtab.ativo { color: var(--accent); border-bottom-color: var(--accent); }
.cli-dtab-body {
  flex: 1;
  overflow-y: auto;
}
.cli-dtab-panel { display: none; padding: 16px; }
.cli-dtab-panel.ativo { display: block; }
/* KPI grid */
.cli-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cli-kpi-card {
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 13px 14px;
  background: var(--app-surface);
}
.cli-kpi-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  margin-bottom: 8px;
}
.cli-kpi-val {
  font-weight: 800;
  font-size: 17px;
  color: var(--app-text);
  line-height: 1;
}
.cli-kpi-label {
  font-size: 11.5px;
  color: var(--app-text-subtle);
  margin-top: 4px;
}
/* Contato & Endereço (Resumo) */
.cli-contato-section {
  margin-top: 16px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--app-surface);
}
.cli-contato-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 10px;
}
.cli-contato-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--app-border);
}
.cli-contato-row:first-of-type { border-top: none; }
.cli-contato-icon { color: var(--app-text-muted); flex-shrink: 0; display: flex; }
.cli-contato-label { font-size: 13px; color: var(--app-text-subtle); flex: 1; }
.cli-contato-val { font-size: 13px; font-weight: 700; color: var(--app-text); text-align: right; }
/* Crédito */
.cli-cred-card {
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--app-surface);
  margin-bottom: 10px;
}
.cli-cred-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 12px;
}
.cli-cred-valor-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.cli-cred-valor { font-size: 22px; font-weight: 800; color: var(--app-text); }
.cli-cred-disp  { font-size: 13px; color: var(--app-text-subtle); }
.cli-cred-bar-wrap { height: 6px; border-radius: 4px; background: var(--app-border); margin-bottom: 6px; overflow: hidden; }
.cli-cred-bar-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width .4s; }
.cli-cred-bar-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--app-text-muted); }
.cli-cred-fin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--app-border);
}
.cli-cred-fin-row:first-of-type { border-top: none; }
.cli-cred-fin-icon { color: var(--app-text-muted); flex-shrink: 0; display: flex; }
.cli-cred-fin-label { font-size: 13px; color: var(--app-text-subtle); flex: 1; }
.cli-cred-fin-val { font-size: 13px; font-weight: 700; color: var(--app-text); }
.cli-cred-fin-val.ok  { color: var(--accent); }
.cli-cred-fin-val.bad { color: #c0392b; }
/* Crédito — títulos table */
.cli-tit-scroll { overflow-x: auto; margin-top: 4px; }
.cli-tit-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cli-tit-table th {
  text-align: left; padding: 6px 8px;
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  color: var(--app-text-subtle); border-bottom: 2px solid var(--app-border);
  white-space: nowrap;
}
.cli-tit-table td {
  padding: 7px 8px; border-bottom: 1px solid var(--app-border);
  color: var(--app-text); white-space: nowrap;
}
.cli-tit-table tr:last-child td { border-bottom: none; }
.cli-tit-table tr:hover td { background: var(--app-surface-2); }
/* Resumo — info table */
.cli-info-table {
  border: 1px solid var(--app-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--app-surface);
}
.cli-info-row {
  display: flex; align-items: baseline;
  gap: 10px; padding: 9px 14px;
  border-top: 1px solid var(--app-border);
}
.cli-info-row:first-child { border-top: none; }
.cli-info-label {
  font-size: 12px; color: var(--app-text-subtle);
  min-width: 130px; flex-shrink: 0;
}
.cli-info-val {
  font-size: 13px; font-weight: 600; color: var(--app-text);
  word-break: break-word;
}
/* Endereços */
.cli-end-card {
  border: 1px solid var(--app-border);
  border-radius: 12px; padding: 14px 16px;
  background: var(--app-surface); margin-bottom: 10px;
}
.cli-end-hdr {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.cli-end-apelido {
  font-size: 13px; font-weight: 700; color: var(--app-text); flex: 1;
}
.cli-end-tipo {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; background: var(--accent-soft); color: var(--accent);
  letter-spacing: .05em;
}
.cli-end-row { font-size: 13px; color: var(--app-text); line-height: 1.5; }
.cli-end-sub { font-size: 12px; color: var(--app-text-subtle); }

/* ── Histórico ─────────────────────────────────── */
.cli-hist-card {
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-surface);
  margin-bottom: 8px;
  overflow: hidden;
}
.cli-hist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.cli-hist-row:hover { background: rgba(0,0,0,.025); }
.cli-hist-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cli-hist-info { flex: 1; min-width: 0; }
.cli-hist-num  { font-size: 13px; font-weight: 700; color: var(--app-text); }
.cli-hist-meta { font-size: 11px; color: var(--app-text-subtle); margin-top: 1px; }
.cli-hist-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.cli-hist-val  { font-size: 13px; font-weight: 700; color: var(--app-text); }
.cli-hist-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 20px;
}
.cli-hist-badge-faturado { background: var(--accent-soft); color: var(--accent); }
.cli-hist-badge-entregue { background: #e8f5e9; color: #388e3c; }
.cli-hist-badge-cancelado { background: #fdecea; color: #c0392b; }
.cli-hist-badge-neutro    { background: var(--app-border); color: var(--app-text-subtle); }
.cli-hist-chev {
  flex-shrink: 0;
  background: none; border: none; padding: 2px 4px; cursor: pointer;
  color: var(--app-text-subtle); display: flex; align-items: center;
  border-radius: 6px; transition: background .15s;
}
.cli-hist-chev:hover { background: var(--app-border); }

/* Itens expandidos */
.cli-hist-itens { background: var(--app-bg); border-top: 1px solid var(--app-border); }
.cli-hist-item-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--app-border);
}
.cli-hist-item-row:last-child { border-bottom: none; }
.cli-hist-item-ico {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 15px;
}
.cli-hist-item-info { flex: 1; min-width: 0; }
.cli-hist-item-name {
  font-size: 13px; font-weight: 600; color: var(--app-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cli-hist-item-sub  { font-size: 11px; color: var(--app-text-subtle); margin-top: 1px; }
.cli-hist-item-tot  { font-size: 13px; font-weight: 700; color: var(--app-text); flex-shrink: 0; }

/* Rodapé do pedido expandido */
.cli-hist-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-top: 1px solid var(--app-border);
  background: var(--app-surface);
}
.cli-hist-btn-repetir {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent-soft); color: var(--accent);
  border: none; border-radius: 8px; padding: 7px 14px;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s;
}
.cli-hist-btn-repetir:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.cli-hist-footer-total { font-size: 13px; font-weight: 700; color: var(--app-text); }
.cli-hist-empty { font-size: 13px; color: var(--app-text-subtle); padding: 12px 14px; }

/* ── Produtos split layout ──────────────────────────────────────────────────── */
.prod-split {
  display: flex;
  height: 100%;
  overflow: hidden;
}
.prod-list-col {
  width: 390px;
  min-width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--app-border);
  overflow: hidden;
}
.prod-detail-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.prod-list-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 10px;
  flex-shrink: 0;
}
.prod-list-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 22px;
  color: var(--app-text);
  line-height: 1.1;
}
.prod-list-sub { font-size: 12px; color: var(--app-text-subtle); margin-top: 2px; }
.prod-hdr-eye {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--app-border);
  background: none;
  color: var(--app-text-subtle);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: border-color .13s, color .13s;
}
.prod-hdr-eye:hover { border-color: var(--accent); color: var(--accent); }

/* Search */
.prod-search-wrap {
  position: relative;
  margin: 0 14px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.prod-search-ico {
  position: absolute;
  left: 12px;
  color: var(--app-text-subtle);
  pointer-events: none;
}
.prod-search-input {
  flex: 1;
  height: 38px;
  padding: 0 10px 0 34px;
  border: 1.5px solid var(--app-border);
  border-radius: 10px;
  background: var(--app-surface);
  font-size: 13px;
  color: var(--app-text);
  outline: none;
  transition: border-color .13s;
  box-sizing: border-box;
}
.prod-search-input:focus { border-color: var(--accent); }
.prod-barcode-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: opacity .13s;
}
.prod-barcode-btn:hover { opacity: .85; }

/* Filter chips */
.prod-ftabs {
  display: flex;
  gap: 5px;
  padding: 0 14px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.prod-ftabs::-webkit-scrollbar { display: none; }
.prod-ftab {
  padding: 4px 13px;
  border-radius: 20px;
  border: 1.5px solid var(--app-border);
  background: none;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  color: var(--app-text-subtle);
  transition: background .13s, color .13s, border-color .13s;
}
.prod-ftab.ativo { background: var(--accent); color: #fff; border-color: var(--accent); }
.prod-ftab:hover:not(.ativo) { background: var(--app-border); }

/* Cards list */
.prod-cards {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px;
}
.prod-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .12s, border-color .12s;
  margin-bottom: 4px;
}
.prod-card:hover { background: var(--app-surface); }
.prod-card.ativo {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.prod-avatar {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -.5px;
}
.prod-card-body { flex: 1; min-width: 0; }
.prod-card-name {
  font-size: 13px; font-weight: 700;
  color: var(--app-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.prod-card-meta {
  font-size: 11px; color: var(--app-text-subtle);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px;
}
.prod-card-meta-row { display: flex; align-items: center; gap: 6px; }
.prod-card-price {
  font-size: 14px; font-weight: 800; color: var(--accent);
}
.prod-card-price-unit { font-size: 11px; font-weight: 600; color: var(--app-text-subtle); }
.prod-card-stock {
  font-size: 11px; font-weight: 600;
  color: var(--app-text-subtle);
  display: flex; align-items: center; gap: 3px;
  margin-left: auto;
  flex-shrink: 0;
}
.prod-card-stock svg { opacity: .6; }
.prod-card-stock .prod-stock-val { transition: opacity .15s; }
.prod-estoque-oculto .prod-card-stock .prod-stock-val { display: none; }
.prod-estoque-oculto .prod-card-stock .prod-stock-dots { display: inline; }
.prod-stock-dots { display: none; letter-spacing: 1px; }
.prod-hdr-eye.olho-fechado {
  border-color: var(--app-border);
  color: var(--app-text-subtle);
}
.prod-badge-promo {
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 20px;
  background: var(--accent-soft); color: var(--accent);
}
.prod-avatar-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.prod-avatar-ini {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  font-size: 14px; font-weight: 800; letter-spacing: -.5px;
}

/* Pagination */
.prod-pag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 14px;
  border-top: 1px solid var(--app-border);
  flex-shrink: 0;
}
.prod-pag-btn {
  width: 28px; height: 28px;
  border: 1.5px solid var(--app-border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--app-text-subtle);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .13s;
}
.prod-pag-btn:disabled { opacity: .35; cursor: default; }
.prod-pag-btn:not(:disabled):hover { border-color: var(--accent); color: var(--accent); }
.prod-pag-info { font-size: 12px; color: var(--app-text-subtle); min-width: 70px; text-align: center; }

/* Empty state */
.prod-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 8px;
  color: var(--app-text-subtle);
  padding: 40px;
  text-align: center;
}
.prod-empty svg { opacity: .25; margin-bottom: 4px; }
.prod-empty strong { font-size: 16px; font-weight: 800; color: var(--app-text); }
.prod-empty p { font-size: 13px; color: var(--app-text-subtle); max-width: 240px; line-height: 1.5; }

/* Detail panel */
.prod-detalhe-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.prod-det-hdr {
  background: var(--grad);
  padding: 28px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.prod-det-icon {
  width: 72px; height: 72px;
  background: rgba(255,255,255,.22);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.9);
  overflow: hidden;
}
.prod-det-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}
.prod-det-nome {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  text-align: center;
  line-height: 1.2;
}
.prod-det-classe {
  font-size: 12px;
  color: rgba(255,255,255,.75);
  text-align: center;
}
.prod-det-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 0;
}

/* Unit tabs */
.prod-unit-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.prod-unit-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--app-border);
  background: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--app-text-subtle);
  cursor: pointer;
  text-align: center;
  transition: border-color .13s, color .13s, background .13s;
}
.prod-unit-tab.ativo {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.prod-unit-tab:hover:not(.ativo) { border-color: var(--accent); color: var(--accent); }

/* Price display */
.prod-det-price-wrap { margin-bottom: 16px; }
.prod-det-price-big {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 30px;
  color: var(--accent);
  line-height: 1;
}
.prod-det-price-unit { font-size: 13px; color: var(--app-text-subtle); margin-top: 2px; }

/* Ficha */
.prod-ficha-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ── Pedidos split layout ───────────────────────────────────────────────────── */
.ped-split {
  display: flex;
  height: 100%;
  overflow: hidden;
}
.ped-split.ped-form-full .ped-list-col {
  width: 0;
  min-width: 0;
  border-right: none;
  overflow: hidden;
}
.ped-list-col {
  width: 390px;
  min-width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--app-border);
  overflow: hidden;
}
.ped-detail-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Header */
.ped-list-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 10px;
  flex-shrink: 0;
}
.ped-list-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 22px;
  color: var(--app-text);
  line-height: 1.1;
}
.ped-list-sub { font-size: 12px; color: var(--app-text-subtle); margin-top: 2px; }
.ped-hdr-plus {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1.5px solid var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background .13s, border-color .13s;
}
.ped-hdr-plus:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: var(--accent); }

/* Filter tabs */
.ped-ftabs {
  display: flex;
  gap: 6px;
  padding: 0 14px 10px;
  flex-shrink: 0;
}
.ped-ftab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--app-border);
  background: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--app-text-subtle);
  cursor: pointer;
  white-space: nowrap;
  transition: all .13s;
}
.ped-ftab.ativo { background: var(--accent); color: #fff; border-color: var(--accent); }
.ped-ftab:hover:not(.ativo) { background: var(--app-border); }
.ped-ftab-count {
  font-size: 11px;
  font-weight: 800;
  min-width: 16px;
  text-align: center;
}

/* Cards */
.ped-cards {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px;
}
.ped-card {
  border: 1.5px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-surface);
  margin-bottom: 6px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .12s;
}
.ped-card:hover { border-color: var(--accent); }
.ped-card.ativo { border-color: var(--accent); background: var(--accent-soft); }
.ped-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.ped-card-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  flex-shrink: 0;
}
.ped-card-body { flex: 1; min-width: 0; }
.ped-card-nome { font-size: 13px; font-weight: 700; color: var(--app-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ped-card-meta { font-size: 11px; color: var(--app-text-subtle); margin-top: 1px; }
.ped-card-badges { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
.ped-card-right { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: 2px; }
.ped-card-valor  { font-size: 13px; font-weight: 700; color: var(--app-text); }
.ped-card-itens  { font-size: 11px; color: var(--app-text-subtle); }
.ped-card-del {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid transparent; background: transparent;
  color: var(--app-text-subtle); cursor: pointer;
  transition: all .15s; margin-top: 2px;
}
.ped-card-del:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }
.ped-card-situacao {
  font-size: 12px; font-weight: 600;
  border-top: 1px solid transparent;
  padding: 6px 14px;
}
.ped-card-sit-rascunho  { background: var(--accent-soft); color: var(--accent);  border-top-color: var(--accent-soft); }
.ped-card-sit-aberto    { background: #f1f5f9; color: #64748b; border-top-color: #e2e8f0; }
.ped-card-sit-fechado   { background: #dbeafe; color: #1d4ed8; border-top-color: #bfdbfe; }
.ped-card-sit-faturado  { background: #dcfce7; color: #15803d; border-top-color: #bbf7d0; }
.ped-card-sit-processo  { background: #fef3c7; color: #b45309; border-top-color: #fde68a; }
.ped-card-sit-cancelado { background: #fee2e2; color: #dc2626; border-top-color: #fecaca; }
.ped-card-sit-bloq      { background: #fef3c7; color: #92400e; border-top-color: #fde68a; }
.ped-card-sit-reprov    { background: #fee2e2; color: #be123c; border-top-color: #fecaca; }
.ped-card-sit-neutro    { background: var(--app-border); color: var(--app-text-subtle); }

/* Status badges */
.ped-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 7px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 3px;
}
.ped-badge-rascunho { background: var(--accent-soft); color: var(--accent); }
.ped-badge-aberto   { background: #f1f5f9; color: #64748b; }
.ped-badge-fechado  { background: #dbeafe; color: #1d4ed8; }
.ped-badge-faturado { background: #dcfce7; color: #15803d; }
.ped-badge-processo { background: #fef3c7; color: #b45309; }
.ped-badge-cancelado{ background: #fee2e2; color: #dc2626; }
.ped-badge-bloq     { background: #fef3c7; color: #92400e; }
.ped-badge-reprov   { background: #fee2e2; color: #be123c; }
.ped-badge-erro     { background: #fef3c7; color: #92400e; }
.ped-badge-neutro   { background: var(--app-border); color: var(--app-text-subtle); }

/* Pagination */
.ped-pag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 14px;
  border-top: 1px solid var(--app-border);
  flex-shrink: 0;
}
.ped-pag-btn {
  width: 28px; height: 28px;
  border: 1.5px solid var(--app-border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--app-text-subtle);
  display: flex; align-items: center; justify-content: center;
}
.ped-pag-btn:disabled { opacity: .35; cursor: default; }
.ped-pag-info { font-size: 12px; color: var(--app-text-subtle); min-width: 80px; text-align: center; }

/* Empty state */
.ped-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 8px; color: var(--app-text-subtle); padding: 40px; text-align: center;
}
.ped-empty svg { opacity: .25; margin-bottom: 4px; }
.ped-empty strong { font-size: 16px; font-weight: 800; color: var(--app-text); }
.ped-empty p { font-size: 13px; color: var(--app-text-subtle); max-width: 280px; line-height: 1.5; }

/* Detail panel */
.ped-detalhe-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.ped-det-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--app-border);
  flex-shrink: 0;
  background: var(--app-surface);
}
.ped-tbtn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid var(--app-border);
  cursor: pointer;
  transition: all .13s;
}
.ped-tbtn:disabled { opacity: .35; cursor: default; }
.ped-tbtn-salvar  { background: var(--accent); color: #fff; border-color: var(--accent); }
.ped-tbtn-cancel  { background: none; color: var(--app-text-subtle); }
.ped-tbtn-danger  { background: none; color: #c0392b; border-color: #c0392b; }
.ped-tbtn-dark    { background: none; color: var(--app-text-subtle); }
.ped-tbtn-salvar:not(:disabled):hover { opacity: .88; }
.ped-tbtn-cancel:not(:disabled):hover { background: var(--app-border); }
.ped-tbtn-danger:not(:disabled):hover { background: #fdecea; }
.ped-det-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--app-border);
  flex-shrink: 0;
  padding: 0 16px;
}
.ped-det-tab {
  padding: 10px 16px;
  font-size: 13px; font-weight: 600;
  border: none; background: none;
  color: var(--app-text-subtle);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .13s, border-color .13s;
}
.ped-det-tab.ativo { color: var(--accent); border-bottom-color: var(--accent); }
.ped-det-panel { display: none; flex: 1; overflow-y: auto; }
.ped-det-panel.ativo { display: block; }

/* ── Pedidos resumo ─────────────────────────────────────────────────────────── */
.ped-rsm-wrap {
  display: flex; flex-direction: column; height: 100%; overflow-y: auto;
}
.ped-rsm-cli-card {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 14px; border-bottom: 1px solid var(--app-border);
  flex-shrink: 0;
}
.ped-rsm-cli-avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.ped-rsm-cli-info { flex: 1; min-width: 0; }
.ped-rsm-cli-nome { font-size: 14px; font-weight: 700; color: var(--app-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ped-rsm-cli-cnpj { font-size: 12px; color: var(--app-text-subtle); margin-top: 1px; }
.ped-rsm-cli-badge { flex-shrink: 0; }
.ped-rsm-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700;
}
.ped-rsm-badge svg { flex-shrink: 0; }
.ped-rsm-badge-aberto    { background: #f1f5f9; color: #64748b; }
.ped-rsm-badge-fechado   { background: #dbeafe; color: #1d4ed8; }
.ped-rsm-badge-faturado  { background: #dcfce7; color: #15803d; }
.ped-rsm-badge-processo  { background: #fef3c7; color: #b45309; }
.ped-rsm-badge-cancelado { background: #fee2e2; color: #dc2626; }
.ped-rsm-badge-bloq      { background: #fef3c7; color: #92400e; }
.ped-rsm-badge-reprov    { background: #fee2e2; color: #be123c; }
.ped-rsm-badge-neutro    { background: var(--app-border); color: var(--app-text-subtle); }
.ped-rsm-err {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 16px 0; padding: 9px 12px; border-radius: 10px;
  background: #fef2f2; color: #dc2626; font-size: 12.5px; font-weight: 600;
  flex-shrink: 0;
}
.ped-rsm-config {
  padding: 10px 16px; border-bottom: 1px solid var(--app-border); flex-shrink: 0;
}
.ped-rsm-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--app-border);
  font-size: 13px;
}
.ped-rsm-row:last-child { border-bottom: none; }
.ped-rsm-row-ico { color: var(--app-text-subtle); flex-shrink: 0; display: flex; }
.ped-rsm-row-label { color: var(--app-text-subtle); flex: 1; }
.ped-rsm-row-val { font-weight: 600; color: var(--app-text); text-align: right; }
.ped-rsm-itens-sec { flex: 1; overflow-y: auto; padding-bottom: 8px; }
.ped-rsm-itens-title {
  font-size: 11px; font-weight: 700; color: var(--app-text-subtle); letter-spacing: .06em;
  padding: 14px 16px 8px;
}
.ped-rsm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--app-border);
}
.ped-rsm-item:last-of-type { border-bottom: none; }
.ped-rsm-item-avatar-wrap { flex-shrink: 0; }
.ped-rsm-item-avatar, .ped-rsm-item-img {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; object-fit: cover;
}
.ped-rsm-item-body { flex: 1; min-width: 0; }
.ped-rsm-item-nome { font-size: 13px; font-weight: 600; color: var(--app-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ped-rsm-item-sub  { font-size: 12px; color: var(--app-text-subtle); margin-top: 1px; }
.ped-rsm-item-total { font-size: 13px; font-weight: 700; color: var(--app-text); white-space: nowrap; }
.ped-rsm-empty { padding: 24px 16px; text-align: center; color: var(--app-text-subtle); font-size: 13px; }
.ped-rsm-total-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-top: 1.5px solid var(--app-border);
  font-size: 13.5px; font-weight: 600; color: var(--app-text);
}
.ped-rsm-total-val { font-size: 17px; font-weight: 800; color: var(--accent); }
.ped-rsm-footer {
  padding: 12px 16px 16px; flex-shrink: 0; border-top: 1px solid var(--app-border);
}
.ped-rsm-btn {
  width: 100%; height: 46px; border-radius: 12px; border: none;
  font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .13s;
}
.ped-rsm-btn:disabled { opacity: .5; cursor: not-allowed; }
.ped-rsm-btn-primary   { background: var(--accent-gradient, var(--accent)); color: #fff; }
.ped-rsm-btn-primary:hover:not(:disabled) { opacity: .88; }
.ped-rsm-btn-secondary { background: var(--app-surface-2); color: var(--app-text); border: 1.5px solid var(--app-border-strong); }
.ped-rsm-btn-secondary:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.ped-rsm-footer-btns { display: flex; flex-direction: column; gap: 8px; }
.ped-rsm-footer-btns .ped-rsm-btn { width: 100%; }

/* ── Pedidos wizard ─────────────────────────────────────────────────────────── */
.ped-wiz-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.ped-wiz-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 12px;
  flex-shrink: 0;
}
.ped-wiz-back {
  width: 32px; height: 32px;
  border: 1.5px solid var(--app-border);
  border-radius: 9px;
  background: none;
  color: var(--app-text-subtle);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: border-color .13s, color .13s;
}
.ped-wiz-back:hover { border-color: var(--accent); color: var(--accent); }
.ped-wiz-hdr-text { flex: 1; min-width: 0; }
.ped-wiz-eyebrow {
  font-size: 10px; font-weight: 800;
  letter-spacing: .12em; color: var(--accent);
  margin-bottom: 2px;
}
.ped-wiz-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 20px;
  color: var(--app-text);
  line-height: 1.1;
}
.ped-wiz-cancel {
  background: none; border: none;
  color: var(--app-text-subtle); font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 4px 8px; border-radius: 8px;
  transition: color .13s, background .13s;
  flex-shrink: 0;
}
.ped-wiz-cancel:hover { color: var(--app-text); background: var(--app-border); }

/* Steps progress bar */
.ped-wiz-steps {
  display: flex;
  gap: 5px;
  padding: 0 20px 14px;
  flex-shrink: 0;
}
.ped-wiz-step {
  flex: 1; height: 3px;
  border-radius: 3px;
  background: var(--app-border);
  transition: background .2s;
}
.ped-wiz-step.ativo { background: var(--accent); }

/* Search */
.ped-wiz-search-wrap {
  position: relative;
  margin: 0 16px 12px;
  flex-shrink: 0;
}
.ped-wiz-search-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--app-text-subtle); pointer-events: none;
}
.ped-wiz-search-input {
  width: 100%; height: 42px;
  padding: 0 14px 0 36px;
  border: 1.5px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-surface);
  font-size: 14px; color: var(--app-text);
  outline: none; box-sizing: border-box;
  transition: border-color .13s;
}
.ped-wiz-search-input:focus { border-color: var(--accent); }

/* Client list */
.ped-wiz-lista {
  flex: 1; overflow-y: auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ped-wiz-cli {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--app-border);
  border-radius: 14px;
  background: var(--app-surface);
  cursor: pointer;
  transition: border-color .13s, background .13s;
}
.ped-wiz-cli:hover { border-color: var(--accent); }
.ped-wiz-cli.selecionado {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ped-wiz-cli-avatar {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  flex-shrink: 0;
}
.ped-wiz-cli-body { flex: 1; min-width: 0; }
.ped-wiz-cli-nome { font-size: 14px; font-weight: 700; color: var(--app-text); }
.ped-wiz-cli-cnpj { font-size: 12px; color: var(--app-text-subtle); margin-top: 1px; }
.ped-wiz-cli-status { margin-top: 5px; }

/* Status dots */
.wiz-dot { font-size: 11px; font-weight: 700; }
.wiz-dot-ok      { color: #2e7d32; }
.wiz-dot-risco   { color: #c0392b; }
.wiz-dot-pendente{ color: #f59f00; }
.wiz-dot-inativo { color: var(--app-text-subtle); }

/* Radio button */
.ped-wiz-cli-radio {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--app-border-strong);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.ped-wiz-cli-radio.checked {
  background: var(--accent);
  border-color: var(--accent);
}
.ped-wiz-cli-radio.checked::after {
  content: '';
  width: 6px; height: 10px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}

/* Footer */
.ped-wiz-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--app-border);
  flex-shrink: 0;
}
.ped-wiz-continuar {
  width: 100%; height: 50px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px; font-weight: 800;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 10px 24px rgba(46,139,126,.28);
  transition: opacity .13s, transform .1s;
}
.ped-wiz-continuar:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.ped-wiz-continuar:disabled { opacity: .35; cursor: default; box-shadow: none; }

/* ── Wizard step 2 ─────────────────────────────────────────────────────────── */
.ped-wiz2-content {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 0 16px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.ped-wiz2-cli-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: var(--app-surface);
  border: 1.5px solid var(--app-border);
  border-radius: 16px;
  flex-shrink: 0;
}
.ped-wiz2-cli-avatar {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
  flex-shrink: 0;
}
.ped-wiz2-cli-info { flex: 1; min-width: 0; }
.ped-wiz2-cli-nome { font-size: 14px; font-weight: 700; color: var(--app-text); }
.ped-wiz2-cli-cnpj { font-size: 12px; color: var(--app-text-subtle); margin-top: 1px; }
.ped-wiz2-cred-badge {
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px; font-weight: 700;
  color: var(--accent);
  white-space: nowrap; flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
}
.ped-wiz2-cred-badge--negativo {
  background: #fef2f2; border-color: #fca5a5; color: #dc2626;
}
.ped-wiz2-rows-card {
  background: var(--app-surface);
  border: 1.5px solid var(--app-border);
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.ped-wiz2-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  cursor: pointer;
  transition: background .13s;
}
.ped-wiz2-row:hover { background: var(--accent-soft); }
.ped-wiz2-sep { height: 1px; background: var(--app-border); margin: 0 14px; }
.ped-wiz2-row-ico {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ped-wiz2-row-body { flex: 1; min-width: 0; }
.ped-wiz2-row-label { font-size: 11px; font-weight: 600; color: var(--app-text-subtle); margin-bottom: 2px; }
.ped-wiz2-row-value { font-size: 14px; font-weight: 700; color: var(--app-text); }
.ped-wiz2-v { font-size: 13px; font-weight: 600; color: var(--app-text); text-align: right; flex-shrink: 0; max-width: 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ped-wiz2-row > svg:last-child { color: var(--app-text-subtle); flex-shrink: 0; }
.ped-wiz2-obs-card {
  background: var(--app-surface);
  border: 1.5px solid var(--app-border);
  border-radius: 14px;
  padding: 14px 16px;
  flex-shrink: 0;
}
.ped-wiz2-obs-hdr {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.ped-wiz2-obs-input {
  display: block; width: 100%;
  border: none; outline: none; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--app-text);
  font-family: inherit; resize: none; line-height: 1.5;
  padding: 0; min-height: 48px;
}
.ped-wiz2-obs-input::placeholder { font-weight: 400; color: var(--app-text-subtle); }
.ped-wiz2-row-inline { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.ped-wiz2-desc-input {
  width: 90px; height: 36px; padding: 0 10px;
  border: 1.5px solid var(--app-border-strong); border-radius: 8px;
  background: var(--app-surface-2); color: var(--app-text);
  font-size: 14px; font-weight: 600; outline: none;
  transition: border-color .13s;
}
.ped-wiz2-desc-input:focus { border-color: var(--accent); }
.ped-wiz2-desc-pct { font-size: 14px; font-weight: 700; color: var(--app-text-muted); }
.ped-wiz2-info-note {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(46,139,126,.25);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px; color: var(--app-text); line-height: 1.5;
}
.ped-wiz2-info-note > svg { color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* ── Wizard step 3 — itens ─────────────────────────────────────────────────── */
.ped-wiz3-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 6px;
  flex-shrink: 0;
}
.ped-wiz3-count {
  font-size: 11px; font-weight: 800;
  letter-spacing: .09em; color: var(--app-text-subtle);
}
.ped-wiz3-add-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border: none; border-radius: 20px;
  padding: 7px 14px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .13s;
}
.ped-wiz3-add-btn:hover { background: var(--accent); color: #fff; }

.ped-wiz3-lista {
  flex: 1; overflow-y: auto;
  padding: 0 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.ped-wiz3-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px; color: var(--app-text-subtle);
  font-size: 14px; font-weight: 600;
  gap: 6px;
}
.ped-wiz3-item-card {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 13px 10px;
  background: var(--app-surface);
  border: 1.5px solid var(--app-border);
  border-radius: 14px;
}
.ped-wiz3-item-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.ped-wiz3-item-img { width: 44px; height: 44px; object-fit: cover; }
.ped-wiz3-item-ini {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.ped-wiz3-item-body { flex: 1; min-width: 0; }
.ped-wiz3-item-nome { font-size: 14px; font-weight: 700; color: var(--app-text); line-height: 1.25; }
.ped-wiz3-item-qty  { font-size: 12.5px; color: var(--app-text-subtle); margin-top: 2px; }
.ped-wiz3-item-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.ped-wiz3-item-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--app-surface-2); border: 1px solid var(--app-border);
  border-radius: 6px; padding: 2px 7px;
  font-size: 11px; font-weight: 600; color: var(--app-text-subtle);
}
.ped-wiz3-item-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0;
}
.ped-wiz3-item-valor { font-size: 14px; font-weight: 800; color: var(--app-text); }
.ped-wiz3-item-actions { display: flex; gap: 6px; }
.ped-wiz3-act {
  width: 30px; height: 30px; border-radius: 8px; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .12s, color .12s;
}
.ped-wiz3-act-edit { background: var(--accent-soft); color: var(--accent); }
.ped-wiz3-act-edit:hover { background: var(--accent); color: #fff; }
.ped-wiz3-act-del  { background: #fff0f0; color: #c0392b; }
.ped-wiz3-act-del:hover { background: #c0392b; color: #fff; }

.ped-wiz3-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--app-border);
}
.ped-wiz3-totals {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px 4px;
  font-size: 13px;
}
.ped-wiz3-totals span { color: var(--app-text-subtle); font-weight: 600; }
.ped-wiz3-totals strong { color: var(--app-text); font-weight: 800; font-size: 15px; }
.ped-wiz3-footer .ped-wiz-footer { border-top: none; padding-top: 6px; }

/* ── Wizard step 4 — revisão & envio ─────────────────────────────────────── */
.ped-wiz4-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 0 16px 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.ped-wiz4-body > * { flex-shrink: 0; }
.ped-wiz4-rows-ro .ped-wiz4-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  cursor: default;
}
.ped-wiz4-rows-ro .ped-wiz2-row-ico { pointer-events: none; }
.ped-wiz4-rows-ro:hover { background: var(--app-surface); }
.ped-wiz4-itens {
  background: var(--app-surface);
  border: 1.5px solid var(--app-border);
  border-radius: 14px;
  overflow: hidden;
}
.ped-wiz4-itens-hdr {
  font-size: 11px; font-weight: 800; letter-spacing: .09em;
  color: var(--app-text-subtle);
  padding: 12px 14px 8px;
}
.ped-wiz4-item-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 14px;
  border-top: 1px solid var(--app-border);
}
.ped-wiz4-item-desc {
  flex: 1; min-width: 0;
  font-size: 13px; color: var(--app-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ped-wiz4-item-val {
  font-size: 13px; font-weight: 700; color: var(--app-text); flex-shrink: 0;
}
.ped-wiz4-totals {
  background: var(--app-surface);
  border: 1.5px solid var(--app-border);
  border-radius: 14px;
  overflow: hidden;
  padding: 0 14px;
}
.ped-wiz4-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--app-border);
  font-size: 14px;
}
.ped-wiz4-total-row:last-child { border-bottom: none; }
.ped-wiz4-total-label { color: var(--app-text-subtle); font-weight: 500; }
.ped-wiz4-total-val   { font-weight: 800; color: var(--app-text); }
.ped-wiz4-total-desc  { font-weight: 700; color: #c0392b; }
.ped-wiz4-total-verba { font-weight: 700; color: var(--accent); }
.ped-wiz4-total-row--total { border-top: 2px solid var(--app-border); margin-top: 2px; }
.ped-wiz4-total-row--total .ped-wiz4-total-label { color: var(--app-text); font-weight: 700; font-size: 15px; }
.ped-wiz4-total-grand { font-weight: 800; font-size: 18px; color: var(--accent); }
.ped-wiz4-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--app-border);
  flex-shrink: 0;
}
.ped-wiz4-finalizar {
  width: 100%; height: 52px;
  background: var(--grad);
  color: #fff; border: none; border-radius: 14px;
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(13,148,136,.28);
  transition: opacity .13s, transform .1s;
}
.ped-wiz4-finalizar:hover { opacity: .9; transform: translateY(-1px); }
.ped-wiz4-finalizar:disabled { opacity: .4; cursor: default; box-shadow: none; }

/* ── Seletor de produtos ───────────────────────────────────────────────────── */
.ped-sel-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex; align-items: flex-end;
  z-index: 200;
}
.ped-sel-panel {
  width: 100%; height: 88%;
  background: var(--app-surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -6px 32px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ped-sel-drag {
  width: 36px; height: 4px;
  background: var(--app-border-strong);
  border-radius: 4px;
  margin: 10px auto 4px;
  flex-shrink: 0;
}
.ped-sel-hdr { padding: 4px 20px 10px; flex-shrink: 0; }
.ped-sel-title {
  font-family: var(--font-display);
  font-style: italic; font-weight: 800;
  font-size: 20px; color: var(--app-text);
}
.ped-sel-search-wrap {
  position: relative; margin: 0 14px 8px; flex-shrink: 0;
}
.ped-sel-search-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--app-text-subtle); pointer-events: none;
}
.ped-sel-search {
  width: 100%; height: 44px;
  padding: 0 14px 0 36px;
  border: 1.5px solid var(--app-border-strong);
  border-radius: 14px;
  background: var(--app-surface-2);
  font-size: 14px; color: var(--app-text);
  outline: none; box-sizing: border-box;
  transition: border-color .13s;
}
.ped-sel-search:focus { border-color: var(--accent); }
.ped-sel-info {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 4px 16px 10px;
  font-size: 12px; color: var(--app-text-subtle);
  flex-shrink: 0;
}
.ped-sel-info strong { color: var(--app-text); }
.ped-sel-info-tip { color: var(--app-text-subtle); }
.ped-sel-lista { flex: 1; overflow-y: auto; }
.ped-sel-prod {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--app-border);
  transition: background .12s;
}
.ped-sel-prod:hover { background: var(--accent-soft); }
.ped-sel-prod-ativo {
  box-shadow: inset 0 0 0 2px var(--accent);
  background: var(--accent-soft);
}
.ped-sel-prod-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.ped-sel-prod-img { width: 44px; height: 44px; object-fit: cover; }
.ped-sel-prod-ini {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.ped-sel-prod-body { flex: 1; min-width: 0; }
.ped-sel-prod-nome  { font-size: 13.5px; font-weight: 700; color: var(--app-text); }
.ped-sel-prod-preco { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.ped-sel-prod-vlr   { font-size: 13px; font-weight: 700; color: var(--accent); }
.ped-sel-promo-badge {
  background: #fff0f4; color: #c0392b;
  border-radius: 6px; padding: 1px 6px;
  font-size: 11px; font-weight: 700;
}
.ped-sel-prod-action { flex-shrink: 0; }
.ped-sel-add-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--app-surface-2);
  color: var(--app-text-subtle);
  border: 1.5px solid var(--app-border-strong);
  font-size: 20px; font-weight: 400;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .13s;
}
.ped-sel-add-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.ped-sel-add-count {
  border-radius: 10px; width: auto;
  padding: 0 12px; font-size: 14px; font-weight: 800;
  background: var(--accent); color: #fff; border-color: var(--accent);
  min-width: 52px;
}
.ped-sel-add-count:hover { opacity: .85; }
.ped-sel-prod-cod {
  font-size: 11px; color: var(--app-text-subtle); font-weight: 500;
  margin-right: 6px;
}
.ped-sel-stepper {
  display: flex; align-items: center; gap: 2px;
}
.ped-sel-step-btn {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: #fff; border: none;
  font-size: 18px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: opacity .13s; flex-shrink: 0;
}
.ped-sel-step-btn:hover { opacity: .82; }
.ped-sel-step-minus { background: var(--app-surface-2); color: var(--app-text); border: 1.5px solid var(--app-border-strong); }
.ped-sel-step-minus:hover { background: #fee2e2; color: #dc2626; border-color: #dc2626; }
.ped-sel-step-qtd {
  min-width: 28px; text-align: center;
  font-size: 15px; font-weight: 800; color: var(--accent);
}
.ped-sel-footer {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--app-border);
  flex-shrink: 0;
}
.ped-sel-footer .ped-wiz-continuar { box-shadow: none; }

/* ── Detalhe de item (sobre o seletor) ────────────────────────────────────── */
.ped-di-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.35);
  display: flex; align-items: flex-end;
  z-index: 250;
}
.ped-di-panel {
  width: 100%; max-height: 96%;
  background: var(--app-surface);
  border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: slideUp .22s ease;
}
.ped-di-drag {
  width: 36px; height: 4px;
  background: var(--app-border-strong);
  border-radius: 2px; margin: 10px auto 0; flex-shrink: 0;
}
.ped-di-hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 8px; flex-shrink: 0;
}
.ped-di-back {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--app-border);
  background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--app-text); flex-shrink: 0; transition: background .13s;
}
.ped-di-back:hover { background: var(--app-border); }
.ped-di-hdr-title { font-size: 17px; font-weight: 700; color: var(--app-text); }
.ped-di-body { flex: 1; overflow-y: auto; padding: 0 16px 8px; }
.ped-di-prod-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--app-border); margin-bottom: 16px;
}
.ped-di-prod-avatar {
  width: 48px; height: 48px; border-radius: 10px;
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.ped-di-prod-img { width: 100%; height: 100%; object-fit: cover; }
.ped-di-prod-ini {
  width: 100%; height: 100%; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
}
.ped-di-prod-info { flex: 1; min-width: 0; }
.ped-di-prod-nome {
  font-size: 14px; font-weight: 700; color: var(--app-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ped-di-prod-meta { font-size: 11px; color: var(--app-text-subtle); margin-top: 2px; }
.ped-di-section { margin-bottom: 18px; }
.ped-di-section-label {
  font-size: 13px; font-weight: 700; color: var(--app-text); margin-bottom: 8px;
}
.ped-di-unit-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ped-di-unit-card {
  border: 1.5px solid var(--app-border); border-radius: 10px;
  padding: 8px 10px; cursor: pointer; transition: all .13s;
  background: var(--app-surface);
}
.ped-di-unit-card.ativo { border-color: var(--accent); background: var(--accent-soft); }
.ped-di-unit-card-unid { font-size: 14px; font-weight: 800; color: var(--app-text); }
.ped-di-unit-card-desc { font-size: 11px; color: var(--app-text-subtle); margin-top: 1px; }
.ped-di-unit-card-preco { font-size: 11px; color: var(--accent); font-weight: 600; margin-top: 3px; }
.ped-di-conv-info {
  font-size: 11px; color: var(--app-text-subtle); margin-top: 6px;
  display: flex; align-items: center; gap: 4px;
}
.ped-di-qty-row { display: flex; align-items: center; gap: 8px; }
.ped-di-qty-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--app-border); background: var(--app-surface);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 300; color: var(--app-text); transition: all .13s;
}
.ped-di-qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.ped-di-qty-val {
  min-width: 40px; text-align: center;
  font-size: 22px; font-weight: 800; color: var(--app-text);
}
.ped-di-quick-btns { display: flex; gap: 6px; margin-left: 4px; }
.ped-di-quick {
  padding: 7px 13px; border-radius: 20px;
  border: 1.5px solid var(--app-border); background: var(--app-surface);
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--app-text);
  transition: all .13s;
}
.ped-di-quick:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
/* ── Parâmetros de permissão — estados readonly ─────────────────────────────── */
.ped-wiz2-row--readonly { cursor: default; opacity: .7; }
.ped-wiz2-row--readonly:hover { background: transparent !important; }
.ped-di-lista-cards--readonly .ped-di-lista-card { cursor: default; pointer-events: none; opacity: .75; }
.ped-di-section--readonly { opacity: .55; pointer-events: none; }
.ped-di-locked { font-size: 10px; font-weight: 600; color: #f59e0b; text-transform: uppercase; letter-spacing: .06em; margin-left: 6px; }
.ped-di-negoc-banner {
  display: flex; align-items: center; gap: 8px;
  background: #fffbeb; border: 1px solid #fbbf24; border-radius: 8px;
  padding: 10px 12px; margin-bottom: 16px;
  font-size: 13px; font-weight: 600; color: #92400e;
}
.ped-di-negoc-banner svg { flex-shrink: 0; color: #d97706; }

.ped-di-lista-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ped-di-lista-card {
  border: 1.5px solid var(--app-border); border-radius: 10px;
  padding: 10px 12px; cursor: pointer; transition: all .13s;
  background: var(--app-surface); position: relative;
}
.ped-di-lista-card.ativo { border-color: var(--accent); background: var(--accent-soft); }
.ped-di-lista-check {
  position: absolute; top: 8px; right: 8px;
  color: var(--accent); display: none;
}
.ped-di-lista-card.ativo .ped-di-lista-check { display: block; }
.ped-di-lista-nome { font-size: 12px; font-weight: 700; color: var(--accent); }
.ped-di-lista-preco { font-size: 15px; font-weight: 800; color: var(--app-text); margin-top: 2px; }
.ped-di-lista-min { font-size: 10px; color: var(--app-text-subtle); margin-top: 1px; }
.ped-di-promo-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--app-border); cursor: pointer;
  transition: border-color .13s, background .13s; margin-bottom: 6px;
}
.ped-di-promo-card:last-child { margin-bottom: 0; }
.ped-di-promo-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.ped-di-promo-card.ativo { border-color: var(--accent); background: var(--accent-soft); }
.ped-di-promo-card-ico {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.ped-di-promo-card-body { flex: 1; min-width: 0; }
.ped-di-promo-card-title { font-size: 13px; font-weight: 700; color: var(--app-text); }
.ped-di-promo-card-eco   { font-size: 11px; color: var(--app-text-subtle); margin-top: 1px; }
.ped-di-promo-card-vlr   { font-size: 14px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.ped-di-desc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ped-di-desc-toggle {
  display: flex; border-radius: 8px; overflow: hidden;
  border: 1.5px solid var(--app-border); flex-shrink: 0;
}
.ped-di-desc-toggle-btn {
  padding: 7px 11px; background: none; border: none;
  cursor: pointer; font-size: 13px; font-weight: 700;
  color: var(--app-text-subtle); transition: all .13s;
}
.ped-di-desc-toggle-btn.ativo { background: var(--accent); color: #fff; }
.ped-di-price-input {
  width: 100%; height: 42px; border-radius: 8px;
  border: 1.5px solid var(--app-border);
  padding: 0 12px; font-size: 16px; font-weight: 700;
  color: var(--app-text); background: var(--app-surface);
  outline: none; transition: border-color .13s; box-sizing: border-box;
}
.ped-di-price-input:focus { border-color: var(--accent); }
.ped-di-price-input[readonly] { opacity: .55; cursor: default; }
.ped-di-desc-input {
  flex: 1; height: 38px; border-radius: 8px;
  border: 1.5px solid var(--app-border);
  padding: 0 12px; font-size: 14px; font-weight: 600;
  color: var(--app-text); background: var(--app-surface);
  outline: none; transition: border-color .13s;
}
.ped-di-desc-input:focus { border-color: var(--accent); }
.ped-di-desc-quick-row { display: flex; gap: 6px; }
.ped-di-desc-quick {
  padding: 5px 12px; border-radius: 20px;
  border: 1.5px solid var(--app-border); background: var(--app-surface);
  cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--app-text-subtle); transition: all .13s;
}
.ped-di-desc-quick:hover { border-color: var(--accent); color: var(--accent); }
.ped-di-calc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: var(--app-surface-2);
  border-radius: 10px; font-size: 13px; color: var(--app-text-subtle);
  margin-bottom: 4px;
}
.ped-di-total-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px 4px;
  border-top: 1px solid var(--app-border); margin-top: 8px;
}
.ped-di-total-label { font-size: 14px; font-weight: 700; color: var(--app-text); }
.ped-di-total-val {
  font-size: 20px; font-weight: 900; color: var(--accent);
  font-family: var(--font-display, 'Outfit', 'Nunito', sans-serif);
}
.ped-di-footer {
  padding: 10px 16px 16px;
  border-top: 1px solid var(--app-border); flex-shrink: 0;
}
.ped-di-add-btn {
  width: 100%; padding: 16px; border-radius: 14px; border: none;
  background: var(--grad, linear-gradient(135deg, var(--accent), #0d9f72));
  color: #fff; font-size: 16px; font-weight: 800;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display, 'Outfit', 'Nunito', sans-serif);
  transition: opacity .15s;
}
.ped-di-add-btn:hover { opacity: .9; }
.ped-di-add-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── Picker bottom sheet ───────────────────────────────────────────────────── */
.ped-picker-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.38);
  display: flex; align-items: flex-end;
  z-index: 100;
}
.ped-picker-sheet {
  width: 100%;
  background: var(--app-surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -6px 32px rgba(0,0,0,.15);
  display: flex; flex-direction: column;
  max-height: 70%;
  overflow: hidden;
}
.ped-picker-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--app-border);
  flex-shrink: 0;
}
.ped-picker-title { font-size: 15px; font-weight: 800; color: var(--app-text); }
.ped-picker-close {
  width: 30px; height: 30px;
  border: none; background: var(--app-surface-2);
  border-radius: 50%; cursor: pointer;
  color: var(--app-text-subtle);
  display: flex; align-items: center; justify-content: center;
  transition: background .13s, color .13s;
}
.ped-picker-close:hover { background: var(--app-border); color: var(--app-text); }
.ped-picker-list { overflow-y: auto; padding: 6px 0 16px; }
.ped-picker-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px;
  cursor: pointer; transition: background .12s;
}
.ped-picker-item:hover { background: var(--accent-soft); }
.ped-picker-item.selecionado { background: var(--accent-soft); }
.ped-picker-item-text { flex: 1; font-size: 14px; font-weight: 600; color: var(--app-text); }
.ped-picker-radio {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--app-border-strong);
  flex-shrink: 0; transition: all .15s;
}
.ped-picker-radio.checked { background: var(--accent); border-color: var(--accent); }
.ped-picker-radio.checked::after {
  content: '';
  display: block;
  width: 6px; height: 10px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg) translateY(-1px);
  margin: 2px auto 0;
}

/* ── Calendar date picker ─────────────────────────────────────────────────── */
.ped-cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--app-border);
  flex-shrink: 0;
}
.ped-cal-mes { font-size: 15px; font-weight: 700; color: var(--app-text); }
.ped-cal-prev,
.ped-cal-next {
  width: 34px; height: 34px; border-radius: 10px;
  border: none; background: var(--app-surface-2);
  color: var(--app-text-subtle);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .13s, color .13s;
}
.ped-cal-prev:hover,
.ped-cal-next:hover { background: var(--accent-soft); color: var(--accent); }
.ped-cal-close {
  width: 30px; height: 30px;
  border: none; background: var(--app-surface-2);
  border-radius: 50%; cursor: pointer;
  color: var(--app-text-subtle);
  display: flex; align-items: center; justify-content: center;
  transition: background .13s, color .13s;
}
.ped-cal-close:hover { background: var(--app-border); color: var(--app-text); }
.ped-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 6px 12px 20px; gap: 2px;
}
.ped-cal-hdr {
  text-align: center; padding: 8px 2px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: var(--app-text-subtle);
}
.ped-cal-dia {
  text-align: center; padding: 8px 2px;
  font-size: 13.5px; border: none; background: transparent;
  border-radius: 10px; cursor: pointer;
  transition: background .1s; color: var(--app-text);
  font-family: inherit;
}
.ped-cal-dia:hover { background: var(--accent-soft); color: var(--accent); }
.ped-cal-dia.hoje  { font-weight: 700; color: var(--accent); }
.ped-cal-dia.sel   { background: var(--accent); color: #fff !important; font-weight: 700; }

.prod-ficha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--app-border);
}
.prod-ficha-ico { color: var(--app-text-subtle); display: flex; flex-shrink: 0; }
.prod-ficha-label { font-size: 13px; color: var(--app-text-subtle); flex: 1; }
.prod-ficha-val { font-size: 13px; font-weight: 700; color: var(--app-text); }
.prod-ficha-val.accent { color: var(--accent); }

/* Product sub-tabs */
.prod-stabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 2px solid var(--app-border);
  flex-shrink: 0;
  scrollbar-width: none;
  background: var(--app-surface);
}
.prod-stabs::-webkit-scrollbar { display: none; }
.prod-stab {
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--app-text-subtle);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .13s;
  flex-shrink: 0;
}
.prod-stab.ativo { color: var(--accent); border-bottom-color: var(--accent); }
.prod-stab:hover:not(.ativo) { color: var(--app-text); }
.prod-stab-body { flex: 1; min-height: 0; overflow-y: auto; }
.prod-stab-panel { display: none; padding: 14px 18px; }
.prod-stab-panel.ativo { display: block; }

/* Unit selector in add bar */
.prod-unit-sel-wrap { display: flex; gap: 4px; flex-shrink: 0; }
.prod-unit-sel-btn {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1.5px solid var(--app-border);
  background: none;
  color: var(--app-text-subtle);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .13s, color .13s, background .13s;
}
.prod-unit-sel-btn.ativo { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Product tables */
.prod-tit-scroll { overflow-x: auto; }
.prod-tit-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.prod-tit-table th {
  text-align: left; padding: 6px 8px;
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  color: var(--app-text-subtle); border-bottom: 2px solid var(--app-border); white-space: nowrap;
}
.prod-tit-table td { padding: 7px 8px; border-bottom: 1px solid var(--app-border); color: var(--app-text); white-space: nowrap; }
.prod-tit-table tr:last-child td { border-bottom: none; }
.prod-tit-table tbody tr:hover td { background: var(--app-surface-2); }
.prod-tit-table tbody tr.selected td { background: var(--accent-soft); color: var(--accent); }

/* Mix Ideal sub-tabs */
.prod-mix-tabs {
  display: flex;
  border-bottom: 1px solid var(--app-border);
  margin-bottom: 12px;
}
.prod-mix-tab {
  padding: 8px 14px;
  font-size: 12px; font-weight: 600;
  color: var(--app-text-subtle);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer; white-space: nowrap;
  transition: color .13s;
}
.prod-mix-tab.ativo { color: var(--accent); border-bottom-color: var(--accent); }
.prod-mix-tab:hover:not(.ativo) { color: var(--app-text); }

/* Qty bar + Adicionar */
.prod-add-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--app-border);
  background: var(--app-surface);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.prod-qty-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--app-border);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.prod-qty-btn {
  width: 34px; height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--app-text-subtle);
  display: flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.prod-qty-btn:hover { background: var(--app-border); color: var(--app-text); }
.prod-qty-input {
  width: 44px; height: 38px;
  border: none;
  border-left: 1.5px solid var(--app-border);
  border-right: 1.5px solid var(--app-border);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--app-text);
  background: var(--app-bg);
  outline: none;
}
.prod-add-btn {
  flex: 1;
  height: 42px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .13s;
}
.prod-add-btn:hover { opacity: .88; }
.prod-add-btn:disabled { opacity: .4; cursor: default; }

/* ── Metas ──────────────────────────────────────────────────────────────────── */
.met-header {
  background: linear-gradient(135deg, #0b5231 0%, #1a7a47 55%, #22a85e 100%);
  border-radius: 14px;
  padding: 18px 20px 20px;
  color: #fff;
  margin-bottom: 2px;
}
.met-hdr-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  opacity: .8;
  margin-bottom: 14px;
}
.met-hdr-body {
  display: flex;
  align-items: center;
  gap: 18px;
}
.met-hdr-ring { flex-shrink: 0; }
.met-hdr-info { flex: 1; min-width: 0; }
.met-hdr-val {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2px;
}
.met-hdr-sub {
  font-size: 12px;
  opacity: .78;
  margin-bottom: 10px;
}
.met-hdr-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.met-tag {
  background: rgba(0,0,0,.22);
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
}

/* Tabs */
.met-tabs {
  display: flex;
  border-bottom: 1px solid var(--app-border);
  margin: 0;
}
.met-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 11px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--app-text-subtle);
  cursor: pointer;
  transition: color .13s, border-color .13s;
}
.met-tab.ativo  { color: var(--app-accent); border-bottom-color: var(--app-accent); }
.met-tab:hover:not(.ativo) { color: var(--app-text); }

/* Painéis */
.met-pnl          { display: none; }
.met-pnl.ativo    { display: block; }

/* KPI grid */
.met-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 0 10px;
}
.met-kpi-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 13px 13px 11px;
}
.met-kpi-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.met-kpi-ico  { color: var(--app-text-subtle); line-height: 0; }
.met-kpi-pct  { font-size: 12px; font-weight: 700; }
.met-ok       { color: #1a9c59; }
.met-warn     { color: #d97706; }
.met-low      { color: #dc2626; }
.met-kpi-val  {
  font-size: 17px;
  font-weight: 700;
  color: var(--app-text);
  line-height: 1.2;
  margin-bottom: 2px;
}
.met-kpi-sub  {
  font-size: 10.5px;
  color: var(--app-text-subtle);
  margin-bottom: 8px;
  line-height: 1.3;
}
.met-kpi-bar  {
  height: 4px;
  background: var(--app-border);
  border-radius: 2px;
  overflow: hidden;
}
.met-kpi-bar-fill           { height: 100%; border-radius: 2px; transition: width .4s ease; }
.met-kpi-bar-fill.met-ok    { background: #1a9c59; }
.met-kpi-bar-fill.met-warn  { background: #d97706; }
.met-kpi-bar-fill.met-low   { background: #dc2626; }

/* Histórico */
.met-hist-box {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 14px 14px 10px;
  margin-bottom: 14px;
}
.met-hist-hdr  { margin-bottom: 10px; }
.met-hist-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--app-text-subtle);
}

/* Mix */
.met-mix-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: 14px 14px 10px;
  margin-top: 8px;
}
.met-mix-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--app-accent);
  margin-bottom: 12px;
}
.met-mix-list { display: flex; flex-direction: column; gap: 12px; }
.met-mix-row  { display: flex; flex-direction: column; gap: 5px; }
.met-mix-row-hdr {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.met-mix-desc {
  font-size: 13px;
  font-weight: 600;
  color: var(--app-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.met-mix-num {
  font-size: 12px;
  color: var(--app-text-subtle);
  white-space: nowrap;
  flex-shrink: 0;
}
.met-mix-bar-wrap { height: 7px; background: var(--app-border); border-radius: 4px; overflow: hidden; }
.met-mix-bar-fill { height: 100%; border-radius: 4px; transition: width .5s ease; }

/* Ranking */
.met-rank-list { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.met-rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px;
}
.met-rank-row.voce {
  background: rgba(26,156,89,.07);
  border-color: #1a9c59;
}
.met-rank-pos {
  width: 22px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--app-text-subtle);
  flex-shrink: 0;
}
.met-rank-pos.gold { color: #c8940a; }
.met-rank-avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.met-rank-info { flex: 1; min-width: 0; }
.met-rank-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--app-text);
  display: flex;
  align-items: center;
  gap: 5px;
}
.met-rank-medal { font-size: 14px; line-height: 1; }
.met-rank-val  {
  font-size: 12px;
  color: var(--app-text-subtle);
  margin-top: 1px;
}
.met-rank-badge-voce {
  background: rgba(26,156,89,.12);
  color: #1a9c59;
  border: 1px solid rgba(26,156,89,.3);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ── Agenda ──────────────────────────────────────────────────────────────────── */
.ag-page-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.ag-page-title { font-size: 22px; font-weight: 800; color: var(--app-text); line-height: 1.1; }
.ag-page-date  { font-size: 13px; color: var(--app-text-subtle); margin-top: 2px; }
.ag-cal-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--app-text-subtle);
  transition: background .13s, color .13s;
  flex-shrink: 0;
}
.ag-cal-btn:hover { background: var(--app-surface-2); color: var(--app-text); }
.ag-day-picker {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 14px;
}
.ag-day-btn {
  flex: 1;
  padding: 7px 4px;
  border: 1.5px solid var(--app-border);
  background: var(--app-surface);
  border-radius: 8px;
  font-size: 12px; font-weight: 500;
  color: var(--app-text-subtle);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  text-align: center;
  white-space: nowrap;
}
.ag-day-btn:hover:not(.ativo) { background: var(--app-surface-2); color: var(--app-text); border-color: var(--accent); }
.ag-day-btn.ativo {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(46,139,126,.35);
}
.ag-roteiro-card {
  background: linear-gradient(135deg, var(--up-teal-900) 0%, var(--up-teal-800) 55%, var(--up-teal-600) 100%);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  color: #fff;
}
.ag-roteiro-ring  { flex-shrink: 0; }
.ag-roteiro-info  { flex: 1; }
.ag-roteiro-titulo { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.ag-roteiro-sub   { font-size: 12.5px; opacity: .85; margin-bottom: 10px; }
.ag-roteiro-opt {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff; border-radius: 20px;
  padding: 5px 14px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .13s;
}
.ag-roteiro-opt:hover { background: rgba(255,255,255,.25); }
.ag-list  { display: flex; flex-direction: column; }
.ag-empty { color: var(--app-text-subtle); padding: 24px 0; font-size: 13px; }
.ag-visit-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 5px 0; cursor: pointer;
}
.ag-visit-ico { flex-shrink: 0; padding-top: 14px; line-height: 0; }
.ag-visit-card {
  flex: 1; background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px; padding: 12px 14px;
  transition: border-color .13s;
}
.ag-visit-card:hover    { border-color: var(--accent); }
.ag-visit-card-curr     { border-color: var(--accent); border-width: 1.5px; }
.ag-visit-top {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 5px; flex-wrap: wrap;
}
.ag-visit-hora  { font-size: 13px; font-weight: 700; color: var(--app-text-subtle); }
.ag-curr .ag-visit-hora { color: #0d9488; }
.ag-pend .ag-visit-hora { opacity: .7; }
.ag-visit-badge {
  font-size: 11px; font-weight: 600;
  background: rgba(0,0,0,.06); color: var(--app-text-subtle);
  border-radius: 6px; padding: 2px 7px;
}
.ag-visit-agora {
  font-size: 11px; font-weight: 700;
  background: rgba(13,148,136,.12); color: #0d9488;
  border-radius: 6px; padding: 2px 7px;
}
.ag-visit-nome { font-size: 14px; font-weight: 700; color: var(--app-text); margin-bottom: 3px; }
.ag-visit-loc  {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--app-text-subtle); margin-bottom: 2px;
}
.ag-visit-ped  {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: #1a9c59; margin-top: 4px;
}
.ag-visit-nv   { font-size: 11.5px; color: #d97706; margin-top: 2px; }

/* =======================================================================
   VERBA COMERCIAL
   ======================================================================= */
.vrb-page-hdr    { margin-bottom: 16px; }
.vrb-page-title  { font-size: 20px; font-weight: 800; color: var(--app-text); font-family: var(--font-display); }
.vrb-page-sub    { font-size: 13px; color: var(--app-text-muted); margin-top: 2px; }

.vrb-saldo-card {
  background: linear-gradient(135deg, var(--up-teal-900) 0%, var(--up-teal-800) 50%, var(--up-teal-600) 100%);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  min-height: 120px;
}
.vrb-saldo-body  { flex: 1; z-index: 1; }
.vrb-saldo-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: rgba(255,255,255,.65); text-transform: uppercase; margin-bottom: 6px;
}
.vrb-saldo-valor {
  font-size: 32px; font-weight: 900; color: #fff;
  font-family: var(--font-display); margin-bottom: 14px;
  letter-spacing: -.01em;
}
.vrb-saldo-bar-wrap {
  height: 6px; background: rgba(255,255,255,.2); border-radius: 4px; margin-bottom: 8px;
}
.vrb-saldo-bar-fill {
  height: 100%; background: rgba(255,255,255,.7); border-radius: 4px;
  transition: width .4s var(--ease-out);
}
.vrb-saldo-foot {
  display: flex; justify-content: space-between;
  font-size: 12px; color: rgba(255,255,255,.75); font-weight: 500;
}
.vrb-saldo-deco {
  position: absolute; right: -30px; top: 50%; transform: translateY(-50%);
  width: 140px; height: 140px;
  border-radius: 50%;
  border: 28px solid rgba(255,255,255,.08);
  pointer-events: none;
}

.vrb-sec-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 12px;
}

.vrb-camp-list   { display: flex; flex-direction: column; gap: 10px; }
.vrb-camp-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
}
.vrb-camp-top    { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.vrb-camp-ico {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vrb-camp-info   { flex: 1; min-width: 0; }
.vrb-camp-nome   { font-size: 14px; font-weight: 700; color: var(--app-text); margin-bottom: 6px; }
.vrb-camp-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

.vrb-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
}
.vrb-badge-desc  { background: #fef3c7; color: #92400e; }
.vrb-badge-bonif { background: #dcfce7; color: #166534; }
.vrb-badge-fixa  { background: #ede9fe; color: #5b21b6; }

.vrb-badge-date {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: #d97706;
}

.vrb-camp-sep {
  height: 1px; background: var(--app-border); margin-bottom: 12px;
}
.vrb-camp-prog-hdr {
  display: flex; justify-content: space-between;
  font-size: 12px; margin-bottom: 6px;
}
.vrb-camp-prog-label { color: var(--app-text-muted); font-weight: 500; }
.vrb-camp-prog-val   { color: var(--app-text); font-weight: 700; }
.vrb-camp-bar-wrap {
  height: 6px; background: var(--app-surface-2); border-radius: 4px;
}
.vrb-camp-bar-fill {
  height: 100%; background: var(--accent); border-radius: 4px;
  transition: width .4s var(--ease-out);
}

/* =======================================================================
   NÃO VENDA
   ======================================================================= */
.nv-page-hdr        { margin-bottom: 22px; }
.nv-page-hdr--tabs  { margin-bottom: 0; padding-bottom: 12px; }
.nv-page-title { font-size: 22px; font-weight: 800; color: var(--app-text); font-family: var(--font-display); font-style: italic; }
.nv-page-sub   { font-size: 13px; color: var(--app-text-muted); margin-top: 3px; }

.nv-tabs {
  display: flex;
  border-bottom: 2px solid var(--app-border);
  margin-bottom: 24px;
}
.nv-tab {
  background: none; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 8px 18px;
  font-size: 13px; font-weight: 600;
  color: var(--app-text-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.nv-tab:hover { color: var(--accent); }
.nv-tab.ativo { color: var(--accent); border-bottom-color: var(--accent); }

.nv-lista-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.nv-lista-nav-label { font-size: 14px; font-weight: 600; color: var(--app-text); }
.nv-lista-nav-btn {
  background: none; border: 1px solid var(--app-border);
  border-radius: 6px; padding: 4px 10px;
  font-size: 16px; color: var(--accent);
  cursor: pointer; transition: background .15s;
}
.nv-lista-nav-btn:hover:not(:disabled) { background: var(--accent-soft); }
.nv-lista-nav-btn:disabled { opacity: .35; cursor: default; }

.nv-lista-grid { display: flex; flex-direction: column; gap: 8px; }
.nv-lista-row {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
}
.nv-lista-row-main {
  display: flex; align-items: baseline;
  justify-content: space-between; gap: 8px;
  margin-bottom: 3px;
}
.nv-lista-cli  { font-size: 14px; font-weight: 600; color: var(--app-text); }
.nv-lista-hora { font-size: 12px; color: var(--app-text-muted); white-space: nowrap; }
.nv-lista-motivo { font-size: 12px; color: var(--accent); font-weight: 500; }
.nv-lista-obs  { font-size: 12px; color: var(--app-text-muted); margin-top: 4px; }
.nv-lista-vazia {
  text-align: center; padding: 48px 0;
  color: var(--app-text-muted); font-size: 14px;
}

.nv-section     { margin-bottom: 22px; }
.nv-sec-label   { font-size: 13px; font-weight: 600; color: var(--app-text); margin-bottom: 10px; }

/* ── Cliente selector ── */
.nv-cli-selector {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: var(--app-surface);
  border: 1.5px solid var(--app-border);
  border-radius: 12px; padding: 13px 16px;
  cursor: pointer; text-align: left;
  transition: border-color .15s;
}
.nv-cli-selector:hover,
.nv-cli-selector:focus-visible { border-color: var(--accent); outline: none; }
.nv-cli-selector.tem-cli { border-color: var(--accent); }
.nv-cli-ico         { color: var(--app-text-subtle); flex-shrink: 0; line-height: 0; }
.nv-cli-label       { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.nv-cli-placeholder { color: var(--app-text-subtle); font-size: 14px; }
.nv-cli-nome        { color: var(--app-text); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-cli-clear {
  background: none; border: none; color: var(--app-text-subtle); cursor: pointer;
  line-height: 0; padding: 2px; border-radius: 50%; flex-shrink: 0;
  transition: color .1s;
}
.nv-cli-clear:hover { color: #ef4444; }
.nv-cli-arrow  { color: var(--app-text-subtle); flex-shrink: 0; line-height: 0; }

.nv-cli-search {
  display: none; flex-direction: column; gap: 6px;
  background: var(--app-surface);
  border: 1.5px solid var(--accent);
  border-top: none; border-radius: 0 0 12px 12px;
  padding: 10px;
  margin-top: -3px;
}
.nv-cli-search.aberto { display: flex; }
.nv-cli-input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--app-border);
  border-radius: 8px; font-size: 13.5px;
  background: var(--app-surface-2); color: var(--app-text);
  font-family: inherit;
}
.nv-cli-input:focus { outline: none; border-color: var(--accent); }
.nv-cli-results    { max-height: 340px; overflow-y: auto; }
.nv-cli-result {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; cursor: pointer; border-radius: 10px;
  transition: background .1s;
}
.nv-cli-result:hover { background: var(--app-surface-sunk); }
.nv-cli-avatar {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
  font-family: var(--font-display); letter-spacing: .02em;
}
.nv-cli-result-info { flex: 1; min-width: 0; }
.nv-cli-result-name { font-size: 14px; font-weight: 700; color: var(--app-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-cli-result-sub  { font-size: 11.5px; color: var(--app-text-muted); margin-top: 2px; }
.nv-cli-loading,
.nv-cli-empty  { font-size: 12.5px; color: var(--app-text-muted); padding: 10px 8px; }

/* ── Motivo cards ── */
.nv-motivos-list  { display: flex; flex-direction: column; gap: 8px; }
.nv-motivo-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--app-surface);
  border: 1.5px solid var(--app-border);
  border-radius: 12px; cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.nv-motivo-card:hover { border-color: var(--accent); }
.nv-motivo-card.ativo {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.nv-motivo-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--app-border-strong);
  flex-shrink: 0; position: relative;
  transition: border-color .15s;
}
.nv-motivo-card.ativo .nv-motivo-radio { border-color: var(--accent); }
.nv-motivo-card.ativo .nv-motivo-radio::after {
  content: ''; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--accent);
}
.nv-motivo-txt { font-size: 14px; color: var(--app-text); font-weight: 500; }

/* ── Obs ── */
.nv-obs {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--app-border);
  border-radius: 12px; font-size: 14px;
  background: var(--app-surface); color: var(--app-text);
  resize: vertical; min-height: 80px; font-family: inherit;
  transition: border-color .15s;
}
.nv-obs:focus { outline: none; border-color: var(--accent); }

/* ── Foto ── */
.nv-foto-btn {
  width: 100%; padding: 14px 16px;
  border: 1.5px dashed var(--app-border-strong);
  border-radius: 12px; background: none;
  color: var(--app-text-muted); font-size: 14px; font-family: inherit;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 9px;
  margin-bottom: 20px;
  transition: border-color .15s, color .15s;
}
.nv-foto-btn:hover { border-color: var(--accent); color: var(--accent); }
.nv-foto-btn.tem-foto { border-style: solid; border-color: var(--accent); color: var(--accent); }

/* ── Submit ── */
.nv-submit-btn {
  width: 100%; padding: 16px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 14px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: var(--font-display);
  transition: background .15s, opacity .15s;
  margin-bottom: 24px; letter-spacing: .01em;
}
.nv-submit-btn:hover:not(:disabled) { background: var(--accent-deep); }
.nv-submit-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Sucesso ── */
.nv-sucesso {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 48px 24px;
  gap: 12px;
}
.nv-sucesso-ico   { color: var(--accent); line-height: 0; }
.nv-sucesso-titulo { font-size: 20px; font-weight: 800; color: var(--app-text); font-family: var(--font-display); }
.nv-sucesso-sub    { font-size: 14px; color: var(--app-text-muted); margin-bottom: 12px; }

/* ── Pré-Cadastro ──────────────────────────────────────────────────────────── */
.pc-page-hdr {
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--app-border);
  margin-bottom: 20px;
}
.pc-page-hdr--tabs {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 12px;
}

/* Abas */
.pc-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--app-border);
  margin-bottom: 24px;
}
.pc-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--app-text-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.pc-tab:hover { color: var(--accent); }
.pc-tab.ativo { color: var(--accent); border-bottom-color: var(--accent); }

/* Lista de pré-cadastros */
.pc-lista-grid { display: flex; flex-direction: column; gap: 8px; }
.pc-lista-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  transition: border-color .15s;
}
.pc-lista-row:hover { border-color: var(--accent-soft); }
.pc-lista-razao-nome { font-size: 14px; font-weight: 600; color: var(--app-text); display: block; }
.pc-lista-razao-fan  { font-size: 12px; color: var(--app-text-muted); display: block; margin-top: 1px; }
.pc-lista-cnpj { font-size: 12px; color: var(--app-text-muted); white-space: nowrap; }
.pc-lista-badges { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.pc-lista-dt { font-size: 12px; color: var(--app-text-muted); white-space: nowrap; }
.pc-lista-vazia {
  text-align: center;
  padding: 48px 0;
  color: var(--app-text-muted);
  font-size: 14px;
}
.pc-lista-pag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--app-border);
}
.pc-lista-pag-info { font-size: 13px; color: var(--app-text-muted); }
.pc-lista-pag-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pc-lista-pag-btn:hover { background: var(--accent); color: #fff; }
.pc-page-title {
  font-size: 22px; font-weight: 800;
  color: var(--app-text); font-family: var(--font-display);
  font-style: italic;
}
.pc-page-sub {
  font-size: 13px; color: var(--app-text-muted);
  margin-top: 2px;
}

/* ── Campos ── */
.pc-section { margin-bottom: 16px; }
.pc-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--app-text-muted); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 6px;
}
.pc-req { color: var(--accent); }
.pc-input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--app-border);
  border-radius: var(--r-control);
  background: var(--app-surface);
  color: var(--app-text); font-size: 15px;
  font-family: var(--font-body);
  box-sizing: border-box;
  transition: border-color .15s;
}
.pc-input:focus { outline: none; border-color: var(--accent); }
.pc-input::placeholder { color: var(--app-text-muted); }
.pc-input-err { border-color: #ef4444 !important; }

/* ── Par de inputs lado a lado ── */
.pc-row2 { display: flex; gap: 12px; }

/* ── Segmento chips ── */
.pc-seg-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 2px;
}
.pc-seg-btn {
  padding: 7px 14px;
  border: 1.5px solid var(--app-border);
  border-radius: 999px;
  background: var(--app-surface);
  color: var(--app-text-muted);
  font-size: 13px; font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.pc-seg-btn:hover { border-color: var(--accent); color: var(--accent); }
.pc-seg-btn.ativo {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* ── Info box ── */
.pc-info-box {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(46,139,126,.08);
  border: 1px solid rgba(46,139,126,.22);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--accent);
  font-size: 13px; line-height: 1.5;
  margin-bottom: 20px;
}
.pc-info-box svg { flex-shrink: 0; margin-top: 1px; }

/* ── Botão submit ── */
.pc-submit-btn {
  width: 100%; padding: 16px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 14px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: var(--font-display);
  transition: background .15s, opacity .15s;
  margin-bottom: 24px; letter-spacing: .01em;
}
.pc-submit-btn:hover:not(:disabled) { background: var(--accent-deep); }
.pc-submit-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Erro ── */
.pc-erro-box {
  background: #fef2f2; border: 1px solid #fecaca;
  color: #b91c1c; border-radius: 10px;
  padding: 12px 14px; font-size: 13px;
  margin-bottom: 12px;
}

/* ── Sucesso ── */
.pc-sucesso {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 48px 24px;
  gap: 12px;
}
.pc-sucesso-ico   { color: var(--accent); line-height: 0; }
.pc-sucesso-titulo { font-size: 20px; font-weight: 800; color: var(--app-text); font-family: var(--font-display); }
.pc-sucesso-sub    { font-size: 14px; color: var(--app-text-muted); }
.pc-sucesso-aviso  { font-size: 12px; color: var(--app-text-muted); margin-bottom: 12px; }

/* ── Pré-Cadastro: novos blocos ─────────────────────────────────────────────── */

/* Select condição de pagamento */
.pc-select {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--app-border);
  border-radius: var(--r-control);
  background: var(--app-surface);
  color: var(--app-text); font-size: 15px;
  font-family: var(--font-body);
  box-sizing: border-box;
  cursor: pointer;
  appearance: auto;
  transition: border-color .15s;
}
.pc-select:focus { outline: none; border-color: var(--accent); }

/* Divisor entre seções */
.pc-section-divider {
  border: none;
  border-top: 1px solid var(--app-border);
  margin: 8px 0 16px;
}

/* CEP row: input + botão */
.pc-cep-row {
  display: flex; gap: 8px; align-items: stretch;
}
.pc-cep-btn {
  flex-shrink: 0; width: 44px; height: 44px;
  border: 1.5px solid var(--app-border);
  border-radius: var(--r-control);
  background: var(--app-surface);
  color: var(--app-text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s, background .15s;
}
.pc-cep-btn:hover { border-color: var(--accent); color: var(--accent); }
.pc-cep-btn.pc-cep-btn-busy { opacity: .6; pointer-events: none; }

/* CNPJ row: input + botão Consultar */
.pc-cnpj-row {
  display: flex; gap: 8px; align-items: stretch;
}
.pc-cnpj-row .pc-input { flex: 1; }
.pc-cnpj-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 14px; height: 44px;
  border: 1.5px solid var(--accent);
  border-radius: var(--r-control);
  background: transparent;
  color: var(--accent);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  cursor: pointer; transition: background .15s, color .15s;
}
.pc-cnpj-btn:hover { background: var(--accent); color: #fff; }
/* Mensagem de erro inline abaixo do campo CNPJ */
.pc-cnpj-err-msg {
  display: none;
  margin-top: 5px;
  font-size: 12px; color: #e53e3e; font-weight: 500;
}
.pc-cnpj-err-msg.visivel { display: block; }

.pc-cnpj-confirm {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: #555;
}
.pc-cnpj-confirm.visivel { display: flex; }
.pc-cnpj-confirm button {
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pc-cnpj-confirm button:hover { background: var(--accent); color: #fff; }

/* IE + Isento */
.pc-ie-row {
  display: flex; gap: 12px; align-items: center;
}
.pc-isento-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--app-text-muted);
  cursor: pointer; white-space: nowrap;
  flex-shrink: 0;
}
.pc-isento-chk { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.pc-input-disabled { opacity: .55; background: var(--app-surface) !important; }

/* ── Pré-Cadastro: select de cidade (herda estilo do pc-select) ─────────────── */
.pc-cid-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; cursor: pointer;
  font-size: 14px; color: var(--app-text);
  border-bottom: 1px solid var(--app-border);
  transition: background .1s;
}
.pc-cid-item:last-child { border-bottom: none; }
.pc-cid-item:hover { background: var(--accent-soft); }
.pc-cid-uf {
  font-size: 11px; font-weight: 700;
  color: var(--accent); background: rgba(46,139,126,.1);
  border-radius: 4px; padding: 2px 6px;
  flex-shrink: 0;
}
.pc-cid-loading, .pc-cid-empty {
  padding: 12px 14px; font-size: 13px;
  color: var(--app-text-muted); text-align: center;
}

/* ── Importar Pedido ──────────────────────────────────────────────────────── */
.ip-wrap {
  max-width: 640px; margin: 0 auto;
  padding: 28px 20px 40px;
  display: flex; flex-direction: column; gap: 24px;
}
.ip-header { display: flex; flex-direction: column; gap: 4px; }
.ip-titulo {
  font-family: var(--font-display); font-style: italic;
  font-weight: 800; font-size: 22px;
  color: var(--app-text); margin: 0;
}
.ip-subtitulo { font-size: 13px; color: var(--app-text-subtle); margin: 0; }

/* Steps */
.ip-steps {
  display: flex; align-items: center; gap: 0;
}
.ip-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--app-text-muted);
}
.ip-step--ativo { color: var(--accent); }
.ip-step--ativo .ip-step-num {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.ip-step-num {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--app-border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  background: var(--app-surface); color: var(--app-text-muted);
  flex-shrink: 0;
}
.ip-step-line { flex: 1; height: 2px; background: var(--app-border); margin: 0 8px; }

/* Card */
.ip-card {
  background: var(--app-surface);
  border: 1.5px solid var(--app-border);
  border-radius: 18px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}

/* Drop zone */
.ip-dropzone {
  border: 2px dashed var(--app-border-strong);
  border-radius: 14px;
  padding: 40px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
  transition: border-color .15s, background .15s;
  cursor: pointer; position: relative;
}
.ip-dropzone:hover,
.ip-dropzone--over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ip-dropzone--com-arquivo {
  padding-bottom: 24px;
}
.ip-file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.ip-drop-icon { color: var(--app-text-muted); line-height: 0; }
.ip-dropzone--over .ip-drop-icon,
.ip-dropzone:hover .ip-drop-icon { color: var(--accent); }
.ip-drop-title { font-size: 15px; font-weight: 700; color: var(--app-text); }
.ip-drop-sub   { font-size: 13px; color: var(--app-text-muted); }

.ip-btn-escolher {
  position: relative; z-index: 1;
  background: var(--app-surface-2);
  border: 1.5px solid var(--app-border-strong);
  border-radius: 10px;
  padding: 8px 20px;
  font-size: 13px; font-weight: 700;
  color: var(--app-text);
  cursor: pointer;
  transition: border-color .13s, background .13s;
}
.ip-btn-escolher:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.ip-formatos { font-size: 12px; color: var(--app-text-muted); margin-top: 4px; }

/* Arquivo selecionado */
.ip-arquivo-info {
  display: flex; align-items: center; gap: 12px;
  background: var(--app-surface-2);
  border: 1.5px solid var(--app-border);
  border-radius: 12px;
  padding: 12px 14px;
}
.ip-arquivo-detalhes { flex: 1; min-width: 0; }
.ip-arquivo-nome {
  font-size: 14px; font-weight: 700; color: var(--app-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ip-arquivo-meta { font-size: 12px; color: var(--app-text-muted); margin-top: 2px; }
.ip-btn-remover {
  background: transparent; border: none; cursor: pointer;
  color: var(--app-text-muted); padding: 4px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: color .13s, background .13s;
}
.ip-btn-remover:hover { color: #ef4444; background: #fef2f2; }

/* Erro */
.ip-erro {
  display: flex; align-items: flex-start; gap: 8px;
  background: #fef2f2; border: 1.5px solid #fca5a5;
  border-radius: 10px; padding: 10px 14px;
  font-size: 13px; color: #dc2626;
}
.ip-erro svg { flex-shrink: 0; margin-top: 1px; }

/* Footer */
.ip-footer { display: flex; justify-content: flex-end; }
.ip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 24px;
  border-radius: 12px; border: none;
  font-size: 14px; font-weight: 700;
  cursor: pointer; transition: opacity .15s, transform .1s;
}
.ip-btn:disabled { opacity: .45; cursor: not-allowed; }
.ip-btn--primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 4px 14px rgba(13,148,136,.28);
}
.ip-btn--primary:not(:disabled):hover { opacity: .88; }
.ip-btn--primary:not(:disabled):active { transform: scale(.97); }
.ip-btn--secondary {
  background: var(--app-surface-2);
  border: 1.5px solid var(--app-border-strong);
  color: var(--app-text);
}
.ip-btn--secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Step done */
.ip-step--done { color: var(--accent); }
.ip-step--done .ip-step-num {
  background: var(--accent); color: #fff; border-color: var(--accent);
  font-size: 11px;
}

/* Seção de revisão */
.ip-rev-secao { display: flex; flex-direction: column; gap: 10px; }
.ip-rev-secao-titulo {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--app-text-muted);
}
.ip-rev-badge {
  margin-left: auto; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
}
.ip-rev-badge--ok   { background: #f0fdf4; color: #15803d; }
.ip-rev-badge--warn { background: #fffbeb; color: #92400e; }
.ip-rev-badge--err  { background: #fef2f2; color: #dc2626; }
.ip-rev-vazio { font-size: 13px; color: var(--app-text-muted); padding: 16px 0; }

/* Cards de cliente */
.ip-rev-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--app-border);
  background: var(--app-surface);
}
.ip-rev-card--ok  { border-color: #86efac; background: #f0fdf4; }
.ip-rev-card--warn { border-color: #fcd34d; background: #fffbeb; }
.ip-rev-card-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ip-rev-card--ok   .ip-rev-card-icon { background: #dcfce7; color: #15803d; }
.ip-rev-card--warn .ip-rev-card-icon { background: #fef3c7; color: #92400e; }
.ip-rev-card-body { flex: 1; min-width: 0; }
.ip-rev-card-title { font-size: 14px; font-weight: 700; color: var(--app-text); }
.ip-rev-card-sub   { font-size: 12px; color: var(--app-text-subtle); margin-top: 3px; line-height: 1.5; }

/* Itens de revisão */
.ip-rev-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid var(--app-border);
  background: var(--app-surface);
  margin-bottom: 6px;
}
.ip-rev-item:last-child { margin-bottom: 0; }
.ip-rev-item--ok   { border-color: #bbf7d0; }
.ip-rev-item--warn { border-color: #fde68a; }
.ip-rev-item-status {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ip-rev-item-status--ok   { background: #dcfce7; color: #15803d; }
.ip-rev-item-status--warn { background: #fef3c7; color: #92400e; }
.ip-rev-item-body { flex: 1; min-width: 0; }
.ip-rev-item-nome { font-size: 13px; font-weight: 600; color: var(--app-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-rev-item-sub  { font-size: 11px; color: var(--app-text-muted); margin-top: 2px; }
.ip-rev-item-qtd  { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; flex-shrink: 0; }

/* Footer com dois botões */
.ip-footer { display: flex; justify-content: space-between; gap: 10px; }
