/* SevaSangam — Design System (Jobber-aligned, Indian palette) */
:root {
  /* Dark surface — Jobber-style deep teal-navy */
  --navy-900: #012939;
  --navy-800: #043A4F;
  --navy-700: #0E4C66;

  /* Secondary brand — quiet jade for trust signals (UPI etc) */
  --brand-50:  #ECFDF5;
  --brand-100: #D1FAE5;
  --brand-500: #10A37F;
  --brand-600: #0E8F70;
  --brand-700: #0E6B5C;
  --brand-800: #0B5448;

  /* Primary punch — Indian saffron/marigold (replaces Jobber's lime) */
  --accent-50:  #FFFBEB;
  --accent-100: #FEF3C7;
  --accent-200: #FDE68A;
  --accent-400: #FBBF24;
  --accent-500: #F59E0B;
  --accent-600: #D97706;
  --accent-700: #B45309;

  --ink-900: #032B3A;   /* Jobber heading color */
  --ink-700: #233D48;   /* Jobber body color */
  --ink-500: #4A6573;
  --ink-400: #6B8694;
  --ink-300: #94A8B4;
  --ink-200: #DADFE2;   /* Jobber card border */
  --ink-100: #E2E8EC;
  --ink-50:  #F4F2EE;   /* Search bg / subtle surface */

  /* Marketing pages keep cream; app pages get white */
  --bg:      #F2F0EA;
  --bg-app:  #FFFFFF;
  --surface: #FFFFFF;
  --line:    #DADFE2;
  --line-warm: #EEECE7;

  --success: #16A34A;
  --warning: #F59E0B;
  --danger:  #DC2626;
  --info:    #0EA5E9;

  /* Single action green — all primary buttons/focus states use this pair. */
  --primary:       var(--brand-600);
  --primary-hover: var(--brand-700);

  --radius-sm: 4px;       /* marketing buttons */
  --radius:    8px;       /* app buttons & inputs */
  --radius-lg: 16px;      /* product cards */
  --shadow-sm: 0 1px 2px rgba(1,41,57,.06);
  --shadow:    0 4px 16px rgba(1,41,57,.06), 0 1px 2px rgba(1,41,57,.04);
  --shadow-lg: 0 24px 60px rgba(1,41,57,.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink-900);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Layout — Jobber's app shell is white + narrow 240px sidebar */
.app-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; background: var(--bg-app); transition: grid-template-columns .2s; }
.app-shell.sidebar-collapsed { grid-template-columns: 64px minmax(0, 1fr); }
.app-shell.sidebar-collapsed .sidebar { padding: 18px 10px; }
.app-shell.sidebar-collapsed .sidebar .brand div:not(.brand-mark) { display: none; }
.app-shell.sidebar-collapsed .sidebar .nav .nav-section,
.app-shell.sidebar-collapsed .sidebar .nav a.sub,
.app-shell.sidebar-collapsed .sidebar .trial-banner { display: none; }
.app-shell.sidebar-collapsed .sidebar .nav a { justify-content: center; padding: 9px 8px; }
.app-shell.sidebar-collapsed .sidebar .nav a.active::before { display: none; }
.sidebar {
  background: #FAFAF7;
  color: var(--ink-900);
  padding: 18px 12px 0;
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh;
  overflow: hidden;
  min-width: 0;
  display: flex; flex-direction: column;
}
.sidebar > * { min-width: 0; }
.sidebar .brand { flex-shrink: 0; }
.sidebar .nav {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
  /* Soft fade at bottom of scroll area */
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 18px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 18px), transparent 100%);
  padding-bottom: 14px;
}
.sidebar .nav::-webkit-scrollbar { display: none; }   /* Chrome/Safari */
.sidebar .trial-banner {
  flex-shrink: 0;
  margin: 12px -12px 0;
  padding: 14px 14px 16px;
  border-top: 1px solid var(--line);
  border-radius: 0 !important;
  background: var(--accent-50);
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  min-width: 0;
}
.sidebar .brand > div:not(.brand-mark) { min-width: 0; flex: 1; overflow: hidden; }
.sidebar .brand-name, .sidebar .brand-tag {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.sidebar .brand-mark { flex-shrink: 0; }
.sidebar .collapse-btn { flex-shrink: 0; }
.sidebar .brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-500), #FB923C);
  display: grid; place-items: center; color: #1A1306; font-weight: 800; font-size: 16px;
  box-shadow: 0 4px 10px rgba(245,158,11,.35);
}
.sidebar .brand-name { font-weight: 900; font-size: 16px; letter-spacing: -.01em; color: var(--ink-900); }
.sidebar .brand-tag { font-size: 10px; color: var(--ink-400); font-weight: 600; }

.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-400); padding: 12px 10px 4px; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px;
  color: var(--ink-900); font-size: 13.5px; font-weight: 600;
  margin-bottom: 1px;
  min-width: 0;
}
.nav a .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a:hover { background: var(--ink-50); }
.nav a.active { background: var(--ink-50); color: var(--ink-900); font-weight: 800; }
.nav a.active::before { content:""; width:3px; height:18px; background: var(--accent-500); border-radius: 2px; margin-right: -4px; flex-shrink: 0; }
.nav a .icon { width: 18px; display: inline-block; text-align: center; opacity: .85; flex-shrink: 0; }
.nav a.sub { padding-left: 32px; font-size: 13px; }
.nav .nav-section { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* When sidebar is collapsed, hide labels entirely */
.app-shell.sidebar-collapsed .nav a .label { display: none; }

/* Inline jargon helper — ⓘ icon next to acronyms (small, subtle) */
.help-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; border-radius: 50%;
  background: transparent; color: var(--ink-300);
  font-size: 11px; font-weight: 800; cursor: help;
  margin: 0 2px 0 3px; vertical-align: baseline;
  font-style: normal; user-select: none; flex-shrink: 0;
  transition: all .15s; line-height: 1; position: relative; top: -1px;
}
.help-icon:hover { color: var(--accent-600); }
/* Suppress glossary ⓘ inside table cells, pill text, and small UI elements */
.table td .help-icon,
.pill .help-icon, .pill-src .help-icon,
button .help-icon,
.tab-strip .help-icon,
.flow-strip .help-icon,
.stat .help-icon,
h1 .help-icon, h2 .help-icon, h3 .help-icon, h4 .help-icon,
.brand .help-icon { display: none !important; }

