/* ============================================================
   PropostaFlex — shadcn/React aesthetic, mesmas cores
   ============================================================ */

:root {
  /* Brand — mantidas exatamente */
  --primary:    #4F46E5;
  --primary-dk: #3730A3;
  --primary-lt: #EEF2FF;
  --primary-ring: rgba(79,70,229,.18);

  --success:    #10B981;
  --success-lt: #ECFDF5;
  --danger:     #EF4444;
  --danger-lt:  #FEF2F2;
  --warning:    #F59E0B;
  --warning-lt: #FFFBEB;
  --info:       #3B82F6;
  --info-lt:    #EFF6FF;

  /* Neutrals — hsl-based para precisão */
  --white:     #ffffff;
  --bg:        hsl(210 20% 98%);      /* quase branco frio */
  --border:    hsl(214 13% 91%);      /* E2E8F0 — shadcn default */
  --border-hov:hsl(214 13% 82%);

  --gray-50:  hsl(210 20% 98%);
  --gray-100: hsl(210 17% 95%);
  --gray-200: hsl(214 13% 91%);
  --gray-300: hsl(213 12% 84%);
  --gray-400: hsl(215 14% 63%);
  --gray-500: hsl(215 16% 47%);
  --gray-600: hsl(215 19% 35%);
  --gray-700: hsl(215 25% 27%);
  --gray-800: hsl(217 33% 17%);
  --gray-900: hsl(222 47% 11%);

  /* Typography */
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Geometry */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius:    8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows — sutis como shadcn */
  --shadow-xs:  0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow-sm:  0 1px 3px 0 rgb(0 0 0 / .07), 0 1px 2px -1px rgb(0 0 0 / .06);
  --shadow:     0 4px 6px -1px rgb(0 0 0 / .06), 0 2px 4px -2px rgb(0 0 0 / .04);
  --shadow-md:  0 10px 15px -3px rgb(0 0 0 / .07), 0 4px 6px -4px rgb(0 0 0 / .04);
  --shadow-lg:  0 20px 25px -5px rgb(0 0 0 / .08), 0 8px 10px -6px rgb(0 0 0 / .04);

  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--gray-700);
  line-height: 1.5;
  min-height: 100vh;
  
}

/* ================================================================
   LAYOUT
================================================================ */
.layout { display: flex; min-height: 100vh; }

/* ================================================================
   SIDEBAR — estilo Linear App / shadcn
================================================================ */
.sidebar {
  width: 224px;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  top: 0; left: 0;
  z-index: 200;
}

/* Brand */
.sidebar-brand {
  height: 56px;
  padding: 0 .875rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand-mark {
  width: 28px; height: 28px;
  background: var(--primary);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(79,70,229,.35);
}
.brand-mark svg { width: 14px; height: 14px; color: #fff; }
.sidebar-brand h1 {
  font-size: .875rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -.25px;
  flex: 1;
}
.brand-badge {
  font-size: .6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--primary-lt);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 99px;
  border: 1px solid rgba(79,70,229,.15);
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: .5rem .5rem;
  overflow-y: auto;
}
.nav-section-label {
  padding: .75rem .5rem .25rem;
  font-size: .625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gray-400);
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: .5625rem;
  padding: .4375rem .625rem;
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  text-decoration: none;
  font-size: .8125rem;
  font-weight: 500;
  transition: color .12s var(--ease), background .12s var(--ease);
  margin-bottom: 1px;
  position: relative;
}
.sidebar-nav a svg {
  width: 15px; height: 15px;
  flex-shrink: 0;
  opacity: .85;
}
.sidebar-nav a span { flex: 1; }
.sidebar-nav a:hover {
  color: var(--gray-900);
  background: var(--gray-100);
}
.sidebar-nav a.active {
  color: var(--primary);
  background: var(--primary-lt);
  font-weight: 600;
}
.sidebar-nav a.active svg { opacity: 1; }

