/*
 * RadarAlfa product theme
 * Reference: forest navigation, lime selection, quiet operational surfaces.
 * Loaded after legacy page styles so every authenticated surface speaks the
 * same visual language without coupling the theme to individual templates.
 */
:root {
  --dark:#1b3026;
  --dark-2:#233c2d;
  --dark-line:#385241;
  --primary:#bfe974;
  --primary-dark:#83ae45;
  --paper:#f6f8f3;
  --surface:#fff;
  --soft:#eef3e9;
  --line:#e1e8dc;
  --ink:#1d3228;
  --muted:#7b8b7c;
  --reference-shadow:0 8px 32px rgba(29,51,35,.045);

  /* Bridge the existing component vocabulary to the reference. */
  --bg:var(--paper);
  --bg-surface:var(--surface);
  --bg-subtle:#f9fbf7;
  --bg-inset:var(--soft);
  --surface-soft:var(--soft);
  --text:var(--ink);
  --text-muted:var(--muted);
  --text-dim:#95a499;
  --border:var(--line);
  --border-light:#edf1ea;
  --border-soft:var(--line);
  --accent:var(--dark);
  --accent-hover:var(--dark-2);
  --accent-deep:var(--dark);
  --accent-soft:#eaf4df;
  --accent-loud:var(--primary);
  --success:#4d8850;
  --success-soft:#e8f5e3;
  --success-border:#d2e8c8;
  --warning:#a27832;
  --warning-soft:#fbf3df;
  --warning-border:#ead9ad;
  --danger:#b8564c;
  --danger-soft:#fff0ee;
  --danger-border:#efc5c0;
  --info:#536c9c;
  --info-soft:#eaf0fa;
  --info-border:#d6e0f1;
  --sidebar-bg:var(--dark);
  --sidebar-text:#c4d3c7;
  --sidebar-muted:#91aa97;
  --header-bg:#fff;
  --header-text:var(--ink);
  --radius:13px;
  --radius-sm:8px;
  --radius-lg:15px;
  --shadow-sm:0 2px 10px rgba(29,51,35,.035);
  --shadow:var(--reference-shadow);
  --shadow-lg:0 16px 42px rgba(29,51,35,.12);
  --shadow-focus:0 0 0 3px rgba(134,184,84,.22);
  --font-body:'DM Sans',ui-sans-serif,system-ui,sans-serif;
  --font-display:'Manrope','DM Sans',ui-sans-serif,sans-serif;
  --font-mono:'DM Sans',ui-sans-serif,system-ui,sans-serif;
}