/* Inline form hint + validation */
.field-hint { font-size: 12px; color: var(--ink-400); margin-top: 4px; line-height: 1.45; }
.field-hint.error { color: var(--danger); }
.field-required::after { content: " *"; color: var(--danger); }

/* Row highlight flash after Save */
@keyframes ks-row-flash {
  0%   { background: #FEF3C7; }
  100% { background: transparent; }
}
.ks-row-new { animation: ks-row-flash 2.5s ease-out; }

/* Floating JS-driven tooltip — escapes sidebar overflow */
.ks-tooltip {
  position: fixed; z-index: 999;
  background: var(--ink-900); color: #fff;
  padding: 7px 11px; border-radius: 6px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(3,43,58,.22);
  opacity: 0; transform: translateX(-4px);
  transition: opacity .12s, transform .12s;
}
.ks-tooltip.show { opacity: 1; transform: translateX(0); }
.ks-tooltip::before {
  content: ""; position: absolute; left: -4px; top: 50%; transform: translateY(-50%);
  border: 4px solid transparent; border-right-color: var(--ink-900); border-left: 0;
}
/* Section headers shouldn't show in collapsed mode */
.app-shell.sidebar-collapsed .nav .nav-section { font-size: 0; padding: 6px 0; }
.app-shell.sidebar-collapsed .nav .nav-section::before { content: ""; display: block; height: 1px; background: var(--line); margin: 4px 8px; }
.nav a .icon { width: 18px; display: inline-block; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.topbar .search {
  display:flex; align-items:center; gap:10px;
  background: var(--line-warm); border: 1px solid var(--line-warm); border-radius: 8px; padding: 8px 14px; min-width: 320px;
  color: var(--ink-400); font-size: 14px; height: 40px;
}
.topbar .search input { background:transparent; border:0; outline:0; color:var(--ink-900); width:100%; font-size:14px; }
.topbar .actions { display:flex; gap:10px; align-items:center; }
.avatar { width:36px; height:36px; border-radius: 50%; background: var(--brand-700); color:#fff; display:grid; place-items:center; font-weight:700; font-size:13px; }

.content { padding: 28px; }

/* Typography — Jobber's product H1 is 36px / 900 */
.h1 { font-size: 36px; font-weight: 900; letter-spacing: -.025em; margin: 0 0 4px; color: var(--ink-900); line-height: 1.1; }
.h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 12px; color: var(--ink-900); }
.muted { color: var(--ink-500); }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--brand-700); letter-spacing: .08em; text-transform: uppercase; }