/* Sidebar footer */
.sidebar-footer {
  padding: .75rem .875rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.footer-avatar {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: var(--primary-lt);
  color: var(--primary);
  font-size: .65rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(79,70,229,.15);
}
.footer-info { flex: 1; min-width: 0; }
.footer-name {
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.footer-logout {
  font-size: .7rem;
  color: var(--gray-400);
  text-decoration: none;
  transition: color .12s;
}
.footer-logout:hover { color: var(--danger); }

/* ================================================================
   MAIN
================================================================ */
.main {
  margin-left: 224px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  width: calc(100% - 224px);
  overflow-x: hidden;
}

/* Topbar */
.topbar {
  height: 56px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
  overflow: visible;
}
.topbar-left { display: flex; align-items: center; gap: .5rem; min-width: 0; flex: 1; overflow: hidden; }
.topbar h2 {
  font-size: .875rem;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -.15px;
}
.topbar-sep { color: var(--gray-300); font-size: .8rem; }
.topbar-sub { font-size: .8rem; color: var(--gray-400); font-weight: 400; }
.topbar-right { display: flex; align-items: center; gap: .625rem; flex-shrink: 0; }
.topbar-chip {
  display: flex;
  align-items: center;
  gap: .375rem;
  padding: .3125rem .6875rem;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--gray-600);
}
.online-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(16,185,129,.2);
}

/* Content */
.content { padding: 1.5rem; flex: 1; min-width: 0; }

/* ================================================================
   CARD — shadcn Card component
================================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-header h3 {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -.1px;
}
.card-body { padding: 1.25rem; }
.card-footer {
  padding: .875rem 1.25rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
}

/* ================================================================
   METRIC CARDS
================================================================ */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .875rem;
  margin-bottom: 1.25rem;
}
.metric-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  transition: box-shadow .15s var(--ease), border-color .15s var(--ease);
  cursor: default;
}
.metric-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-hov);
}
.metric-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.metric-icon svg { width: 18px; height: 18px; }
.metric-icon.ia { background: var(--primary-lt); color: var(--primary); border-color: rgba(79,70,229,.15); }
.metric-icon.ib { background: #EFF6FF; color: #2563EB; border-color: #BFDBFE; }
.metric-icon.ig { background: var(--success-lt); color: var(--success); border-color: #A7F3D0; }
.metric-icon.ir { background: var(--danger-lt); color: var(--danger); border-color: #FECACA; }
.metric-icon.iw { background: var(--warning-lt); color: var(--warning); border-color: #FDE68A; }
.metric-icon.it { background: #F0FDFA; color: #0D9488; border-color: #99F6E4; }
.metric-info { flex: 1; min-width: 0; }
.metric-label {
  font-size: .6875rem;
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .25rem;
}
.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -.5px;
  line-height: 1.1;
}
.metric-sub {
  font-size: .7rem;
  color: var(--gray-400);
  margin-top: .2rem;
}

/* ================================================================
   BUTTONS — shadcn Button variants
================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: .4375rem .875rem;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font);
  transition: background .12s var(--ease), border-color .12s var(--ease),
              box-shadow .12s var(--ease), color .12s var(--ease);
  white-space: nowrap;
  letter-spacing: -.1px;
  user-select: none;
}
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* default */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover {
  background: var(--primary-dk);
  border-color: var(--primary-dk);
}
.btn-primary:active { opacity: .92; }

/* outline */
.btn-outline {
  background: var(--white);
  color: var(--gray-700);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--border-hov);
  color: var(--gray-900);
}

/* ghost */
.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

/* destructive */
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: var(--shadow-xs);
}
.btn-danger:hover { filter: brightness(.93); }

/* success */
.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  box-shadow: var(--shadow-xs);
}
.btn-success:hover { filter: brightness(.93); }

/* whatsapp */
.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  box-shadow: var(--shadow-xs);
}
.btn-whatsapp:hover { background: #1db954; border-color: #1db954; }

/* sizes */
.btn-sm { padding: .3125rem .625rem; font-size: .75rem; border-radius: var(--radius-xs); }
.btn-lg { padding: .5625rem 1.125rem; font-size: .875rem; }
.btn-icon { padding: .4375rem; }

/* ================================================================
   FORMS — shadcn Input / Label / Textarea style
================================================================ */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: .375rem;
  letter-spacing: -.1px;
}
.form-label .req { color: var(--danger); margin-left: .1rem; }