html { background:var(--paper); }
body,
button,
input,
select,
textarea { font-family:var(--font-body); }
body { color:var(--ink); background:var(--paper); font-size:12px; }
h1,h2,h3,.topbar-title,.brand-name,.stat-value,.kpi-value,
.metric-value,.detail-name,.auth-title { font-family:var(--font-display); }
button,input,select,textarea { font-size:inherit; }
::selection { color:var(--dark); background:var(--primary); }
:focus-visible { outline:2px solid #86b854; outline-offset:2px; }

/* Shell ------------------------------------------------------------------ */
.app-shell { min-height:680px; background:var(--paper); }
.app-sidebar {
  width:244px;
  flex-basis:244px;
  padding:0 11px 15px;
  background:var(--dark);
  color:#dce7dc;
}
.sidebar-head { min-height:72px; padding:0 9px; }
.app-sidebar .brand { gap:11px; }
.app-sidebar .brand-mark {
  width:37px;
  height:37px;
  border-radius:11px;
  background:var(--primary);
  box-shadow:none;
}
.app-sidebar .brand-name { color:#fff; font-size:17px; font-weight:800; letter-spacing:-.8px; }
.app-sidebar .app-tagline { margin-top:2px; color:#91aa97; font-size:10px; letter-spacing:.05em; }
.sidebar-collapse { border:0; color:#8caa92; }
.sidebar-team-switcher {
  margin:0 1px 13px;
  padding:12px;
  border:1px solid #3a5240;
  border-radius:12px;
  background:#263b2e;
}
.sidebar-team-label { color:#95b59b; font-size:9px; letter-spacing:.13em; }
.sidebar-workspace-menu { position:relative; margin-top:7px; }
.sidebar-workspace-menu > summary {
  display:flex;
  align-items:center;
  gap:9px;
  width:100%;
  min-height:36px;
  padding:0 10px 0 11px;
  border:1px solid #49644f;
  border-radius:8px;
  background:#203629;
  color:#fff;
  cursor:pointer;
  list-style:none;
  font-size:11px;
  font-weight:800;
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
.sidebar-workspace-menu > summary::-webkit-details-marker { display:none; }
.sidebar-workspace-menu > summary:hover { border-color:#68856d; background:#294333; }
.sidebar-workspace-menu > summary:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
.sidebar-workspace-menu > summary i { margin-left:auto; color:#b7c9ba; font-size:10px; transition:transform .15s ease; }
.sidebar-workspace-menu[open] > summary { border-color:var(--primary); background:#294333; box-shadow:0 0 0 2px rgba(191,233,116,.12); }
.sidebar-workspace-menu[open] > summary i { transform:rotate(180deg); }
.sidebar-workspace-current { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-workspace-options {
  position:absolute;
  z-index:120;
  top:calc(100% + 6px);
  left:0;
  right:0;
  padding:5px;
  border:1px solid #49644f;
  border-radius:10px;
  background:#203629;
  box-shadow:0 16px 32px rgba(7,20,12,.32);
}
.sidebar-workspace-options form { margin:0; }
.sidebar-workspace-option {
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  min-height:38px;
  padding:5px 8px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#d9e5db;
  cursor:pointer;
  text-align:left;
  font-size:11px;
  font-weight:700;
}
.sidebar-workspace-option:hover,.sidebar-workspace-option:focus-visible { background:#2d4937; color:#fff; outline:none; }
.sidebar-workspace-option.is-active { background:var(--primary); color:var(--dark); }
.sidebar-workspace-option > i { margin-left:auto; font-size:13px; }
.sidebar-workspace-avatar { display:grid; place-items:center; flex:0 0 25px; width:25px; height:25px; border-radius:7px; background:#385742; color:#d8ff96; font-size:10px; font-weight:800; }
.sidebar-workspace-option.is-active .sidebar-workspace-avatar { background:#a6d25f; color:#213925; }
.sidebar-team-manage { color:#9bb2a0; }
.sidebar-scroll { padding:0; scrollbar-color:#47614e transparent; }
.sidebar-section-label {
  padding:0 11px 7px;
  color:#799988;
  font-size:9px;
  font-weight:800;
  letter-spacing:.14em;
}
.sidebar-section-label:not(:first-child) { padding-top:18px; }
.sidebar-nav { gap:2px; }
.sidebar-link,.sidebar-logout {
  min-height:39px;
  padding:0 11px;
  border:0;
  border-radius:9px;
  color:#c4d3c7;
  font-size:12px;
  font-weight:650;
}
.sidebar-link i,.sidebar-logout i { width:17px; color:inherit; font-size:16px; opacity:.8; }
.sidebar-link:hover,.sidebar-logout:hover { color:#fff; background:#2b4333; transform:none; }
.sidebar-link.active {
  color:#1f3524;
  background:var(--primary);
  box-shadow:none;
  font-weight:800;
}
.sidebar-link.active i { color:#1f3524; opacity:1; }
.sidebar-badge,.sidebar-plan-lock {
  margin-left:auto;
  border:0;
  border-radius:6px;
  background:#385342;
  color:#cee3d0;
  font-size:10px;
}
.sidebar-link.active .sidebar-badge { background:#a8d667; color:#27412b; }
.sidebar-subnav { margin:3px 0 7px 20px; border-left-color:#385241; }
.sidebar-subnav a { color:#9fb2a2; font-size:10.5px; border-radius:7px; }
.sidebar-subnav a:hover,.sidebar-subnav a.active { color:#e5f1e6; background:#294333; }
.sidebar-plan-card {
  margin:13px 1px 0;
  padding:11px 12px;
  border:1px solid #476046;
  border-radius:11px;
  background:#283a2c;
  box-shadow:none;
}
.sidebar-runway { height:5px; background:#405744; }
.sidebar-runway i { background:var(--primary); }
.sidebar-footer { padding:12px 1px 0; border-top-color:#34503d; }
.user-avatar { background:#42633b; color:#d8ff96; }

.app-topbar {
  min-height:72px;
  height:72px;
  padding:0 27px;
  border-bottom:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  box-shadow:none;
}
.topbar-kicker,.eyebrow {
  color:#91a294;
  font-family:var(--font-body);
  font-size:9px;
  font-weight:800;
  letter-spacing:.13em;
}
.topbar-title { color:var(--ink); font-size:23px; font-weight:800; letter-spacing:-.9px; }
.topbar-search {
  min-width:200px;
  height:36px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f9fbf7;
  color:#738676;
}
.topbar-search:hover { border-color:#cbd8c7; background:#fff; }
.topbar-search i { color:#738676; }
.topbar-search kbd { border:0; background:#e9eee7; font-family:var(--font-body); }
.topbar-plan-pill,.operator-control,.theme-toggle-btn {
  min-height:36px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fff;
  color:#435547;
  box-shadow:none;
}
.topbar-plan-pill:hover,.operator-control:hover,.theme-toggle-btn:hover { background:var(--soft); }
.topbar-live { color:#446e4b; }
.topbar-live .live-dot { background:#56a36c; }
.app-main { max-width:1700px; padding:24px 27px; }

/* Shared component grammar ----------------------------------------------- */
.btn {
  min-height:36px;
  padding:0 13px;
  border-radius:9px;
  font-size:11px;
  font-weight:800;
  box-shadow:none;
}
.btn-sm { min-height:30px; padding:0 10px; border-radius:7px; font-size:10.5px; }
.btn-lg { min-height:42px; padding:0 17px; border-radius:10px; font-size:12px; }
.btn-primary,.btn-success { color:#fff; background:var(--dark); border-color:var(--dark); box-shadow:none; }
.btn-primary:hover:not(:disabled),.btn-success:hover:not(:disabled) { background:var(--dark-2); border-color:var(--dark-2); }
.btn-secondary,.btn-ghost { color:#344e3b; background:#fff; border-color:var(--line); box-shadow:none; }
.btn-secondary:hover:not(:disabled),.btn-ghost:hover:not(:disabled) { background:var(--soft); border-color:#d0ddcb; }
.input,
input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
select,
textarea {
  border-color:var(--line);
  border-radius:8px;
  background:#fff;
  color:var(--ink);
}
.input { min-height:36px; padding:0 10px; font-size:11.5px; }
textarea.input { min-height:96px; padding:10px; }
.input:focus,input:focus,select:focus,textarea:focus { border-color:#86b854; box-shadow:var(--shadow-focus); }
.field-label { color:#718573; font-size:10px; font-weight:700; letter-spacing:0; text-transform:none; }
input[type='checkbox'],input[type='radio'] { accent-color:#507b47; }

.card,.panel,.lead-list-panel,.detail-panel,.inbox-panel,
.settings-card,.billing-card,.automation-card,.booking-card {
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  box-shadow:var(--reference-shadow);
}
.card-header,.panel-header {
  min-height:62px;
  padding:14px 18px;
  border-bottom-color:var(--line);
}
.card-header h3,.panel-title h2,.panel-title h3 { font-family:var(--font-display); font-size:16px; font-weight:800; letter-spacing:-.45px; }
.panel-count,.count-chip { padding:4px 7px; border-radius:7px; background:#eaf4df; color:#477a43; font-size:10px; }
.dashboard-intro h1,.page-header h1,.workspace-header h1 { font-family:var(--font-display); font-size:24px; font-weight:800; letter-spacing:-1px; }
.dashboard-intro p,.page-header p,.workspace-header p { color:var(--muted); font-size:12px; }
.stat-card,.kpi {
  min-height:103px;
  border-color:var(--line);
  background:#fff;
  box-shadow:var(--reference-shadow);
}
.stat-card { border-radius:13px; padding:15px 17px; }
.stat-card::after { display:none; }
.stat-icon,.kpi-icon { width:31px; height:31px; border-radius:9px; background:#eef5e9; color:#68945f; }
.stat-value,.kpi-value { font-size:25px; font-weight:800; letter-spacing:-1px; }
.stat-label,.kpi-label { color:#718573; font-size:10.5px; letter-spacing:0; text-transform:none; }
.kpi-strip { border-radius:13px; border-color:var(--line); box-shadow:var(--reference-shadow); }
.quick-actions { border-color:var(--line); border-radius:12px; box-shadow:var(--reference-shadow); }
.quick-link { color:#628366; font-size:11px; font-weight:800; }
.quick-link:hover { color:#224c32; }

table { color:var(--ink); }
th {
  background:#f6f8f4;
  color:#859685;
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
th,td { border-color:#edf0eb; }
.lead-table th,.lead-table td { padding:12px; }
.lead-table .td-company { min-height:54px; align-items:center; }
.lead-table .company-meta { width:min(280px,32vw); gap:2px; overflow:hidden; }
.lead-table .company-name { max-width:100%; line-height:16px; }
.company-secondary { display:flex; align-items:center; gap:4px; min-width:0; height:14px; color:#93a094; font-size:10px; line-height:14px; }
.company-contact-name { flex:0 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.company-secondary-sep { flex:none; color:#bdc8bc; }
.company-secondary .company-url { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.company-meta-row { display:flex; align-items:center; gap:6px; min-width:0; height:18px; overflow:hidden; }
.company-linkedin { flex:none; font-size:10px; line-height:16px; white-space:nowrap; }
.company-tags { display:flex; align-items:center; gap:3px; min-width:0; overflow:hidden; white-space:nowrap; }
.company-tags .badge-tag { display:block; max-width:84px; padding:2px 6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; line-height:14px; }
.company-tags .badge-tag-more { flex:none; padding:2px 6px; border-radius:6px; background:#dfead9; color:#4c7451; font-size:9px; font-weight:800; line-height:14px; }
.lead-row:hover,tr[data-href]:hover { background:#f9fcf7; }
.lead-row--selected { background:#f0f7e9; }
.badge,.pill,.status-badge,.tag { border-radius:6px; font-size:10px; font-weight:800; }
.tabs,.tab-bar,.detail-tabs { border-bottom-color:var(--line); }
.tab,.tabs a,.tabs button { color:#829485; font-size:11px; font-weight:750; }
.tab.active,.tab.on,.tabs a.active,.tabs button.active { color:#224e31; }

dialog,.modal,.modal-card { border-color:var(--line); border-radius:13px; background:#fff; box-shadow:0 20px 55px rgba(27,48,38,.2); }
.alert,.toast,.message { border-radius:10px; }
.pagination a,.pagination button,.pagination-btn { border-color:var(--line); border-radius:7px; background:#fff; color:#506b55; }
.empty-state { color:var(--muted); }

/* Authentication uses the same shell language, at a calmer scale. */
.auth-page { background:var(--paper); }
.auth-rail { background:var(--dark); }
.auth-logo-mark { border-radius:11px; background:var(--primary); }
.auth-overline,.auth-topline { font-family:var(--font-body); }
.auth-card,.auth-card--product { border-color:var(--line); border-radius:13px; background:#fff; box-shadow:var(--reference-shadow); }
.auth-title { color:var(--ink); font-weight:800; letter-spacing:-.8px; }
.auth-page > .auth-card { border:1px solid var(--line); }
.auth-page > .auth-card .brand-mark { background:var(--primary); color:var(--dark); }

/* Dark mode retains the same semantic hierarchy instead of changing brand. */
[data-theme='dark'] {
  --paper:#101b15;
  --surface:#19271f;
  --soft:#223329;
  --line:#33473a;
  --ink:#edf5ee;
  --muted:#a7b7aa;
  --bg:var(--paper);
  --bg-surface:var(--surface);
  --bg-subtle:#1d2d24;
  --bg-inset:var(--soft);
  --text:var(--ink);
  --text-muted:var(--muted);
  --text-dim:#84988a;
  --border:var(--line);
  --border-light:#293c30;
  --header-bg:#19271f;
  --header-text:var(--ink);
}
[data-theme='dark'] .app-topbar,
[data-theme='dark'] .topbar-search,
[data-theme='dark'] .topbar-plan-pill,
[data-theme='dark'] .operator-control,
[data-theme='dark'] .theme-toggle-btn,
[data-theme='dark'] .card,
[data-theme='dark'] .panel,
[data-theme='dark'] .lead-list-panel,
[data-theme='dark'] .auth-card { background:var(--surface); color:var(--ink); }

@media (max-width:1250px) {
  .app-sidebar { width:211px; flex-basis:211px; }
  .app-main { padding:19px; }
  .app-topbar { padding:0 19px; }
}
@media (max-width:1024px) {
  .app-sidebar { width:244px; flex-basis:244px; }
}
@media (max-width:700px) {
  .app-topbar { min-height:66px; height:66px; padding:0 15px; }
  .app-main { padding:15px; }
  .topbar-title { font-size:20px; }
  .dashboard-intro { align-items:flex-start; flex-direction:column; }
  .filter-toolbar,.filter-bar { width:100%; min-width:0; }
  .filter-bar .input,.filter-bar input[name='search'] {
    min-width:0;
    width:100%;
    max-width:100%;
  }
  .filter-bar input[name='search'] { flex:1 1 100%; }
  .filter-bar select.input { flex:1 1 calc(50% - 4px); width:calc(50% - 4px); }
  .filter-more-toggle { justify-content:center; width:100%; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}
