:root {
  --gw-bg: #0a0f1a;
  --gw-bg-input: #0d1220;
  --gw-border: #1e2d45;
  --gw-border-light: #253550;
  --gw-text: #e2e8f0;
  --gw-text-muted: #8494a7;
  --gw-text-dim: #5a6b80;
  --sidebar-bg: rgba(8, 12, 24, 0.95);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-item-text: rgba(255, 255, 255, 0.55);
  --sidebar-item-hover-bg: rgba(255, 255, 255, 0.06);
  --sidebar-item-hover-text: rgba(255, 255, 255, 0.9);
  --sidebar-item-active-bg: rgba(247, 148, 29, 0.12);
  --sidebar-item-active-text: #ff8a1c;
  --orange-500: #ff8a1c;
  --orange-600: #f97316;
  --orange-400: #ffaa33;
  --ink-900: #0e1422;
  --ink-800: #1b2236;
  --ink-700: #323b52;
  --ink-600: #525c73;
  --ink-500: #6e7891;
  --ink-300: #c7cddc;
  --ink-200: #e2e6ef;
  --ink-100: #eff2f8;
  --ink-50: #f7f9fc;
  --stage-identified: #94a3b8;
  --stage-outreach: #64a6f4;
  --stage-response: #8b5cf6;
  --stage-decision: #a855f7;
  --stage-presentation: #d946ef;
  --stage-agreement: #ff8a1c;
  --stage-docusign: #ea580c;
  --stage-signed: #16a34a;
  --stage-serviceready: #059669;
  --topbar-height: 58px;
  --sidebar-width: 220px;
  --rail-width: 340px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.34);
  --font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Archivo", "Open Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
  font-family: var(--font-sans);
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  color: var(--gw-text);
  background:
    radial-gradient(circle at top, rgba(28, 46, 92, 0.42), transparent 42%),
    linear-gradient(180deg, #081122 0%, #0b162b 48%, #0f1c34 100%);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.08), rgba(8, 12, 24, 0.14));
  pointer-events: none;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; }

.auth {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--gw-text);
  background:
    linear-gradient(135deg, rgba(247, 148, 29, 0.2), transparent 32%),
    radial-gradient(circle at 78% 20%, rgba(100, 166, 244, 0.18), transparent 28%),
    var(--gw-bg);
}
.auth-card {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 12, 24, 0.92);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sun {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffd29b 0 18%, var(--orange-500) 19% 54%, transparent 55%),
    conic-gradient(from 0deg, transparent 0 9deg, var(--orange-500) 9deg 18deg, transparent 18deg 36deg);
  flex: 0 0 auto;
}
.brand-title { font: 800 21px/1 var(--font-display); color: white; }
.brand-sub { color: var(--gw-text-muted); font-size: 10px; font-weight: 800; letter-spacing: 0.16em; margin-top: 2px; }
.topbar .brand { gap: 8px; }
.topbar .sun { width: 18px; height: 18px; }
.topbar .brand-title { font-size: 13px; color: var(--orange-500); }
.topbar .brand-sub { font-size: 7px; color: rgba(255,255,255,0.72); }
.auth h1 { margin: 22px 0 8px; font: 800 30px/1.08 var(--font-display); color: white; }
.auth p { margin: 0 0 22px; color: var(--gw-text-muted); line-height: 1.5; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 700;
}
.tab.active { background: var(--orange-500); border-color: var(--orange-500); color: white; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label {
  font-size: 11px;
  color: var(--gw-text-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--gw-border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--gw-bg-input);
  color: var(--gw-text);
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.14);
}

