/* ============================================================
   MAAZAR — Design System
   Paleta: Navy #0D1B3E, Ciano #00C2FF, Roxo #B347EA, Branco
   Fonte: Poppins
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* --- Tokens ------------------------------------------------ */
:root {
  --navy:        #0D1B3E;
  --navy-mid:    #162650;
  --navy-light:  #1E3366;
  --cyan:        #00C2FF;
  --purple:      #B347EA;
  --grad:        linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);

  --bg:          #F0F2F8;
  --surface:     #FFFFFF;
  --surface-2:   #F5F7FC;
  --border:      #DDE2F0;
  --ink:         #0D1B3E;
  --muted:       #6B748A;

  --good:        #0EA472;
  --good-bg:     #E6F9F1;
  --warning:     #C07A00;
  --warning-bg:  #FFF4DC;
  --danger:      #C0392B;
  --danger-bg:   #FDECEA;
  --info:        #0070C9;
  --info-bg:     #E5F1FF;

  --radius:      10px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 4px rgba(13,27,62,.07);
  --shadow:      0 4px 20px rgba(13,27,62,.10);
  --shadow-lg:   0 8px 40px rgba(13,27,62,.14);

  --sidebar-w:   260px;
}

/* ============================================================
   MODO NOTURNO
   ============================================================ */
[data-theme="dark"] {
  --navy:        #00C2FF;
  --navy-mid:    #1a2a4a;
  --navy-light:  #243558;
  --cyan:        #00C2FF;
  --purple:      #B347EA;
  --grad:        linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);

  --bg:          #0f1520;
  --surface:     #1a2235;
  --surface-2:   #1f2a40;
  --border:      #2a3850;
  --ink:         #e8edf5;
  --muted:       #8899b4;

  --good:        #2ecc71;
  --good-bg:     #0d2b1a;
  --warning:     #f39c12;
  --warning-bg:  #2b1f05;
  --danger:      #e74c3c;
  --danger-bg:   #2b0d0a;
  --info:        #3498db;
  --info-bg:     #0a1e2b;

  --shadow-sm:   0 1px 4px rgba(0,0,0,.3);
  --shadow:      0 4px 20px rgba(0,0,0,.4);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.5);
}

[data-theme="dark"] .sidebar {
  background: #111827;
}
[data-theme="dark"] .topbar {
  background: #1a2235;
  border-color: #2a3850;
}
[data-theme="dark"] .auth-card {
  background: #1a2235;
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #111827;
  border-color: #2a3850;
  color: #e8edf5;
}
[data-theme="dark"] .list-item,
[data-theme="dark"] .order-card,
[data-theme="dark"] .panel {
  background: #1a2235;
  border-color: #2a3850;
}
[data-theme="dark"] .nav-button:hover,
[data-theme="dark"] .nav-button.active {
  background: rgba(0,194,255,.15);
}

/* Botão de tema no topbar */
#themeToggleBtn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .18s;
}
#themeToggleBtn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ============================================================
   VIEWS — só a active-view é visível
   ============================================================ */
.view { display: none !important; }
.view.active-view { display: block !important; }



/* --- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,p { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

/* --- Helpers ----------------------------------------------- */
.hidden { display: none !important; }
.muted  { color: var(--muted); font-size: .85rem; }

/* ============================================================
   AUTH SCREEN
   ============================================================ */
.auth-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--navy);
  background-image:
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(0,194,255,.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 20%, rgba(179,71,234,.18) 0%, transparent 70%);
}

.auth-screen.hidden,
.app-shell.hidden { display: none; }

.auth-card {
  width: min(440px, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px;
  text-align: center;
}

.auth-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-card img {
  display: block;
  width: 220px;
  height: auto;
  margin: 0 auto 24px;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--navy);
}

.auth-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--navy);
}

.auth-card > p { color: var(--muted); margin-bottom: 4px; font-size: .9rem; }

/* form elements stay left-aligned inside centered card */
.auth-card form,
.auth-card label,
.auth-card .auth-tabs {
  text-align: left;
}

.auth-message {
  min-height: 20px;
  margin-top: 10px;
  font-weight: 600;
  font-size: .88rem;
  color: var(--danger);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 4px;
}

.auth-tab {
  min-height: 38px;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  transition: all .2s;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

/* password strength */
.password-strength { display: grid; gap: 5px; margin-top: -4px; }
.strength-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.strength-track span {
  display: block; width: 25%; height: 100%;
  border-radius: 999px;
  background: var(--danger);
  transition: width .25s ease, background .25s ease;
}
.password-strength strong { color: var(--muted); font-size: .8rem; }
.password-strength.medium .strength-track span { width: 60%; background: var(--warning); }
.password-strength.strong  .strength-track span { width: 100%; background: var(--good); }

/* ============================================================
   APP SHELL — LAYOUT
   ============================================================ */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0,1fr);
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--navy);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand-mark {
  width: 180px;
  height: 60px;
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* logo já é branca, sem filtro */
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 12px;
  flex: 1;
}

/* nav section label */
.nav-section {
  padding: 12px 10px 4px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255,255,255,.65);
  text-align: left;
  font-size: .88rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.nav-button .icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 7px;
  font-size: 1rem;
  background: transparent;
  color: rgba(255,255,255,.45);
  transition: background .15s, color .15s;
}

.nav-button:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}
.nav-button:hover .icon { color: var(--cyan); }

.nav-button.active {
  background: rgba(0,194,255,.14);
  color: #fff;
  font-weight: 600;
}
.nav-button.active .icon {
  background: var(--grad);
  color: #fff;
}

.submenu-button {
  padding-left: 20px;
  font-size: .84rem;
  color: rgba(255,255,255,.5);
}
.submenu-button.active { color: #fff; }

/* sidebar bottom */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}

/* ============================================================
   MAIN
   ============================================================ */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-title { flex: 1; }

.eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2px;
}

.topbar h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

/* subscription badge */
.subscription-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: default;
  transition: all .3s;
}
.subscription-badge::before { content: "⏳"; font-size: .8rem; }
.subscription-badge.ok      { background: var(--good-bg);    color: var(--good);    border: 1px solid #a3dfc8; }
.subscription-badge.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #f0c97a; }
.subscription-badge.urgent  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid #f5b7b1; animation: pulse-badge 1.8s ease-in-out infinite; }
@keyframes pulse-badge { 0%,100%{opacity:1} 50%{opacity:.55} }

/* ============================================================
   CONTENT AREA
   ============================================================ */
.content { padding: 24px 28px; flex: 1; }


/* ============================================================
   BUTTONS
   ============================================================ */
.primary-button,
.secondary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .88rem;
  transition: all .18s;
  white-space: nowrap;
}

.primary-button {
  background: var(--grad);
  color: #fff;
  border: none;
  box-shadow: 0 2px 12px rgba(0,194,255,.25);
}
.primary-button:hover { opacity: .88; box-shadow: 0 4px 18px rgba(0,194,255,.35); }

.secondary-button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.secondary-button:hover { background: var(--surface-2); border-color: var(--muted); }

.ghost-button {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
.ghost-button:hover { background: rgba(255,255,255,.18); }

.text-button {
  background: transparent;
  color: var(--cyan);
  padding: 0;
  min-height: auto;
}

/* topbar logout */
#logoutButton {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .82rem;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
}
#logoutButton:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }

/* ============================================================
   FORMS
   ============================================================ */
form { display: grid; gap: 14px; }

label {
  display: grid;
  gap: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}

input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,194,255,.14);
}
input:focus::placeholder, textarea:focus::placeholder { color: transparent; }
input[readonly] { background: var(--surface-2); color: var(--muted); font-weight: 600; }

.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-check  { display: flex; align-items: center; gap: 8px; }
.inline-check input { width: 16px; height: 16px; }

/* ============================================================
   PANELS & CARDS
   ============================================================ */
.panel, .form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.wide-panel { min-height: 500px; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-header h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--navy); }

h2 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 16px; }

.split-layout {
  display: grid;
  grid-template-columns: minmax(300px,.85fr) minmax(0,1.35fr);
  gap: 20px;
  align-items: start;
}

/* ============================================================
   DASHBOARD METRICS
   ============================================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  transition: box-shadow .2s, transform .2s;
}
.metric-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.metric-card span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}

/* accent lines on metric cards */
.metric-card:nth-child(1) { border-top: 3px solid var(--good); }
.metric-card:nth-child(2) { border-top: 3px solid var(--cyan); }
.metric-card:nth-child(3) { border-top: 3px solid var(--danger); }
.metric-card:nth-child(4) { border-top: 3px solid var(--purple); }

/* ============================================================
   SHORTCUT CARDS (DASHBOARD)
   ============================================================ */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.shortcut-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-align: left;
  font-weight: 600;
  transition: all .18s;
}
.shortcut-card:hover {
  border-color: var(--cyan);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.shortcut-card span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0,194,255,.12), rgba(179,71,234,.12));
  color: var(--cyan);
  font-size: 1.2rem;
}

/* ============================================================
   CHART
   ============================================================ */
