/* ============================================
   Guac Lead Plus — Guac Digital brand
   Lime green #E0FF8A — all green
   Light mode only
   ============================================ */

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

:root {
  /* Backgrounds */
  --bg-deep: #FAFAFA;
  --bg-surface: #FFFFFF;
  --bg-card: #F4F4F5;
  --bg-card-hover: #E4E4E7;
  --bg-input: #FFFFFF;
  --bg-input-focus: #FFFFFF;

  /* Guac brand palette */
  --lime: #E0FF8A;
  --lime-dark: #acdb27;
  --lime-medium: #d0f568;
  --lime-light: #E6FFA3;
  --lime-pale: #f4ffe0;
  --lime-bg: #e8ffb5;
  --gold: #fccb3a;

  /* Functional greens (for status badges) */
  --green-600: #16a34a;
  --green-700: #15803d;

  /* Text */
  --text-primary: #0A0A0B;
  --text-secondary: #18181B;
  --text-muted: #52525B;
  --text-accent: #acdb27;

  /* Borders */
  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-default: rgba(0, 0, 0, 0.09);
  --border-focus: rgba(172, 219, 39, 0.5);

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-display: "Instrument Serif", "Georgia", serif;
  --font-body: "Outfit", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Fira Code", monospace;

  /* Sizing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--lime-dark); text-decoration: none; }
a:hover { color: var(--green-700); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D4D4D8; border-radius: 3px; }

/* ============================================
   LAYOUT
   ============================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-deep);
}

/* ── Client Sidebar (light lime gradient) ── */
.app-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #f0ffc7 0%, #e8ffb5 40%, #f0ffc7 100%);
  border-radius: 0 20px 20px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 8px;
  left: 0;
  bottom: 8px;
  z-index: 100;
  overflow: visible;
  transition: width 0.3s var(--ease-out), transform 0.25s var(--ease-out);
  box-shadow: 4px 0 24px rgba(172,219,39,0.08), inset -1px 0 0 rgba(172,219,39,0.2);
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── Admin Sidebar (dark) ── */
.app-sidebar.admin-sidebar {
  background: linear-gradient(180deg, #0f2918 0%, #0a1f12 50%, #071a0d 100%);
  box-shadow: 4px 0 24px rgba(172,219,39,0.06), inset -1px 0 0 rgba(172,219,39,0.12);
}

/* Brand */
.app-sidebar-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(172,219,39,0.2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-sidebar .app-sidebar-brand {
  border-bottom-color: rgba(172,219,39,0.15);
}

.app-sidebar-brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.app-sidebar-brand-logo img {
  height: 38px;
  width: auto;
}

.app-sidebar-brand-sub {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lime-dark);
  margin-top: 4px;
}

.admin-sidebar .app-sidebar-brand-sub {
  color: var(--lime);
}

/* Nav */
.app-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 12px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-sidebar-nav::-webkit-scrollbar { display: none; }

.app-sidebar-section-label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 10px 2px;
  opacity: 0.5;
}

.admin-sidebar .app-sidebar-section-label {
  color: rgba(255,255,255,0.3);
}

.app-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: #3f3f46;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.app-sidebar-link:hover {
  background: rgba(172,219,39,0.15);
  color: var(--text-primary);
}

.app-sidebar-link.active {
  background: linear-gradient(135deg, var(--lime-dark), var(--lime-medium));
  color: #1a1a1a !important;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(172,219,39,0.35);
}

.app-sidebar-link svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  opacity: 0.6;
  color: #52525B;
}