.primary, .secondary, .ghost, .danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.primary { background: var(--orange-500); color: white; }
.primary:hover { background: var(--orange-600); }
.secondary { border: 1px solid var(--gw-border); color: var(--gw-text); background: rgba(255, 255, 255, 0.05); }
.secondary:hover, .ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.18); }
.ghost { border: 1px solid var(--gw-border); color: rgba(255, 255, 255, 0.82); background: transparent; }
.danger { background: rgba(220, 38, 38, 0.15); color: #fecaca; border: 1px solid rgba(248, 113, 113, 0.25); }
.error { color: #fecaca; min-height: 20px; font-size: 13px; margin-top: 10px; }
.notice { color: #86efac; font-size: 13px; }

.shell {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 250px minmax(260px, 620px) minmax(max-content, 1fr);
  align-items: center;
  height: var(--topbar-height);
  padding: 0 18px;
  gap: 16px;
  color: white;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--sidebar-border);
  backdrop-filter: blur(20px);
}
.search { position: relative; max-width: 620px; width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid var(--gw-border); border-radius: 8px; background: var(--gw-bg-input); padding: 0 10px; }
.search input {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: white;
  padding: 9px 0;
  outline: none;
  font-size: 13px;
}
.search input::placeholder { color: rgba(255, 255, 255, 0.5); }
.kbd { font-family: var(--font-mono); font-size: 10px; padding: 2px 5px; background: rgba(255,255,255,0.12); border-radius: 3px; color: rgba(255,255,255,0.7); }
.results {
  position: absolute;
  z-index: 150;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(8, 12, 24, 0.96);
  color: var(--gw-text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  backdrop-filter: blur(18px);
}
.result { padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); cursor: pointer; }
.result:hover { background: rgba(255, 255, 255, 0.06); }
.result strong { display: block; font-size: 12px; color: white; }
.result span { color: var(--gw-text-muted); font-size: 11px; }
.userbar {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  min-width: 0;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--orange-500);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.workspace {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--rail-width);
}
.workspace.panel-hidden { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar {
  min-height: 0;
  overflow-y: auto;
  padding: 14px 12px;
  background: var(--sidebar-bg);
  color: var(--gw-text);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  backdrop-filter: blur(18px);
}
.side-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(255,255,255,0.36); padding: 16px 12px 8px; }
.side-label:first-child { padding-top: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  border-left: 2px solid transparent;
  padding: 10px 12px;
  text-align: left;
  color: var(--sidebar-item-text);
  font-size: 13px;
  font-weight: 700;
}
.nav-item:hover { background: var(--sidebar-item-hover-bg); color: var(--sidebar-item-hover-text); }
.nav-item.active {
  background: var(--sidebar-item-active-bg);
  color: var(--sidebar-item-active-text);
  border-left-color: var(--orange-500);
}
.nav-icon { width: 12px; color: currentColor; display: inline-grid; place-items: center; opacity: 0.86; }
.side-count { margin-left: auto; font-size: 11px; color: rgba(255,255,255,0.38); font-variant-numeric: tabular-nums; }
.filter-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.filter-dot.warn { background: #f59e0b; }
.filter-dot.good { background: #22c55e; }
.filter-dot.hot { background: var(--orange-500); }
.nav-item.soft { color: rgba(255,255,255,0.52); font-weight: 700; }
.nav-item.active-soft { background: rgba(247, 148, 29, 0.12); color: var(--orange-500); border-left-color: var(--orange-500); }
.mini-avatar { width: 18px; height: 18px; border-radius: 50%; background: #2a4db0; color: white; font-size: 9px; font-weight: 800; display: inline-grid; place-items: center; flex: 0 0 auto; }
.side-footer {
  margin-top: auto;
  padding: 16px 0 8px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-profile {
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.sidebar-profile-copy { min-width: 0; display:grid; gap: 2px; }
.sidebar-profile-name { font-size: 12px; font-weight: 800; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile-role { font-size: 10px; color: rgba(255,255,255,0.42); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.side-footer .nav-item {
  font-size: 12px;
  min-height: 34px;
  border-radius: 6px;
}

.content {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  background: var(--sidebar-bg);
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 0;
  margin: 0;
}
.page-title { display:flex; align-items:center; gap: 9px; }
.title-chip { background: rgba(255,255,255,0.09); color: rgba(255,255,255,0.78); padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
h1 {
  margin: 0;
  font: 800 22px/1.1 var(--font-display);
  letter-spacing: 0;
  color: var(--gw-text);
}
.sub { margin-top: 5px; color: var(--gw-text-muted); font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.toolbar {
  margin-top: 104px;
  padding: 14px 24px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar-sep { width: 1px; height: 22px; background: rgba(255,255,255,0.14); }
.sorted { margin-left: auto; color: var(--gw-text-muted); font-size: 11px; align-self: center; }
.sorted b { color: white; }
.filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
}
.filter.active { background: #132b6b; color: white; border-color: #132b6b; }
.view-switch {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.view-switch button {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.62);
}
.view-switch button.active { background: rgba(255, 255, 255, 0.14); color: white; }

.right-panel {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: rgba(8, 12, 24, 0.9);
  color: white;
  border-left: 1px solid var(--sidebar-border);
  padding: 0;
  backdrop-filter: blur(18px);
}
.panel-hidden .right-panel { display: none; }
.ai-panel { background: transparent; color: white; display:flex; flex-direction:column; min-height:0; }
.ai-header { padding: 12px 14px; border-bottom: 1px solid var(--sidebar-border); display:flex; align-items:center; gap:8px; }
.ai-header .title { font-family: var(--font-display); font-weight: 800; font-size: 13px; }
.ai-header .sparkle { color: var(--orange-400); }
.ai-badge { margin-left:auto; font-size: 9px; font-weight:800; letter-spacing: 0.06em; background: rgba(244,115,33,0.2); color: var(--orange-400); padding: 2px 6px; border-radius: 3px; }
.ai-body { padding: 12px 14px; overflow-y:auto; min-height:0; max-height: 320px; }
.ai-prompt { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 9px 11px; font-size: 12px; color: rgba(255,255,255,0.7); display:flex; align-items:center; gap:8px; }
.ai-prompt-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}
.ai-prompt-form input {
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: white;
  padding: 9px 10px;
  font-size: 12px;
}
.ai-prompt-form input::placeholder { color: rgba(255,255,255,0.5); }
.ai-prompt-form button {
  border-radius: 8px;
  background: rgba(247,148,29,0.95);
  color: #111827;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
}
.ai-answer {
  margin-top: 9px;
  border: 1px solid rgba(247,148,29,0.28);
  border-radius: 8px;
  background: rgba(247,148,29,0.08);
  color: rgba(255,255,255,0.88);
  padding: 10px;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.ai-suggestions { display:flex; flex-direction:column; gap:6px; margin-top:9px; }
.ai-sg { padding: 8px 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 6px; font-size: 11px; color: rgba(255,255,255,0.85); display:flex; align-items:flex-start; gap:8px; line-height:1.4; }
button.ai-sg { text-align: left; }
button.ai-sg:hover { border-color: rgba(247,148,29,0.34); background: rgba(247,148,29,0.08); }
.ai-sg b { color: white; font-weight: 800; }
.rail-section { border-bottom: 1px solid var(--sidebar-border); display:flex; flex-direction:column; min-height:0; }
.rail-head { padding: 10px 14px; display:flex; align-items:center; gap:8px; background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--sidebar-border); }
.rail-head .t { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.78); }
.rail-head .b { font-family: var(--font-mono); font-size:10px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.72); padding: 2px 6px; border-radius: 3px; font-weight: 700; }
.rail-head .right { margin-left:auto; display:flex; gap:4px; }
.tinybtn { font-size: 11px; padding: 3px 8px; border-radius: 4px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.72); font-weight: 700; }
.tinybtn.active { background: #1f3f8c; color: white; }
.stream { min-height: 116px; overflow-y:auto; padding: 0 14px 8px; }
.stream-empty { height: 84px; }
.stream-item { display:grid; grid-template-columns:24px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 12px; }
.stream-item .head { font-size: 11px; color: rgba(255,255,255,0.5); }
.stream-item .head b { color: white; font-weight: 700; }
.stream-item .text { color: rgba(255,255,255,0.9); line-height: 1.4; margin-top: 2px; }
.stream-item .ctx { font-size: 11px; color: rgba(247,148,29,0.92); margin-top: 3px; font-weight: 600; }
.lb { padding: 8px 14px 12px; }
.lb-row { display: grid; grid-template-columns: 18px 1fr 60px auto; gap: 8px; align-items: center; padding: 5px 0; font-size: 12px; }
.lb-row .rank { color: var(--ink-500); font-family: var(--font-mono); font-size: 10px; font-weight: 800; }
.lb-row .rep { display:inline-flex; align-items: center; gap:6px; font-weight: 700; }
.lb-row .v { font-family: var(--font-mono); font-weight: 800; color: white; }
.lb-row .bar { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; width: 60px; }
.lb-row .bar span { display:block; height: 100%; background: var(--orange-500); border-radius: 2px; }
.alerts-panel { background: rgba(247,148,29,0.08); border-top: 1px solid rgba(247,148,29,0.22); padding: 10px 14px; }
.alerts-head { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--orange-600); margin-bottom: 6px; display:flex; align-items:center; gap:6px; }
.alert-item { font-size: 11px; color: rgba(255,255,255,0.82); padding: 4px 0; line-height: 1.4; }
.alert-item b { color: var(--orange-600); }
.panel-card {
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--sidebar-border);
  border-radius: 0;
  background: transparent;
}
.panel-card h3 {
  margin: 0 0 9px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.panel-card p {
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  line-height: 1.45;
}
.muted { color: var(--gw-text-muted); }
.grid { display: grid; gap: 14px; }
.content > .grid { padding: 0 24px 24px; }
.metrics { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.metric, .card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--gw-text);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}
.metric span {
  color: var(--gw-text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.metric strong {
  display: block;
  font: 800 24px/1 var(--font-display);
  color: white;
  margin-top: 8px;
}
.empty {
  margin: 28px 24px 24px;
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  background: rgba(15, 23, 42, 0.55);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: var(--gw-text-muted);
  padding: 24px;
  backdrop-filter: blur(12px);
}
.pipeline-blank { min-height: 300px; }
.empty strong {
  display: block;
  color: var(--gw-text);
  font: 800 20px/1.1 var(--font-display);
  margin-bottom: 8px;
}

.kanban {
  overflow-x: auto;
  overflow-y: visible;
  min-height: 0;
  height: auto;
  padding: 8px 24px 24px;
  display: grid;
  grid-template-columns: repeat(9, 288px);
  gap: 14px;
  align-items: start;
}
.lane {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  min-height: 180px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}
.lane h3 {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 2px;
  padding: 8px 0 6px;
  color: var(--gw-text);
  background: var(--sidebar-bg);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lane h3 span:last-child {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
}
.prop-card {
  width: 100%;
  text-align: left;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--ink-800);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.prop-card:hover {
  border-color: #64a6f4;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.prop-card strong {
  display: block;
  color: var(--ink-800);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 3px;
}
.prop-card > div:not(.chips) {
  color: var(--ink-500);
  font-size: 11px;
  line-height: 1.35;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  border-radius: 999px;
  background: var(--ink-100);
  color: var(--ink-600);
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
}
.chip:nth-child(2) { background: #dbeafe; color: #1d4ed8; }

table {
  width: calc(100% - 48px);
  margin: 8px 24px 24px;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--gw-text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
th, td {
  padding: 9px 10px;
  text-align: left;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}
th {
  background: rgba(8, 12, 24, 0.94);
  color: var(--gw-text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
td { color: rgba(255, 255, 255, 0.82); }
td strong { color: white; }
tr:hover td { background: rgba(255, 255, 255, 0.04); }
.clickable { cursor: pointer; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-bar { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 999px; overflow: hidden; }
.report-bar span { display: block; height: 100%; background: var(--orange-500); }
.ops-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
  padding: 18px 24px 24px;
  align-items: start;
}
.ops-column {
  min-height: 180px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.52);
  overflow: hidden;
}
.ops-column h3 {
  margin: 0;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: white;
  font-size: 12px;
  font-weight: 800;
}
.ops-column h3 b {
  margin-left: auto;
  color: var(--orange-400);
  font-size: 12px;
}
.ops-column > .muted { padding: 12px; margin: 0; font-size: 12px; }
.content-list { display: grid; gap: 10px; padding: 18px 24px 24px; }
.ops-card {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 12px;
  text-align: left;
  color: var(--gw-text);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: transparent;
}
.ops-card:hover { background: rgba(255,255,255,0.04); }
.ops-card strong { color: white; font-size: 13px; }
.ops-card span, .ops-card em { color: var(--gw-text-muted); font-size: 11px; font-style: normal; line-height: 1.4; }
.ops-card p { margin: 4px 0 0; color: rgba(255,255,255,0.82); font-size: 12px; line-height: 1.35; }
.task-card {
  grid-template-columns: 1fr auto;
  align-items: start;
}
.task-main { display: grid; gap: 5px; text-align: left; min-width: 0; }
.task-done {
  border: 1px solid rgba(34,197,94,0.28);
  border-radius: 6px;
  padding: 6px 9px;
  color: #86efac;
  background: rgba(34,197,94,0.12);
  font-size: 11px;
  font-weight: 800;
}
.route-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
  padding-right: 24px;
}
.route-layout .content-list { padding-right: 0; }
.route-print {
  margin-top: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 14px;
  height: max-content;
  background: rgba(15, 23, 42, 0.52);
}
.route-print h3 { margin: 0 0 6px; color: white; }
.score-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 14px; padding: 18px 24px 24px; }
.scorecard-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 24px 8px;
}
.scorecard-toolbar strong { color: white; }
.scorecard-toolbar select {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: white;
  border-radius: 8px;
  padding: 8px 10px;
}
.scorecard-admin-actions { display:flex; align-items:center; gap: 8px; flex-wrap: wrap; justify-content:flex-end; }
.score-card h3 { margin: 0 0 12px; color: white; }
.score-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 12px; }
.score-row span { color: var(--gw-text-muted); }
.score-row b { color: white; }
.scorecard-daily { display:grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 14px; padding: 0 24px 24px; }
.score-entry-grid { display:grid; gap: 14px; padding: 18px 24px 24px; }
.score-entry-card { overflow: auto; }
.score-entry-head { display:flex; justify-content:space-between; align-items:center; gap: 12px; margin-bottom: 12px; }
.score-entry-head h3 { margin: 0; color: white; }
.score-live-pill {
  border: 1px solid rgba(34,197,94,0.24);
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(34,197,94,0.1);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
}
.score-entry-table { min-width: 860px; display:grid; gap: 6px; }
.score-entry-row {
  display:grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(70px, 0.42fr)) minmax(74px, 0.45fr);
  gap: 8px;
  align-items:center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.score-entry-row.header { color: var(--gw-text-muted); text-transform: uppercase; letter-spacing: 0; font-size: 10px; font-weight: 800; }
.score-entry-row span { color: var(--gw-text-muted); font-size: 12px; }
.score-entry-row input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: white;
  padding: 7px 8px;
  font: 700 12px var(--font-sans);
}
.score-entry-row b { color: white; text-align:right; }
.score-entry-row .score-count {
  display: block;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  padding: 7px 8px;
  min-height: 30px;
}
.import-preview {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  padding: 14px;
}
.import-preview h3, .import-preview h4 { margin: 0 0 10px; color: white; }
.import-preview .metrics { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin-bottom: 12px; }
.import-preview .metric { padding: 10px; }
.import-preview .metric strong { font-size: 18px; }
.import-ok {
  border: 1px solid rgba(34,197,94,0.28);
  border-radius: 8px;
  background: rgba(34,197,94,0.08);
  color: #bbf7d0;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-weight: 700;
}
.import-warnings {
  border: 1px solid rgba(245,158,11,0.28);
  border-radius: 8px;
  background: rgba(245,158,11,0.08);
  padding: 10px;
  margin-bottom: 12px;
}
.team-card { grid-column: 1 / -1; }
.team-list { display: grid; gap: 10px; }
.team-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1fr) auto auto minmax(150px, 0.55fr);
  gap: 10px;
  align-items: end;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 0 10px;
}
.team-row.add {
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1fr) auto;
  border-bottom: 0;
  padding-top: 4px;
}
.team-row .field { margin: 0; }
.team-row button { min-height: 40px; white-space: nowrap; }
@media (max-width: 960px) {
  .team-row,
  .team-row.add { grid-template-columns: 1fr; align-items: stretch; }
}
.duplicate-group {
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 8px;
  margin-top: 8px;
}
.duplicate-group > strong,
.duplicate-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,0.9);
}
.duplicate-group > strong span,
.duplicate-row em {
  color: rgba(255,255,255,0.56);
  font-style: normal;
}
.duplicate-row {
  font-size: 12px;
}
.territory-map-shell {
  position: relative;
  height: calc(100vh - var(--topbar-height) - 126px);
  min-height: 620px;
  margin-top: 18px;
  overflow: hidden;
  background: #dbeafe;
}
.territory-map {
  position: absolute;
  inset: 0;
  background: #dbeafe;
}
.territory-map .maplibregl-ctrl-bottom-right { right: 10px; bottom: 24px; }
.territory-map .maplibregl-ctrl-attrib {
  font-size: 10px;
  border-radius: 999px 0 0 0;
  background: rgba(255,255,255,0.86);
}
.map-card {
  position: absolute;
  z-index: 5;
  background: rgba(31, 43, 72, 0.94);
  color: var(--gw-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
}
.map-card h3 { margin: 0; color: white; font-size: 14px; font-weight: 800; }
.map-card .muted { margin: 3px 0 14px; color: rgba(255,255,255,0.52); font-size: 11px; }
.map-panel-toggle {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  width: 28px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.52);
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.22);
}
.map-panel-toggle:hover,
.map-panel-toggle:focus-visible {
  border-color: rgba(255, 138, 28, 0.72);
  color: var(--orange-500);
  background: rgba(15, 23, 42, 0.86);
}
.map-panel-body { display: block; }
.map-card.collapsed {
  width: 44px;
  height: 32px;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  padding: 0;
}
.map-card.collapsed .map-panel-body { display: none; }
.map-card.collapsed .map-panel-toggle {
  top: 6px;
  width: 30px;
}
.map-left {
  top: 18px;
  left: 18px;
  width: 310px;
  max-height: calc(100% - 36px);
  overflow: auto;
  padding: 14px;
}
.map-right {
  top: 18px;
  right: 18px;
  width: 290px;
  max-height: calc(100% - 36px);
  overflow: hidden;
  padding: 14px 0 0;
}
.map-list-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 14px 12px;
}
.map-list-head span { color: rgba(255,255,255,0.46); font-size: 11px; font-weight: 800; }
.map-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.map-stat-grid div {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255,255,255,0.055);
}
.map-stat-grid div:first-child { border-color: rgba(255,138,28,0.42); background: rgba(255,138,28,0.08); }
.map-stat-grid strong {
  display:block;
  color: #ffd29b;
  font: 800 20px/1 var(--font-display);
  margin-bottom: 4px;
}
.map-stat-grid span {
  color: rgba(255,255,255,0.58);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.map-panel-label {
  margin: 14px 0 7px;
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.map-stage-list { display: flex; flex-wrap: wrap; gap: 6px; }
.map-stage-chip {
  display:inline-flex;
  align-items:center;
  gap: 6px;
  border: 1px solid rgba(255,138,28,0.55);
  border-radius: 6px;
  padding: 5px 8px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.78);
  font-size: 11px;
  font-weight: 700;
}
.map-stage-chip.active { color: var(--orange-500); background: rgba(247,148,29,0.12); }
.map-stage-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display:inline-block;
}
.map-stage-chip b { color: rgba(255,255,255,0.45); font-weight: 800; }
.map-property-list {
  max-height: calc(100vh - 230px);
  overflow: auto;
  padding: 0 14px 14px;
}
.map-property-list button {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.map-property-list button.active {
  margin: 4px 0;
  padding: 11px 10px;
  border: 1px solid rgba(255,138,28,0.55);
  border-radius: 8px;
  background: rgba(255,138,28,0.12);
}
.map-property-list strong { color: white; font-size: 12px; }
.map-property-list span { color: rgba(255,255,255,0.52); font-size: 11px; }
.map-property-list em {
  display:flex;
  align-items:center;
  gap: 6px;
  color: #fbbf24;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.map-property-list em i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.map-empty-copy {
  display:grid;
  gap: 6px;
  padding: 12px 0;
  color: rgba(255,255,255,0.58);
  font-size: 12px;
}
.map-empty-copy strong { color: white; }
.map-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid white;
  background: var(--marker-color, var(--orange-500));
  box-shadow: 0 2px 8px rgba(15,23,42,0.35);
}
.map-marker.active {
  width: 24px;
  height: 24px;
  z-index: 3;
  box-shadow: 0 0 0 6px rgba(255,138,28,0.24), 0 4px 14px rgba(15,23,42,0.45);
}
.map-marker::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.38);
}
.map-library-missing {
  position:absolute;
  inset: 0;
  display:grid;
  place-items:center;
  color: #0f172a;
  background: #e0f2fe;
  font-weight: 800;
}