.chart-panel { box-shadow: var(--shadow-sm); }
.monthly-chart { display: grid; gap: 14px; }
.chart-row {
  display: grid;
  grid-template-columns: 68px minmax(0,1fr) 100px;
  align-items: center;
  gap: 10px;
  font-size: .83rem;
}
.chart-bars { display: grid; gap: 5px; }
.chart-track { height: 11px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.chart-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.chart-fill.income  { background: linear-gradient(90deg, var(--good), #2DD38F); }
.chart-fill.expense { background: linear-gradient(90deg, var(--danger), #E87070); }

/* ============================================================
   LISTS / TABLE-LIKE ITEMS
   ============================================================ */
.item-list, .table-list, .timeline, .card-grid, .kanban { display: grid; gap: 10px; }

.list-item, .service-card, .timeline-item, .kanban-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 14px 16px;
  transition: box-shadow .18s;
}
.list-item:hover, .service-card:hover { box-shadow: var(--shadow-sm); }

.list-item {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
}
.list-item strong, .service-card strong, .timeline-item strong { display: block; margin-bottom: 3px; font-weight: 600; }
.list-item p, .service-card p, .timeline-item p { margin: 0; color: var(--muted); font-size: .85rem; }

.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.icon-button {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: grid; place-items: center;
  transition: all .15s;
}
.icon-button:hover { border-color: var(--cyan); color: var(--cyan); background: var(--info-bg); }

/* ============================================================
   SERVICE CARDS & PICKER
   ============================================================ */
.card-grid { grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); }

.service-card { display: grid; gap: 8px; }
.price { color: var(--cyan); font-weight: 700; }

.service-picker { display: grid; gap: 8px; }
.service-options {
  display: grid; gap: 6px;
  max-height: 180px;
  overflow: auto;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px;
}
.service-options:empty { display: none; }
.service-option {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  padding: 8px 10px;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 600;
  text-align: left;
}
.service-option:hover, .service-option.active {
  background: linear-gradient(135deg, rgba(0,194,255,.06), rgba(179,71,234,.06));
  border-color: var(--cyan);
}
.service-option span:last-child { color: var(--cyan); }

.selected-services { display: grid; gap: 8px; margin-top: 10px; }
.selected-service {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto auto 34px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 9px 12px;
  font-size: .88rem;
  font-weight: 600;
}
.selected-service-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-service-field { display: flex; flex-direction: column; gap: 2px; }
.selected-service-label { font-size: .72rem; font-weight: 600; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.selected-service-total { color: var(--cyan); font-weight: 700; white-space: nowrap; text-align: right; }
.quantity-input { min-width: 0; width: 64px; padding: 6px 8px; text-align: center; }
.price-input   { min-width: 0; width: 90px; padding: 6px 8px; text-align: right; }
.price-custom-tag { font-size: .68rem; font-weight: 700; color: var(--warning, #f59e0b); background: #fef3c7; border-radius: 4px; padding: 1px 5px; font-style: normal; }

@media (max-width: 540px) {
  .selected-service {
    grid-template-columns: minmax(0,1fr) 34px;
    grid-template-rows: auto auto;
  }
  .selected-service-name { grid-column: 1; grid-row: 1; }
  .selected-service .icon-button { grid-column: 2; grid-row: 1; }
  .selected-service-field:nth-of-type(1) { grid-column: 1; grid-row: 2; }
  .selected-service-field:nth-of-type(2) { grid-column: 1; grid-row: 2; justify-self: end; }
  .selected-service-total { grid-column: 1; grid-row: 3; }
}


/* quote totals */
.quote-totals {
  display: grid;
  grid-template-columns: minmax(0,1fr) 90px minmax(0,1fr) minmax(0,1fr);
  gap: 12px;
  align-items: end;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: .74rem;
  font-weight: 700;
  text-transform: capitalize;
  background: var(--surface-2);
  color: var(--muted);
}
.badge.pago, .badge.aprovado, .badge.concluido {
  background: var(--good-bg); color: var(--good);
}
.badge.pendente, .badge.solicitado {
  background: var(--warning-bg); color: var(--warning);
}
.badge.vencido, .badge.recusado, .badge.cancelado {
  background: var(--danger-bg); color: var(--danger);
}
.badge.agendado {
  background: var(--info-bg); color: var(--info);
}
.badge.andamento {
  background: linear-gradient(135deg,rgba(0,194,255,.1),rgba(179,71,234,.1));
  color: var(--purple);
}

/* ============================================================
   CALENDAR
   ============================================================ */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  gap: 5px;
  margin-bottom: 16px;
}
.calendar-day, .calendar-head {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 6px;
  font-size: .8rem;
}
.calendar-head {
  min-height: auto;
  background: var(--navy);
  color: rgba(255,255,255,.7);
  font-weight: 700;
  text-align: center;
  font-size: .74rem;
  letter-spacing: .04em;
}
.calendar-day { cursor: pointer; transition: border-color .15s; }
.calendar-day:hover { border-color: var(--cyan); }
.calendar-day.has-event {
  border-color: var(--cyan);
  background: rgba(0,194,255,.06);
}
.calendar-day.active {
  border-color: var(--purple);
  box-shadow: 0 0 0 1.5px var(--purple);
}
.calendar-events { display: grid; gap: 2px; margin-top: 4px; }
.calendar-event {
  border-radius: 4px;
  background: linear-gradient(90deg,rgba(0,194,255,.18),rgba(179,71,234,.18));
  color: var(--navy);
  padding: 2px 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .68rem;
  font-weight: 700;
}

/* ============================================================
   STATUS BOARD
   ============================================================ */
.status-board {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}
.status-board div {
  min-height: 88px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: var(--surface);
}
.status-board span { color: var(--muted); font-size: .82rem; }
.status-board strong { display: block; margin-top: 10px; font-size: 1.6rem; font-weight: 700; color: var(--navy); }

/* ============================================================
   KANBAN
   ============================================================ */
.kanban { grid-template-columns: repeat(4,minmax(180px,1fr)); align-items: start; }
.kanban-column {
  display: grid; gap: 8px;
  min-height: 240px;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px;
}
.kanban-column h3 { margin: 0 0 4px; font-size: .86rem; font-weight: 700; color: var(--muted); }
.kanban-card { display: grid; gap: 6px; }

/* ============================================================
   COMPANY PREVIEW
   ============================================================ */
.company-preview { display: grid; gap: 12px; }
.logo-preview {
  display: grid;
  place-items: center;
  width: 120px;
  height: 80px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 700;
  overflow: hidden;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }

/* ============================================================
   SEARCH / COMPACT INPUTS
   ============================================================ */
.search-input, .compact-select { max-width: 220px; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-size: .9rem;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  right: 20px; bottom: 20px;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  transition: opacity .2s ease, transform .2s ease;
  font-size: .88rem;
  font-weight: 600;
  z-index: 999;
}
.toast.visible { transform: translateY(0); opacity: 1; }

/* ============================================================
   ACTION BUTTON (generic)
   ============================================================ */
.action-button {
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: .84rem;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s;
}
.action-button:hover { border-color: var(--cyan); color: var(--cyan); }

/* ============================================================
   RELATÓRIOS
   ============================================================ */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.report-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all .18s;
  text-align: left;
}
.report-card:hover {
  border-color: var(--cyan);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.report-card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,194,255,.14), rgba(179,71,234,.14));
  font-size: 1.4rem;
}
.report-card h3 { font-size: .95rem; font-weight: 700; color: var(--navy); margin: 0; }
.report-card p  { font-size: .8rem; color: var(--muted); margin: 0; }

.report-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}
.report-filters label { min-width: 140px; flex: 1; }
.report-filters .primary-button { align-self: flex-end; min-height: 40px; }

.report-result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.report-result h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--navy); }

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.report-table th {
  padding: 9px 14px;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.report-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}
.report-table tbody tr:last-child td { border-bottom: none; }
.report-table tbody tr:hover { background: var(--surface-2); }

.report-summary {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(0,194,255,.06), rgba(179,71,234,.06));
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.report-summary-item { display: flex; flex-direction: column; gap: 2px; }
.report-summary-item span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.report-summary-item strong { font-size: 1.2rem; font-weight: 700; color: var(--navy); }

/* ============================================================
   ADMIN SUBSCRIPTIONS PANEL
   ============================================================ */
.adm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.adm-title    { font-size: 1.3rem; font-weight: 800; color: var(--navy); margin: 0 0 4px; }
.adm-subtitle { font-size: .84rem; color: var(--muted); margin: 0; }

.adm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(140px,1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.adm-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adm-stat--green  { background: var(--good-bg);    border-color: #a3dfc8; }
.adm-stat--yellow { background: var(--warning-bg); border-color: #f0c97a; }
.adm-stat--red    { background: var(--danger-bg);  border-color: #f5b7b1; }
.adm-stat__value  { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--navy); }
.adm-stat__label  { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.adm-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.adm-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.adm-table thead tr { background: var(--navy); }
.adm-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(255,255,255,.65);
}
.adm-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.adm-table tbody tr:last-child td { border-bottom: none; }
.adm-table tbody tr:hover { background: var(--surface-2); }
.adm-email { font-weight: 600; color: var(--navy); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-plan {
  background: linear-gradient(135deg,rgba(0,194,255,.12),rgba(179,71,234,.12));
  color: var(--purple);
  font-size: .72rem; font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: capitalize;
}
.adm-date { color: var(--muted); font-size: .83rem; }

.adm-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.adm-btn {
  padding: 5px 12px;
  border-radius: 7px;
  font-size: .78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all .15s;
}
.adm-btn:hover { background: var(--surface-2); border-color: var(--muted); }
.adm-btn--danger  { background: var(--danger-bg);  color: var(--danger);  border-color: #f5b7b1; }
.adm-btn--danger:hover  { background: #fbd0cc; }
.adm-btn--success { background: var(--good-bg);    color: var(--good);    border-color: #a3dfc8; }
.adm-btn--success:hover { background: #c2f0dc; }
.adm-btn--refresh {
  padding: 9px 18px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: var(--radius);
}
.adm-btn--refresh:hover { opacity: .88; }

.adm-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.adm-badge--active  { background: var(--good-bg);    color: var(--good); }
.adm-badge--warning { background: var(--warning-bg); color: var(--warning); }
.adm-badge--urgent  { background: var(--danger-bg);  color: var(--danger); }
.adm-badge--expired { background: var(--surface-2);  color: var(--muted); }
.adm-badge--blocked { background: var(--danger-bg);  color: var(--danger); border: 1px solid #f5b7b1; }

.adm-loading, .adm-empty {
  padding: 48px;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}

/* ============================================================
   MOBILE — BOTTOM NAV (≤ 768px)
   ============================================================ */
/* ============================================================
   MOBILE — BOTTOM NAV + DRAWER (≤ 768px)
   ============================================================ */

/* topbar: logo mobile hidden by default */
.topbar-mobile-logo { display: none; }

/* sidebar: visível apenas no desktop */
/* Mobile bottom nav e drawer — escondidos por padrão no desktop */
.mobile-bottom-nav { display: none; }
.mobile-drawer { display: none; }
.mobile-drawer-overlay { display: none; }

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  /* Esconde sidebar desktop */
  .sidebar { display: none; }

  .app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    grid-template-columns: 1fr;
  }

  /* Topbar mobile com logo */
  .topbar {
    padding: 10px 14px;
    gap: 10px;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 40;
  }

  .topbar-mobile-logo {
    display: block;
    height: 32px;
    width: auto;
    border-radius: 0;
    background: transparent;
    padding: 0;
    flex-shrink: 0;
  }

  .topbar-title .eyebrow { display: none; }
  .topbar h1 { font-size: 1rem; }

  /* main */
  .main {
    flex: 1;
    padding-bottom: 68px;
  }

  .content { padding: 12px; }

  /* grids */
  .metrics-grid       { grid-template-columns: 1fr 1fr; gap: 10px; }
  .shortcut-grid      { grid-template-columns: 1fr; }
  .split-layout       { grid-template-columns: 1fr; }
  .kanban             { grid-template-columns: 1fr; }
  .quote-totals       { grid-template-columns: 1fr 1fr; }
  .status-board       { grid-template-columns: 1fr; }
  .form-row           { grid-template-columns: 1fr; }
  .adm-stats          { grid-template-columns: 1fr 1fr; }
  .report-grid        { grid-template-columns: 1fr 1fr; }
  .dashboard-grid     { grid-template-columns: 1fr; }
  .dashboard-bottom-grid { grid-template-columns: 1fr; }

  /* ── BOTTOM NAV ── */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 62px;
    background: var(--navy);
    display: none;
    align-items: stretch;
    z-index: 50;
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -4px 24px rgba(13,27,62,.3);
  }

  /* Só aparece quando o app está ativo (não no login) */
  body.app-active .mobile-bottom-nav {
    display: flex;
  }

  .mbn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,.5);
    font-size: .6rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .15s, background .15s;
    padding: 0;
    position: relative;
  }

  .mbn-item::after {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 2px;
    border-radius: 0 0 3px 3px;
    background: var(--grad);
    opacity: 0;
    transition: opacity .2s;
  }

  .mbn-item.active { color: #fff; }
  .mbn-item.active::after { opacity: 1; }

  .mbn-icon {
    font-size: 1.25rem;
    line-height: 1;
    display: block;
  }

  .mbn-label { font-size: .58rem; letter-spacing: .02em; }

  /* ── DRAWER OVERLAY ── */
  .mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13,27,62,.5);
    backdrop-filter: blur(3px);
    z-index: 60;
  }

  /* ── DRAWER ── */
  .mobile-drawer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    max-height: 88vh;
    background: var(--navy);
    border-radius: 20px 20px 0 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.32,1,.23,1);
  }

  .mobile-drawer.open { transform: translateY(0); }

  .mobile-drawer-handle {
    width: 36px; height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,.2);
    margin: 10px auto 0;
    flex-shrink: 0;
  }

  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
  }

  .mobile-drawer-logo {
    height: 28px;
    border-radius: 5px;
    background: transparent;
    padding: 0;
  }

  .mobile-drawer-close {
    width: 30px; height: 30px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    background: transparent;
    color: rgba(255,255,255,.6);
    font-size: .9rem;
    display: grid;
    place-items: center;
    cursor: pointer;
  }

  .mobile-drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mobile-drawer-section {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    padding: 10px 10px 4px;
    display: block;
  }

  .mobile-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255,255,255,.75);
    font-size: .9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background .15s, color .15s;
  }

  .mobile-drawer-item:hover,
  .mobile-drawer-item.active {
    background: rgba(255,255,255,.1);
    color: #fff;
  }

  .mobile-drawer-item span:first-child { font-size: 1.1rem; width: 24px; text-align: center; }

  .mobile-drawer-footer {
    padding: 12px 18px 20px;
    border-top: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
  }

  .mobile-drawer-logout {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    background: transparent;
    color: rgba(255,255,255,.6);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
  }
  .mobile-drawer-logout:hover { background: rgba(179,71,234,.2); color: #fff; border-color: var(--purple); }

  /* FAB acima do bottom nav */
  .fab-container { bottom: 72px !important; }

  /* Toast acima do bottom nav */
  .toast { bottom: 72px; left: 12px; right: 12px; text-align: center; }

  /* topbar: esconde botões extras */
  #changelogBtn, #exportBtn { display: none; }
  #logoutButton { display: none; } /* logout está no drawer */
  .subscription-badge { 
    display: inline-flex;
    font-size: .72rem;
    padding: 3px 8px;
  }
}