.app-sidebar-link:hover svg { opacity: 0.9; }
.app-sidebar-link.active svg { opacity: 1 !important; color: #1a1a1a !important; }

/* Admin sidebar links */
.admin-sidebar .app-sidebar-link {
  color: rgba(255,255,255,0.55);
}
.admin-sidebar .app-sidebar-link:hover {
  background: rgba(172,219,39,0.1);
  color: #fff;
}
.admin-sidebar .app-sidebar-link.active {
  background: linear-gradient(135deg, var(--lime-dark), var(--lime-medium));
  color: #1a1a1a !important;
  box-shadow: 0 2px 12px rgba(172,219,39,0.35);
}
.admin-sidebar .app-sidebar-link svg { color: var(--lime); opacity: 0.5; }
.admin-sidebar .app-sidebar-link:hover svg { opacity: 0.9; color: var(--lime-medium); }
.admin-sidebar .app-sidebar-link.active svg { color: #1a1a1a !important; opacity: 1 !important; }

/* Footer / user */
.app-sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(172,219,39,0.15);
}

.admin-sidebar .app-sidebar-footer {
  border-top-color: rgba(172,219,39,0.12);
}

.app-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: default;
}

.app-sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lime-dark);
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.admin-sidebar .app-sidebar-user-avatar {
  background: var(--lime-dark);
  color: #1a1a1a;
}

.app-sidebar-user-info { flex: 1; min-width: 0; }