.form-control {
  display: block;
  width: 100%;
  padding: .4375rem .75rem;
  font-size: .8125rem;
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
  line-height: 1.5;
}
.form-control::placeholder { color: var(--gray-400); }
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.form-control:hover:not(:focus) { border-color: var(--border-hov); }
select.form-control {
  cursor: pointer;
  padding-right: 2rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .625rem center;
}
textarea.form-control { resize: vertical; min-height: 88px; }
.form-hint { font-size: .72rem; color: var(--gray-400); margin-top: .3rem; line-height: 1.4; }
.form-error { font-size: .72rem; color: var(--danger); margin-top: .3rem; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* Input with icon */
.input-wrap { position: relative; }
.input-wrap .form-control { padding-left: 2.25rem; }
.input-wrap .input-icon {
  position: absolute; left: .625rem; top: 50%;
  transform: translateY(-50%); color: var(--gray-400);
  pointer-events: none; width: 15px; height: 15px;
}

/* ================================================================
   TABLE — shadcn Table
================================================================ */
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8125rem;
}
thead tr {
  border-bottom: 1px solid var(--border);
}
thead th {
  background: transparent;
  padding: .6875rem 1.125rem;
  text-align: left;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  white-space: nowrap;
}
tbody td {
  padding: .8125rem 1.125rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .08s; }
tbody tr:hover td { background: var(--gray-50); }
.td-actions { display: flex; gap: .25rem; align-items: center; }

/* ================================================================
   BADGES — shadcn Badge
================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .175rem .5625rem;
  font-size: .6875rem;
  font-weight: 500;
  border-radius: 99px;
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: .01em;
}
.badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .7;
  flex-shrink: 0;
}
.badge-draft    { background: var(--gray-100); color: var(--gray-600); border-color: var(--border); }
.badge-sent     { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.badge-viewed   { background: #FFF7ED; color: #C2410C; border-color: #FED7AA; }
.badge-approved { background: var(--success-lt); color: #065F46; border-color: #A7F3D0; }
.badge-rejected { background: var(--danger-lt); color: #991B1B; border-color: #FECACA; }

/* ================================================================
   ALERTS — shadcn Alert
================================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  padding: .75rem .875rem;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  line-height: 1.5;
  animation: alertIn .15s var(--ease);
}
@keyframes alertIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.alert svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #F0FDF4; color: #166534; border-color: #BBF7D0; }
.alert-error   { background: var(--danger-lt); color: #991B1B; border-color: #FECACA; }
.alert-info    { background: var(--info-lt); color: #1E40AF; border-color: #BFDBFE; }

/* ================================================================
   SEPARATOR / DIVIDER
================================================================ */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ================================================================
   PROPOSAL ITEMS TABLE
================================================================ */
.items-table { width: 100%; border-collapse: collapse; }
.items-table th {
  background: var(--gray-50);
  font-size: .6875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--gray-500);
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.items-table td {
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.items-table tr:last-child td { border-bottom: none; }
.items-table .num { text-align: right; }
.items-table input {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .3125rem .5625rem;
  font-size: .8rem;
  color: var(--gray-900);
  font-family: var(--font);
  transition: border-color .12s, box-shadow .12s;
}
.items-table input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-ring);
}
.items-table input.desc  { width: 100%; }
.items-table input.qty, .items-table input.price { width: 88px; text-align: right; }
.items-table .total-cell { font-weight: 600; color: var(--gray-900); text-align: right; }
.btn-remove-item {
  background: none; border: none; cursor: pointer;
  color: var(--gray-300); padding: .25rem .3125rem;
  border-radius: var(--radius-xs);
  transition: color .12s, background .12s;
  display: flex; align-items: center;
}
.btn-remove-item:hover { color: var(--danger); background: var(--danger-lt); }

.totals-box {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: .375rem;
  padding-top: .875rem;
}
.totals-row { display: flex; gap: 2.5rem; align-items: center; font-size: .8125rem; }
.totals-row .label { color: var(--gray-500); }
.totals-row .value { font-weight: 500; min-width: 110px; text-align: right; color: var(--gray-900); }
.totals-row.grand {
  padding-top: .5625rem;
  border-top: 1px solid var(--border);
  margin-top: .25rem;
}
.totals-row.grand .label { font-size: .875rem; font-weight: 600; color: var(--gray-900); }
.totals-row.grand .value { font-size: 1.125rem; font-weight: 700; color: var(--primary); }