/* ── SWIPE CARDS ── */
.swipe-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.swipe-card {
  position: relative;
  transition: transform .25s cubic-bezier(.25,.46,.45,.94);
  touch-action: pan-y;
  user-select: none;
  will-change: transform;
  z-index: 1;
}

.swipe-actions {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  display: flex;
  align-items: stretch;
  z-index: 0;
}

.swipe-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 72px;
  border: none;
  font-size: .68rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  padding: 0 8px;
  transition: filter .15s;
}
.swipe-action-btn:hover { filter: brightness(1.1); }
.swipe-action-btn span { font-size: 1.2rem; line-height: 1; }

.swipe-action-btn--edit    { background: var(--info); }
.swipe-action-btn--done    { background: var(--good); }
.swipe-action-btn--send    { background: var(--purple); }
.swipe-action-btn--delete  { background: var(--danger); }
.swipe-action-btn--view    { background: var(--navy); }
.swipe-action-btn--print   { background: #475569; }

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 12px; }
  .metric-card strong { font-size: 1.25rem; }
  .quote-totals { grid-template-columns: 1fr; }
  .panel, .form-panel { padding: 12px; }
  .report-grid { grid-template-columns: 1fr; }
  .adm-table th:nth-child(2),
  .adm-table td:nth-child(2) { display: none; }
  input, select, textarea,
  .primary-button, .secondary-button { min-height: 44px; }
}

/* ============================================================
   DESKTOP ADJUSTMENTS
   ============================================================ */
@media (min-width: 769px) {
  .topbar { padding: 0 28px; height: 64px; }
  .content { padding: 28px; }
}

@media (min-width: 1400px) {
  :root { --sidebar-w: 280px; }
}

/* ============================================================
   TOPBAR ICON BUTTONS
   ============================================================ */
.topbar-icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
  flex-shrink: 0;
  transition: all .15s;
}
.topbar-icon-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--info-bg);
}

/* ============================================================
   GLOBAL SEARCH
   ============================================================ */
.gsearch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,27,62,.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: grid;
  place-items: start center;
  padding-top: 80px;
}
.gsearch-box {
  width: min(580px, 94vw);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.gsearch-box input {
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-size: 1rem;
  outline: none;
}
.gsearch-results { max-height: 400px; overflow-y: auto; }
.gsearch-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background .12s;
  border-bottom: 1px solid var(--border);
}
.gsearch-item:last-child { border-bottom: none; }
.gsearch-item:hover { background: var(--surface-2); }
.gsearch-item-icon {
  font-size: 1.2rem;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}
.gsearch-item-main strong { display: block; font-size: .9rem; font-weight: 600; color: var(--navy); }
.gsearch-item-main span  { font-size: .78rem; color: var(--muted); }
.gsearch-empty { padding: 24px 20px; text-align: center; color: var(--muted); font-size: .9rem; }

/* ============================================================
   FAB (Floating Action Button)
   ============================================================ */
.fab-container {
  position: fixed;
  bottom: 76px;
  right: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.fab-main {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--grad);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 300;
  box-shadow: 0 4px 20px rgba(0,194,255,.4);
  display: grid;
  place-items: center;
  transition: transform .2s, box-shadow .2s;
}
.fab-main:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(0,194,255,.5); }
.fab-main.open { transform: rotate(45deg); }

.fab-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 16px 8px 10px;
  box-shadow: var(--shadow);
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.fab-item:hover { transform: translateX(-3px); box-shadow: var(--shadow-lg); }
.fab-item-icon { font-size: 1.1rem; }
.fab-item-label { }

/* on desktop hide fab */
@media (min-width: 769px) { .fab-container { display: none !important; } }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,27,62,.55);
  backdrop-filter: blur(3px);
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-card {
  width: min(500px, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  display: grid;
  gap: 16px;
}
.modal-card--wide { width: min(720px, 100%); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.modal-close {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  display: grid;
  place-items: center;
}
.modal-close:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }
.modal-desc { color: var(--muted); font-size: .85rem; margin: 0; }
.modal-vars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.modal-vars code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: .78rem;
  color: var(--purple);
  font-family: monospace;
}
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   CLIENTE — FOTO
   ============================================================ */
.client-photo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}
.client-photo-preview {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  overflow: hidden;
  flex-shrink: 0;
}
.client-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.client-photo-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.client-photo-label input { margin-top: 4px; }

/* avatar em listas */
.client-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,194,255,.2), rgba(179,71,234,.2));
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  overflow: hidden;
  flex-shrink: 0;
}
.client-avatar img { width: 100%; height: 100%; object-fit: cover; }

.list-item--with-avatar {
  grid-template-columns: 38px minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
}

/* ============================================================
   PAGINAÇÃO
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .15s;
}
.page-btn:hover  { border-color: var(--cyan); color: var(--cyan); }
.page-btn.active { background: var(--grad); border: none; color: #fff; }
.page-btn:disabled { opacity: .4; cursor: default; }

/* ============================================================
   EXPORTAÇÃO
   ============================================================ */
.export-menu {
  position: absolute;
  top: 48px; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 100;
  overflow: hidden;
}
.export-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background .12s;
}
.export-item:hover { background: var(--surface-2); }

/* ============================================================
   HISTÓRICO / CHANGELOG
   ============================================================ */
.changelog-list { max-height: 480px; overflow-y: auto; display: grid; gap: 1px; }
.changelog-item {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 110px;
  gap: 10px;
  align-items: start;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: .84rem;
}
.changelog-item:last-child { border-bottom: none; }
.changelog-icon {
  font-size: 1.1rem;
  text-align: center;
  padding-top: 2px;
}
.changelog-text strong { display: block; font-weight: 600; color: var(--navy); }
.changelog-text span { color: var(--muted); font-size: .78rem; }
.changelog-time { color: var(--muted); font-size: .74rem; text-align: right; }

/* ============================================================
   DASHBOARD — OS STATUS CHART + HEATMAP
   ============================================================ */
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.os-status-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.os-bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 44px;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
}
.os-bar-track {
  height: 12px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.os-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .5s ease;
}

.schedule-heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.heatmap-head {
  text-align: center;
  font-size: .65rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  padding-bottom: 4px;
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: .62rem;
  font-weight: 700;
  color: transparent;
  transition: transform .1s;
  cursor: default;
}
.heatmap-cell:hover { transform: scale(1.15); color: #fff; }
.heatmap-cell[data-count="0"] { background: var(--surface-2); }
.heatmap-cell[data-count="1"] { background: rgba(0,194,255,.25); }
.heatmap-cell[data-count="2"] { background: rgba(0,194,255,.5); }
.heatmap-cell[data-count="3"] { background: rgba(0,194,255,.75); }
.heatmap-cell[data-count="4"] { background: var(--cyan); }

/* ============================================================
   IMPRESSÃO A4 — melhorada
   ============================================================ */
@media print {
  @page { size: A4; margin: 18mm 14mm; }
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea { position: absolute; inset: 0; }
}

/* ============================================================
   RESPONSIVO — extras mobile
   ============================================================ */
@media (max-width: 768px) {
  .dashboard-bottom-grid { grid-template-columns: 1fr; }
  .topbar-icon-btn { width: 32px; height: 32px; font-size: .9rem; }
}
@media (max-width: 480px) {
  #globalSearchBtn, #changelogBtn, #exportBtn { display: none; }
}

/* ============================================================
   BOTÕES DA LISTA DE OS
   ============================================================ */
.order-btn-concluir {
  background: var(--good-bg) !important;
  color: var(--good) !important;
  border-color: #a3dfc8 !important;
  font-weight: 700 !important;
  padding: 0 10px !important;
  font-size: .78rem !important;
}
.order-btn-concluir:hover {
  background: #c2f0dc !important;
}

/* ============================================================
   POPOVER DE ENVIO
   ============================================================ */
.send-popover {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-width: 148px;
  animation: popover-in .12s ease;
}
@keyframes popover-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.send-popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .12s;
}
.send-popover-item:hover { background: var(--surface-2); }
.send-popover-item + .send-popover-item { border-top: 1px solid var(--border); }

/* ============================================================
   ORDER CARD — layout limpo com barra de ações
   ============================================================ */
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .18s;
}
.order-card:hover { box-shadow: var(--shadow); }

.order-card-info strong {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
}
.order-card-info p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: .84rem;
}
.order-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.order-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* botão base da OS */
.oa-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
}
.oa-btn:hover {
  background: var(--surface);
  border-color: var(--muted);
}

/* variantes */
.oa-btn--green {
  background: var(--good-bg);
  color: var(--good);
  border-color: #a3dfc8;
}
.oa-btn--green:hover { background: #c2f0dc; }

.oa-btn--blue {
  background: var(--info-bg);
  color: var(--info);
  border-color: #93c5fd;
}
.oa-btn--blue:hover { background: #dbeafe; }

.oa-btn--red {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fca5a5;
}
.oa-btn--red:hover { background: #fee2e2; }

.oa-done {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--good-bg);
  color: var(--good);
  font-size: .8rem;
  font-weight: 700;
  border: 1px solid #a3dfc8;
}

/* mobile: empilha os botões em 2 colunas */
@media (max-width: 480px) {
  .order-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .oa-btn, .oa-done { justify-content: center; }
}

/* ============================================================
   BUSCA DE CLIENTE — DROPDOWN VISUAL
   ============================================================ */
.client-search-wrap {
  position: relative;
}

.client-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: 260px;
  overflow-y: auto;
}

.client-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .12s;
  border-bottom: 1px solid var(--border);
}
.client-dropdown-item:last-child { border-bottom: none; }
.client-dropdown-item:hover { background: var(--surface-2); }
.client-dropdown-item strong { display: block; font-size: .88rem; font-weight: 600; color: var(--navy); }
.client-dropdown-item span   { font-size: .76rem; color: var(--muted); }