.app-sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sidebar .app-sidebar-user-name { color: #fff; }

.app-sidebar-user-email {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sidebar .app-sidebar-user-email { color: rgba(255,255,255,0.35); }

.btn-logout {
  display: block;
  width: 100%;
  padding: 7px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  background: none;
  transition: all 0.15s;
  font-family: var(--font-body);
  margin-top: 8px;
  text-decoration: none;
}

.btn-logout:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
}

.admin-sidebar .btn-logout {
  color: rgba(255,255,255,0.4);
  border-color: rgba(255,255,255,0.08);
}
.admin-sidebar .btn-logout:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

/* ── Main ── */
.app-main {
  flex: 1;
  margin-left: 220px;
  min-height: 100vh;
  padding: 8px 0 0 0;
  transition: margin-left 0.3s var(--ease-out);
}

.page-header {
  padding: 24px 32px 0;
}

.page-header h2 {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.page-content {
  padding: 20px 32px 40px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid #d4d4d8;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: all 0.2s var(--ease-out);
}

.card:hover {
  border-color: var(--lime-dark);
  box-shadow: 0 4px 12px rgba(172,219,39,0.15), 0 1px 4px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

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

.card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body { padding: 20px; }

/* ============================================
   STAT CARDS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1.5px solid #d4d4d8;
  padding: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: all 0.2s var(--ease-out);
}

.stat-card:hover {
  border-color: var(--lime-dark);
  box-shadow: 0 4px 12px rgba(172,219,39,0.15), 0 1px 4px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.stat-card .stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card .stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.stat-card .stat-change { font-size: 11px; margin-top: 4px; font-weight: 500; }
.stat-card .stat-change.up { color: var(--green-600); }
.stat-card .stat-change.down { color: #ef4444; }

.stat-card.accent {
  background: linear-gradient(135deg, var(--lime-dark) 0%, var(--lime-medium) 100%);
  border-color: transparent;
  color: #1a1a1a;
  box-shadow: 0 4px 16px rgba(172,219,39,0.3);
}

.stat-card.accent .stat-label { color: rgba(0,0,0,0.5); }
.stat-card.accent .stat-value { color: #1a1a1a; }

/* Admin accent card */
.admin-accent {
  background: linear-gradient(135deg, var(--lime-dark) 0%, var(--lime-medium) 100%) !important;
  color: #1a1a1a !important;
  box-shadow: 0 4px 16px rgba(172,219,39,0.3) !important;
}
.admin-accent .stat-label { color: rgba(0,0,0,0.5) !important; }
.admin-accent .stat-value { color: #1a1a1a !important; }

/* ============================================
   LEAD CARDS
   ============================================ */
.leads-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-card {
  background: var(--bg-surface);
  border: 1.5px solid #d4d4d8;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.lead-card:hover {
  border-color: var(--lime-dark);
  box-shadow: 0 4px 12px rgba(172,219,39,0.15), 0 1px 4px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.lead-card.new {
  border-left: 4px solid var(--lime-dark);
  background: linear-gradient(90deg, var(--lime-pale) 0%, var(--bg-surface) 15%);
  animation: leadPulse 2s ease-out;
}

@keyframes leadPulse {
  0% { background: var(--lime-pale); box-shadow: 0 0 0 0 rgba(172,219,39,0.2); }
  70% { box-shadow: 0 0 0 8px rgba(172,219,39,0); }
  100% { background: var(--bg-surface); }
}

.lead-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lime-dark), var(--lime-medium));
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(172,219,39,0.25);
}

.lead-info { flex: 1; min-width: 0; }

.lead-name { font-weight: 700; font-size: 15px; color: var(--text-primary); }

.lead-detail {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-meta { text-align: right; flex-shrink: 0; }

.lead-cost {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.lead-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.lead-source {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

.lead-source.google { background: #dcfce7; color: #166534; }
.lead-source.meta { background: #dbeafe; color: #1e40af; }
.lead-source.bing { background: #fff7ed; color: #c2410c; }
.lead-source.call { background: #fce7f3; color: #be185d; }
.lead-source.form { background: var(--lime-pale); color: #52600a; }
.lead-source.manual { background: var(--bg-card); color: var(--text-muted); }

/* ============================================
   STATUS BADGES
   ============================================ */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: capitalize;
}

.status-badge.new { background: var(--lime-pale); color: #52600a; }
.status-badge.contacted { background: #dbeafe; color: #1d4ed8; }
.status-badge.won { background: #d1fae5; color: #047857; }
.status-badge.lost { background: #fee2e2; color: #dc2626; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  transition: all 0.15s var(--ease-out);
}

.btn-primary {
  background: linear-gradient(135deg, var(--lime-dark) 0%, var(--lime-medium) 100%);
  color: #1a1a1a;
  box-shadow: 0 1px 2px rgba(172,219,39,0.3);
  font-weight: 600;
}

.btn-primary:hover {
  box-shadow: 0 2px 8px rgba(172,219,39,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  background: var(--bg-card);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }

.btn-call {
  background: linear-gradient(135deg, var(--lime-dark), var(--lime-medium));
  color: #1a1a1a;
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(172,219,39,0.3);
}

.btn-call:hover {
  box-shadow: 0 4px 12px rgba(172,219,39,0.4);
  color: #1a1a1a !important;
}

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--bg-input);
  color: var(--text-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--lime-dark);
  box-shadow: 0 0 0 3px rgba(172,219,39,0.12);
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--bg-input);
  cursor: pointer;
  color: var(--text-primary);
}

.form-select:focus {
  outline: none;
  border-color: var(--lime-dark);
  box-shadow: 0 0 0 3px rgba(172,219,39,0.12);
}

/* ============================================
   FILTERS
   ============================================ */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}

.filter-chip:hover { border-color: var(--lime-dark); color: #52600a; }
.filter-chip.active {
  background: var(--lime-pale);
  border-color: var(--lime-dark);
  color: #52600a;
}

/* ============================================
   TABLE
   ============================================ */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-default);
}

td {
  padding: 11px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

tr:hover td { background: var(--bg-card); }

.margin-positive { color: var(--green-600); font-weight: 600; }
.margin-negative { color: #ef4444; font-weight: 600; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-default);
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { font-size: 16px; font-weight: 600; }

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: all 0.15s;
}

.modal-close:hover { background: var(--bg-card-hover); }

.modal-body { padding: 22px; }

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================
   LEAD DETAIL
   ============================================ */
.lead-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.lead-detail-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lime-pale);
  color: #52600a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.lead-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.lead-detail-field {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.lead-detail-field .field-label { font-size: 12px; color: var(--text-muted); }
.lead-detail-field .field-value { font-size: 13px; font-weight: 500; color: var(--text-primary); }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state svg { width: 40px; height: 40px; color: var(--text-muted); opacity: 0.3; margin-bottom: 12px; }
.empty-state h3 { font-size: 15px; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state p { font-size: 13px; color: var(--text-muted); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
}

.pagination button {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--text-secondary);
}

.pagination button.active {
  background: var(--lime-dark);
  color: #1a1a1a;
  border-color: transparent;
  font-weight: 600;
}

.pagination button:hover:not(.active) { background: var(--bg-card); }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--lime-pale) 0%, #fff 50%, var(--lime-pale) 100%);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px;
  border: 1px solid var(--border-default);
}

.login-card .brand { text-align: center; margin-bottom: 28px; }

.login-card .brand h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
}

.login-card .brand h1 span { color: var(--lime-dark); }

.login-card .brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-error {
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  color: #dc2626;
  font-size: 12px;
  margin-bottom: 14px;
}

.login-btn {
  width: 100%;
  padding: 11px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--lime-dark) 0%, var(--lime-medium) 100%);
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(172,219,39,0.3);
}

.login-btn:hover {
  box-shadow: 0 4px 12px rgba(172,219,39,0.4);
  transform: translateY(-1px);
}

/* ============================================
   LANDING PAGE
   ============================================ */
.landing-page { min-height: 100vh; background: #fff; }

.landing-hero {
  padding: 80px 20px 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--lime-pale) 0%, #fff 100%);
}

.landing-hero h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  max-width: 600px;
  margin: 0 auto;
}

.landing-hero p {
  font-size: 17px;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.landing-form-wrap {
  max-width: 440px;
  margin: 36px auto 0;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  border: 1px solid var(--border-default);
}

.landing-form-wrap h2 { font-size: 18px; font-weight: 600; margin-bottom: 18px; text-align: center; }

.landing-trust {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 12px;
}

.landing-trust span { display: flex; align-items: center; gap: 5px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease-out);
    border-radius: 0;
    top: 0; bottom: 0;
  }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .page-header { padding: 16px 16px 0; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .mobile-toggle {
    display: flex !important;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 101;
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    background: var(--lime-dark);
    color: #1a1a1a;
    border: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(172,219,39,0.3);
  }
}

.mobile-toggle { display: none; }

/* ============================================
   CLIENT SWITCHER (admin sidebar)
   ============================================ */
.app-sidebar-switcher {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(172,219,39,0.1);
  position: relative;
}

.app-sidebar-switcher-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(172,219,39,0.15);
  background: rgba(172,219,39,0.04);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
  text-align: left;
  color: inherit;
}

.app-sidebar-switcher-btn:hover {
  background: rgba(172,219,39,0.08);
  border-color: rgba(172,219,39,0.25);
}

.app-sidebar-switcher-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(172,219,39,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--lime);
}

