/* Universo dos Drones CRM — Signature Bento Split-Sheet Architecture
   Strict Brand Palette: #DDE7DF (Sage Mist), #1B412D (Deep Forest), #30BD19 (Electric Agri Green) */
:root {
  --brand-mist: #dde7df;
  --brand-mist-light: #e8f0ea;
  --brand-mist-surface: #eff5f0;
  --brand-mist-deep: #cedbcf;
  --brand-forest: #1b412d;
  --brand-forest-dark: #10291c;
  --brand-forest-hover: #23533a;
  --brand-green: #30bd19;
  --brand-green-dark: #239811;
  --brand-green-soft: #dff5db;

  --bg: var(--brand-mist);
  --surface: #edf3ee;
  --surface-white: #f7fbf8;
  --surface-subtle: #e3ece5;
  --border: #c4d5c8;
  --border-strong: #aec5b4;

  --text: #152b1e;
  --text-secondary: #415c4c;
  --text-muted: #658070;

  /* Semantic Status Palette (Map & Funnel) */
  --st-gray: #6b7280;
  --st-gray-bg: #e7ece9;
  --st-blue: #2563eb;
  --st-blue-bg: #e3eeff;
  --st-orange: #ea580c;
  --st-orange-bg: #ffeedf;
  --st-purple: #7c3aed;
  --st-purple-bg: #efe9ff;
  --st-green: #229c11;
  --st-green-bg: #daf5d6;
  --st-red: #dc2626;
  --st-red-bg: #fde8e8;
  --st-amber: #d97706;
  --st-amber-bg: #fef3d6;

  --wa-green: #22a316;
  --wa-green-hover: #1b8711;

  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 2px rgba(27, 65, 45, 0.06);
  --shadow-sm: 0 4px 12px rgba(27, 65, 45, 0.07);
  --shadow: 0 10px 28px rgba(27, 65, 45, 0.11);
  --shadow-lg: 0 22px 54px rgba(16, 41, 28, 0.28);

  --rail-w: 228px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Noto Sans SC", Inter, sans-serif;
  background: var(--brand-forest-dark);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; }

.hidden { display: none !important; }
.print-only { display: none; }

/* ============================================================
   OUTER APP FRAME: SLIM DARK ICON RAIL + VIBRANT GREEN SHELL
   ============================================================ */
.app-frame {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, #10291c 0%, #1b412d 100%);
}

/* Dark Forest Labeled Left Sidebar */
.icon-rail {
  width: var(--rail-w);
  background: linear-gradient(180deg, #132d1f 0%, #0d2116 100%);
  display: flex;
  flex-direction: column;
  padding: 14px 12px 14px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  border-right: 1px solid rgba(221, 231, 223, 0.1);
}

.rail-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 2px 2px 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(221, 231, 223, 0.1);
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.rail-brand {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(145deg, #39cf21 0%, #249e12 100%);
  box-shadow: 0 0 18px rgba(48, 189, 25, 0.48), inset 0 1px 1px rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rail-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rail-brand-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-brand-sub {
  font-size: 10.5px;
  color: #9ec0aa;
  margin-top: 1px;
  white-space: nowrap;
}

.rail-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  overflow-y: auto;
  padding-right: 2px;
}

.rail-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: #c2d6c8;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.rail-menu-item:hover {
  background: rgba(221, 231, 223, 0.09);
  color: #ffffff;
}

.rail-menu-item.active {
  background: rgba(48, 189, 25, 0.2);
  border-color: rgba(48, 189, 25, 0.48);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(48, 189, 25, 0.18);
}

.rail-menu-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.rail-menu-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(221, 231, 223, 0.16);
  background: rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  flex-shrink: 0;
}

.rail-menu-item.active .rail-menu-icon {
  background: var(--brand-green);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 10px rgba(48, 189, 25, 0.5);
}