/* ============================================================
   AGENDA — NOVA ESTRUTURA
   ============================================================ */
.schedule-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   FINANCEIRO — botões de ação espaçados
   ============================================================ */
.list-item .row-actions {
  flex-wrap: wrap;
  gap: 6px;
}

/* ============================================================
   MOBILE — Impede zoom automático ao focar inputs (iOS/Android)
   iOS faz zoom quando font-size < 16px no input focado
   ============================================================ */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* ============================================================
   STATUS PICKER INLINE
   ============================================================ */
.status-picker-wrap {
  position: relative;
  display: inline-block;
}

.status-picker-trigger {
  cursor: pointer;
  border: none;
  font: inherit;
  font-size: .76rem;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity .15s;
}
.status-picker-trigger:hover { opacity: .8; }

.status-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  min-width: 140px;
  overflow: hidden;
  animation: popover-in .12s ease;
}

.status-picker-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background .1s;
  text-align: left;
}
.status-picker-option:hover { background: var(--surface-2); }
.status-picker-option + .status-picker-option { border-top: 1px solid var(--border); }

/* ============================================================
   MODAL WIDE — para orçamento que tem mais campos
   ============================================================ */
.modal-card--wide {
  width: min(680px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
}

/* nav financeiro: só label, sem botão */
.nav-section-label {
  padding: 12px 10px 4px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  display: block;
}

/* ============================================================
   PAINEL ADMIN — MELHORIAS
   ============================================================ */
.adm-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.adm-filters input {
  flex: 1;
  min-width: 200px;
}
.adm-filters select {
  min-width: 160px;
  flex: 0 0 auto;
}

.adm-row--urgent { background: #fff5f5; }
.adm-row--warning { background: #fffbeb; }
.adm-row--urgent:hover { background: #fee2e2 !important; }
.adm-row--warning:hover { background: #fef3c7 !important; }

.adm-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* Subscriber detail modal */
.subscriber-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.subscriber-detail-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.subscriber-detail-item span {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 4px;
}
.subscriber-detail-item strong {
  font-size: .92rem;
  color: var(--navy);
}

/* Plan option buttons */
.plan-option-btn {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--navy);
  font-size: .92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all .15s;
}
.plan-option-btn:hover {
  border-color: var(--cyan);
  background: var(--info-bg);
  transform: translateX(4px);
}

@media (max-width: 480px) {
  .subscriber-detail-grid { grid-template-columns: 1fr; }
  .adm-filters { flex-direction: column; }
}

/* ============================================================
   UPGRADE MODAL — TELA DE PLANOS
   ============================================================ */
.upgrade-modal-overlay {
  align-items: flex-start;
  padding: 20px 16px 40px;
  overflow-y: auto;
  z-index: 400;
}

.upgrade-modal {
  position: relative;
  width: min(1020px, 100%);
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin: auto;
}

.upgrade-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  transition: background .15s;
}
.upgrade-modal-close:hover { background: rgba(255,255,255,.25); }

/* Header */
.upgrade-header {
  background: var(--navy);
  background-image:
    radial-gradient(ellipse 70% 60% at 10% 90%, rgba(0,194,255,.2) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 90% 10%, rgba(179,71,234,.2) 0%, transparent 60%);
  padding: 40px 32px 32px;
  text-align: center;
  color: #fff;
}

.upgrade-logo {
  height: 44px;
  border-radius: 8px;
  background: transparent;
  margin-bottom: 16px;
}

.upgrade-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.upgrade-header p {
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  margin-bottom: 14px;
}

.upgrade-countdown { margin-top: 4px; }
.upgrade-trial-days {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: .88rem;
  color: rgba(255,255,255,.9);
}
.upgrade-trial-days strong { color: #fff; }
.upgrade-expired {
  display: inline-block;
  background: rgba(192,57,43,.3);
  border: 1px solid rgba(245,183,177,.4);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: .88rem;
  color: #fca5a5;
  font-weight: 700;
}

/* Plans grid */
.upgrade-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}

.upgrade-plan {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  transition: background .2s;
}
.upgrade-plan:last-child { border-right: none; }
.upgrade-plan:hover { background: var(--surface-2); }

.upgrade-plan--featured {
  background: linear-gradient(180deg, rgba(0,194,255,.04) 0%, rgba(179,71,234,.04) 100%);
  border-left: 2px solid var(--cyan);
  border-right: 2px solid var(--purple);
  z-index: 1;
}
.upgrade-plan--featured:hover { background: linear-gradient(180deg, rgba(0,194,255,.08) 0%, rgba(179,71,234,.08) 100%); }

.upgrade-plan-badge {
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  background: var(--grad);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 0 0 10px 10px;
  white-space: nowrap;
}

.upgrade-plan-header { margin-bottom: 16px; text-align: center; padding-top: 12px; }
.upgrade-plan-icon { font-size: 2rem; display: block; margin-bottom: 6px; }
.upgrade-plan-header h3 { font-size: 1.2rem; font-weight: 800; color: var(--navy); margin: 0 0 4px; }
.upgrade-plan-header p { font-size: .8rem; color: var(--muted); margin: 0; }

.upgrade-plan-price {
  text-align: center;
  margin-bottom: 4px;
}
.upgrade-plan-price strong {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.upgrade-plan-price strong span { font-size: 1.2rem; }
.upgrade-plan-price span { font-size: .85rem; color: var(--muted); }

.upgrade-plan-annual {
  text-align: center;
  font-size: .76rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.upgrade-plan-annual em { color: var(--good); font-style: normal; font-weight: 600; }

.upgrade-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 8px;
  flex: 1;
}
.upgrade-features li {
  font-size: .82rem;
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.upgrade-btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-lg);
  text-align: center;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .18s;
  border: none;
  cursor: pointer;
}

.upgrade-btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0,194,255,.3);
}
.upgrade-btn--primary:hover { opacity: .88; box-shadow: 0 6px 24px rgba(0,194,255,.45); transform: translateY(-1px); }

.upgrade-btn--secondary {
  background: var(--surface);
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.upgrade-btn--secondary:hover { border-color: var(--cyan); color: var(--cyan); background: var(--info-bg); }

.upgrade-footer {
  text-align: center;
  padding: 16px 24px 24px;
  font-size: .82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.upgrade-footer a { color: var(--good); font-weight: 600; text-decoration: none; }
.upgrade-footer a:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 768px) {
  .upgrade-plans { grid-template-columns: 1fr; }
  .upgrade-plan { border-right: none; border-bottom: 1px solid var(--border); }
  .upgrade-plan:last-child { border-bottom: none; }
  .upgrade-plan--featured { border-left: none; border-right: none; border-top: 2px solid var(--cyan); border-bottom: 2px solid var(--purple); }
  .upgrade-header { padding: 32px 20px 24px; }
  .upgrade-header h2 { font-size: 1.4rem; }
  .upgrade-modal-overlay { padding: 10px; }
}

/* ============================================================
   BACKUP GRID
   ============================================================ */
.backup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.backup-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: all .18s;
}
.backup-card:hover {
  border-color: var(--cyan);
  background: var(--info-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.backup-card span { font-size: 1.6rem; }
.backup-card strong { font-size: .88rem; font-weight: 700; color: var(--navy); }
.backup-card p { font-size: .75rem; color: var(--muted); margin: 0; }

.backup-card--full {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(0,194,255,.06), rgba(179,71,234,.06));
  border-color: var(--cyan);
}
.backup-card--full:hover {
  background: linear-gradient(135deg, rgba(0,194,255,.12), rgba(179,71,234,.12));
}

/* ============================================================
   DASHBOARD — Agendamentos de hoje
   ============================================================ */
.panel-header h2 { margin-bottom: 0; }

@media (max-width: 480px) {
  .backup-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   UPGRADE MODAL — 2 planos
   ============================================================ */
.upgrade-plans--two {
  grid-template-columns: 1fr 1fr !important;
}

/* ── Upsell Ebooks ── */
.ebook-upsell {
  background: linear-gradient(135deg, rgba(0,194,255,.07), rgba(179,71,234,.07));
  border: 1.5px dashed var(--cyan);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin: 16px 0;
}

.ebook-upsell-header { margin-bottom: 10px; }

.ebook-upsell-tag {
  display: inline-block;
  background: var(--grad);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
  letter-spacing: .03em;
}

.ebook-upsell-header p {
  font-size: .82rem;
  color: var(--ink);
  margin: 0;
}
.ebook-upsell-header strong { color: var(--navy); }

.ebook-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.ebook-cover-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.ebook-cover-img {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ebook-cover-item span {
  font-size: .62rem;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
  line-height: 1.2;
}

.ebook-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  color: var(--navy);
  padding: 8px 10px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  transition: border-color .15s, background .15s;
}
.ebook-checkbox:hover { border-color: var(--cyan); background: var(--info-bg); }
.ebook-checkbox input { width: 16px; height: 16px; accent-color: var(--cyan); cursor: pointer; }

@media (max-width: 640px) {
  .upgrade-plans--two { grid-template-columns: 1fr !important; }
}

/* ============================================================
   FIX: order cards dentro da view correta
   ============================================================ */
.active-view #ordersList {
  display: grid;
  gap: 12px;
}
.order-card-actions { margin-top: auto; }

/* ============================================================
   SIDEBAR — ÍCONES SVG VAZADOS + RECOLHÍVEL
   ============================================================ */
.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: rgba(255,255,255,.55);
  transition: stroke .18s;
}
.nav-button:hover .nav-icon,
.nav-button.active .nav-icon {
  stroke: #fff;
}
.nav-label {
  transition: opacity .2s, width .2s;
  white-space: nowrap;
  overflow: hidden;
}
.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Botão de recolher */
.sidebar-collapse-btn {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  margin-left: auto;
  transition: color .18s, background .18s;
}
.sidebar-collapse-btn:hover { color: #fff; background: rgba(255,255,255,.18); }
.sidebar-collapse-btn svg { transition: transform .3s; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}
.brand-name {
  font-size: .9rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .2s, width .2s;
}

/* Estado RECOLHIDO */
.sidebar.collapsed {
  width: 64px !important;
}

/* App shell ajusta quando sidebar recolhe */
.app-shell:has(.sidebar.collapsed) {
  grid-template-columns: 64px minmax(0,1fr);
}
.sidebar.collapsed .brand-name { opacity: 0; width: 0; }
.sidebar.collapsed .nav-label { opacity: 0; width: 0; }
.sidebar.collapsed .nav-section { opacity: 0; height: 0; padding: 0; margin: 0; overflow: hidden; }
.sidebar.collapsed .nav-button { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }
.sidebar.collapsed .nav-button[data-title] { position: relative; }

/* Tooltip ao recolher */
.sidebar.collapsed .nav-button:hover::after {
  content: attr(data-title);
  position: absolute;
  left: 68px;
  background: #1a2535;
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

/* Ícones de navegação */
.sidebar { transition: width .25s ease; overflow: hidden; }

/* ============================================================
   COMPANY TABS
   ============================================================ */
.company-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
  width: fit-content;
}
.company-tab {
  padding: 8px 20px;
  border: none;
  border-radius: calc(var(--radius-lg) - 2px);
  background: transparent;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.company-tab.active {
  background: var(--surface);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.company-tab-content { display: block; }
.company-tab-content.hidden { display: none; }

/* ============================================================
   TABELA DE TAXAS
   ============================================================ */
.fee-table-config {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.fee-table-header {
  display: grid;
  grid-template-columns: 1fr 140px;
  padding: 9px 14px;
  background: var(--navy);
  color: rgba(255,255,255,.8);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.fee-table-section {
  padding: 7px 14px;
  background: var(--surface-2);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.fee-table-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  align-items: center;
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.fee-table-row:last-child { border-bottom: none; }
.fee-table-row:hover { background: var(--surface-2); }
.fee-table-row label { font-size: .86rem; font-weight: 500; color: var(--ink); margin: 0; }
.fee-table-row input { text-align: right; padding: 6px 10px; border-radius: var(--radius); border: 1.5px solid var(--border); font-size: .88rem; font-weight: 600; width: 100%; }
.fee-table-row input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,194,255,.12); }

/* ============================================================
   SIMULADOR DE TAXAS
   ============================================================ */
.fee-simulator-result {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 4px;
}
.fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
}
.fee-row:last-child { border-bottom: none; }
.fee-row span { color: var(--muted); }
.fee-row strong { font-weight: 700; }
.fee-row--tax { background: #fff5f5; }
.fee-row--net { background: linear-gradient(135deg, rgba(0,194,255,.05), rgba(179,71,234,.05)); }
.fee-row--net span { color: var(--navy); font-weight: 600; }

/* Bloco interno de taxa no orçamento */
.fee-internal-block {
  background: #fff8e1;
  border: 1.5px dashed #f59e0b;
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-top: 12px;
  display: grid;
  gap: 6px;
}
.fee-internal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #92400e;
  margin-bottom: 4px;
}
.fee-internal-row { display: flex; justify-content: space-between; font-size: .84rem; }
.fee-internal-row span { color: #78716c; }
.fee-internal-row strong { font-weight: 700; }
.fee-internal-row.net strong { color: var(--good); font-size: .95rem; }
.fee-internal-row.tax strong { color: var(--danger); }

/* ============================================================
   BADGE DE ASSINATURA NO DRAWER MOBILE
   ============================================================ */
.mobile-sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .18s;
}
.mobile-sub-badge:empty { display: none; }
.mobile-sub-badge:hover { opacity: .8; }
.mobile-sub-badge.ok      { background: rgba(39,174,96,.15); color: #27ae60; border: 1px solid rgba(39,174,96,.3); }
.mobile-sub-badge.warning { background: rgba(243,156,18,.15); color: #e67e22; border: 1px solid rgba(243,156,18,.3); }
.mobile-sub-badge.urgent  { background: rgba(231,76,60,.15);  color: #e74c3c; border: 1px solid rgba(231,76,60,.3); animation: pulse-badge 1.8s ease-in-out infinite; }

/* ============================================================
   FLUXO DE CAIXA
   ============================================================ */
.cashflow-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.cashflow-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: box-shadow .18s;
}
.cashflow-card:hover { box-shadow: var(--shadow); }

.cashflow-icon { font-size: 1.6rem; }

.cashflow-info { display: flex; flex-direction: column; gap: 2px; }
.cashflow-info span { font-size: .78rem; color: var(--muted); font-weight: 500; }
.cashflow-info strong { font-size: 1.15rem; font-weight: 800; }

.cashflow-card--green { border-left: 3px solid var(--good); }
.cashflow-card--green .cashflow-info strong { color: var(--good); }
.cashflow-card--red   { border-left: 3px solid var(--danger); }
.cashflow-card--red   .cashflow-info strong { color: var(--danger); }
.cashflow-card--blue  { border-left: 3px solid var(--cyan); }
.cashflow-card--blue  .cashflow-info strong { color: var(--cyan); }
.cashflow-card--yellow{ border-left: 3px solid var(--warning); }
.cashflow-card--yellow .cashflow-info strong { color: var(--warning); }

.cashflow-filter {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cashflow-filter label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}
.cashflow-filter select,
.cashflow-filter input[type="date"] {
  width: auto;
  min-width: 120px;
  font-size: .82rem;
  padding: 6px 10px;
}
@media (max-width: 600px) {
  .cashflow-filter { gap: 8px; }
  .cashflow-filter label { font-size: .72rem; }
  .cashflow-filter select,
  .cashflow-filter input[type="date"] { 
    min-width: 90px;
    font-size: .78rem;
    padding: 5px 8px;
  }
}

/* Barras de categoria */
.category-bars { display: grid; gap: 10px; padding: 4px 0; }
.cat-bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 90px;
  align-items: center;
  gap: 10px;
}
.cat-bar-label { font-size: .84rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.cat-bar-track {
  background: var(--surface-2);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.cat-bar-fill {
  background: var(--grad);
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
  min-width: 4px;
}
.cat-bar-value { font-size: .82rem; font-weight: 700; color: var(--navy); text-align: right; }

/* ============================================================
   ALERTAS FINANCEIROS
   ============================================================ */
.finance-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: .85rem;
  margin-bottom: 8px;
  border-left: 3px solid;
}
.finance-alert--danger  { background: #fff5f5; border-color: var(--danger); color: #7b2d2d; }
.finance-alert--warning { background: #fffbeb; border-color: var(--warning); color: #7c5e10; }
.finance-alert strong { font-weight: 700; }

@media (max-width: 768px) {
  .cashflow-cards { grid-template-columns: 1fr 1fr; }
  .cat-bar-row { grid-template-columns: 100px 1fr 70px; }
}
@media (max-width: 480px) {
  .cashflow-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   GRÁFICO PIZZA + LAYOUT
   ============================================================ */
.cf-charts-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .cf-charts-row { flex-direction: column; }
}

.cf-pie-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 16px;
  flex-wrap: wrap;
}

.pie-legend {
  display: grid;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}
.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
}
.pie-legend-item span:last-of-type { flex: 1; color: var(--ink); }
.pie-legend-item strong { color: var(--navy); font-weight: 700; margin-left: auto; }
.pie-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* ============================================================
   ÍCONES SVG NOS CARDS (substitui emojis)
   ============================================================ */
.cashflow-icon svg,
.metric-icon svg,
.report-card-icon svg,
.shortcut-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}
.cashflow-card--green .cashflow-icon { color: var(--good); }
.cashflow-card--red   .cashflow-icon { color: var(--danger); }
.cashflow-card--blue  .cashflow-icon { color: var(--cyan); }
.cashflow-card--yellow .cashflow-icon { color: var(--warning); }

/* ============================================================
   NOTIFICAÇÃO — BADGE E CLIENTES INATIVOS
   ============================================================ */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}

.inactive-config {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.inactive-config label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .86rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.inactive-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
}

.inactive-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow .15s;
}
.inactive-item:hover { box-shadow: var(--shadow-sm); }

.inactive-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inactive-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.inactive-info strong { font-size: .9rem; color: var(--ink); }
.inactive-info span   { font-size: .78rem; color: var(--muted); }
.inactive-date        { font-style: italic; color: var(--warning) !important; }

.inactive-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
  text-decoration: none;
  flex-shrink: 0;
}
.inactive-wa-btn:hover { opacity: .85; }

/* ============================================================
   DRE — DEMONSTRATIVO DE RESULTADO
   ============================================================ */
.dre-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}

.dre-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--navy);
  flex-wrap: wrap;
  gap: 10px;
}
.dre-header h3 {
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  margin: 0;
}