.app-sidebar-switcher-info { flex: 1; min-width: 0; }

.app-sidebar-switcher-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar-switcher-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar-switcher-arrow {
  flex-shrink: 0;
  opacity: 0.4;
  color: inherit;
  transition: transform 0.2s;
}

.app-sidebar-switcher-dropdown {
  display: none;
  position: absolute;
  left: 10px;
  right: 10px;
  top: calc(100% + 4px);
  z-index: 200;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.app-sidebar-switcher-dropdown.is-open { display: block; }

.app-sidebar-switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.app-sidebar-switcher-item:hover { background: var(--bg-card); }

.app-sidebar-switcher-item.is-active {
  background: var(--lime-pale);
}

.app-sidebar-switcher-item-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.app-sidebar-switcher-item.is-active .app-sidebar-switcher-item-icon {
  background: var(--lime-dark);
  color: #1a1a1a;
}

.app-sidebar-switcher-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar-switcher-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--lime-dark);
  display: none;
}

.app-sidebar-switcher-item.is-active .app-sidebar-switcher-check { display: block; }

.app-sidebar-switcher-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 6px;
}

/* ============================================
   USER DROPDOWN
   ============================================ */
.app-sidebar-user-wrap {
  position: relative;
}

.app-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  font-family: var(--font-body);
  color: inherit;
}