/* ================================================================
   AUTH — layout split screen
================================================================ */
.auth-wrap { min-height: 100vh; display: flex; }
.auth-left {
  flex: 1;
  background: var(--primary);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(255,255,255,.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 80%, rgba(0,0,0,.15) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem;
  position: relative;
  overflow: hidden;
}
/* Grid pattern */
.auth-left::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.auth-left-inner { position: relative; z-index: 1; }
.auth-brand {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: 3rem;
}
.auth-brand-icon {
  width: 30px; height: 30px;
  background: rgba(255,255,255,.2);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.25);
}
.auth-brand-icon svg { width: 15px; height: 15px; color: #fff; }
.auth-brand-name { font-size: .9375rem; font-weight: 700; color: #fff; letter-spacing: -.2px; }
.auth-headline {
  font-size: 2rem; font-weight: 700;
  color: #fff; letter-spacing: -.6px;
  line-height: 1.25; margin-bottom: .875rem;
}
.auth-headline em { font-style: normal; color: rgba(255,255,255,.5); }
.auth-desc { font-size: .875rem; color: rgba(255,255,255,.5); line-height: 1.7; max-width: 320px; }
.auth-feats { margin-top: 2.5rem; display: flex; flex-direction: column; gap: .5rem; }
.auth-feat  { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; color: rgba(255,255,255,.6); }
.auth-feat svg { width: 14px; height: 14px; color: rgba(255,255,255,.4); flex-shrink: 0; }

.auth-right {
  width: 440px;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  background: var(--bg);
}
.auth-box {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.auth-box-head { margin-bottom: 1.5rem; }
.auth-box-title {
  font-size: 1.125rem; font-weight: 700;
  color: var(--gray-900); letter-spacing: -.3px; margin-bottom: .25rem;
}
.auth-box-sub { font-size: .8rem; color: var(--gray-400); }
.auth-footer {
  text-align: center; margin-top: 1.125rem;
  font-size: .8rem; color: var(--gray-500);
}
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

/* ================================================================
   PAGE HEAD
================================================================ */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}
.page-head-left {}
.page-head h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -.3px;
}
.page-head p {
  font-size: .8rem;
  color: var(--gray-500);
  margin-top: .1rem;
}
.page-head .actions { display: flex; gap: .5rem; align-items: center; }

/* ================================================================
   EMPTY STATE
================================================================ */
.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
}
.empty-state .icon { font-size: 2rem; margin-bottom: .75rem; opacity: .4; }
.empty-state p { font-size: .8125rem; color: var(--gray-400); margin-bottom: 1.125rem; }

/* ================================================================
   SEARCH BAR
================================================================ */
.search-bar { display: flex; gap: .5rem; align-items: center; }
.search-bar .form-control { min-width: 220px; }

/* ================================================================
   MISC HELPERS
================================================================ */
.wa-preview {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-sm);
  padding: .75rem .875rem;
  font-size: .8rem;
  color: #14532D;
  min-height: 80px;
  white-space: pre-wrap;
  line-height: 1.6;
}
.valid-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--warning-lt); color: #92400E;
  border: 1px solid #FDE68A;
  border-radius: 99px; padding: .175rem .55rem;
  font-size: .7rem; font-weight: 500;
}
.badge-aberto {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--warning-lt); color: #92400E;
  border: 1px solid #FDE68A;
  border-radius: 99px; padding: .15rem .55rem;
  font-size: .68rem; font-weight: 500;
}

/* ================================================================
   SECTION TITLE (gráficos, listas)
================================================================ */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .875rem;
}
.section-head h4 {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -.1px;
}
.section-head span { font-size: .75rem; color: var(--gray-400); }

/* ================================================================
   SCROLLBAR — webkit refinado
================================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-300); }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s var(--ease); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { padding: 0 1rem; }
  .content { padding: 1rem; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
}

/* ================================================================
   SIDEBAR — ajustes solicitados
================================================================ */

/* Remove badge Beta — não renderiza mais no HTML, mas garante escondido */
.brand-badge { display: none; }

/* Nav section labels — mesmo tamanho da palavra Dashboard nos links */
.nav-section-label {
  font-size: .8125rem !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--gray-700) !important;
  padding: .875rem .625rem .3rem !important;
}

/* Footer da sidebar — ícone de logout no lugar do texto "Sair" */
.sidebar-footer {
  padding: .75rem .875rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.footer-name {
  flex: 1;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.footer-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  color: var(--gray-400);
  text-decoration: none;
  flex-shrink: 0;
  transition: color .12s var(--ease), background .12s var(--ease);
}
.footer-logout-btn svg { width: 15px; height: 15px; }
.footer-logout-btn:hover {
  color: var(--danger);
  background: var(--danger-lt);
}

/* Topbar chip — nome do usuário mesmo tamanho de Dashboard */
.topbar h2,
.topbar-chip {
  font-size: .8125rem !important;
}
.topbar-chip {
  font-weight: 500;
}

/* ================================================================
   APP FOOTER — rodapé da aplicação
================================================================ */
.app-footer {
  border-top: 1px solid var(--border);
  padding: .75rem 1.5rem;
  text-align: center;
  font-size: .75rem;
  color: var(--gray-400);
  background: var(--white);
  letter-spacing: .01em;
}

/* ================================================================
   APP FOOTER — rodapé centralizado, mesmo tamanho do Dashboard
================================================================ */
.app-footer {
  border-top: 1px solid var(--border);
  padding: .875rem 1.5rem;
  text-align: center;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--white);
  letter-spacing: -.1px;
}