.dre-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.dre-filters select,
.dre-filters input[type="date"] {
  font-size: .78rem;
  padding: 5px 10px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  color: #fff;
  min-width: 90px;
}
.dre-filters label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: rgba(255,255,255,.7);
  margin: 0;
}

.dre-body {
  display: flex;
  gap: 0;
}

.dre-col {
  flex: 1;
  border-right: 1px solid var(--border);
  min-width: 0;
}
.dre-col:last-child { border-right: none; }
.dre-col--prev { background: var(--surface-2); }

.dre-label {
  padding: 8px 16px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.dre-section {
  padding: 6px 16px;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.dre-section--result {
  background: var(--navy);
  color: rgba(255,255,255,.7);
}

.dre-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.dre-row span { color: var(--muted); }
.dre-row strong { font-weight: 700; color: var(--ink); }
.dre-row em { font-size: .72rem; color: var(--muted); }

.dre-row--highlight { background: rgba(0,194,255,.04); }
.dre-row--highlight strong { color: var(--good); font-size: .95rem; }

.dre-row--sub span { padding-left: 12px; font-size: .82rem; }
.dre-row--sub strong { color: var(--danger); }

.dre-row--total {
  background: var(--surface-2);
  border-top: 2px solid var(--border);
}
.dre-row--total strong { font-size: .92rem; }

.dre-row--lucro {
  border-top: 2px solid var(--border);
}
.dre-row--lucro.positive { background: var(--good-bg); }
.dre-row--lucro.positive strong { color: var(--good); font-size: 1.05rem; }
.dre-row--lucro.negative { background: var(--danger-bg); }
.dre-row--lucro.negative strong { color: var(--danger); font-size: 1.05rem; }

.dre-row--margem strong { color: var(--cyan); }

@media (max-width: 640px) {
  .dre-header { flex-direction: column; align-items: flex-start; }
  .dre-filters select,
  .dre-filters input[type="date"] { font-size: .72rem; padding: 4px 8px; }
  .dre-body { flex-direction: column; }
  .dre-col { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ============================================================
   CATEGORIAS EDITÁVEIS
   ============================================================ */
.cat-add-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.cat-add-form input { flex: 1; min-width: 80px; }

.cat-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow .15s;
}
.cat-edit-row:hover { box-shadow: var(--shadow-sm); }

.cat-edit-icon {
  width: 44px !important;
  text-align: center;
  font-size: 1.1rem;
  padding: 4px !important;
}
.cat-edit-name {
  flex: 1;
  font-size: .86rem;
  font-weight: 600;
}
.cat-edit-color {
  width: 36px !important;
  height: 32px !important;
  padding: 2px !important;
  border-radius: 6px !important;
  cursor: pointer;
  border: 1.5px solid var(--border) !important;
}
.cat-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .2s;
}

/* ============================================================
   ALERTAS DE VENCIMENTO NOS CARDS
   ============================================================ */
.item-overdue { border-left: 3px solid var(--danger) !important; background: var(--danger-bg) !important; }
.item-urgent  { border-left: 3px solid var(--danger) !important; }
.item-warning { border-left: 3px solid var(--warning) !important; }

/* Pill de categoria nas contas */
.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}

/* Tag recorrente */
.recur-tag {
  font-size: .72rem;
  color: var(--cyan);
  font-weight: 600;
}

/* ============================================================
   GRÁFICO EVOLUÇÃO FINANCEIRA
   ============================================================ */
.evolution-panel { padding-bottom: 0 !important; overflow: hidden; }

.evolution-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 20px 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.evolution-header h2 { margin: 0; }

.evolution-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.evo-leg {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
}
.evo-leg::before {
  content: '';
  width: 20px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}
.evo-leg--income::before  { background: #00C2FF; }
.evo-leg--expense::before { background: #B347EA; }
.evo-leg--profit::before  { background: #0EA472; border-top: 2px dashed #0EA472; height: 0; }

/* Cards de sumário */
.evolution-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 640px) {
  .evolution-summary { grid-template-columns: repeat(2, 1fr); }
}

.evo-sum-card {
  background: var(--surface);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.evo-sum-card span { font-size: .72rem; color: var(--muted); font-weight: 500; }
.evo-sum-card strong { font-size: .95rem; font-weight: 800; }
.evo-sum--income strong  { color: #00C2FF; }
.evo-sum--expense strong { color: #B347EA; }
.evo-sum--profit.positive strong { color: #0EA472; }
.evo-sum--profit.negative strong { color: var(--danger); }
.evo-sum--best strong    { color: var(--navy); }

/* Tabela detalhada */
.evolution-table {
  border-top: 1px solid var(--border);
  overflow-x: auto;
}
.evo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.evo-table th {
  padding: 8px 14px;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.evo-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.evo-table tbody tr:last-child td { border-bottom: none; }
.evo-table tbody tr:hover { background: var(--surface-2); }

.evo-income  { color: #00C2FF; font-weight: 700; }
.evo-expense { color: #B347EA; font-weight: 700; }
.evo-up      { color: var(--good);    font-weight: 700; }
.evo-down    { color: var(--danger);  font-weight: 700; }

/* ============================================================
   CENTRAL DE NOTIFICAÇÕES
   ============================================================ */
.notif-center {
  position: fixed;
  inset: 0;
  z-index: 9000;
}
.notif-center.hidden { display: none; }

.notif-center-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(2px);
}

.notif-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 100vw;
  background: var(--surface);
  box-shadow: -8px 0 40px rgba(0,0,0,.2);
  display: flex;
  flex-direction: column;
  animation: slideInRight .25s ease;
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.notif-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--navy);
}
.notif-header h3 { color: #fff; font-size: 1rem; font-weight: 700; margin: 0; }
.notif-header .muted { color: rgba(255,255,255,.5); font-size: .78rem; }
.notif-close {
  background: rgba(255,255,255,.1);
  border: none;
  color: rgba(255,255,255,.7);
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-close:hover { background: rgba(255,255,255,.2); color: #fff; }

.notif-config {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: .80rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.notif-config input, .notif-config select {
  font-size: .80rem;
  padding: 4px 8px;
  border-radius: 6px;
}

/* Estatísticas */
.notif-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.notif-stat {
  background: var(--surface);
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notif-stat strong { font-size: 1.2rem; font-weight: 800; }
.notif-stat span   { font-size: .68rem; color: var(--muted); font-weight: 500; }
.notif-stat--red    strong { color: var(--danger); }
.notif-stat--yellow strong { color: var(--warning); }
.notif-stat--blue   strong { color: var(--cyan); }
.notif-stat--gray   strong { color: var(--muted); }

/* Ações em massa */
.notif-bulk {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.notif-bulk-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: .80rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: #25D366;
  color: #fff;
  transition: opacity .15s;
}
.notif-bulk-btn:hover { opacity: .88; }
.notif-bulk-btn--secondary { background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); }
.notif-bulk-btn--secondary:hover { background: var(--border); opacity: 1; }

/* Mensagem template */
.notif-msg-wrap {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.notif-msg-wrap label { font-size: .75rem; font-weight: 600; color: var(--muted); }
.notif-msg-wrap textarea {
  width: 100%;
  font-size: .82rem;
  resize: vertical;
  min-height: 60px;
  margin-top: 4px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 8px 10px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
}

/* Lista */
.notif-client-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
  border-left: 3px solid transparent;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item--urgent { border-left-color: var(--danger); }
.notif-item--normal { border-left-color: var(--warning); }
.notif-item--contacted { opacity: .55; }

.notif-item-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-item-avatar.urgent { background: var(--danger); }

.notif-item-info {
  flex: 1;
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
}
.notif-item-info strong { font-size: .88rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item-info span   { font-size: .75rem; color: var(--muted); }
.notif-item-date { font-style: italic; color: var(--warning) !important; }

.notif-contacted-tag {
  font-size: .68rem !important;
  color: var(--good) !important;
  font-weight: 700 !important;
  font-style: normal !important;
}

.notif-item-actions {
  display: flex; gap: 6px; flex-shrink: 0;
}
.notif-wa-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s;
}
.notif-wa-btn:hover { opacity: .85; }

.notif-check-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  border: 1.5px solid var(--border);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.notif-check-btn.active { background: var(--good); color: #fff; border-color: var(--good); }
.notif-check-btn:hover  { border-color: var(--good); color: var(--good); }

.notif-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px; gap: 12px; color: var(--muted); text-align: center;
}
.notif-empty svg { opacity: .3; }

.notif-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

@media (max-width: 480px) {
  .notif-panel { width: 100%; }
  .notif-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   PERFIL DO CLIENTE
   ============================================================ */
.profile-card {
  max-width: 680px !important;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.profile-content {
  overflow-y: auto;
  flex: 1;
}

/* Hero */
.profile-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  flex-wrap: wrap;
}
.profile-avatar { flex-shrink: 0; }
.profile-avatar-img {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.3);
}
.profile-avatar-letter {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid rgba(255,255,255,.2);
}
.profile-hero-info { flex: 1; }
.profile-hero-info h2 { margin: 0 0 4px; font-size: 1.15rem; color: #fff; }
.profile-hero-info p  { margin: 2px 0; font-size: .82rem; color: rgba(255,255,255,.7); }

.profile-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.profile-wa-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: #25D366; color: #fff;
  border-radius: var(--radius);
  font-size: .80rem; font-weight: 700;
  text-decoration: none;
  transition: opacity .15s;
}
.profile-wa-btn:hover { opacity: .88; }
.profile-edit-btn {
  padding: 7px 14px;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  font-size: .80rem; font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.profile-edit-btn:hover { background: rgba(255,255,255,.25); }

/* Stats */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 560px) { .profile-stats { grid-template-columns: repeat(3, 1fr); } }

.profile-stat {
  background: var(--surface);
  padding: 12px 10px;
  text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.profile-stat strong { font-size: .92rem; font-weight: 800; color: var(--navy); }
.profile-stat span   { font-size: .68rem; color: var(--muted); }

/* Tabs */
.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  background: var(--surface-2);
  overflow-x: auto;
}
.profile-tab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all .18s;
}
.profile-tab.active { color: var(--navy); border-bottom-color: var(--cyan); background: var(--surface); }
.profile-tab:hover  { color: var(--navy); }

.profile-tab-content { padding: 8px 0; }
.profile-tab-content.hidden { display: none; }

/* History items */
.profile-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  transition: background .15s;
}
.profile-history-item:hover { background: var(--surface-2); }
.profile-history-item:last-child { border-bottom: none; }

.phi-left {
  display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0;
}
.phi-left strong { font-size: .88rem; color: var(--ink); }
.phi-left span   { font-size: .75rem; color: var(--muted); }

.phi-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0;
}
.phi-right strong { font-size: .88rem; font-weight: 700; color: var(--navy); }

.profile-empty {
  text-align: center;
  color: var(--muted);
  padding: 24px;
  font-size: .85rem;
}
.profile-notes {
  margin: 12px 20px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
  font-size: .84rem;
  color: var(--ink);
  border-left: 3px solid var(--cyan);
}

/* ============================================================
   PERFIL DO CLIENTE — VIEW DEDICADA
   ============================================================ */
.cp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 16px;
  gap: 16px;
}
.cp-back {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none;
  color: var(--cyan); font-size: .88rem; font-weight: 600;
  cursor: pointer; padding: 6px 0;
  transition: opacity .15s;
}
.cp-back:hover { opacity: .75; }
.cp-topbar-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 999px; padding: 6px 14px;
  color: var(--muted);
}
.cp-topbar-search input {
  border: none; background: none; outline: none;
  font-size: .84rem; color: var(--ink); width: 180px;
}

.cp-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .cp-layout { grid-template-columns: 1fr; }
}

/* Hero */
.cp-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cp-hero-left { display: flex; gap: 16px; align-items: flex-start; }
.cp-avatar-wrap { flex-shrink: 0; }
.cp-avatar-img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); }
.cp-avatar-letter {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--grad); color: #fff;
  font-size: 1.8rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.cp-hero-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.cp-hero-name-row h2 { margin: 0; font-size: 1.2rem; color: var(--ink); }
.cp-status-badge {
  padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
}
.cp-status-badge.active { background: #e6f9f1; color: var(--good); border: 1px solid #a3dfc8; }
.cp-status-badge.vip    { background: #fef3c7; color: #92400e;    border: 1px solid #fcd34d; }
.cp-hero-contacts { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 4px; }
.cp-hero-contacts span { display: flex; align-items: center; gap: 4px; font-size: .80rem; color: var(--muted); }
.cp-since { font-size: .75rem; color: var(--muted); }

.cp-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.cp-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: .82rem; font-weight: 700; cursor: pointer;
  border: none; text-decoration: none; transition: opacity .15s;
}
.cp-btn--wa     { background: #25D366; color: #fff; }
.cp-btn--edit   { background: var(--surface-2); color: var(--ink); border: 1.5px solid var(--border); }
.cp-btn--primary{ background: var(--grad); color: #fff; }
.cp-btn:hover   { opacity: .85; }

/* Stats */
.cp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 700px) { .cp-stats { grid-template-columns: repeat(2, 1fr); } }

.cp-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.cp-stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cp-stat-icon--green  { background: #e6f9f1; color: var(--good); }
.cp-stat-icon--orange { background: #fff4e0; color: var(--warning); }
.cp-stat-icon--blue   { background: #e5f1ff; color: var(--info); }
.cp-stat-icon--purple { background: #f3e8ff; color: #7c3aed; }
.cp-stat-card > div > span  { display: block; font-size: .72rem; color: var(--muted); margin-bottom: 2px; }
.cp-stat-card > div > strong{ display: block; font-size: 1.1rem; font-weight: 800; color: var(--navy); }
.cp-stat-card > div > small { display: block; font-size: .68rem; color: var(--muted); margin-top: 1px; }

/* Tabs */
.cp-tabs-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}
.cp-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  overflow-x: auto;
}
.cp-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 18px;
  border: none; background: transparent;
  color: var(--muted); font-size: .82rem; font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
  transition: all .18s;
}
.cp-tab.active { color: var(--navy); border-bottom-color: var(--cyan); background: var(--surface); }
.cp-tab:hover  { color: var(--navy); }

.cp-tab-content { display: block; }
.cp-tab-content.hidden { display: none; }
.cp-table-header { padding: 14px 20px 10px; border-bottom: 1px solid var(--border); }
.cp-table-header h3 { margin: 0; font-size: .92rem; color: var(--navy); }

.cp-table {
  width: 100%; border-collapse: collapse; font-size: .82rem;
}
.cp-table th {
  padding: 8px 14px; text-align: left; font-size: .70rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.cp-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.cp-table tbody tr:last-child td { border-bottom: none; }
.cp-table tbody tr:hover { background: var(--surface-2); }
.cp-empty { padding: 24px; text-align: center; color: var(--muted); font-size: .84rem; }

/* VIP Banner */
.cp-vip {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1.5px solid #fcd34d;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cp-vip.hidden { display: none; }
.cp-vip-icon { font-size: 2rem; }
.cp-vip-text { flex: 1; }
.cp-vip-text strong { display: block; font-size: .92rem; color: #92400e; }
.cp-vip-text span   { font-size: .78rem; color: #a16207; }
.cp-vip-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.cp-vip-stats > div { text-align: center; }
.cp-vip-stats strong { display: block; font-size: .92rem; font-weight: 800; color: #92400e; }
.cp-vip-stats span   { font-size: .68rem; color: #a16207; }

/* Sidebar */
.cp-sidebar { display: flex; flex-direction: column; gap: 12px; }
.cp-info-card, .cp-timeline-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
}
.cp-info-card h4, .cp-timeline-card h4 {
  margin: 0 0 12px; font-size: .88rem; color: var(--navy); font-weight: 700;
}
.cp-info-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 7px 0; border-bottom: 1px solid var(--border);
  font-size: .80rem; gap: 8px;
}
.cp-info-row:last-child { border-bottom: none; }
.cp-info-row span  { color: var(--muted); flex-shrink: 0; }
.cp-info-row strong{ color: var(--ink); text-align: right; word-break: break-all; }
.cp-notes { margin-top: 10px; padding: 10px; background: var(--surface-2); border-radius: var(--radius); font-size: .80rem; color: var(--ink); }

/* Timeline */
.cp-timeline { display: flex; flex-direction: column; gap: 0; }
.cp-tl-item { display: flex; gap: 10px; padding: 8px 0; position: relative; }
.cp-tl-item:not(:last-child)::before {
  content: ''; position: absolute; left: 5px; top: 20px;
  width: 2px; bottom: -8px; background: var(--border);
}
.cp-tl-dot {
  width: 12px; height: 12px; border-radius: 50%;
  flex-shrink: 0; margin-top: 3px;
  border: 2px solid var(--border); background: var(--surface);
}
.cp-tl-os    .cp-tl-dot { background: var(--cyan);    border-color: var(--cyan); }
.cp-tl-pay   .cp-tl-dot { background: var(--good);    border-color: var(--good); }
.cp-tl-quote .cp-tl-dot { background: var(--purple);  border-color: var(--purple); }
.cp-tl-new   .cp-tl-dot { background: var(--muted);   border-color: var(--muted); }
.cp-tl-content { display: flex; flex-direction: column; gap: 1px; }
.cp-tl-date    { font-size: .68rem; color: var(--muted); }
.cp-tl-content strong { font-size: .78rem; color: var(--ink); }

/* ============================================================
   ORÇAMENTOS PENDENTES NA TELA DE OS
   ============================================================ */
.pending-quotes-section {
  background: var(--surface);
  border: 2px solid var(--warning);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.pending-quotes-section.hidden { display: none; }

.pqs-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff8e6;
  border-bottom: 1px solid var(--warning);
}
[data-theme="dark"] .pqs-header { background: #2b1f05; }
.pqs-header h3 { margin: 0; font-size: .90rem; color: #92400e; }

.pq-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.pq-card:last-child { border-bottom: none; }
.pq-card:hover { background: var(--surface-2); }

.pq-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
}
.pq-info strong { font-size: .88rem; color: var(--ink); }
.pq-info span   { font-size: .76rem; color: var(--muted); }

.pq-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pq-status-select {
  font-size: .78rem;
  padding: 5px 8px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

/* Seções de OS */
.orders-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.orders-section-label--done {
  margin-top: 16px;
  justify-content: space-between;
  user-select: none;
}
.orders-section-label--done svg {
  transition: transform .2s;
  flex-shrink: 0;
}

/* ============================================================
   POPUP DE NOTIFICAÇÕES
   ============================================================ */
.notif-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8998;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}
.notif-backdrop.hidden { display: none; }

.notif-popup {
  position: fixed;
  z-index: 8999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 620px;
  max-width: 95vw;
  max-height: 80vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popupIn .2s ease;
}
.notif-popup.hidden { display: none; }

@keyframes popupIn {
  from { opacity: 0; transform: translateY(-8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Seta apontando para o sino */
.notif-popup-arrow { display: none; }

.notif-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--navy);
}
.notif-popup-header h3 { color: #fff; font-size: .92rem; font-weight: 700; margin: 0; }
.notif-popup-header .muted { color: rgba(255,255,255,.5); font-size: .72rem; }
.notif-popup-header .notif-close {
  background: rgba(255,255,255,.1);
  border: none; color: rgba(255,255,255,.7);
  width: 24px; height: 24px; border-radius: 6px;
  cursor: pointer; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}
.notif-popup-header .notif-close:hover { background: rgba(255,255,255,.2); color: #fff; }

/* Filtro */
.notif-popup-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: .78rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.notif-popup-filter input {
  width: 44px;
  text-align: center;
  font-size: .78rem;
  padding: 4px 6px;
  border-radius: 6px;
}
.notif-popup-filter select {
  font-size: .78rem;
  padding: 4px 6px;
  border-radius: 6px;
}

/* Mensagem */
.notif-popup-msg {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}
.notif-popup-msg textarea {
  width: 100%;
  font-size: .78rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  resize: none;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.4;
}

/* Lista */
.notif-popup-list {
  flex: 1;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
  border-left: 3px solid transparent;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item--urgent { border-left-color: var(--danger); }
.notif-item--normal { border-left-color: var(--warning); }
.notif-item--contacted { opacity: .5; }

.notif-item-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad); color: #fff;
  font-weight: 800; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-item-avatar.urgent { background: var(--danger); }

.notif-item-info { flex: 1; min-width: 0; }
.notif-item-info strong { font-size: .82rem; color: var(--ink); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item-info span   { font-size: .70rem; color: var(--muted); display: block; }
.notif-item-date        { color: var(--warning) !important; font-style: italic; }
.notif-contacted-tag    { color: var(--good) !important; font-weight: 700 !important; }

.notif-item-actions { display: flex; gap: 5px; flex-shrink: 0; }
.notif-wa-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: #25D366; color: #fff; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: opacity .15s;
}
.notif-wa-btn:hover { opacity: .85; }
.notif-check-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-2); color: var(--muted);
  border: 1.5px solid var(--border); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.notif-check-btn.active { background: var(--good); color: #fff; border-color: var(--good); }
.notif-check-btn:hover  { border-color: var(--good); color: var(--good); }

/* Footer */
.notif-popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  gap: 8px;
  flex-wrap: wrap;
}
.notif-bulk { display: flex; gap: 6px; flex-wrap: wrap; }
.notif-bulk-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: var(--radius);
  font-size: .74rem; font-weight: 700;
  cursor: pointer; border: none;
  background: #25D366; color: #fff;
  transition: opacity .15s;
}
.notif-bulk-btn:hover { opacity: .88; }
.notif-bulk-btn--secondary {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border);
}

.notif-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 20px; gap: 8px; color: var(--muted); text-align: center;
}
.notif-empty svg { opacity: .25; }
.notif-empty p { font-size: .84rem; margin: 0; }

@media (max-width: 480px) {
  .notif-popup { width: calc(100vw - 20px); right: 10px !important; }
}

/* ============================================================
   TELA DE LOGIN COM PLANOS
   ============================================================ */
.auth-screen {
  min-height: 100vh;
  background: linear-gradient(135deg, #0D1B3E 0%, #1E3366 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  width: 100%;
  max-width: 900px;
  align-items: start;
}

@media (max-width: 760px) {
  .auth-layout {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  .auth-right { order: -1; }
}

/* Coluna esquerda */
.auth-left {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.auth-logo {
  height: 48px;
  margin-bottom: 16px;
  display: block;
}
.auth-left h1 {
  font-size: 1.4rem;
  color: var(--navy);
  margin: 0 0 4px;
}
.auth-sub {
  font-size: .84rem;
  color: #6B748A;
  margin-bottom: 20px;
}

/* Coluna direita — planos */
.auth-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-plans-header {
  text-align: center;
  margin-bottom: 4px;
}
.auth-plans-header h2 {
  color: #fff;
  font-size: 1.3rem;
  margin: 0 0 4px;
}
.auth-plans-header p {
  color: rgba(255,255,255,.6);
  font-size: .82rem;
}

/* Cards de plano */
.auth-plan-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  padding: 16px 20px;
  position: relative;
  transition: background .2s;
}
.auth-plan-card:hover {
  background: rgba(255,255,255,.13);
}
.auth-plan--anual {
  border-color: #f59e0b;
  background: rgba(245,158,11,.08);
}
.auth-plan--anual:hover {
  background: rgba(245,158,11,.14);
}

.auth-plan-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--cyan);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.auth-plan-badge--gold {
  background: #f59e0b;
  color: #1a1a1a;
}

.auth-plan-card h3 {
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.auth-plan-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.auth-plan-price span {
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255,255,255,.6);
}
.auth-plan-economy {
  font-size: .72rem;
  color: #f59e0b;
  margin: -4px 0 8px;
  font-weight: 600;
}
.auth-plan-features {
  list-style: none;
  padding: 0; margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.auth-plan-features li {
  font-size: .78rem;
  color: rgba(255,255,255,.8);
}
.auth-plan-cta {
  font-size: .78rem;
  color: var(--cyan);
  font-weight: 600;
  margin: 0;
}
.auth-plan-btn {
  display: block;
  text-align: center;
  padding: 9px 16px;
  background: var(--cyan);
  color: #0D1B3E;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
  transition: opacity .15s;
}
.auth-plan-btn:hover { opacity: .88; }
.auth-plan-btn--gold {
  background: #f59e0b;
  color: #1a1a1a;
}

/* Botão ver planos na tela de login */
.auth-plans-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: .80rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.auth-plans-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0,194,255,.06);
}

/* ============================================================
   DASHBOARD MODO NOTURNO — LAYOUT PREMIUM
   ============================================================ */

/* Cards métricos premium */
[data-theme="dark"] .metric-card {
  background: #12192e;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
[data-theme="dark"] .metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

/* Borda colorida por card */
[data-theme="dark"] .metric-card:nth-child(1) { border-top: 2px solid #22c55e; }
[data-theme="dark"] .metric-card:nth-child(2) { border-top: 2px solid #00C2FF; }
[data-theme="dark"] .metric-card:nth-child(3) { border-top: 2px solid #e74c3c; }
[data-theme="dark"] .metric-card:nth-child(4) { border-top: 2px solid #B347EA; }
[data-theme="dark"] .metric-card:nth-child(5) { border-top: 2px solid #22c55e; }
[data-theme="dark"] .metric-card:nth-child(6) { border-top: 2px solid #00C2FF; }
[data-theme="dark"] .metric-card:nth-child(7) { border-top: 2px solid #e74c3c; }
[data-theme="dark"] .metric-card:nth-child(8) { border-top: 2px solid #B347EA; }

/* Ícone do card */
[data-theme="dark"] .metric-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  position: relative; z-index: 1;
}
[data-theme="dark"] .metric-card:nth-child(1) .metric-icon { background: rgba(34,197,94,.15); color: #22c55e; }
[data-theme="dark"] .metric-card:nth-child(2) .metric-icon { background: rgba(0,194,255,.15); color: #00C2FF; }
[data-theme="dark"] .metric-card:nth-child(3) .metric-icon { background: rgba(231,76,60,.15);  color: #e74c3c; }
[data-theme="dark"] .metric-card:nth-child(4) .metric-icon { background: rgba(179,71,234,.15); color: #B347EA; }
[data-theme="dark"] .metric-card:nth-child(5) .metric-icon { background: rgba(34,197,94,.15);  color: #22c55e; }
[data-theme="dark"] .metric-card:nth-child(6) .metric-icon { background: rgba(0,194,255,.15);  color: #00C2FF; }
[data-theme="dark"] .metric-card:nth-child(7) .metric-icon { background: rgba(231,76,60,.15);  color: #e74c3c; }
[data-theme="dark"] .metric-card:nth-child(8) .metric-icon { background: rgba(179,71,234,.15); color: #B347EA; }

/* Texto do card */
[data-theme="dark"] .metric-card span {
  font-size: .72rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: rgba(255,255,255,.45);
  display: block; margin-bottom: 4px;
}
[data-theme="dark"] .metric-card strong {
  font-size: 1.4rem; font-weight: 800; color: #fff;
  display: block;
}

/* Ícone fantasma decorativo */
[data-theme="dark"] .metric-card::after {
  content: '';
  position: absolute;
  right: -8px; bottom: -8px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: currentColor;
  opacity: .04;
}

/* Sidebar premium no dark */
[data-theme="dark"] .nav-button {
  border-radius: 10px;
  transition: background .15s;
}
[data-theme="dark"] .nav-button.active {
  background: linear-gradient(135deg, rgba(0,194,255,.25), rgba(179,71,234,.2));
  border-left: 3px solid var(--cyan);
}
[data-theme="dark"] .nav-button:hover:not(.active) {
  background: rgba(255,255,255,.06);
}

/* Ícones coloridos no menu dark */
[data-theme="dark"] [data-view="dashboard"]  .icon { color: #00C2FF; }
[data-theme="dark"] [data-view="clients"]    .icon { color: #22c55e; }
[data-theme="dark"] [data-view="services"]   .icon { color: #f59e0b; }
[data-theme="dark"] [data-view="quotes"]     .icon { color: #B347EA; }
[data-theme="dark"] [data-view="orders"]     .icon { color: #00C2FF; }
[data-theme="dark"] [data-view="schedule"]   .icon { color: #22c55e; }
[data-theme="dark"] [data-view="payments"]   .icon { color: #f59e0b; }
[data-theme="dark"] [data-view="receivable"] .icon { color: #22c55e; }
[data-theme="dark"] [data-view="payable"]    .icon { color: #e74c3c; }
[data-theme="dark"] [data-view="reports"]    .icon { color: #B347EA; }

/* Atalhos do dashboard dark */
[data-theme="dark"] .shortcut-card {
  background: #12192e;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  transition: all .2s;
}
[data-theme="dark"] .shortcut-card:hover {
  border-color: rgba(0,194,255,.3);
  background: rgba(0,194,255,.06);
  transform: translateY(-1px);
}
[data-theme="dark"] .shortcut-card::after {
  content: '›';
  position: absolute;
  right: 16px;
  font-size: 1.4rem;
  color: rgba(255,255,255,.2);
}
[data-theme="dark"] .shortcut-card { position: relative; }

/* Agendamentos dark */
[data-theme="dark"] #upcomingList .list-item {
  background: #12192e;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  border-left: 3px solid var(--cyan);
  margin-bottom: 8px;
}
[data-theme="dark"] #upcomingList .list-item strong { color: #fff; }
[data-theme="dark"] #upcomingList .list-item p { color: rgba(255,255,255,.45); }

/* Panel/cards dark */
[data-theme="dark"] .panel {
  background: #12192e;
  border-color: rgba(255,255,255,.07);
  border-radius: 16px;
}
[data-theme="dark"] .panel-header {
  border-color: rgba(255,255,255,.07);
}
[data-theme="dark"] .panel-header h2 {
  color: var(--cyan);
}

/* Gráfico barras horizontal dark */
[data-theme="dark"] .chart-fill.income {
  background: linear-gradient(90deg, #00C2FF, #B347EA);
}
[data-theme="dark"] .chart-fill.expense {
  background: linear-gradient(90deg, #e74c3c, #f59e0b);
}
[data-theme="dark"] .chart-track {
  background: rgba(255,255,255,.06);
  border-radius: 999px;
}

/* Bloco Dica Maazar na sidebar */
[data-theme="dark"] .sidebar-tip {
  margin: 12px 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(0,194,255,.15), rgba(179,71,234,.15));
  border: 1px solid rgba(0,194,255,.2);
  border-radius: 14px;
  font-size: .76rem;
  color: rgba(255,255,255,.8);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
[data-theme="dark"] .sidebar-tip strong { color: #fff; display: block; margin-bottom: 3px; font-size: .8rem; }
[data-theme="dark"] .sidebar-tip .tip-emoji { font-size: 1.4rem; flex-shrink: 0; }

/* List items dark */
[data-theme="dark"] .list-item {
  background: #12192e;
  border-color: rgba(255,255,255,.07);
  border-radius: 12px;
  margin-bottom: 8px;
}
[data-theme="dark"] .list-item:hover { background: #1a2340; }

/* Topbar dark refinado */
[data-theme="dark"] .topbar {
  background: #0d1427;
  border-color: rgba(255,255,255,.07);
  box-shadow: 0 1px 0 rgba(255,255,255,.05);
}

/* ============================================================
   METRIC CARDS COM ÍCONE (diurno e noturno)
   ============================================================ */
.metric-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.metric-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
  background: var(--surface-2);
  color: var(--navy);
  flex-shrink: 0;
}

/* Sidebar tip — oculto no modo diurno, aparece no noturno */
.sidebar-tip--hidden { display: none; }
[data-theme="dark"] .sidebar-tip--hidden { display: flex; }

/* Agendamentos dark com avatar */
[data-theme="dark"] #upcomingList .list-item {
  position: relative;
  padding-left: 54px;
}
[data-theme="dark"] .appt-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
}

/* Shortcut cards dark com seta */
[data-theme="dark"] .shortcut-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
[data-theme="dark"] .shortcut-card .shortcut-arrow {
  margin-left: auto;
  color: rgba(255,255,255,.25);
  font-size: 1.2rem;
  display: block;
}

/* ============================================================
   MODO NOTURNO — CORREÇÕES DE COR
   ============================================================ */

/* Barra inferior mobile: fundo escuro no dark */
[data-theme="dark"] .mobile-bottom-nav {
  background: #0d1427 !important;
  border-top: 1px solid rgba(255,255,255,.06) !important;
  box-shadow: 0 -4px 24px rgba(0,0,0,.4) !important;
}

/* Brand/logo na sidebar: sem fundo azul bebê */
[data-theme="dark"] .brand {
  background: transparent !important;
  border-bottom-color: rgba(255,255,255,.06) !important;
}
[data-theme="dark"] .brand-mark {
  background: transparent !important;
}

/* Drawer mobile no modo noturno — fundo escuro correto */
[data-theme="dark"] .mobile-drawer {
  background: #111827 !important;
}
[data-theme="dark"] .mobile-drawer-overlay {
  background: rgba(0,0,0,.6) !important;
}
[data-theme="dark"] .mobile-drawer-header {
  background: #111827 !important;
  border-color: rgba(255,255,255,.07) !important;
}
[data-theme="dark"] .mobile-drawer-nav {
  background: #111827 !important;
}
[data-theme="dark"] .mobile-drawer-item {
  color: rgba(255,255,255,.75) !important;
  border-color: rgba(255,255,255,.05) !important;
}
[data-theme="dark"] .mobile-drawer-item.active,
[data-theme="dark"] .mobile-drawer-item:hover {
  background: rgba(0,194,255,.1) !important;
  color: #fff !important;
}
[data-theme="dark"] .mobile-drawer-section {
  color: rgba(255,255,255,.3) !important;
}

/* ============================================================
   NOVA TELA DE LOGIN
   ============================================================ */
.auth-screen {
  min-height: 100vh;
  background: #0a0f1e;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  background: #111827;
  border-radius: 24px;
  padding: 36px 28px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.07);
}

/* Logo ícone */
.auth-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.auth-icon {
  height: 64px;
  width: auto;
  mix-blend-mode: screen;
  background: transparent;
}

/* Título */
.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin: 0 0 6px;
}
.auth-card > p {
  text-align: center;
  color: rgba(255,255,255,.5);
  font-size: .88rem;
  margin: 0 0 24px;
}

/* Abas */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #1a2235;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border: none;
  border-radius: 9px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  color: rgba(255,255,255,.5);
  background: transparent;
  font-family: inherit;
}
.auth-tab.active {
  background: #243050;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

/* Inputs */
.auth-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  margin-bottom: 14px;
}
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-wrap svg:first-child {
  position: absolute;
  left: 14px;
  color: rgba(255,255,255,.3);
  pointer-events: none;
  flex-shrink: 0;
}
.auth-input-wrap input {
  width: 100%;
  background: #1a2235;
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 13px 44px;
  color: #fff;
  font-size: .9rem;
  font-family: inherit;
  transition: border-color .2s;
}
.auth-input-wrap input::placeholder { color: rgba(255,255,255,.25); }
.auth-input-wrap input:focus {
  outline: none;
  border-color: rgba(0,194,255,.5);
  background: #1e2a40;
}
.auth-eye-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: rgba(255,255,255,.3);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}
.auth-eye-btn:hover { color: rgba(255,255,255,.7); }

/* Lembrar + Esqueci */
.auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.auth-remember {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 0 !important;
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  cursor: pointer;
}
.auth-remember input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--cyan);
  cursor: pointer;
}
.auth-forgot {
  background: none;
  border: none;
  color: #B347EA;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.auth-forgot:hover { opacity: .8; }

/* Botão submit */
.auth-submit-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #00C2FF, #B347EA);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .2s, transform .2s;
  margin-bottom: 20px;
}
.auth-submit-btn:hover { opacity: .9; transform: translateY(-1px); }

/* Separador */
.auth-or {
  text-align: center;
  color: rgba(255,255,255,.25);
  font-size: .8rem;
  margin-bottom: 16px;
  position: relative;
}
.auth-or::before, .auth-or::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: rgba(255,255,255,.08);
}
.auth-or::before { left: 0; }
.auth-or::after  { right: 0; }

/* CTA planos */
.auth-plans-cta {
  background: rgba(179,71,234,.08);
  border: 1px solid rgba(179,71,234,.2);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.auth-plans-cta-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(179,71,234,.2);
  color: #B347EA;
  display: flex; align-items: center; justify-content: center;
}
.auth-plans-cta-text strong {
  display: block;
  color: #fff;
  font-size: .9rem;
  margin-bottom: 4px;
}
.auth-plans-cta-text span {
  color: rgba(255,255,255,.5);
  font-size: .78rem;
  line-height: 1.4;
}
.auth-plans-cta-btn {
  background: none;
  border: 1.5px solid rgba(179,71,234,.4);
  border-radius: 10px;
  color: #B347EA;
  font-size: .84rem;
  font-weight: 700;
  padding: 9px 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  width: 100%;
}
.auth-plans-cta-btn:hover {
  background: rgba(179,71,234,.1);
  border-color: #B347EA;
}

/* Mensagem de erro/sucesso */
.auth-message {
  text-align: center;
  font-size: .84rem;
  margin: 8px 0 0;
  min-height: 20px;
  color: var(--danger);
}

/* ============================================================
   CORREÇÕES MOBILE
   ============================================================ */

/* Topbar mobile — mesma cor da versão web */
@media (max-width: 768px) {
  .topbar {
    background: var(--navy) !important;
    border-bottom-color: rgba(255,255,255,.07) !important;
  }
  .topbar h1 { color: #fff !important; }
  .topbar .eyebrow { color: var(--cyan) !important; }
  .topbar-icon-btn { color: rgba(255,255,255,.7) !important; }
  #themeToggleBtn { border-color: rgba(255,255,255,.2) !important; color: rgba(255,255,255,.7) !important; }
}

/* Login — remove fundo azul da logo com mix-blend-mode mais forte */
.auth-logo-wrap {
  background: transparent;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.auth-icon {
  height: 64px;
  width: auto;
  mix-blend-mode: lighten;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}