.rail-menu-labels {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rail-menu-title {
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-menu-sub {
  font-size: 10px;
  color: #8eb09b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-menu-item.active .rail-menu-sub { color: #bcebb5; }

.rail-badge {
  background: rgba(221, 231, 223, 0.16);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
  flex-shrink: 0;
}

.rail-badge.danger {
  background: #ef4444;
  color: #ffffff;
}

.rail-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid rgba(221, 231, 223, 0.1);
}

.role-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(221, 231, 223, 0.12);
  border-radius: 11px;
  padding: 9px 10px;
}

.rail-reset-btn {
  width: 100%;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(221, 231, 223, 0.18);
  background: transparent;
  color: #bfd5c6;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s;
}

.rail-reset-btn:hover {
  background: rgba(221, 231, 223, 0.1);
  color: #ffffff;
}

.role-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #a9ceb6;
  margin-bottom: 6px;
}

.select-compact {
  width: 100%;
  background: #10291c;
  color: #ffffff;
  border: 1px solid rgba(221, 231, 223, 0.25);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12.5px;
  cursor: pointer;
}

.role-hint {
  font-size: 11px;
  color: #bfd7c7;
  margin-top: 7px;
  line-height: 1.4;
}

/* ============================================================
   VIBRANT GREEN GRADIENT OUTER STAGE + FLOATING SAGE SHEET
   ============================================================ */
.green-stage {
  margin-left: var(--rail-w);
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  background: linear-gradient(125deg, #2cb617 0%, #1f8a22 36%, #1b412d 85%);
  padding: 10px 14px 14px 12px;
  display: flex;
  flex-direction: column;
}

.stage-topbar {
  height: 52px;
  padding: 0 8px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.stage-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  max-width: 640px;
}

.stage-back-title {
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background 0.15s;
}

.stage-back-title:hover { background: rgba(255, 255, 255, 0.12); }
.stage-back-arrow { font-size: 18px; opacity: 0.9; }

.global-search-wrap { position: relative; flex: 1; max-width: 360px; }

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  pointer-events: none;
}

.global-search {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: all 0.16s ease;
}

.global-search::placeholder { color: rgba(235, 247, 238, 0.82); }

.global-search:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 340px;
  background: var(--surface-white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 440px;
  overflow-y: auto;
  z-index: 1400;
}

.search-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-forest);
  padding: 8px 14px 5px;
  background: var(--brand-mist);
}

.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.search-item:hover { background: var(--brand-mist-light); }
.search-item-title { font-weight: 700; font-size: 13px; color: var(--brand-forest); }
.search-item-sub { font-size: 11.5px; color: var(--text-secondary); margin-top: 1px; }

.stage-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.glass-lang-toggle {
  display: inline-flex;
  background: rgba(16, 41, 28, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  padding: 3px;
}

.glass-lang-toggle .lang-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(235, 247, 238, 0.85);
  cursor: pointer;
  transition: all 0.14s;
}

.glass-lang-toggle .lang-btn.active {
  background: #ffffff;
  color: var(--brand-forest);
}

.glass-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.glass-pill-btn:hover { background: rgba(255, 255, 255, 0.24); }

.glow-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: linear-gradient(180deg, #39cf21 0%, #26a613 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 41, 28, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.14s, box-shadow 0.14s;
}

.glow-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(48, 189, 25, 0.45);
}

/* Main Floating Sage-Mist Sheet (#DDE7DF) */
.sage-sheet {
  flex: 1;
  background: linear-gradient(180deg, #e2ece4 0%, #dde7df 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 46px rgba(12, 34, 22, 0.26);
  padding: 22px 24px 36px;
  min-height: calc(100vh - 76px);
}

/* ============================================================
   SIGNATURE SPLIT-PANEL ARCHITECTURE (Reference Left Rail + Right Main)
   ============================================================ */
.split-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.profile-rail {
  padding-right: 22px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1b412d 0%, #2b6446 100%);
  border: 2.5px solid #30bd19;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(27, 65, 45, 0.2);
}

.profile-name {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--brand-forest);
  line-height: 1.25;
}

.profile-role {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.rail-meta-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-meta-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.rail-meta-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand-forest);
}

.rail-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--brand-mist-surface);
  color: var(--brand-forest);
  font-size: 12.5px;
  font-weight: 700;
  width: fit-content;
}

.rail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rail-tag {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.36);
  color: var(--brand-forest);
  font-size: 11.5px;
  font-weight: 600;
}