/* Buttons — Jobber app uses 8px radius, green primary, weight 700 */
.btn { display:inline-flex; align-items:center; gap:8px; padding: 9px 18px; border-radius: 8px; font-weight: 700; font-size: 14px; border: 1px solid transparent; transition: all .12s ease; white-space: nowrap; line-height: 1.2; min-height: 40px;}
.btn-primary { background: var(--primary); color:#fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent-500); color: var(--navy-900); }
.btn-accent:hover { background: var(--accent-400); }
.btn-ghost { background: #fff; color: var(--ink-900); border-color: var(--ink-200); font-weight: 700; }
.btn-ghost:hover { background: var(--ink-50); border-color: var(--ink-300); }

/* Segmented control — when btn-ghost is inside a tab-group container */
.seg { background: var(--ink-50); border-radius: 8px; padding: 3px; display: inline-flex; gap: 0; }
.seg .btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.seg .btn-ghost:hover { background: rgba(255,255,255,.5); }
.seg .btn-ghost.is-on { background: #fff; color: var(--ink-900); box-shadow: 0 1px 2px rgba(3,43,58,.08); }

/* Focus rings: ditch browser blue, use brand green
   Only show on keyboard nav (Tab key) — NOT on mouse click */
button:focus, a:focus, input:focus, select:focus, textarea:focus { outline: none; }
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
.btn-ghost:focus-visible, .tab-strip button:focus-visible { outline-offset: 1px; outline-width: 2px; }
/* Tab strip buttons: never show focus ring after click — only on keyboard */
.tab-strip button:focus:not(:focus-visible) { outline: none; }
.btn-dark { background: var(--navy-900); color: #fff; }
.btn-danger { background: #FEE2E2; color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 13px; min-height: 32px; }
.btn-lg { padding: 13px 26px; font-size: 16px; min-height: 48px; border-radius: 4px; }
/* Marketing CTAs keep 4px radius */
.landing .btn-lg, .landing .btn-accent { border-radius: 4px; }

/* Cards — Jobber app: 16px radius, soft gray border, NO shadow */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: none; }
.card-pad-0 { padding: 0; }
.stat { display:flex; flex-direction:column; gap:6px; }
.stat .label { font-size: 12px; color: var(--ink-400); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat .value { font-size: 30px; font-weight: 900; letter-spacing: -.025em; color: var(--navy-900); }
.stat .delta { font-size: 12px; color: var(--success); font-weight: 600; }
.stat .delta.down { color: var(--danger); }

.grid { display: grid; gap: 16px; }
.content { padding: 24px 28px 40px; max-width: 1400px; }
/* Subtle, calmer pill styles to reduce noise */
.pill-warning { background: #FEF3C7; color: #92400E; }
.pill-success { background: #DCFCE7; color: #166534; }
.pill-brand   { background: #DBEAFE; color: #1E40AF; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-2-3 { grid-template-columns: 2fr 1fr; }
.grid-3-2 { grid-template-columns: 3fr 2fr; }

/* Table — premium Indian look, spacious but never wraps awkwardly */
.table { width: 100%; border-collapse: collapse; table-layout: auto; }
.table th {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-400); text-align: left;
  padding: 14px 18px;
  background: var(--line-warm);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-900);
  line-height: 1.4;
  vertical-align: middle;
}
.table td strong { font-size: 14px; font-weight: 800; color: var(--ink-900); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.table td .muted { font-size: 12px; color: var(--ink-400); margin-top: 2px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.table td > div.flex > div:not(.avatar) { min-width: 0; flex: 1; }
/* Belt-and-braces: lock avatars to circle dimensions always */
.avatar { aspect-ratio: 1 / 1; border-radius: 50% !important; flex-shrink: 0 !important; flex-grow: 0 !important; flex-basis: auto !important; }
.table tr:hover td { background: #FAF8F4; }
.table tr:last-child td { border-bottom: 0; }

/* Avatar in table = 40px (was 44 — slightly tighter so name has more room) */
.table .avatar { width: 40px; height: 40px; font-size: 13px; font-weight: 800; flex-shrink: 0; }

/* Time / Action / Source columns - dont wrap */
.table td:has(.pill-src), .table td:has(button), .table td:nth-last-child(-n+2) { white-space: nowrap; }

/* Tab-strip filter row (replaces dense pill toolbar) */
.tab-strip {
  display: flex; gap: 4px; padding: 8px;
  background: var(--line-warm);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.tab-strip button {
  background: transparent; border: 0;
  padding: 9px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 700; color: var(--ink-700);
  cursor: pointer; line-height: 1.2; min-height: 36px;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.tab-strip button:hover { background: rgba(255,255,255,.5); color: var(--ink-900); }
.tab-strip button.is-on, .tab-strip button.is-active {
  background: #fff; color: var(--ink-900);
  box-shadow: 0 1px 3px rgba(3,43,58,.08);
  font-weight: 800;
}
.tab-strip .count { color: var(--ink-400); font-weight: 600; font-size: 13px; }

/* Source pills — semantic colors for Indian channels */
.src-whatsapp { background: #DCFCE7; color: #166534; }
.src-society  { background: #FEF3C7; color: #92400E; }
.src-justdial { background: #DBEAFE; color: #1E40AF; }
.src-sulekha  { background: #FCE7F3; color: #9D174D; }
.src-phone    { background: var(--ink-50); color: var(--ink-700); }
.src-walkin   { background: #F3E8FF; color: #6B21A8; }
.pill-src {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
}

/* Action buttons inside table rows — beefier */
.table .btn-primary, .table .btn-action {
  background: var(--primary); color: #fff;
  padding: 10px 22px; border-radius: 10px;
  font-weight: 700; font-size: 14px; border: 0;
  min-height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
}
.table .btn-primary:hover { background: var(--primary-hover); }
.table .btn-ghost { padding: 10px 18px; min-height: 42px; }

/* Pills */
.pill { display:inline-flex; align-items:center; gap:6px; padding: 3px 9px; border-radius: 4px; font-size: 12px; font-weight: 700; background: var(--ink-50); color: var(--ink-700); white-space: nowrap; }

/* ---------- Drawer (slide-in panel for + actions) ---------- */
.drawer-scrim { position: fixed; inset: 0; background: rgba(3,43,58,.4); z-index: 99; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 580px; max-width: 96vw; background: #fff; z-index: 100; transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.85,.25,1), box-shadow .32s ease; box-shadow: 0 0 0 rgba(3,43,58,0); display: flex; flex-direction: column; }
.drawer.open { box-shadow: -32px 0 80px rgba(3,43,58,.24); }
@media (max-width: 720px) { .drawer { width: 100vw; } }
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2 { margin: 0; font-size: 20px; font-weight: 900; color: var(--ink-900); }
.drawer-head .close { background: var(--ink-50); border: 0; width: 32px; height: 32px; border-radius: 8px; font-size: 18px; color: var(--ink-500); cursor: pointer; }
.drawer-body { padding: 22px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: #fff; }

/* ---------- Tabs at top of pages ---------- */
.tabs { display:flex; gap:0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs button { background: transparent; border: none; padding: 12px 4px; margin-right: 28px; font-weight: 600; font-size: 14px; color: var(--ink-500); cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button.active { color: var(--ink-900); font-weight: 800; border-bottom-color: var(--primary); }

/* ---------- Page header simplification ---------- */
.page-head { display:flex; justify-content:space-between; align-items:flex-end; margin-bottom: 22px; }
.page-head .h1 { margin-bottom: 4px; }
.page-head .muted { font-size: 14px; }

/* ============ FLOW STRIP — compact inline pill row ============ */
.flow-strip {
  background: transparent;
  border: 0;
  padding: 0;
  margin: -4px 0 14px;
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 12px;
  flex-wrap: wrap;
}
.flow-strip::before {
  content: "Pipeline:";
  color: var(--ink-400); font-weight: 700; font-size: 11px;
  letter-spacing: .04em; text-transform: uppercase;
  margin-right: 8px;
}
.flow-strip .flow-step {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 99px;
  color: var(--ink-400); font-weight: 600;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  font-size: 12px;
  transition: all .15s;
}
.flow-strip .flow-step:hover { background: var(--ink-50); color: var(--ink-900); }
.flow-strip .flow-step .num {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink-100); color: var(--ink-400);
  display: grid; place-items: center; font-size: 10px; font-weight: 800;
  flex-shrink: 0;
}
.flow-strip .flow-step.done .num { background: #DCFCE7; color: #166534; }
.flow-strip .flow-step.done { color: var(--ink-500); }
.flow-strip .flow-step.active { color: var(--ink-900); background: var(--accent-50); font-weight: 800; }
.flow-strip .flow-step.active .num { background: var(--accent-500); color: var(--ink-900); }
.flow-strip .arrow {
  color: var(--ink-300); font-weight: 600; flex-shrink: 0;
  padding: 0 1px; font-size: 11px;
}

/* ============ PAGE INTRO — DEPRECATED · 4-step walkthrough banner replaces this ============ */
.page-intro { display: none !important; }
.page-intro-old {
  background: #F0F9FF; border: 1px solid #BAE6FD;
  border-radius: 12px; padding: 14px 44px 14px 18px; margin-bottom: 22px;
  display: flex; gap: 14px; align-items: flex-start; position: relative;
}
.page-intro .ico { font-size: 20px; flex-shrink: 0; }
.page-intro h3 { margin: 0 0 4px; font-size: 14px; font-weight: 800; color: #075985; }
.page-intro p { margin: 0; font-size: 13px; color: #0C4A6E; line-height: 1.55; }
.page-intro p strong { color: #075985; }
.page-intro .dismiss {
  position: absolute; top: 10px; right: 12px;
  background: transparent; border: 0; color: #0369A1;
  font-size: 18px; cursor: pointer; line-height: 1; padding: 4px;
}
.page-intro a { color: #0369A1; font-weight: 800; }

/* Feature explainer card (Jobber pattern) */
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; }
.feature-card .ico { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-50); color: var(--accent-700); display:grid; place-items:center; font-size: 22px; margin-bottom: 14px; }
.feature-card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 900; color: var(--ink-900); }
.feature-card p { margin: 0 0 12px; color: var(--ink-500); font-size: 14px; line-height: 1.5; }
.feature-card ul { margin: 0 0 16px; padding-left: 16px; font-size: 13px; color: var(--ink-700); line-height: 1.6; }
.feature-card .spacer { flex: 1; }
.feature-card .try { color: var(--primary); font-weight: 800; font-size: 13px; }
.btn:hover { cursor: pointer; }
.pill:hover, .choice:hover { cursor: pointer; }
.pill-success { background: #DCFCE7; color: #166534; }
.pill-warning { background: #FEF3C7; color: #92400E; }
.pill-danger  { background: #FEE2E2; color: #991B1B; }
.pill-info    { background: #DBEAFE; color: #1E40AF; }
.pill-brand   { background: var(--brand-50); color: var(--brand-800); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.field input, .field select, .field textarea {
  border: 1px solid var(--ink-200); border-radius: 8px; padding: 12px 14px; font-size: 15px; outline:none; background:#fff; color: var(--ink-900); font-family: inherit; min-height: 48px;
}
.field textarea { min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,143,112,.12); }
.field .hint { font-size: 12px; color: var(--ink-400); }

/* Auth & onboarding */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.auth-side { background: var(--navy-900); color: #fff; padding: 56px; display:flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content:""; position:absolute; right:-120px; bottom:-120px; width:420px; height:420px; border-radius:50%; background: radial-gradient(circle, rgba(245,158,11,.18), transparent 65%); }
.auth-side .brand-large { display:flex; align-items:center; gap:14px; }
.auth-side .brand-large .brand-mark { width:48px; height:48px; border-radius:6px; }
.auth-side h2 { font-size: 40px; line-height: 1.12; font-weight:900; letter-spacing:-.025em; max-width: 480px; color:#fff; }
.auth-side .quote { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); padding: 22px; border-radius: 14px; max-width: 480px; backdrop-filter: blur(4px); }
.auth-form-wrap { display: grid; place-items: center; padding: 40px; }
.auth-form { width: 100%; max-width: 380px; }

/* Onboarding stepper */
.stepper { display:flex; gap:8px; margin-bottom: 24px; }
.stepper .step { flex:1; height: 5px; border-radius: 99px; background: var(--ink-100); }
.stepper .step.active { background: var(--navy-900); }
.stepper .step.done { background: var(--accent-500); }

.choice-grid { display:grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.choice {
  border: 1.5px solid var(--ink-200); border-radius: 6px; padding: 16px; cursor:pointer; transition: all .12s ease;
  display:flex; gap:12px; align-items:center; background:#fff;
}
.choice:hover { border-color: var(--navy-900); }
.choice.selected { border-color: var(--navy-900); background: var(--accent-50); }
.choice .emoji { font-size: 22px; }

/* Landing — Jobber-style: dark navy hero with white headline */
.landing { background: var(--bg); }
.landing .nav-top { display:flex; align-items:center; justify-content:space-between; padding: 18px 48px; max-width: 1320px; margin: 0 auto; }
.landing .nav-top a.link { color: var(--navy-900); font-weight: 700; margin: 0 14px; font-size: 14px; }
.hero-wrap { background: var(--navy-900); color: #fff; border-radius: 0; }
.hero { padding: 56px 48px 88px; max-width: 1320px; margin: 0 auto; display:grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: 56px; line-height: 1.05; font-weight: 900; letter-spacing: -.025em; margin: 16px 0 18px; color:#fff; }
.hero h1 .hi { color: var(--accent-400); }
.hero p.lead { font-size: 18px; color: #B8CCD6; max-width: 540px; margin-bottom: 28px; line-height: 1.5; }
.hero .cta-row { display:flex; gap: 12px; margin-bottom: 26px; }
.hero .badges { display:flex; gap:18px; color: #8FA8B5; font-size: 13px; align-items: center; flex-wrap: wrap; font-weight: 500; }
.hero .eyebrow { color: var(--accent-400); }
.hero .mock { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); overflow: hidden; color: var(--navy-900); }
.hero .mock-header { background: var(--ink-50); padding: 10px 14px; display:flex; gap:6px; border-bottom: 1px solid var(--line); }
.hero .mock-header span { width:10px; height:10px; border-radius:50%; background: var(--ink-200); }
.hero .mock-body { padding: 20px; }

.section { padding: 80px 48px; max-width: 1320px; margin: 0 auto; }
.section h2.title { font-size: 44px; font-weight: 900; letter-spacing: -.025em; text-align: center; margin: 6px 0 14px; color: var(--navy-900); line-height: 1.1; }
.section p.subtitle { text-align: center; color: var(--ink-500); max-width: 640px; margin: 0 auto 48px; font-size: 17px; line-height: 1.5; }
.trades { display:grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.trade { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 24px; text-align: center; transition: all .15s ease; }
.trade:hover { border-color: var(--navy-900); transform: translateY(-2px); }
.trade .emoji { font-size: 36px; }
.trade .name { font-weight: 800; margin-top: 10px; color: var(--navy-900); }
.trade .users { font-size: 12px; color: var(--ink-400); margin-top: 4px; font-weight: 500; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 28px; }
.feature .ico { width: 48px; height: 48px; border-radius: 6px; background: var(--accent-100); color: var(--accent-700); display:grid; place-items:center; font-size: 22px; margin-bottom: 16px; }
.feature h3 { font-size: 18px; font-weight: 900; margin: 0 0 8px; color: var(--navy-900); letter-spacing: -.01em; }
.feature p { color: var(--ink-500); margin: 0; font-size: 14px; line-height: 1.55; }

.pricing { display:grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 32px; }
.price-card.feat { border: 2px solid var(--navy-900); position: relative; box-shadow: var(--shadow); }
.price-card.feat::before { content: "Most popular"; position:absolute; top:-12px; left: 28px; background: var(--accent-500); color: var(--navy-900); padding: 4px 12px; border-radius: 4px; font-size: 11px; font-weight: 900; letter-spacing:.06em; text-transform: uppercase; }
.price { font-size: 42px; font-weight: 900; letter-spacing: -.025em; margin: 14px 0 4px; color: var(--navy-900); }
.price .per { font-size: 14px; font-weight: 600; color: var(--ink-400); }
.tier-name { font-weight: 900; font-size: 20px; color: var(--navy-900); letter-spacing: -.01em; }
.tier-tag { color: var(--ink-500); font-size: 13px; font-weight: 500; }
.tier-list { margin: 22px 0; padding: 0; list-style: none; }
.tier-list li { padding: 7px 0; font-size: 14px; color: var(--ink-700); display:flex; gap:10px; align-items:flex-start; line-height: 1.4; }
.tier-list li::before { content: "✓"; color: var(--brand-700); font-weight: 900; flex-shrink:0; }

.footer { background: var(--navy-900); color: #8FA8B5; padding: 56px 48px; }
.footer-inner { max-width: 1280px; margin: 0 auto; display:grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { color: #fff; font-size: 14px; margin: 0 0 12px; }
.footer a { display:block; padding: 5px 0; font-size: 14px; color: #94A3B8; }
.footer a:hover { color: #fff; }

/* Utility */
.flex { display:flex; }
.items-center { align-items:center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; }

.lang-toggle { display:inline-flex; background: var(--ink-50); border-radius: 99px; padding: 3px; font-size: 12px; font-weight: 600; }
.lang-toggle button { background: transparent; border: 0; padding: 5px 12px; border-radius: 99px; color: var(--ink-500); }
.lang-toggle button.active { background: var(--surface); color: var(--ink-900); box-shadow: var(--shadow-sm); }

/* Schedule */
.schedule { display:grid; grid-template-columns: 80px repeat(7, 1fr); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.schedule > div { background: var(--surface); padding: 10px; min-height: 72px; }
.schedule .time-col { font-size: 12px; color: var(--ink-400); font-weight: 700; background: var(--ink-50); text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: flex-start; justify-content: flex-end; padding: 12px 14px 0; min-height: auto; }
.schedule .day-head { font-size: 12px; font-weight: 700; background: var(--ink-50); text-align: center; padding: 12px; color: var(--ink-500); text-transform: uppercase; letter-spacing: .04em; min-height: auto; }
.schedule .day-head .date { font-size: 17px; color: var(--ink-900); font-weight: 900; margin-top: 2px; letter-spacing: 0; text-transform: none; }
.job-block { background: var(--brand-50); border-left: 3px solid var(--primary); padding: 8px 10px; border-radius: 6px; font-size: 12px; transition: transform .15s, box-shadow .15s; cursor: pointer; }
.job-block:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(14,143,112,.18); }
.job-block.accent { background: var(--accent-50); border-left-color: var(--accent-500); }
.job-block.accent:hover { box-shadow: 0 4px 12px rgba(245,158,11,.25); }
.job-block strong { display:block; font-size: 13px; margin-bottom: 1px; line-height: 1.25; }

.empty { padding: 60px; text-align: center; color: var(--ink-400); }

/* Tablet: narrower sidebar */
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .nav a { font-size: 13px; padding: 6px 8px; gap: 8px; }
  .nav a .icon { width: 16px; }
}

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display:none; }
  .grid-4, .features, .trades, .pricing { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display:none; }
}

@media (max-width: 720px) {
  /* Collapse remaining multi-column layouts so pages never force a wide layout viewport */
  .grid-2, .grid-3, .grid-4, .grid-3-2 { grid-template-columns: 1fr; }
  /* Prevent grid blowout: children may shrink so wide tables scroll inside their card */
  .grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .grid-3-2 > *, .content > * { min-width: 0; }
  /* Walkthrough cards use inline 4-col grids — override for small screens */
  .card[id^="howto-"] div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  /* Any inline repeat(N,…) grid collapses to 2 columns on phones — inline styles
     beat media queries, so this guard needs !important */
  .content div[style*="grid-template-columns:repeat("],
  .content div[style*="grid-template-columns: repeat("] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  /* Fixed-sidebar builder layouts (settings 240px, website 320px) stack on phones */
  .content div[style*="grid-template-columns:240px"],
  .content div[style*="grid-template-columns:320px"] { grid-template-columns: 1fr !important; }
  /* Wide tables scroll inside their card instead of stretching the page */
  .card { overflow-x: auto; }
  /* Action rows and toolbars wrap instead of forcing horizontal overflow */
  .topbar, .topbar .actions, .flex { flex-wrap: wrap; }
}

/* Slim collapsed walkthrough card */
.card.ks-howto-slim { padding: 10px 14px !important; }
.card.ks-howto-slim > div:first-child { margin-bottom: 0 !important; }
.card.ks-howto-slim h3 { font-size: 13px !important; }

/* Channel tile grid (Marketing page systematic layout) */
.ks-channel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1180px) { .ks-channel-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 880px)  { .ks-channel-grid { grid-template-columns: repeat(2, 1fr); } }
.ks-channel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.ks-channel:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); border-color: var(--brand-700); }
.ks-channel .ks-ch-head { display:flex; justify-content:space-between; align-items:center; }
.ks-channel .ks-ch-emoji { font-size: 22px; }
.ks-channel .ks-ch-title { font-weight: 800; font-size: 14px; color: var(--ink-900); }
.ks-channel .ks-ch-sub   { font-size: 12px; color: var(--ink-500); line-height: 1.4; }
.ks-channel .ks-ch-stat  { font-size: 18px; font-weight: 900; color: var(--ink-900); margin-top: 4px; }
.ks-channel .ks-ch-delta { font-size: 11px; color: var(--ink-500); }
.ks-channel.is-empty {
  border-style: dashed; background: #FAFAF9; color: var(--ink-500);
  align-items:center; justify-content:center; text-align:center; min-height: 130px;
}

/* Line items polished design */
.ks-line { background:#fff; border:1px solid var(--line); border-radius:10px; padding:10px 12px; }
.ks-line + .ks-line { margin-top:8px; }
.ks-line:hover { border-color: var(--brand-700); }
.ks-line-grid {
  display:grid;
  grid-template-columns: minmax(0,1.8fr) 60px minmax(0,1fr) 76px 24px;
  gap:8px;
  align-items:center;
}
.ks-line-item, .ks-line-qty, .ks-line-price {
  width:100%;min-width:0;box-sizing:border-box;
  padding:8px 10px;border:1px solid var(--line);border-radius:7px;
  font-size:13px;font-family:inherit;background:#fff;transition:border-color .12s;
}
.ks-line-item:focus, .ks-line-qty:focus, .ks-line-price:focus {
  border-color: var(--brand-700); outline:0;
}
.ks-line-priceWrap { position:relative; }
.ks-line-priceWrap .ks-line-rupee {
  position:absolute;left:8px;top:50%;transform:translateY(-50%);
  font-size:12px;color:var(--ink-400);font-weight:700;pointer-events:none;
}
.ks-line-priceWrap .ks-line-price { padding-left:20px; }
.ks-line-total {
  text-align:right;font-weight:800;font-size:13px;color:var(--ink-900);
  padding:0 2px;
}
.ks-line-del {
  background:transparent;border:0;color:var(--ink-300);
  cursor:pointer;font-size:14px;line-height:1;padding:6px;
  border-radius:6px;transition:background .12s,color .12s;
}
.ks-line-del:hover { background:#FEE2E2;color:#DC2626; }
.ks-line-meta {
  display:flex;justify-content:space-between;align-items:center;
  margin-top:8px;font-size:11px;color:var(--ink-500);
}
.ks-line-hsn { display:flex;align-items:center;gap:6px;font-weight:700; }
.ks-line-hsn input {
  border:1px solid var(--line);background:var(--ink-50);
  padding:3px 7px;border-radius:5px;width:64px;font-size:11px;font-family:'SF Mono',Menlo,monospace;
}
.ks-line-tax { font-weight:600; }

/* Drawer body more breathing room */
.drawer-body { padding: 22px 26px !important; }
.drawer-head { padding: 20px 26px !important; }
.drawer-foot { padding: 18px 26px !important; }

/* Jobs page · flow strip connecting Requests → Jobs → Invoices */
.ks-flow-strip {
  display:flex;align-items:center;gap:10px;padding:12px 16px;
  background:linear-gradient(135deg,#ECFDF5 0%,#FEF3C7 100%);
  border:1px solid #BAE6FD;border-radius:12px;margin-bottom:18px;
  overflow-x:auto;flex-wrap:nowrap;
}
.ks-flow-step {
  display:flex;align-items:center;gap:6px;padding:5px 11px;
  background:#fff;border:1px solid var(--line);border-radius:99px;
  font-size:12px;font-weight:700;color:var(--ink-700);
  text-decoration:none;white-space:nowrap;flex-shrink:0;
  transition:transform .15s, box-shadow .15s;
}
.ks-flow-step:hover { transform:translateY(-1px); box-shadow:0 4px 10px rgba(0,0,0,.06); }
.ks-flow-step.is-current { background:var(--ink-900); color:#fff; border-color:var(--ink-900); }
.ks-flow-arrow { color:var(--ink-400);font-weight:900;flex-shrink:0; }

/* ═════════════════ GUIDED TOUR (animated popup walkthrough) ═════════════════ */
.ks-tour-highlight {
  position: fixed; z-index: 9999;
  border-radius: 10px;
  box-shadow:
    0 0 0 3px rgba(14,143,112,1),
    0 0 0 6px rgba(14,143,112,.35),
    0 0 0 9999px rgba(3,43,58,.55);
  pointer-events: none;
  opacity: 0;
  transition: top .35s cubic-bezier(.2,.85,.2,1),
              left .35s cubic-bezier(.2,.85,.2,1),
              width .35s cubic-bezier(.2,.85,.2,1),
              height .35s cubic-bezier(.2,.85,.2,1),
              opacity .35s ease,
              box-shadow .35s ease;
  animation: ks-tour-pulse 2.2s ease-in-out infinite;
}
.ks-tour-highlight.is-on { opacity: 1; }
@keyframes ks-tour-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(14,143,112,1), 0 0 0 6px rgba(14,143,112,.35), 0 0 0 9999px rgba(3,43,58,.55); }
  50%      { box-shadow: 0 0 0 3px rgba(14,143,112,1), 0 0 0 12px rgba(14,143,112,.15), 0 0 0 9999px rgba(3,43,58,.55); }
}

.ks-tour-tip {
  position: fixed; z-index: 10000;
  background: #fff; border-radius: 14px;
  padding: 16px 18px; width: 320px; max-width: calc(100vw - 24px);
  box-shadow: 0 24px 60px rgba(3,43,58,.35), 0 4px 12px rgba(0,0,0,.08);
  opacity: 0; transform: translateY(8px) scale(.96);
  transition: opacity .25s ease, transform .3s cubic-bezier(.2,.85,.2,1),
              top .35s cubic-bezier(.2,.85,.2,1), left .35s cubic-bezier(.2,.85,.2,1);
}
.ks-tour-tip.is-on { opacity: 1; transform: translateY(0) scale(1); }
.ks-tour-tip .step-num {
  display: inline-block; background: var(--brand-700); color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 99px; text-transform: uppercase;
  margin-bottom: 6px;
}
.ks-tour-tip .title { font-size: 16px; font-weight: 900; color: var(--ink-900); letter-spacing: -.01em; }
.ks-tour-tip .body  { font-size: 13px; color: var(--ink-600); margin-top: 6px; line-height: 1.55; }
.ks-tour-tip .ks-tour-emoji { font-size: 32px; line-height: 1; margin-bottom: 8px; }
.ks-tour-tip .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 8px; }
.ks-tour-tip .dots { display: inline-flex; gap: 4px; }
.ks-tour-tip .dots .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-200); transition: background .2s, transform .2s; }
.ks-tour-tip .dots .dot.is-on { background: var(--brand-700); transform: scale(1.4); }
.ks-tour-tip button {
  padding: 7px 14px; border-radius: 8px; border: 0; cursor: pointer;
  font-weight: 800; font-size: 12px; font-family: inherit; transition: background .12s, transform .1s;
}
.ks-tour-tip button:active { transform: scale(.97); }
.ks-tour-tip .next { background: var(--brand-700); color: #fff; }
.ks-tour-tip .next:hover { background: var(--primary-hover); }
.ks-tour-tip .prev { background: var(--ink-50); color: var(--ink-700); }
.ks-tour-tip .prev:hover { background: var(--ink-100); }
.ks-tour-tip .skip { background: transparent; color: var(--ink-400); font-weight: 600; }
.ks-tour-tip .skip:hover { color: var(--ink-700); }

/* Arrow connector between tip and highlight */
.ks-tour-tip::before {
  content: ''; position: absolute; width: 14px; height: 14px;
  background: #fff; transform: rotate(45deg);
}
.ks-tour-tip[data-pos="below"]::before { top: -7px; left: 30px; box-shadow: -2px -2px 4px rgba(0,0,0,.04); }
.ks-tour-tip[data-pos="above"]::before { bottom: -7px; left: 30px; box-shadow:  2px  2px 4px rgba(0,0,0,.04); }
.ks-tour-tip[data-pos="left"]::before  { right: -7px;  top: 30px; box-shadow: 2px -2px 4px rgba(0,0,0,.04); }
.ks-tour-tip[data-pos="right"]::before { left: -7px;   top: 30px; box-shadow:-2px  2px 4px rgba(0,0,0,.04); }

/* Tour trigger pill (next to page H1) */
.ks-tour-btn {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 10px; padding: 4px 10px; vertical-align: middle;
  background: var(--brand-50); color: var(--brand-700);
  border: 1px solid #86EFAC; border-radius: 99px;
  font-size: 11px; font-weight: 800; cursor: pointer;
  transition: background .12s, transform .12s;
}
.ks-tour-btn:hover { background: #DCFCE7; transform: scale(1.04); }

/* === Feedback widget (universal, all pages) === */
.ks-fb-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  background: var(--brand-700); color: #fff; border: 0;
  padding: 11px 18px; border-radius: 99px; cursor: pointer;
  font-weight: 800; font-size: 13px; letter-spacing: .01em;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 22px rgba(14,143,112,.32), 0 2px 6px rgba(0,0,0,.08);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.ks-fb-fab:hover { transform: translateY(-2px); background: var(--primary-hover); box-shadow: 0 12px 28px rgba(14,143,112,.4); }
.ks-fb-fab svg { width: 16px; height: 16px; }

.ks-fb-scrim {
  position: fixed; inset: 0; background: rgba(3,43,58,.35);
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.ks-fb-scrim.open { opacity: 1; pointer-events: auto; }
.ks-fb-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -42%);
  z-index: 201; background: #fff; border-radius: 16px;
  width: 460px; max-width: 92vw; max-height: 80vh; overflow: auto;
  box-shadow: 0 24px 60px rgba(3,43,58,.24);
  opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s;
  padding: 22px 24px;
}
.ks-fb-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.ks-fb-modal h3 { margin: 0 0 4px; font-size: 18px; font-weight: 900; color: var(--ink-900); letter-spacing: -.01em; }
.ks-fb-modal .sub { font-size: 13px; color: var(--ink-500); line-height: 1.45; margin-bottom: 14px; }
.ks-fb-modal label { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-500); display: block; margin: 10px 0 5px; }
.ks-fb-mood { display: flex; gap: 8px; }
.ks-fb-mood button {
  flex: 1; background: var(--ink-50); border: 1.5px solid transparent;
  border-radius: 10px; padding: 10px; font-size: 22px;
  cursor: pointer; transition: all .12s;
}
.ks-fb-mood button:hover { background: var(--ink-100); }
.ks-fb-mood button.is-on { background: var(--brand-50); border-color: var(--brand-700); }
.ks-fb-cat { display: flex; gap: 6px; flex-wrap: wrap; }
.ks-fb-cat button {
  padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line);
  background: #fff; font-size: 12px; font-weight: 700; color: var(--ink-700);
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.ks-fb-cat button:hover { border-color: #CBD5E1; }
.ks-fb-cat button.is-on { background: var(--ink-900); color: #fff; border-color: var(--ink-900); }
.ks-fb-modal textarea {
  width: 100%; min-height: 100px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 9px;
  font-family: inherit; font-size: 14px; box-sizing: border-box;
  line-height: 1.5; resize: vertical;
}
.ks-fb-modal textarea:focus { border-color: var(--brand-700); outline: 0; }
.ks-fb-meta { display: flex; gap: 8px; font-size: 11px; color: var(--ink-400); margin-top: 8px; }
.ks-fb-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 10px; }
/* All .send buttons inside modal (foot AND thanks screen) */
.ks-fb-modal .send { background: var(--brand-700); color: #fff; border: 0; padding: 10px 20px; border-radius: 8px; font-weight: 800; font-size: 13px; cursor: pointer; font-family: inherit; transition: background .12s; }
.ks-fb-modal .send:hover { background: var(--primary-hover); }
.ks-fb-modal .send:disabled { background: var(--ink-200); color: var(--ink-400); cursor: not-allowed; }
.ks-fb-modal .cancel { background: transparent; border: 0; color: var(--ink-500); font-weight: 600; font-size: 13px; cursor: pointer; padding: 6px 10px; font-family: inherit; }
.ks-fb-close { position: absolute; top: 12px; right: 12px; background: transparent; border: 0; color: var(--ink-400); cursor: pointer; font-size: 20px; line-height: 1; padding: 4px 8px; }
.ks-fb-thanks { padding: 30px 20px; text-align: center; }
.ks-fb-thanks .big { font-size: 38px; margin-bottom: 8px; }
.ks-fb-thanks h4 { font-size: 16px; font-weight: 800; margin: 0 0 4px; }
.ks-fb-thanks p { font-size: 13px; color: var(--ink-500); margin: 0; }

@media (max-width: 720px) {
  .ks-fb-fab { padding: 10px 14px; font-size: 12px; right: 14px; bottom: 14px; }
  .ks-fb-fab span { display: none; }
}


@media (max-width: 720px) {
  /* Search stops forcing 320px so the topbar fits a phone */
  .topbar { gap: 10px; }
  .topbar .search { min-width: 0; flex: 1; }
}

/* Brand mark carrying the SVG confluence logo (runtime-injected by app.js) */
.brand-mark.has-logo { background: none !important; box-shadow: none !important; padding: 0; overflow: hidden; }
.brand-mark.has-logo svg { display: block; width: 100%; height: 100%; }

/* ═════════ Bottom navigation (≤1000px) — primary mobile nav ═════════ */
.ks-bottom-nav, .ks-more-sheet, .ks-more-scrim { display: none; }
@media (max-width: 1000px) {
  .ks-bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    background: #fff;
    border-top: 1px solid var(--ink-100);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(3,43,58,.08);
  }
  .ks-bottom-nav a, .ks-bottom-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-height: 48px; padding: 4px 0 2px;
    background: none; border: 0; border-radius: 10px;
    font-family: inherit; font-size: 10px; font-weight: 700; letter-spacing: .01em;
    color: var(--ink-400); text-decoration: none; line-height: 1.2;
  }
  .ks-bottom-nav .bn-icon { font-size: 19px; line-height: 1; }
  .ks-bottom-nav .active { color: var(--primary); }
  .ks-bottom-nav .active .bn-icon { transform: translateY(-1px); }

  /* content never hides behind the bar (incl. drawers' page underneath) */
  .app-shell > .main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .ks-fb-fab { bottom: calc(74px + env(safe-area-inset-bottom)); }

  /* "More" bottom sheet with the rest of the sidebar destinations */
  .ks-more-scrim {
    display: block; position: fixed; inset: 0; z-index: 96;
    background: rgba(3,43,58,.4); opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  .ks-more-scrim.open { opacity: 1; pointer-events: auto; }
  .ks-more-sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 97;
    background: #fff; border-radius: 18px 18px 0 0;
    padding: 12px 14px calc(18px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform .25s cubic-bezier(.2,.85,.25,1);
    box-shadow: 0 -18px 60px rgba(3,43,58,.25);
    max-height: 70dvh; overflow-y: auto;
  }
  .ks-more-sheet.open { transform: translateY(0); }
  .ks-more-sheet .ks-more-title {
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
    color: var(--ink-400); margin: 10px 4px 6px;
  }
  .ks-more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .ks-more-grid a {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 2px; border-radius: 10px;
    font-size: 11px; font-weight: 700; color: var(--ink-700); text-align: center;
  }
  .ks-more-grid a .bn-icon { font-size: 20px; line-height: 1; }
  .ks-more-grid a.active { background: var(--brand-50); color: var(--primary); }
}
@media (prefers-reduced-motion: reduce) { .ks-more-sheet { transition: none; } }