/* ================================================================
   SIDEBAR — logo Propoo
================================================================ */
.sidebar-brand-logo {
  height: 72px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--white);
}
.sidebar-logo {
  width: 148px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ================================================================
   AUTH — logo Propoo (texto branco via filter)
================================================================ */
.auth-brand {
  margin-bottom: 2.5rem;
}
.auth-brand-logo {
  width: 280px;
  height: auto;
  display: block;
  /* Inverte preto->branco no texto preservando as cores do hexágono:
     invert(1) torna tudo branco; hue-rotate(180deg) restaura as cores
     do hexágono que ficaram invertidas */
}

/* ================================================================
   MOBILE — correções completas (hamburguer, cards, gráficos, tabelas)
================================================================ */

/* Hamburguer button — aparece só no mobile */
.hamburger-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: none; background: none; cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  flex-shrink: 0;
  transition: background .12s;
}
.hamburger-btn:hover { background: var(--gray-100); }
.hamburger-btn svg { width: 20px; height: 20px; }

/* Overlay escuro quando sidebar aberta no mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

@media (max-width: 768px) {
  /* Layout base */
  .layout { position: relative; }
  .main   { margin-left: 0 !important; width: 100%; overflow-x: hidden; }
  .content { padding: .875rem; overflow-x: hidden; }

  /* Sidebar deslizante */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
  }
  .sidebar.open { transform: translateX(0); }

  /* Topbar com hamburguer */
  .topbar { padding: 0 .875rem; gap: .5rem; }
  .hamburger-btn { display: flex; }

  /* Cards de métricas: 2 colunas no mobile */
  .metrics {
    grid-template-columns: 1fr 1fr !important;
    gap: .625rem !important;
  }
  .metric-card { padding: .75rem !important; }
  .metric-icon { width: 34px !important; height: 34px !important; }
  .metric-icon svg { width: 15px !important; height: 15px !important; }
  .metric-value { font-size: 1.25rem !important; }
  .metric-label { font-size: .68rem !important; }

  /* Gráficos: empilhados no mobile */
  .charts-row {
    grid-template-columns: 1fr !important;
    gap: .75rem !important;
  }

  /* Donut: centralizado */
  .donut-wrap { width: 140px !important; height: 140px !important; }

  /* Tabela do dashboard: scroll horizontal */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dash-proposals-table { min-width: 520px; }

  /* Page head */
  .page-head { flex-direction: column; align-items: flex-start; gap: .625rem; }
  .page-head .btn { width: 100%; justify-content: center; }

  /* Form rows em coluna */
  .form-row, .form-row-3 { grid-template-columns: 1fr !important; }

  /* Cards de suporte */
  .support-grid { grid-template-columns: 1fr !important; }

  /* Auth — gerenciado pelo bloco dedicado abaixo */

  /* Topbar chip — esconde no mobile pra não poluir */
  .topbar-chip { display: none; }
}

/* ================================================================
   SIDEBAR — tema escuro (dark)
================================================================ */
.sidebar {
  background: #3D4EC2 !important;
  border-right: none !important;
}