.app-sidebar-user:hover {
  background: rgba(172,219,39,0.08);
}

.app-sidebar-user-arrow {
  flex-shrink: 0;
  opacity: 0.4;
  transition: transform 0.2s;
  color: inherit;
}

.app-sidebar-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 10px;
  right: 10px;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
  z-index: 200;
}

.app-sidebar-dropdown.is-open { display: block; }

.app-sidebar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary) !important;
  transition: background 0.12s;
  text-decoration: none;
}

.app-sidebar-dropdown-item:hover {
  background: var(--bg-card);
}

.app-sidebar-dropdown-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.5;
}

.app-sidebar-dropdown-item--logout {
  color: #dc2626 !important;
}

.app-sidebar-dropdown-item--logout svg { color: #dc2626; }

.app-sidebar-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 6px;
}

/* ============================================
   PLAN BADGE (sidebar)
   ============================================ */
.app-sidebar-plan {
  padding: 8px 12px;
}

.app-sidebar-plan-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(172,219,39,0.12);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.app-sidebar-plan-badge svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   COLLAPSED SIDEBAR
   ============================================ */
.app-sidebar-collapse-btn {
  position: fixed;
  top: 50%;
  left: 208px; /* 220 - 12 */
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
  transition: all 0.3s var(--ease-out);
  opacity: 0;
  padding: 0;
}

.app-sidebar:hover ~ .app-sidebar-collapse-btn,
.app-sidebar-collapse-btn:hover { opacity: 1; }

.app-sidebar-collapse-btn:hover {
  background: var(--lime-dark);
  color: #1a1a1a;
  border-color: var(--lime-dark);
  box-shadow: 0 0 12px rgba(172,219,39,0.3);
  transform: translateY(-50%) scale(1.15);
}

.app-sidebar-collapse-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s;
}

/* Collapsed state */
.app-sidebar.is-collapsed {
  width: 64px;
  overflow: hidden;
}

.app-sidebar.is-collapsed .app-sidebar-brand-logo img {
  height: 24px;
}

.app-sidebar.is-collapsed .app-sidebar-brand-sub,
.app-sidebar.is-collapsed .app-sidebar-section-label,
.app-sidebar.is-collapsed .app-sidebar-user-info,
.app-sidebar.is-collapsed .app-sidebar-user-arrow,
.app-sidebar.is-collapsed .app-sidebar-plan {
  display: none;
}

.app-sidebar.is-collapsed .app-sidebar-nav {
  padding: 8px;
}

.app-sidebar.is-collapsed .app-sidebar-link {
  justify-content: center;
  padding: 11px 0;
}

.app-sidebar.is-collapsed .app-sidebar-link span {
  display: none;
}

.app-sidebar.is-collapsed .app-sidebar-link svg {
  margin: 0;
  width: 20px;
  height: 20px;
}

.app-sidebar.is-collapsed .app-sidebar-user {
  justify-content: center;
  padding: 8px 0;
}

.app-sidebar.is-collapsed .app-sidebar-user-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.app-sidebar.is-collapsed .app-sidebar-dropdown {
  position: fixed;
  left: 72px;
  right: auto;
  bottom: 16px;
  width: 200px;
  border-radius: 12px;
}

.app-sidebar.is-collapsed ~ .app-sidebar-collapse-btn {
  left: 52px;
}

.app-sidebar.is-collapsed ~ .app-sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

.app-sidebar.is-collapsed + .app-sidebar-collapse-btn + .app-main,
.app-sidebar.is-collapsed ~ .app-main {
  margin-left: 64px;
}

/* Tooltip on collapsed sidebar */
.app-sidebar.is-collapsed .app-sidebar-link {
  position: relative;
}

.app-sidebar.is-collapsed .app-sidebar-link:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #1a1a1a;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