.calendar-content {
  padding: 0;
  overflow: hidden;
  background: white;
}
.calendar-content .gcal-shell {
  height: 100%;
  min-height: 0;
  background: white;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 42px;
  overflow: hidden;
}
.gcal-left { border-right: 1px solid #E5E7EB; background: #F8FAFC; padding: 14px 14px 18px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 16px; color: #202124; }
.gcal-brand { display:flex; align-items:center; gap:12px; color:#202124; font-size: 22px; font-weight: 500; padding: 2px 2px 4px; }
.gcal-menu { width:34px; height:34px; border-radius:50%; display:grid; place-items:center; color:#3C4043; font-size:20px; }
.gcal-menu:hover { background:#E8EAED; }
.gcal-logo { width:30px; height:30px; border-radius:4px; background: linear-gradient(90deg, #4285F4 0 25%, #34A853 25% 50%, #FBBC04 50% 75%, #EA4335 75%); display:grid; place-items:center; color:white; font-size:12px; font-weight:700; box-shadow: inset 0 -20px rgba(255,255,255,0.86); }
.gcal-create { width: 144px; min-height: 48px; border-radius: 14px; background: white; border: 1px solid #E5E7EB; box-shadow: 0 2px 8px rgba(14,20,34,0.12); display:flex; align-items:center; justify-content:center; gap: 12px; color: #1F2937; font-size: 14px; font-weight: 600; flex: 0 0 auto; }
.gcal-create .plus { font-size: 28px; line-height: 1; font-weight: 300; color: #111827; }
.gcal-create-card { background: white; border: 1px solid #E5E7EB; border-radius: 14px; box-shadow: var(--shadow-sm); padding: 12px; display: grid; gap: 9px; }
.gcal-create-card h3, .gcal-side-section h3 { margin: 0; font-size: 13px; color: #202124; font-weight: 600; }
.gcal-form { display: grid; gap: 8px; }
.gcal-form input, .gcal-form select, .gcal-form textarea { width: 100%; border: 1px solid #DADCE0; border-radius: 8px; padding: 8px 9px; font-size: 12px; color: #202124; background: white; font-family: var(--font-sans); }
.gcal-form textarea { min-height: 58px; resize: vertical; }
.gcal-mini { display: grid; gap: 8px; }
.gcal-mini-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  color: #202124;
  font-size: 13px;
  font-weight: 600;
}
.gcal-mini-head span { text-align: center; }
.gcal-mini-grid { display:grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-size: 11px; color:#3C4043; }
.gcal-mini-grid .dow { color:#5F6368; font-size: 10px; text-align:center; padding: 4px 0; }
.gcal-mini-day { height: 24px; border-radius: 999px; display:grid; place-items:center; cursor:pointer; }
.gcal-mini-day:hover { background:#E8F0FE; }
.gcal-mini-day.today, .gcal-day-number.today { background:#1A73E8; color:white; }
.gcal-mini-day.dim { color:#9AA0A6; }
.gcal-search { background:#EEF2F7; border:0; border-radius:8px; padding: 10px 11px; font-size: 13px; color:#3C4043; width: 100%; }
.gcal-side-section { display:grid; gap: 8px; }
.gcal-cal-row { display:flex; align-items:center; gap: 10px; color:#3C4043; font-size: 13px; }
.gcal-checkbox { width: 15px; height: 15px; border-radius: 3px; display:grid; place-items:center; color:white; font-size: 11px; font-weight:700; }
.gcal-main { min-width: 0; min-height: 0; overflow: hidden; display:grid; grid-template-rows: 64px 28px minmax(0, 1fr); background:white; }
.gcal-main.single-pane { grid-template-rows: 64px minmax(0, 1fr); }
.gcal-top { border-bottom: 1px solid #E5E7EB; display:flex; align-items:center; gap: 12px; padding: 0 18px; color:#202124; }
.gcal-title { font-size: 22px; font-weight: 500; margin-right:auto; }
.gcal-round { border: 1px solid #DADCE0; background:white; color:#202124; border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 500; }
.gcal-icon { width: 34px; height: 34px; border-radius: 50%; display:grid; place-items:center; color:#3C4043; font-size: 18px; }
.gcal-icon:hover { background:#F1F3F4; }
.gcal-view-select { border: 1px solid #DADCE0; background:#F1F3F4; border-radius: 999px; padding: 8px 14px; font-size: 13px; color:#202124; }
.gcal-sync-pill { background:#E8F0FE; color:#174EA6; border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 600; }
.gcal-weekdays { display:grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid #E5E7EB; color:#3C4043; font-size: 11px; text-transform: uppercase; }
.gcal-weekdays div { padding: 7px 10px; text-align:center; }
.gcal-grid { display:grid; grid-template-columns: repeat(7, minmax(96px, 1fr)); grid-template-rows: repeat(6, minmax(104px, 1fr)); min-height:0; overflow: hidden; }
.gcal-day { border-right: 1px solid #E5E7EB; border-bottom: 1px solid #E5E7EB; padding: 7px 8px; overflow:hidden; cursor: pointer; background:white; }
.gcal-day:hover { background:#FBFDFF; }
.gcal-day.outside { background:#FBFBFC; color:#9AA0A6; }
.gcal-day-top { display:flex; justify-content:center; margin-bottom: 5px; }
.gcal-day-number { min-width: 24px; height: 24px; border-radius: 50%; display:grid; place-items:center; font-size: 12px; color:#202124; }
.gcal-day.outside .gcal-day-number { color:#9AA0A6; }
.gcal-events { display:grid; gap: 3px; }
.gcal-event { border:0; border-radius: 5px; padding: 3px 6px; background:#E8F0FE; color:#174EA6; font-size: 11px; line-height: 1.25; text-align:left; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.gcal-week-grid { grid-template-rows: 1fr; }
.gcal-week-grid .gcal-day { min-height: 0; }
.gcal-day-view,
.gcal-schedule {
  min-height: 0;
  overflow: auto;
  padding: 22px;
}
.gcal-day-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #202124;
  margin-bottom: 14px;
}
.gcal-day-view-head div {
  display: grid;
  gap: 4px;
}
.gcal-day-view-head span {
  color: #5F6368;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}
.gcal-day-view-head strong {
  color: #202124;
  font-size: 24px;
  font-weight: 600;
}
.gcal-day-add {
  border: 1px solid #DADCE0;
  background: #1A73E8;
  color: white;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 700;
}
.gcal-day-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  border: 1px solid #DADCE0;
  border-radius: 12px;
  background: #F8FAFC;
  color: #202124;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.gcal-day-summary strong {
  font-size: 24px;
  line-height: 1;
}
.gcal-day-summary span {
  color: #5F6368;
  font-size: 13px;
}
.gcal-day-agenda,
.gcal-schedule {
  display: grid;
  align-content: start;
  gap: 8px;
}
.gcal-day-card,
.gcal-schedule-row,
.gcal-empty-slot {
  display: grid;
  width: 100%;
  border: 1px solid #DADCE0;
  border-radius: 8px;
  background: #F8FAFC;
  color: #202124;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
}
.gcal-day-card {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
}
.gcal-day-card:hover,
.gcal-schedule-row:hover,
.gcal-empty-slot:hover {
  background: #EEF4FF;
  border-color: #C7D2FE;
}
.gcal-day-time {
  color: #1A73E8;
  font-weight: 800;
  white-space: nowrap;
}
.gcal-day-card-main {
  display: grid;
  gap: 4px;
}
.gcal-day-card-main strong {
  color: #202124;
  font-size: 14px;
}
.gcal-day-card-main em,
.gcal-day-card-main small {
  color: #5F6368;
  font-style: normal;
}
.planner-day {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(260px, 0.5fr);
  gap: 18px;
  padding: 24px;
  background: #FFFFFF;
  color: #111111;
  font-family: Arial, Helvetica, sans-serif;
}
.planner-left,
.planner-time,
.planner-space {
  min-width: 0;
}
.planner-left {
  display: grid;
  align-content: start;
  gap: 10px;
}
.planner-top-row,
.planner-bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(180px, 1fr);
  gap: 8px;
}
.planner-field,
.planner-box,
.planner-date-card,
.planner-mood {
  display: grid;
  gap: 3px;
}
.planner-day h3 {
  margin: 0;
  color: #111111;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.planner-field input,
.planner-date-card,
.planner-lines,
.planner-mood {
  width: 100%;
  border: 1px solid #555555;
  border-radius: 3px;
  background: #FFFFFF;
  color: #111111;
  font: 700 13px/24px Arial, Helvetica, sans-serif;
}
.planner-field input {
  height: 30px;
  padding: 2px 8px;
}
.planner-date-card {
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding: 0;
  border: 0;
  gap: 8px;
}
.planner-date-card > div {
  display: grid;
  gap: 3px;
}
.planner-date-card strong {
  min-height: 30px;
  display: flex;
  align-items: center;
  border: 1px solid #555555;
  border-radius: 3px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}
.planner-date-card span {
  display: flex;
  gap: 11px;
  padding-top: 2px;
  color: #111111;
  font-size: 12px;
  font-weight: 900;
}
.planner-date-card b.active {
  color: #1A73E8;
}
.planner-lines {
  --rows: 3;
  min-height: calc(var(--rows) * 24px);
  padding: 0 8px 0 32px;
  resize: vertical;
  line-height: 24px;
  background:
    linear-gradient(90deg, transparent 0 25px, rgba(17,17,17,0.22) 25px 26px, transparent 26px),
    repeating-linear-gradient(to bottom, transparent 0 23px, rgba(17,17,17,0.24) 23px 24px);
}
.planner-grow .planner-lines {
  min-height: 190px;
}
.planner-bottom-row {
  align-items: end;
}
.planner-mood {
  padding: 0;
  border: 0;
}
.planner-mood > div {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border: 1px solid #555555;
  border-radius: 3px;
}
.planner-mood button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 24px;
  line-height: 1;
}
.planner-time {
  padding-top: 50px;
}
.planner-time-row {
  min-height: 24px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  border-bottom: 1px solid #D7D7D7;
  background: #FFFFFF;
  color: #111111;
  text-align: left;
}
.planner-time-row span {
  padding-top: 3px;
  font-size: 12px;
  font-weight: 800;
}
.planner-time-row div {
  display: flex;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
.planner-time-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #111111;
  font: 700 12px/24px Arial, Helvetica, sans-serif;
  outline: none;
}
.planner-time-row button {
  display: block;
  max-width: 120px;
  margin: 2px 0;
  padding: 2px 6px;
  border: 0;
  border-radius: 3px;
  background: #E8F0FE;
  color: #174EA6;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gcal-schedule-row {
  grid-template-columns: 120px minmax(0, 1fr) minmax(180px, 0.8fr);
  gap: 12px;
  align-items: center;
}
.gcal-schedule-row em { color:#5F6368; font-style: normal; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.calendar-dialog { background: white; color: #202124; }
.calendar-dialog .page-head h1,
.calendar-dialog h3 { color: #202124; }
.calendar-dialog .sub,
.calendar-dialog .muted { color: #5F6368; }
.calendar-detail-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.calendar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.field.full { grid-column: 1 / -1; }
.gcal-tools { border-left: 1px solid #E5E7EB; background:#FAFBFC; display:flex; flex-direction:column; align-items:center; gap:18px; padding-top:18px; color:#5F6368; }
.gcal-tool-dot { width: 22px; height: 22px; border-radius: 6px; display:grid; place-items:center; font-size: 14px; }
@media (max-width: 1200px) {
  .planner-day {
    grid-template-columns: minmax(360px, 1fr);
  }
  .planner-time {
    padding-top: 0;
  }
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(14, 20, 34, 0.3);
  backdrop-filter: blur(2px);
}
.drawer {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(540px, 100vw);
  background: var(--sidebar-bg);
  color: var(--gw-text);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
  overflow: auto;
  padding: 20px 24px;
  backdrop-filter: blur(18px);
}
.drawer h2 { margin: 0 0 4px; font: 800 20px/1.2 var(--font-display); color: white; }
.drawer .page-head { padding: 0 0 18px; align-items: flex-start; }
.drawer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.note-entry {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.note-card strong { color: white; }
.note-card p { white-space: pre-wrap; }
.stage-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.stage-buttons button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
}
.stage-buttons button.active { background: var(--orange-500); color: white; border-color: var(--orange-500); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(14, 20, 34, 0.45);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-card {
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: rgba(8, 12, 24, 0.97);
  color: var(--gw-text);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px;
}
.modal-card .page-head { padding: 0 0 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1100px) {
  .workspace, .workspace.panel-hidden { grid-template-columns: 200px minmax(0, 1fr); }
  .right-panel { display: none; }
  .metrics, .three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .topbar { grid-template-columns: 1fr; height: auto; padding: 12px; }
  .shell { grid-template-rows: auto 1fr; }
  .workspace, .workspace.panel-hidden { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; }
  .sidebar::before { display: none; }
  .side-footer { margin-left: auto; margin-top: 0; border-top: 0; display: flex; padding: 0; }
  .content { min-height: 70vh; }
  .page-head { align-items: flex-start; flex-direction: column; padding: 16px 14px 0; }
  .toolbar, .content > .grid, .kanban { padding-left: 14px; padding-right: 14px; }
  .metrics, .two, .three, .ops-board, .score-grid, .route-layout { grid-template-columns: 1fr; }
  .ops-board, .content-list, .score-grid { padding-left: 14px; padding-right: 14px; }
  .drawer-grid { grid-template-columns: 1fr; }
  table, .map { width: calc(100% - 28px); margin-left: 14px; margin-right: 14px; }
}