/* Logo area */
.sidebar-brand,
.sidebar-brand-logo {
  background: #3D4EC2 !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

/* Nav section labels */
.nav-section-label {
  color: rgba(255,255,255,.35) !important;
}

/* Nav links */
.sidebar-nav a {
  color: rgba(255,255,255,.6) !important;
}
.sidebar-nav a svg {
  opacity: .7 !important;
}
.sidebar-nav a:hover {
  background: rgba(255,255,255,.08) !important;
  color: #fff !important;
}
.sidebar-nav a:hover svg {
  opacity: 1 !important;
}

/* Link ativo */
.sidebar-nav a.active {
  background: rgba(99,102,241,.35) !important;
  color: #fff !important;
  font-weight: 600 !important;
}
.sidebar-nav a.active svg {
  opacity: 1 !important;
}

/* Footer */
.sidebar-footer {
  background: #3D4EC2 !important;
  border-top: 1px solid rgba(255,255,255,.08) !important;
}
.footer-avatar {
  background: rgba(99,102,241,.4) !important;
  color: #C7D2FE !important;
  border-color: rgba(99,102,241,.4) !important;
}
.footer-name {
  color: rgba(255,255,255,.85) !important;
}
.footer-logout-btn {
  color: rgba(255,255,255,.35) !important;
}
.footer-logout-btn:hover {
  background: rgba(239,68,68,.2) !important;
  color: #FCA5A5 !important;
}

/* Hamburguer no mobile — cor compatível */
@media (max-width: 768px) {
  .sidebar { box-shadow: 4px 0 32px rgba(0,0,0,.35) !important; }
}


/* ================================================================
   AUTH — Mobile trial banner
================================================================ */
.auth-mobile-banner { display: none; }
.auth-mobile-stats  { display: none; }

@media (max-width: 768px) {
  .auth-wrap { flex-direction: column; min-height: 100vh; }
  .auth-left { display: none !important; }
  .auth-right { width: 100% !important; padding: 0 !important; min-height: unset !important; align-items: flex-start !important; background: #fff !important; }

  /* ── Hero banner ── */
  .auth-mobile-banner {
    display: block;
    background: linear-gradient(150deg, #3730A3 0%, #4F46E5 45%, #6D28D9 100%);
    padding: 1.75rem 1.375rem 0;
    width: 100%;
    position: relative;
    overflow: hidden;
  }
  .auth-mobile-banner::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
    pointer-events: none;
  }
  .auth-mobile-banner-top {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1rem;
  }
  .auth-mobile-banner-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 99px; padding: .3rem .875rem;
    font-size: .69rem; font-weight: 700; color: #fff;
    letter-spacing: .05em; text-transform: uppercase;
  }
  .auth-mobile-banner-logo {
    height: 26px; width: auto; object-fit: contain;
    filter: brightness(0) invert(1); opacity: .85;
  }
  .auth-mobile-banner-title {
    font-size: 1.5rem; font-weight: 800; color: #fff;
    line-height: 1.25; letter-spacing: -.03em;
    margin-bottom: .5rem;
  }
  .auth-mobile-banner-title em { font-style: normal; color: #A5B4FC; }
  .auth-mobile-banner-sub {
    font-size: .8rem; color: rgba(255,255,255,.72);
    margin-bottom: 1.25rem; line-height: 1.55;
  }
  .auth-mobile-banner-feats {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: .5rem; margin-bottom: 1.375rem;
  }
  .auth-mobile-banner-feat {
    display: flex; align-items: center; gap: .5rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px; padding: .6rem .75rem;
    font-size: .75rem; font-weight: 500; color: rgba(255,255,255,.92);
  }
  .auth-mobile-banner-feat-icon {
    font-size: .9rem; flex-shrink: 0;
    width: 26px; height: 26px; border-radius: 7px;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
  }
  .auth-mobile-banner-feat svg { display: none; }
  .auth-mobile-banner-btn {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    width: 100%; padding: .875rem;
    background: #fff; color: #4338CA;
    border: none; border-radius: 14px 14px 0 0;
    font-size: .9375rem; font-weight: 800; cursor: pointer;
    box-shadow: 0 -4px 24px rgba(79,70,229,.2);
    letter-spacing: -.01em;
  }

  /* ── Login box ── */
  .auth-box {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: #fff !important;
  }
  .auth-right .auth-box { padding: 1.625rem 1.375rem 1.5rem; }
  .auth-right .auth-box > div:first-child { display: none; }

  /* ── Stats row ── */
  .auth-mobile-stats {
    display: flex;
    justify-content: space-around;
    background: #F0F4FF;
    border-top: 1px solid #E0E7FF;
    padding: 1.125rem 1rem;
    width: 100%;
  }
  .auth-mobile-stat { text-align: center; flex: 1; }
  .auth-mobile-stat-val {
    font-size: 1.125rem; font-weight: 800;
    color: #4F46E5; letter-spacing: -.02em;
    line-height: 1; margin-bottom: .2rem;
  }
  .auth-mobile-stat-label {
    font-size: .67rem; color: #94A3B8; font-weight: 500; line-height: 1.3;
  }
  .auth-mobile-stat-sep {
    width: 1px; background: #C7D2FE; flex-shrink: 0; margin: .125rem 0;
  }
}