.rail-stat-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Semi-Circular Arc Gauge (Signature Element from Reference!) */
.gauge-card {
  padding-top: 6px;
  text-align: center;
}

.gauge-svg {
  width: 210px;
  height: 118px;
  display: block;
  margin: 0 auto;
}

/* ============================================================
   DARK FOREST HERO BANNER (Top of Right Pane — Signature Element!)
   ============================================================ */
.hero-banner {
  background: linear-gradient(96deg, #102a1d 0%, #1b412d 52%, #1d572a 100%);
  border-radius: 15px;
  padding: 16px 20px;
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(48, 189, 25, 0.25);
  box-shadow: 0 10px 26px rgba(27, 65, 45, 0.18);
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.hero-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-metric + .hero-metric {
  padding-left: 24px;
  border-left: 1px solid rgba(221, 231, 223, 0.16);
}

.hero-metric-label {
  font-size: 11.5px;
  color: #b5d1be;
  font-weight: 500;
}

.hero-metric-val {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-ring {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 3px solid var(--brand-green);
  box-shadow: 0 0 10px rgba(48, 189, 25, 0.7);
  display: inline-block;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(221, 231, 223, 0.26);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.15s;
}

.hero-icon-circle:hover { background: rgba(255, 255, 255, 0.18); }

/* ============================================================
   SOFT-GRADIENT BENTO STAT TILES (Reference "Type / Deadline / Rate / Method")
   ============================================================ */
.bento-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.bento-tile {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ecf3ed 0%, #d4e0d6 100%);
  padding: 14px 16px;
  min-height: 124px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.bento-tile:hover {
  transform: translateY(-2px);
  border-color: var(--brand-forest);
  box-shadow: var(--shadow-sm);
}

.bento-tile.alert {
  background: linear-gradient(180deg, #f8efef 0%, #efd8d8 100%);
  border-color: #e4b5b5;
}

.bento-tile.accent {
  background: linear-gradient(180deg, #e7f6e5 0%, #cde8ca 100%);
  border-color: #9dd496;
}

.bento-tile-top {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.bento-tile-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(27, 65, 45, 0.08);
  color: var(--brand-forest);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
}

.bento-tile-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-forest);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.bento-tile.alert .bento-tile-val { color: var(--st-red); }

.bento-tile-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ============================================================
   SEGMENTED BAR TABS (Reference "Add new | Experience | Price | Availability")
   ============================================================ */
.segmented-bar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: #cfddd2;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 18px;
}

.seg-btn {
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.seg-btn:hover { color: var(--brand-forest); background: rgba(255, 255, 255, 0.32); }

.seg-btn.active {
  background: var(--surface-white);
  color: var(--brand-forest);
  box-shadow: 0 2px 8px rgba(27, 65, 45, 0.1);
}

/* ============================================================
   STANDARD PAGE HEADERS, CARDS, BUTTONS, TABLES (Harmonized with #DDE7DF)
   ============================================================ */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-forest);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-subtitle {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 99px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11.5px; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--brand-forest);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--brand-forest-hover);
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(180deg, #37cc1f 0%, #26a413 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 3px 10px rgba(48, 189, 25, 0.3);
}
.btn-accent:hover {
  background: linear-gradient(180deg, #2fba19 0%, #208e10 100%);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--surface-white);
  border-color: var(--border-strong);
  color: var(--brand-forest);
}
.btn-outline:hover {
  background: var(--brand-mist-surface);
  border-color: var(--brand-forest);
}

.btn-soft {
  background: #d1dfd4;
  color: var(--brand-forest);
  border-color: transparent;
}
.btn-soft:hover { background: #c2d4c6; }

.btn-wa { background: var(--wa-green); color: #ffffff; }
.btn-wa:hover { background: var(--wa-green-hover); }

.btn-danger { background: var(--st-red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-danger-soft { background: var(--st-red-bg); color: var(--st-red); border-color: #f4b8b8; }
.btn-danger-soft:hover { background: #fbd5d5; }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface-white);
  color: var(--brand-forest);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover { background: var(--brand-mist); }

/* Cards */
.card {
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.card-header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f3f8f4 0%, #eaf2ec 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--brand-forest);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 16px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #eff5f0 0%, #d8e4da 100%);
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-forest);
  box-shadow: var(--shadow-sm);
}

.kpi-card.success { background: linear-gradient(180deg, #eaf7e8 0%, #d2ebd0 100%); border-color: #a8d9a2; }
.kpi-card.alert { background: linear-gradient(180deg, #faf0f0 0%, #f1d9d9 100%); border-color: #e4b5b5; }
.kpi-card.warn { background: linear-gradient(180deg, #fcf6e8 0%, #f4e3c2 100%); border-color: #e5cb94; }

.kpi-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 8px;
  color: var(--brand-forest);
  line-height: 1.15;
}

.kpi-card.alert .kpi-value { color: var(--st-red); }
.kpi-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-asymmetric { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-gray { background: var(--st-gray-bg); color: #374151; }
.badge-hollow { background: #ffffff; color: #4b5563; border: 1.5px dashed #9ca3af; }
.badge-blue { background: var(--st-blue-bg); color: var(--st-blue); }
.badge-orange { background: var(--st-orange-bg); color: var(--st-orange); }
.badge-purple { background: var(--st-purple-bg); color: var(--st-purple); }
.badge-green { background: var(--brand-green-soft); color: #167a13; border: 1px solid rgba(48, 189, 25, 0.3); }
.badge-red { background: var(--st-red-bg); color: var(--st-red); border: 1px solid #f5bcbc; }
.badge-amber { background: var(--st-amber-bg); color: #b45309; border: 1px solid #f1d08a; }
.badge-primary { background: var(--brand-mist); color: var(--brand-forest); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-hollow { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #6b7280; background: #ffffff; display: inline-block; }

/* Filters & Forms */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 11px 14px;
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.lang-toggle {
  display: inline-flex;
  background: #cfddd2;
  border-radius: 99px;
  padding: 3px;
}

.lang-toggle .lang-btn {
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-forest);
  cursor: pointer;
}

.lang-toggle .lang-btn.active {
  background: var(--brand-forest);
  color: #ffffff;
}

.input, .select, .textarea {
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 7px 11px;
  background: var(--surface-white);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(48, 189, 25, 0.16);
}

.textarea { width: 100%; min-height: 76px; resize: vertical; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.full { grid-column: 1 / -1; }
.form-label { font-size: 12px; font-weight: 700; color: var(--brand-forest); }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--brand-mist);
  border-bottom: 1px solid var(--border-strong);
  color: var(--brand-forest);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr.clickable:hover td { background: #edf5ef; cursor: pointer; }

/* Tabs */
.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  background: #cfddd2;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-forest);
  cursor: pointer;
}

.tab-btn.active {
  background: var(--surface-white);
  color: var(--brand-forest);
  box-shadow: var(--shadow-xs);
}

/* Banners */
.banner {
  padding: 11px 15px;
  border-radius: var(--radius);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.banner-warn { background: var(--st-amber-bg); border: 1px solid #ecc977; color: #92400e; }
.banner-danger { background: var(--st-red-bg); border: 1px solid #f0a8a8; color: #991b1b; }
.banner-info { background: #d5e2d8; border: 1px solid var(--border-strong); color: var(--brand-forest); }
.banner-success { background: var(--brand-green-soft); border: 1px solid rgba(48, 189, 25, 0.35); color: #14532d; }

/* Pipeline Funnel & Kanban */
.funnel-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.funnel-step {
  background: linear-gradient(180deg, #eff5f0 0%, #d8e4da 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px;
}
.funnel-step-num { font-size: 10.5px; font-weight: 700; color: var(--text-muted); }
.funnel-step-name { font-size: 12.5px; font-weight: 800; color: var(--brand-forest); margin-top: 2px; }
.funnel-step-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 7px; }
.funnel-count { font-size: 19px; font-weight: 800; color: var(--brand-forest); }
.funnel-val { font-size: 11px; color: var(--text-secondary); font-weight: 700; }

.kanban-board { display: grid; grid-template-columns: repeat(4, minmax(265px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col {
  background: #d2dfd5;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 340px;
}
.kanban-col-header { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 5px; }
.kanban-col-title { font-weight: 800; font-size: 13px; color: var(--brand-forest); display: flex; align-items: center; gap: 6px; }

.opp-card {
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.opp-card:hover { border-color: var(--brand-green); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.opp-card.risk { border-left: 4px solid var(--st-red); }
.opp-title { font-weight: 800; font-size: 13.5px; color: var(--brand-forest); margin-bottom: 3px; }
.opp-meta { font-size: 12px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.opp-footer {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--brand-mist);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* Interactive Geo Map & Leaflet */
.map-layout { display: grid; grid-template-columns: 295px minmax(0, 1fr); gap: 14px; align-items: start; }
.map-filters-card {
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}
.map-stage {
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.map-toolbar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #edf4ee;
}
.map-canvas-wrap {
  position: relative;
  height: 550px;
  background: #1a2e22;
  overflow: hidden;
  user-select: none;
  isolation: isolate;
  z-index: 1;
}
.map-legend {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  background: var(--surface-white);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-weight: 600; }

.preset-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.preset-pill {
  background: var(--surface-white);
  border: 1px solid var(--border-strong);
  color: var(--brand-forest);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s;
}
.preset-pill:hover { border-color: var(--brand-green); background: var(--brand-green-soft); }
.preset-pill.active { background: var(--brand-forest); border-color: var(--brand-forest); color: #ffffff; }

/* Leaflet Custom Markers & Popups */
.leaflet-container { font-family: inherit !important; background: #1a2e22; }
.lf-pin-wrapper { background: transparent; border: none; }
.lf-pin-anchor { position: relative; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.lf-pin-shape { box-shadow: 0 3px 10px rgba(0, 0, 0, 0.42); transition: transform 0.15s ease; }
.lf-pin-anchor:hover .lf-pin-shape { transform: scale(1.22); }
.lf-unconfirmed-ring { position: absolute; width: 30px; height: 30px; border-radius: 50%; border: 2px dashed #f59e0b; pointer-events: none; }
.lf-lead-ring { position: absolute; width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(37, 99, 235, 0.65); background: rgba(37, 99, 235, 0.16); pointer-events: none; }
.lf-pin-label {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  background: rgba(27, 65, 45, 0.92); color: #ffffff; padding: 1px 6px; border-radius: 4px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
  border: 1px solid rgba(221, 231, 223, 0.4); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28); pointer-events: none;
}
.lf-hq-star {
  width: 26px; height: 26px; border-radius: 50%; background: #1b412d; color: #30bd19;
  border: 2.5px solid #30bd19; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; box-shadow: 0 0 0 5px rgba(48, 189, 25, 0.28), 0 4px 12px rgba(0, 0, 0, 0.45);
}
.lf-hq-label { background: #30bd19; color: #0d2417; border-color: #1b412d; top: 26px; }
.leaflet-popup-content-wrapper { border-radius: 14px !important; border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg) !important; }
.leaflet-popup-content { margin: 12px 14px !important; }
.lf-popup-title { font-weight: 800; font-size: 14px; color: var(--brand-forest); margin-bottom: 5px; }
.lf-popup-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.lf-popup-addr { font-size: 12px; color: var(--text); line-height: 1.4; }
.lf-popup-gps { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.lf-popup-meta { font-size: 12px; color: var(--text-secondary); margin-top: 5px; }
.lf-popup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--brand-mist); }

/* Recommendation Engine, Checklist, Timeline, Action List */
.rec-box {
  background: linear-gradient(135deg, #dff5db 0%, #d4e3d7 100%);
  border: 1.5px solid rgba(48, 189, 25, 0.45);
  border-radius: 12px;
  padding: 13px 15px;
}
.rec-model { font-size: 16.5px; font-weight: 800; color: var(--brand-forest); }

.checklist { display: flex; flex-direction: column; gap: 7px; }
.check-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-subtle);
}
.check-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--brand-forest); }
.check-row input[type="checkbox"] { accent-color: var(--brand-green); width: 16px; height: 16px; }

.timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline-item { border-left: 2px solid var(--border-strong); padding-left: 12px; position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -5.5px; top: 5px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--brand-green); border: 2px solid var(--surface-white);
}

.action-list { display: flex; flex-direction: column; gap: 8px; }
.action-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-white); transition: all 0.14s;
}
.action-row:hover { border-color: var(--brand-green); box-shadow: var(--shadow-xs); }

/* Drawer & Modal */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(16, 41, 28, 0.45); backdrop-filter: blur(3px); z-index: 1100; }
.drawer {
  position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(670px, calc(100vw - 20px));
  background: var(--brand-mist); border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.5);
  z-index: 1110; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
}
.drawer-header {
  padding: 15px 18px; border-bottom: 1px solid var(--border);
  background: linear-gradient(96deg, #102a1d 0%, #1b412d 100%);
  color: #ffffff; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.drawer-title { font-size: 16px; font-weight: 800; color: #ffffff; }
.drawer-body { padding: 18px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 15px; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(16, 41, 28, 0.52); backdrop-filter: blur(3px);
  z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-dialog {
  background: var(--brand-mist-surface); border-radius: 18px; width: min(760px, 100%);
  max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border-strong);
}
.modal-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: linear-gradient(96deg, #102a1d 0%, #1b412d 100%);
  color: #ffffff; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
}
.modal-title { margin: 0; font-size: 15.5px; font-weight: 800; color: #ffffff; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; min-height: 0; }

/* Proposal PDF Preview */
.pdf-paper { background: #ffffff; border: 1px solid var(--border-strong); border-radius: 10px; padding: 26px; color: #14261c; font-size: 13px; }
.pdf-header { display: flex; justify-content: space-between; border-bottom: 3px solid var(--brand-forest); padding-bottom: 14px; margin-bottom: 18px; }

/* Toast */
.toast-container { position: fixed; right: 20px; bottom: 22px; z-index: 1300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--brand-forest); color: #ffffff; padding: 12px 16px; border-radius: 12px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); max-width: 400px;
  border-left: 4px solid var(--brand-green);
}
.toast.warn { border-left-color: #fbbf24; }
.toast.danger { border-left-color: #f87171; }

/* Utility */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-2 { margin-bottom: 8px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.section-divider {
  font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--brand-forest); background: #d0ded3; padding: 5px 10px; border-radius: 7px; margin-bottom: 10px;
}

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 12.5px; }
.bar-track { flex: 1; height: 9px; background: #cfddd2; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-forest) 0%, var(--brand-green) 100%); }

/* Homepage Overall User Board (3-column Ratio Cards) */
.user-board-panel {
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.user-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.user-board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ratio-card {
  background: linear-gradient(180deg, #eff5f0 0%, #dce7de 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ratio-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ratio-big {
  font-size: 21px;
  font-weight: 800;
  color: var(--brand-forest);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.ratio-big span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.ratio-bar {
  height: 8px;
  border-radius: 99px;
  background: #c6d6c9;
  overflow: hidden;
  display: flex;
}

.ratio-seg-primary { background: var(--brand-forest); height: 100%; }
.ratio-seg-green { background: var(--brand-green); height: 100%; }
.ratio-seg-purple { background: #7c3aed; height: 100%; }

.ratio-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Customer Archive Multi-Row Tag Filter Panel */
.tag-filter-panel {
  background: var(--surface-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tag-filter-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-forest);
  min-width: 78px;
}

.filter-tag {
  border: 1px solid var(--border-strong);
  background: var(--brand-mist-surface);
  color: var(--brand-forest);
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.filter-tag:hover {
  border-color: var(--brand-green);
  background: var(--brand-green-soft);
}

.filter-tag.active {
  background: var(--brand-forest);
  border-color: var(--brand-forest);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(27, 65, 45, 0.22);
}

/* Won Customer Units & Model Highlight Strip */
.won-units-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: linear-gradient(96deg, #163725 0%, #1f4f34 100%);
  color: #ffffff;
  margin-bottom: 12px;
}

.won-units-count {
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.won-model-chip {
  background: rgba(48, 189, 25, 0.22);
  border: 1px solid rgba(48, 189, 25, 0.55);
  color: #e9fbe6;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
}

@media (max-width: 1120px) {
  .user-board-grid { grid-template-columns: 1fr; }
}

/* Monthly New Users Chart */
.month-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  height: 138px;
  padding: 12px 6px 4px;
}

.month-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  height: 100%;
  justify-content: flex-end;
  cursor: pointer;
}

.month-val {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-forest);
}

.month-bar-track {
  width: 100%;
  max-width: 36px;
  height: 82px;
  background: #d5e2d8;
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.month-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #30bd19 0%, #1b412d 100%);
  border-radius: 8px 8px 0 0;
  transition: height 0.25s ease;
}

.month-col.current .month-bar-fill {
  background: linear-gradient(180deg, #39d621 0%, #249b12 100%);
  box-shadow: 0 0 12px rgba(48, 189, 25, 0.4);
}

.month-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.month-col.current .month-label {
  color: var(--brand-forest);
}

/* Interactive Visit Schedule Calendar */
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.cal-head {
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
  padding: 6px 0;
}

.cal-cell {
  min-height: 86px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-white);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.cal-cell:hover {
  border-color: var(--brand-green);
  background: #f2f9f3;
}

.cal-cell.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.cal-cell.today {
  border: 2px solid var(--brand-green);
  background: #eaf8e8;
}

.cal-cell.selected {
  border: 2px solid var(--brand-forest);
  box-shadow: 0 0 0 3px rgba(27, 65, 45, 0.14);
}

.cal-day-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-forest);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cal-chip {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-chip.scheduled { background: var(--st-blue-bg); color: var(--st-blue); }
.cal-chip.pending_log { background: var(--st-amber-bg); color: #b45309; border: 1px solid #f0c36d; }
.cal-chip.completed { background: var(--brand-green-soft); color: #167a13; }

/* Map NEW Badge for Current-Month Added Users */
.lf-new-badge {
  position: absolute;
  top: -11px;
  right: -13px;
  background: #30bd19;
  color: #0d2417;
  font-size: 8.5px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 99px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* Decision Radio Cards in Visit Record Modal */
.decision-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.decision-card {
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  padding: 11px 13px;
  background: var(--surface-white);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  transition: all 0.14s;
}

.decision-card:has(input:checked) {
  border-color: var(--brand-green);
  background: var(--brand-green-soft);
}

@media (max-width: 1120px) {
  .calendar-layout { grid-template-columns: 1fr; }
}

/* Responsive */
.mobile-only { display: none; }
.mobile-bottom-nav { display: none; }

@media (max-width: 1120px) {
  .split-shell { grid-template-columns: 1fr; }
  .profile-rail { border-right: none; padding-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
  .bento-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .map-layout { grid-template-columns: 1fr; }
  .map-filters-card { max-height: none; }
  .funnel-strip { grid-template-columns: repeat(3, 1fr); }
  .grid-asymmetric, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .mobile-only { display: inline-flex; }
  .hide-sm { display: none !important; }
  .icon-rail { transform: translateX(-100%); transition: transform 0.2s ease; }
  .icon-rail.open { transform: translateX(0); }
  .stage-topbar { height: auto; flex-wrap: wrap; padding: 4px 4px 8px; gap: 8px; }
  .stage-topbar-left { max-width: 100%; width: 100%; flex-wrap: wrap; gap: 8px; }
  .global-search-wrap { flex: 1 1 180px; max-width: 100%; }
  .green-stage { margin-left: 0; padding: 8px 8px 70px; }
  .sage-sheet { padding: 14px 12px 24px; border-radius: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .funnel-strip { grid-template-columns: repeat(2, 1fr); }
  .segmented-bar { grid-auto-flow: row; }
  .mobile-bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: 60px;
    background: #10291c; border-top: 1px solid rgba(221, 231, 223, 0.16);
    z-index: 55; justify-content: space-around; align-items: center;
  }
  .mobile-nav-btn {
    border: none; background: transparent; display: flex; flex-direction: column;
    align-items: center; gap: 2px; font-size: 10.5px; color: #b4cabd; padding: 4px 8px;
  }
  .mobile-nav-btn.active { color: var(--brand-green); font-weight: 700; }
}

@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { display: block !important; position: absolute; inset: 0; padding: 20px; background: #fff; }
}
