@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --sidebar: #0f172a;
  --sidebar-soft: #1e293b;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --shadow: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 16px rgba(15,23,42,.06), 0 2px 6px rgba(15,23,42,.04);
  --shadow-lg: 0 20px 40px rgba(15,23,42,.1);
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ─── Brand ─── */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 800; letter-spacing: -0.6px;
}
.brand > span:last-child > span { color: var(--primary); }

.brand-mark {
  display: grid; width: 34px; height: 34px; place-items: center;
  border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16,185,129,.3);
}
.brand-mark svg { width: 20px; fill: currentColor; }

/* ─── Buttons ─── */
.button {
  display: inline-flex; min-height: 40px; align-items: center;
  justify-content: center; gap: 8px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all 0.15s ease; white-space: nowrap;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .55; pointer-events: none; }

.button-primary {
  color: #fff; background: var(--primary);
  box-shadow: 0 1px 3px rgba(16,185,129,.3), 0 4px 12px rgba(16,185,129,.2);
}
.button-primary:hover { background: var(--primary-dark); }

.button-secondary {
  color: #475569; border-color: var(--border); background: #fff;
  box-shadow: var(--shadow);
}
.button-secondary:hover { border-color: #cbd5e1; background: #f8fafc; }

.button-danger { color: #fff; background: var(--danger); box-shadow: 0 2px 8px rgba(239,68,68,.25); }
.button-warning { color: #fff; background: var(--warning); }
.button-full { width: 100%; }
.button-sm { min-height: 34px; padding: 0 12px; font-size: 12px; }
.button-icon { font-size: 18px; font-weight: 400; line-height: 1; }

/* ─── Alerts ─── */
.alert {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
  padding: 12px 14px; border: 1px solid; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
}
.alert-error { color: #991b1b; border-color: #fecaca; background: #fef2f2; }
.alert-success { color: #065f46; border-color: #a7f3d0; background: #ecfdf5; }
.alert-warning { color: #92400e; border-color: #fde68a; background: #fffbeb; }
.alert-icon {
  display: grid; width: 20px; height: 20px; flex: 0 0 auto;
  place-items: center; border-radius: 50%; color: #fff;
  background: #94a3b8; font-size: 11px; font-weight: 700;
}
.alert-error .alert-icon { background: #dc2626; }
.alert-success .alert-icon { background: #059669; }
.alert-close {
  margin-left: auto; padding: 0; border: 0;
  color: currentColor; background: none; cursor: pointer;
  font-size: 18px; opacity: .5;
}
.alert-close:hover { opacity: 1; }

/* ─── Auth ─── */
.auth-body { overflow-x: hidden; background: #fff; }

.auth-shell {
  display: grid; min-height: 100vh;
  grid-template-columns: minmax(500px, 46%) 1fr;
}

.auth-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 52px 9%; background: #fff;
}
.auth-card { width: min(100%, 440px); }
.auth-card > .brand { margin-bottom: 50px; }

.auth-heading { margin-bottom: 28px; }
.auth-heading h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 800; letter-spacing: -1px; color: var(--text);
}
.auth-heading p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 14px; }

.auth-form { display: grid; gap: 18px; }

.field { min-width: 0; }
.field label {
  display: block; margin-bottom: 7px;
  color: #374151; font-size: 13px; font-weight: 600;
}
.field label em { color: var(--primary); font-style: normal; }

.field input, .field select, .field textarea,
.filters-form select, .search-field {
  width: 100%; border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm); outline: none;
  color: var(--text); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input, .field select { height: 44px; padding: 0 13px; }
.field textarea { min-height: 110px; padding: 12px 13px; resize: vertical; line-height: 1.55; }

.field input::placeholder, .field textarea::placeholder { color: #94a3b8; }

.field input:focus, .field select:focus, .field textarea:focus,
.filters-form select:focus, .search-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}

.password-field, .currency-field { position: relative; }
.password-field input { padding-right: 65px; }
.password-toggle {
  position: absolute; top: 50%; right: 12px; padding: 4px;
  border: 0; color: var(--primary); background: transparent;
  cursor: pointer; font-size: 12px; font-weight: 700;
  transform: translateY(-50%);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.auth-switch { margin: 26px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.auth-switch a { color: var(--primary); font-weight: 700; }

.auth-shell-simple {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 40px 20px;
}
.auth-shell-simple .auth-card { width: min(100%, 460px); }

.label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.label-row label { margin-bottom: 0; }
.forgot-link { font-size: 12px; color: var(--primary); font-weight: 600; }
.forgot-link:hover { text-decoration: underline; }

.auth-showcase {
  position: relative; display: flex; overflow: hidden;
  align-items: center; justify-content: center; padding: 70px;
  color: #fff;
  background: radial-gradient(circle at 75% 15%, rgba(16,185,129,.25), transparent 40%),
              linear-gradient(145deg, #060e1c 0%, #0a1a14 60%, #0c201a 100%);
}
.auth-showcase::before, .auth-showcase::after {
  position: absolute; border: 1px solid rgba(255,255,255,.04); border-radius: 50%; content: '';
}
.auth-showcase::before { width: 600px; height: 600px; right: -280px; bottom: -280px; }
.auth-showcase::after { width: 360px; height: 360px; top: -200px; left: -150px; }

.showcase-content { position: relative; z-index: 1; width: min(100%, 580px); }
.showcase-pill {
  display: inline-flex; margin-bottom: 22px; padding: 6px 12px;
  border: 1px solid rgba(52,211,153,.3); border-radius: 100px;
  color: #6ee7b7; background: rgba(16,185,129,.1);
  font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
}
.showcase-content h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 3.8vw, 52px);
  line-height: 1.1; letter-spacing: -2px;
}
.showcase-content h2 span { color: #34d399; }
.showcase-content > p {
  max-width: 500px; margin: 0 0 36px;
  color: #8fb4a0; font-size: 16px; line-height: 1.7;
}

.mini-dashboard {
  width: min(100%, 520px); padding: 16px;
  border: 1px solid rgba(255,255,255,.07); border-radius: 14px;
  background: rgba(255,255,255,.04);
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  backdrop-filter: blur(8px);
  transform: perspective(1000px) rotateY(-3deg) rotateX(2deg);
}
.mini-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; color: #7a8fa0; }
.mini-top span { display: flex; gap: 5px; }
.mini-top i { width: 6px; height: 6px; border-radius: 50%; background: #3d526b; }
.mini-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 9px; }
.mini-grid > div {
  position: relative; display: flex; min-height: 95px;
  flex-direction: column; padding: 15px; border-radius: 9px;
  background: rgba(255,255,255,.045);
}
.mini-grid small { color: #7a8fa0; font-size: 11px; }
.mini-grid strong { margin-top: 7px; font-size: 20px; }
.mini-grid em { margin-top: 6px; color: #34d399; font-size: 11px; font-style: normal; }
.mini-bars { display: flex; height: 28px; align-items: flex-end; gap: 4px; margin-top: auto; }
.mini-bars i { width: 9px; border-radius: 2px 2px 0 0; background: #10b981; }
.mini-bars i:nth-child(1) { height: 30%; }
.mini-bars i:nth-child(2) { height: 55%; }
.mini-bars i:nth-child(3) { height: 42%; }
.mini-bars i:nth-child(4) { height: 78%; }
.mini-bars i:nth-child(5) { height: 96%; }
.mini-list { display: grid; gap: 7px; padding: 12px 2px 0; }
.mini-list span {
  display: block; height: 7px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,.08) 55%, rgba(255,255,255,.03) 55%);
}
.benefit-list { display: grid; gap: 14px; }
.benefit-list > div {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,.06); border-radius: 11px;
  background: rgba(255,255,255,.03);
}
.benefit-list > div > span {
  display: grid; width: 30px; height: 30px; flex: 0 0 auto;
  place-items: center; border-radius: 8px;
  color: #34d399; background: rgba(16,185,129,.12); font-weight: 700;
}
.benefit-list p { display: grid; gap: 2px; margin: 0; }
.benefit-list small { color: #7a8fa0; }

/* ─── App Layout ─── */
.app-body { display: flex; }

.sidebar {
  position: fixed; z-index: 30; top: 0; bottom: 0; left: 0;
  display: flex; width: 248px; flex-direction: column;
  padding: 24px 14px 18px; color: #fff;
  background: var(--sidebar);
  border-right: 1px solid rgba(255,255,255,.04);
}
.sidebar .brand { margin-left: 8px; }
.sidebar .brand > span:last-child > span { color: #34d399; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; }
.sidebar-close { display: none; }

.nav-label {
  padding: 0 12px; margin: 22px 0 6px;
  color: #475569; font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
}

.main-nav { display: grid; gap: 2px; margin-top: 32px; }

.main-nav a {
  display: flex; height: 42px; align-items: center; gap: 12px;
  padding: 0 12px; border-radius: var(--radius-sm);
  color: #64748b; font-size: 13px; font-weight: 500; transition: .15s;
}
.main-nav a:hover { color: #cbd5e1; background: rgba(255,255,255,.05); }
.main-nav a.active {
  color: #fff; background: rgba(16,185,129,.15);
  box-shadow: inset 3px 0 0 var(--primary);
}
.main-nav svg, .logout-link svg { width: 18px; fill: currentColor; flex-shrink: 0; }

.trial-chip {
  display: flex; align-items: center; gap: 10px;
  background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.3);
  border-radius: 9px; padding: 10px 12px; margin-bottom: 10px; font-size: 12px;
}
.trial-chip svg { width: 17px; height: 17px; fill: #fbbf24; flex-shrink: 0; }
.trial-chip > div { flex: 1; min-width: 0; }
.trial-chip strong { display: block; color: #fde68a; font-weight: 700; font-size: 11px; }
.trial-chip span { color: rgba(255,255,255,.6); font-size: 11px; }
.trial-chip a { font-size: 11px; font-weight: 700; color: #fbbf24; text-decoration: none; white-space: nowrap; padding: 3px 8px; border: 1px solid rgba(251,191,36,.5); border-radius: 5px; }
.trial-chip a:hover { background: rgba(251,191,36,.15); }

.sidebar-footer {
  display: flex; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.user-card { display: flex; min-width: 0; flex: 1; align-items: center; gap: 9px; }
.avatar {
  display: grid; width: 34px; height: 34px; flex: 0 0 auto;
  place-items: center; border-radius: 9px; color: #fff;
  background: linear-gradient(135deg, #34d399, #059669);
  font-size: 13px; font-weight: 700;
}
.user-info { display: grid; min-width: 0; gap: 1px; }
.user-info strong, .user-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-info strong { font-size: 13px; font-weight: 600; }
.user-info small { color: #475569; font-size: 11px; }
.logout-link { padding: 6px; color: #475569; border-radius: 6px; }
.logout-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-overlay, .mobile-header { display: none; }

.app-main { width: 100%; min-width: 0; margin-left: 248px; }

.page-container {
  width: min(100%, 1460px); margin: 0 auto;
  padding: 36px clamp(24px, 3.5vw, 56px) 56px;
}

/* ─── Page header ─── */
.eyebrow {
  display: block; margin-bottom: 5px;
  color: var(--primary); font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
}

.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 28px;
}
.page-header h1 {
  margin: 0 0 5px;
  font-size: clamp(24px, 2.5vw, 30px);
  font-weight: 800; line-height: 1.15; letter-spacing: -0.8px;
}
.page-header p { margin: 0; color: var(--muted); font-size: 13px; }
.wave { display: inline-block; font-size: .8em; transform: rotate(-8deg); }

/* ─── Stats grid (6 cards, 3+3) ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px; margin-bottom: 20px;
}

.stat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.stat-icon {
  display: grid; width: 44px; height: 44px; flex: 0 0 auto;
  place-items: center; border-radius: 11px;
}
.stat-icon svg { width: 22px; fill: currentColor; }

.icon-emerald { color: #059669; background: #d1fae5; }
.icon-blue    { color: #2563eb; background: #dbeafe; }
.icon-amber   { color: #d97706; background: #fef3c7; }
.icon-purple  { color: #7c3aed; background: #ede9fe; }
.icon-rose    { color: #e11d48; background: #ffe4e6; }
.icon-cyan    { color: #0891b2; background: #cffafe; }

.stat-copy { display: flex; min-width: 0; flex-direction: column; }
.stat-copy > span { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.stat-copy strong {
  margin: 4px 0 2px;
  font-size: 26px; font-weight: 800; letter-spacing: -0.8px; line-height: 1;
}
.stat-copy strong.currency { font-size: clamp(16px, 1.6vw, 22px); }
.stat-copy small { color: #94a3b8; font-size: 11px; }

/* ─── Cards ─── */
.content-card, .form-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 20px 22px 16px;
}
.card-header h2 { margin: 0 0 3px; font-size: 16px; font-weight: 700; letter-spacing: -.3px; }
.card-header p { margin: 0; color: var(--muted); font-size: 12px; }

.text-link { color: var(--primary); font-size: 12px; font-weight: 700; }
.text-link span { margin-left: 3px; }
.text-link:hover { text-decoration: underline; }

/* ─── Table ─── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; white-space: nowrap; }

th {
  padding: 10px 18px; color: #94a3b8; background: #f8fafc;
  font-size: 10px; font-weight: 700; letter-spacing: .6px;
  text-align: left; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
td { padding: 14px 18px; border-top: 1px solid #f1f5f9; color: #475569; font-size: 13px; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: #fafbfd; }

.client-cell { display: flex; align-items: center; gap: 11px; }

.client-avatar {
  display: grid; width: 34px; height: 34px; flex: 0 0 auto;
  place-items: center; border-radius: 10px;
  color: #065f46; background: #d1fae5;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}

.client-cell > div, .contact-cell { display: grid; gap: 2px; }
.client-cell strong { color: #0f172a; font-size: 13px; font-weight: 600; }
.client-cell small, .contact-cell small { color: #94a3b8; font-size: 11px; }
.contact-cell span { color: #475569; font-size: 13px; }

.money { color: #0f172a; font-weight: 700; }
.muted { color: #94a3b8; }
.text-sm { font-size: 12px; }

/* ─── Classification badges ─── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 100px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}

.badge-bronze {
  color: #7c2d12;
  background: linear-gradient(135deg, #fed7aa, #fdba74);
  border: 1px solid #fb923c;
}
.badge-silver {
  color: #1e3a5f;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  border: 1px solid #94a3b8;
}
.badge-gold {
  color: #78350f;
  background: linear-gradient(135deg, #fef08a, #fde047);
  border: 1px solid #facc15;
}
.badge-new {
  color: #1e40af; background: #dbeafe; border: 1px solid #93c5fd;
}

/* ─── Status chips ─── */
.status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 100px;
  font-size: 11px; font-weight: 600;
}
.status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.status-new      { color: #1d4ed8; background: #eff6ff; }
.status-progress { color: #6d28d9; background: #f5f3ff; }
.status-waiting  { color: #b45309; background: #fffbeb; }
.status-done     { color: #065f46; background: #ecfdf5; }
.status-active   { color: #065f46; background: #d1fae5; }
.status-vip      { color: #92400e; background: #fef3c7; }

/* ─── Empty state ─── */
.empty-state {
  display: flex; min-height: 300px; align-items: center;
  justify-content: center; flex-direction: column;
  padding: 48px 24px; text-align: center;
}
.empty-icon {
  display: grid; width: 60px; height: 60px; place-items: center;
  margin-bottom: 16px; border-radius: 16px;
  color: var(--primary); background: var(--primary-light);
}
.empty-icon svg { width: 28px; fill: currentColor; }
.empty-state h3 { margin: 0 0 7px; font-size: 17px; font-weight: 700; }
.empty-state p { max-width: 380px; margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ─── Clients list ─── */
.clients-card { overflow: hidden; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border);
}

.filters-form { display: flex; flex: 1; align-items: center; gap: 8px; }

.search-field {
  display: flex; width: min(100%, 340px); height: 38px;
  align-items: center; gap: 8px; padding: 0 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: #fff;
}
.search-field svg { width: 16px; flex: 0 0 auto; fill: #94a3b8; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 13px; }
.search-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,185,129,.1); }

.filters-form select {
  width: 160px; height: 38px; padding: 0 10px;
  color: #475569; font-size: 13px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: #fff;
}

.filter-button { display: none; min-height: 38px; }
.clear-filter { color: var(--primary); font-size: 12px; font-weight: 600; }
.clear-filter:hover { text-decoration: underline; }

.results-count { flex: 0 0 auto; color: #94a3b8; font-size: 12px; }

.header-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plan-hint { margin: 0 0 16px; color: #64748b; font-size: 13px; }
.import-form { display: grid; gap: 18px; padding: 8px 4px 20px; }

.demo-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #155e75;
  font-size: 13px;
  line-height: 1.45;
}

.today-panel { margin-bottom: 22px; }
.today-panel__head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.today-panel__head p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.today-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.today-card {
  padding: 18px 18px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.today-card--birthday { border-color: #e9d5ff; }
.today-card--reactivate { border-color: #fde68a; }
.today-card h3 { margin: 0 0 12px; font-size: 15px; }
.today-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.today-list li {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding-bottom: 10px; border-bottom: 1px solid #f1f5f9;
}
.today-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.today-list strong { display: block; font-size: 13px; }
.today-list small { color: var(--muted); font-size: 12px; }
.today-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 860px) {
  .today-grid { grid-template-columns: 1fr; }
}
.results-count strong { color: #475569; }

.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.row-actions form { margin: 0; }

.action-link {
  padding: 5px 8px; border: 0; border-radius: 5px;
  background: transparent; cursor: pointer; font-size: 12px; font-weight: 600;
}
.action-link.view { color: #2563eb; }
.action-link.edit { color: var(--primary); }
.action-link.delete { color: #dc2626; }
.action-link:hover { background: #f1f5f9; }

/* ─── Form ─── */
.form-page-header { margin-bottom: 24px; }
.back-link { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 14px; color: #64748b; font-size: 13px; font-weight: 500; }
.back-link:hover { color: var(--primary); }
.form-alert { max-width: 960px; }

.client-form { display: grid; max-width: 960px; gap: 16px; }

.form-card { padding: 26px; }

.form-section-heading {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.section-number {
  display: grid; width: 36px; height: 36px; flex: 0 0 auto;
  place-items: center; border-radius: 9px;
  color: var(--primary); background: var(--primary-light);
  font-size: 12px; font-weight: 800;
}
.form-section-heading h2 { margin: 0 0 3px; font-size: 15px; font-weight: 700; }
.form-section-heading p { margin: 0; color: var(--muted); font-size: 12px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field-wide, .field-full { grid-column: 1 / -1; }

.currency-field > span {
  position: absolute; top: 50%; left: 13px;
  color: #64748b; font-size: 13px; font-weight: 600; transform: translateY(-50%);
}
.currency-field input { padding-left: 36px; }

.field-hint { display: block; margin-top: 5px; color: #94a3b8; font-size: 11px; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 4px 0 16px; }

/* ─── Modal ─── */
.modal-backdrop {
  position: fixed; z-index: 100; inset: 0;
  display: flex; visibility: hidden; align-items: center; justify-content: center;
  padding: 20px; background: rgba(10,17,30,.55);
  opacity: 0; transition: .2s; backdrop-filter: blur(4px);
}
.modal-backdrop.visible { visibility: visible; opacity: 1; }
.modal {
  width: min(100%, 400px); padding: 28px;
  border-radius: 16px; background: #fff;
  box-shadow: var(--shadow-lg); text-align: center;
  transform: translateY(8px) scale(.98); transition: .2s;
}
.visible .modal { transform: none; }
.modal-icon {
  display: grid; width: 46px; height: 46px; place-items: center;
  margin: 0 auto 14px; border-radius: 13px;
  color: var(--danger); background: #fef2f2; font-size: 18px; font-weight: 800;
}
.modal h2 { margin: 0 0 7px; font-size: 18px; font-weight: 700; }
.modal p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }

/* ─── Profile page ─── */
.profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px; align-items: start;
}

.profile-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.profile-header { padding: 28px 24px 20px; border-bottom: 1px solid var(--border); text-align: center; }

.profile-avatar {
  display: grid; width: 72px; height: 72px; place-items: center;
  margin: 0 auto 14px; border-radius: 20px;
  font-size: 28px; font-weight: 800; color: #065f46;
  background: linear-gradient(135deg, #a7f3d0, #34d399);
  box-shadow: 0 8px 20px rgba(16,185,129,.2);
}
.profile-name { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.profile-company { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

.profile-info { padding: 20px 24px; }
.info-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #f8fafc;
}
.info-item:last-child { border-bottom: none; }
.info-icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; fill: #94a3b8; }
.info-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.info-value { font-size: 13px; color: #0f172a; margin-top: 1px; }
.info-value a { color: var(--primary); }
.info-value a:hover { text-decoration: underline; }

.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-top: 1px solid var(--border); }
.profile-stat { padding: 16px 20px; background: var(--surface); }
.profile-stat:first-child { border-radius: 0 0 0 var(--radius); }
.profile-stat:last-child { border-radius: 0 0 var(--radius) 0; }
.profile-stat > span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.profile-stat strong { font-size: 18px; font-weight: 700; color: #0f172a; }

.profile-main { display: grid; gap: 20px; }

.section-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.section-title h2 { margin: 0; font-size: 14px; font-weight: 700; }

.purchase-item, .contact-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid #f1f5f9;
}
.purchase-item:last-child, .contact-item:last-child { border-bottom: none; }

.purchase-icon {
  display: grid; width: 36px; height: 36px; flex-shrink: 0;
  place-items: center; border-radius: 10px;
  color: #059669; background: #d1fae5;
}
.purchase-icon svg { width: 18px; fill: currentColor; }
.contact-icon {
  display: grid; width: 36px; height: 36px; flex-shrink: 0;
  place-items: center; border-radius: 10px;
  color: #2563eb; background: #dbeafe;
}
.contact-icon svg { width: 18px; fill: currentColor; }

.purchase-info, .contact-info { flex: 1; min-width: 0; }
.purchase-info strong, .contact-info strong { display: block; font-size: 13px; font-weight: 600; color: #0f172a; }
.purchase-info small, .contact-info small { display: block; font-size: 12px; color: #94a3b8; margin-top: 1px; }
.purchase-amount { font-size: 15px; font-weight: 700; color: #059669; }

.add-form {
  padding: 16px 20px; border-top: 1px solid var(--border);
  background: #f8fafc; display: grid; gap: 10px;
}
.add-form-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: end; }
.add-form-row-3 { display: grid; grid-template-columns: 1fr 140px auto; gap: 8px; align-items: end; }

/* ─── Reativação / Aniversariantes ─── */
.reativacao-grid { display: grid; gap: 14px; }

.reativacao-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); transition: box-shadow .15s;
}
.reativacao-card:hover { box-shadow: var(--shadow-md); }

.reativacao-avatar {
  display: grid; width: 42px; height: 42px; flex-shrink: 0;
  place-items: center; border-radius: 12px;
  color: #9a3412; background: #ffedd5; font-size: 16px; font-weight: 700;
}
.reativacao-info { flex: 1; min-width: 0; }
.reativacao-info strong { display: block; font-size: 14px; font-weight: 600; color: #0f172a; }
.reativacao-info small { font-size: 12px; color: #94a3b8; }
.reativacao-days {
  padding: 5px 11px; border-radius: 100px;
  background: #fef2f2; color: #dc2626;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.reativacao-days.days-30 { background: #fffbeb; color: #d97706; }
.reativacao-days.days-60 { background: #fef2f2; color: #ef4444; }
.reativacao-days.days-90 { background: #fdf2f8; color: #db2777; }

.birthday-card {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid #f1f5f9;
}
.birthday-card:last-child { border-bottom: none; }
.birthday-avatar {
  display: grid; width: 40px; height: 40px; flex-shrink: 0;
  place-items: center; border-radius: 11px;
  color: #7c3aed; background: #ede9fe; font-size: 15px; font-weight: 700;
}
.birthday-info { flex: 1; min-width: 0; }
.birthday-info strong { display: block; font-size: 13px; font-weight: 600; color: #0f172a; }
.birthday-info small { font-size: 12px; color: #94a3b8; }
.birthday-day {
  font-size: 20px; font-weight: 800; color: #7c3aed;
  min-width: 32px; text-align: center;
}

.whatsapp-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: #25d366; color: #fff;
  font-size: 12px; font-weight: 600;
  transition: background .15s;
}
.whatsapp-btn:hover { background: #1da855; }
.whatsapp-btn svg { width: 15px; fill: currentColor; }

/* ─── Filter tabs ─── */
.filter-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.tab-btn {
  padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 100px;
  background: #fff; color: #475569; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: .15s;
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; }

/* ─── Info banner ─── */
.info-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-radius: var(--radius-sm);
  background: #eff6ff; border: 1px solid #bfdbfe;
  color: #1e40af; font-size: 13px; margin-bottom: 20px;
}
.info-banner svg { width: 18px; fill: currentColor; flex-shrink: 0; }

/* ─── Error pages ─── */
.error-body { display: grid; place-items: center; min-height: 100vh; padding: 30px; background: #f8fafc; }
.error-page { text-align: center; }
.error-page .brand { margin-bottom: 56px; }
.error-code { display: block; color: #d1fae5; font-size: 110px; font-weight: 800; line-height: .8; letter-spacing: -8px; }
.error-page h1 { margin: 24px 0 7px; font-size: 24px; font-weight: 700; }
.error-page p { margin: 0 0 24px; color: var(--muted); }

/* ─── Divider ─── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ─── Landing ─── */
.landing-body { background: #fff; color: var(--text); }
.landing-wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.landing-header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid rgba(226,232,240,.8);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
}
.landing-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 72px;
}
.landing-nav { display: flex; gap: 22px; color: var(--muted); font-size: 13px; font-weight: 600; }
.landing-nav a:hover { color: var(--text); }
.landing-header-actions { display: flex; gap: 10px; }

.landing-hero {
  position: relative; overflow: hidden;
  background: var(--sidebar); color: #fff;
  padding: 88px 0 72px;
}
.landing-hero::before, .landing-hero::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(16,185,129,.22) 0%, transparent 70%);
}
.landing-hero::before { width: 520px; height: 520px; top: -180px; right: -160px; }
.landing-hero::after { width: 360px; height: 360px; bottom: -140px; left: -80px; }
.landing-hero-inner { position: relative; z-index: 1; max-width: 760px; }
.landing-eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 6px 12px;
  border: 1px solid rgba(16,185,129,.38); border-radius: 99px;
  color: #6ee7b7; background: rgba(16,185,129,.16);
  font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
}
.landing-hero h1 {
  margin: 0 0 18px; font-size: clamp(34px, 6vw, 56px);
  font-weight: 800; line-height: 1.08; letter-spacing: -1.6px;
}
.landing-hero h1 span { color: var(--primary); }
.landing-lead { max-width: 560px; margin: 0 0 28px; color: #94a3b8; font-size: 17px; line-height: 1.6; }
.landing-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }
.landing-cta { min-height: 46px; padding: 0 20px; font-size: 14px; }
.button-ghost {
  color: #e2e8f0; background: transparent; border-color: rgba(226,232,240,.2);
}
.button-ghost:hover { background: rgba(255,255,255,.06); }

.landing-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px; margin: 0;
}
.landing-stats div { padding-left: 16px; border-left: 3px solid var(--primary); }
.landing-stats dt { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.landing-stats dd { margin: 4px 0 0; color: #94a3b8; font-size: 13px; }

.landing-section { padding: 80px 0; }
.landing-section-alt { background: var(--bg); }
.landing-tag {
  margin: 0 0 10px; color: var(--primary);
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
}
.landing-section h2 {
  max-width: 640px; margin: 0 0 14px;
  font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -1px; line-height: 1.15;
}
.landing-section-lead { max-width: 640px; margin: 0 0 32px; color: var(--muted); font-size: 16px; }

.landing-highlight {
  margin: 0 0 32px; padding: 18px 20px;
  border-left: 4px solid var(--primary); border-radius: 0 12px 12px 0;
  background: var(--primary-light); color: #065f46; font-size: 15px;
}

.landing-compare, .landing-split, .landing-features, .landing-cases, .landing-plans {
  display: grid; gap: 20px;
}
.landing-compare, .landing-split, .landing-cases, .landing-plans { grid-template-columns: 1fr 1fr; }
.landing-features { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.landing-card, .landing-features article, .landing-case, .landing-plan {
  padding: 24px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow);
}
.landing-card h3, .landing-features h3, .landing-case h3, .landing-plan h3, .landing-split h3 {
  margin: 0 0 12px; font-size: 18px;
}
.landing-card ul, .landing-checks { margin: 0; padding: 0; list-style: none; }
.landing-card li, .landing-checks li {
  position: relative; padding: 8px 0 8px 22px; color: #334155; font-size: 14px;
}
.landing-card li::before, .landing-checks li::before {
  position: absolute; left: 0; font-weight: 800;
}
.landing-card-bad li::before { content: '–'; color: #ef4444; }
.landing-card-good { border-color: #a7f3d0; background: #f0fdf4; }
.landing-card-good li::before, .landing-checks li::before { content: '✓'; color: var(--primary); }

.landing-features p, .landing-case p { margin: 0; color: var(--muted); }
.landing-case-label {
  margin: 0 0 8px !important; color: var(--primary) !important;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
}
.landing-case-result { margin-top: 14px !important; color: #065f46 !important; font-weight: 600; }

.landing-price { margin: 0 0 8px; font-size: 36px; font-weight: 800; letter-spacing: -1px; }
.landing-price span { font-size: 20px; }
.landing-price small { color: var(--muted); font-size: 14px; font-weight: 500; }
.landing-plan p { color: var(--muted); }
.landing-plan .button { margin-top: 16px; width: 100%; }
.landing-plan-featured { border-color: var(--primary); box-shadow: var(--shadow-md); }
.landing-plan-tag {
  display: inline-block; margin: 0 0 10px; padding: 4px 8px;
  border-radius: 99px; background: var(--primary-light); color: var(--primary-dark);
  font-size: 11px; font-weight: 700;
}
.landing-included {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  margin: 28px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px;
}
.landing-included li::before { content: '✓ '; color: var(--primary); font-weight: 800; }

.landing-final {
  padding: 72px 0; text-align: center;
  background: linear-gradient(135deg, var(--sidebar), #1e3a5f); color: #fff;
}
.landing-final h2 {
  max-width: 640px; margin: 0 auto 14px;
  font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -1px;
}
.landing-final p { max-width: 520px; margin: 0 auto 24px; color: #94a3b8; }

.landing-footer { border-top: 1px solid var(--border); background: #fff; }
.landing-footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 28px 0; color: var(--muted); font-size: 13px;
}
.landing-footer a { color: var(--primary); font-weight: 700; }

/* ─── Responsive ─── */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: 280px 1fr; }
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid { grid-template-columns: 1fr; }
  .auth-showcase { display: none; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-panel { min-height: 100vh; padding: 40px 24px; }
}

@media (max-width: 860px) {
  .sidebar { width: 260px; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar-close { display: block; padding: 5px; border: 0; color: #475569; background: transparent; font-size: 24px; }
  .sidebar-overlay {
    position: fixed; z-index: 20; inset: 0; display: block;
    visibility: hidden; background: rgba(7,12,22,.55); opacity: 0; transition: .25s;
  }
  .menu-open { overflow: hidden; }
  .menu-open .sidebar { transform: translateX(0); }
  .menu-open .sidebar-overlay { visibility: visible; opacity: 1; }
  .app-main { margin-left: 0; }
  .mobile-header {
    position: sticky; z-index: 15; top: 0;
    display: flex; height: 62px; align-items: center; justify-content: space-between;
    padding: 0 20px; border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
  }
  .mobile-header .brand { font-size: 16px; }
  .mobile-header .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
  .mobile-header .brand-mark svg { width: 18px; }
  .mobile-header .avatar { width: 30px; height: 30px; }
  .menu-button { display: grid; width: 30px; gap: 4px; padding: 4px; border: 0; background: transparent; }
  .menu-button span { display: block; height: 2px; border-radius: 2px; background: #475569; }
  .page-container { padding: 26px 18px 40px; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .filters-form { width: 100%; flex-wrap: wrap; }
  .search-field { width: 100%; max-width: none; }
}

@media (max-width: 600px) {
  .page-header { align-items: stretch; flex-direction: column; margin-bottom: 22px; }
  .page-header .button { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 16px 18px; }
  .card-header { align-items: flex-start; }
  .form-row, .form-grid, .form-row-3 { grid-template-columns: 1fr; }
  .field-wide, .field-full { grid-column: auto; }
  .form-card { padding: 18px 16px; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .filters-form select { flex: 1; width: auto; }
  .filter-button { display: inline-flex; }
  .modal-actions { grid-template-columns: 1fr; }
  .add-form-row, .add-form-row-3 { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .landing-nav { display: none; }
  .landing-stats, .landing-compare, .landing-split, .landing-features, .landing-cases, .landing-plans {
    grid-template-columns: 1fr;
  }
  .landing-header-inner { min-height: 64px; }
  .landing-hero { padding: 56px 0 48px; }
  .landing-section { padding: 56px 0; }
  .landing-footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  .landing-wrap { width: min(1120px, calc(100% - 28px)); }
  .landing-header-actions .button-secondary { display: none; }
  .landing-hero-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* Faixa de fim de teste (últimos 3 dias) */
.trial-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  background: #fffbeb; border: 1px solid #fcd34d; border-left: 4px solid #f59e0b;
  border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; color: #78350f;
}
.trial-banner--last { background: #fff1f2; border-color: #fda4af; border-left-color: #e11d48; color: #881337; }
.trial-banner__text { flex: 1 1 280px; min-width: 0; display: grid; gap: 2px; font-size: 14px; }
.trial-banner__text strong { font-size: 15px; }
.trial-banner__cta {
  flex: 0 0 auto; background: #059669; color: #fff; text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 9px 16px; border-radius: 8px;
}
.trial-banner__cta:hover { background: #047857; }
