/* WeDev design system (Liran, 2026-10-19) - the brand guide's palette and type, for every web screen: the
   dashboard (index.html) and the commissions page (commissions.html). Loaded after each page's own styles, so
   it re-points their tokens and refines their components; a page keeps its layout code.

   Palette   Electric Indigo #5D4CF6 - the one primary action, links, the selected state
             Midnight Navy #15202F - navigation, headings, the dark theme's ground
             Lavender Mist #F7F2FB - the page ground; Soft Periwinkle #C9C7FB - soft highlights
             Pistachio Lime #AFE67F with Deep Moss #27331C - positive: approved, billable, paid
   Type      DM Sans (Latin, numbers) + Heebo (Hebrew): bold, tight headings; tabular numbers
   Shape     pill buttons and tabs, 16px cards, 8px spacing; gradients only in hero areas, never over data */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Heebo:wght@400;500;600;700;800&display=swap");

:root {
  --brand-indigo: #5D4CF6;
  --brand-indigo-hover: #4B3AE4;
  --brand-navy: #15202F;
  --brand-navy-2: #1E2B3D;
  --brand-mist: #F7F2FB;
  --brand-periwinkle: #C9C7FB;
  --brand-lime: #AFE67F;
  --brand-moss: #27331C;

  --bg: #F7F2FB;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --border: #E6E1EE;
  --text: #15202F;
  --text-dim: #535C6E;
  --text-faint: #8A91A0;
  --accent: #5D4CF6;
  --accent-ink: #FFFFFF;
  --accent-soft: #ECEAFE;
  --good: #2F6B1E;
  --good-bg: #E9F7DA;
  --bad: #C2353B;
  --bad-bg: #FCE9EA;
  --warn: #9A5B00;
  --warn-bg: #FFF2DC;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(21, 32, 47, .05), 0 6px 20px rgba(21, 32, 47, .06);
  --shadow-lift: 0 2px 4px rgba(21, 32, 47, .06), 0 12px 32px rgba(21, 32, 47, .10);
  --font: "DM Sans", "Heebo", -apple-system, "Segoe UI", sans-serif;
  --sidebar: 248px;
  --table-head: #FAF7FD;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101823;
    --surface: #18222F;
    --surface-raised: #1E2B3D;
    --border: #2A384B;
    --text: #EEF0F6;
    --text-dim: #A9B1C2;
    --text-faint: #6F7A8D;
    --accent: #8C80FF;
    --accent-ink: #0E1420;
    --accent-soft: #252B4F;
    --good: #AFE67F;
    --good-bg: #24331B;
    --bad: #F08A8E;
    --bad-bg: #3A2024;
    --warn: #F2B859;
    --warn-bg: #3A2D16;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .3);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .4);
    --table-head: #1C2735;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101823;
  --surface: #18222F;
  --surface-raised: #1E2B3D;
  --border: #2A384B;
  --text: #EEF0F6;
  --text-dim: #A9B1C2;
  --text-faint: #6F7A8D;
  --accent: #8C80FF;
  --accent-ink: #0E1420;
  --accent-soft: #252B4F;
  --good: #AFE67F;
  --good-bg: #24331B;
  --bad: #F08A8E;
  --bad-bg: #3A2024;
  --warn: #F2B859;
  --warn-bg: #3A2D16;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .3);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .4);
  --table-head: #1C2735;
}

/* ---------- type ---------- */
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; line-height: 1.5; }
h1, h2, h3, h4, .serif { font-family: var(--font) !important; font-weight: 700; letter-spacing: -0.015em; color: var(--text); }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
.num, td.num, .money, .n, .wa-time { font-variant-numeric: tabular-nums; }
a { color: var(--accent); }

/* ---------- focus: visible for the keyboard, quiet for the mouse ---------- */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---------- buttons: pill, one primary per view ---------- */
.btn, .btn-secondary, .pill, .tab, .approve, .reject, .google-btn, .loadmore, .linklike, .add-link { font-family: var(--font); }
.btn, .btn-secondary, .loadmore { border-radius: 999px !important; padding: 7px 16px !important; font-weight: 600 !important; font-size: 13.5px !important;
  border: 1px solid var(--border) !important; background: var(--surface) !important; color: var(--text) !important; }
.btn:hover:not(:disabled), .btn-secondary:hover:not(:disabled), .loadmore:hover { border-color: var(--accent) !important; color: var(--accent) !important; }
.btn.primary, .approve, button.primary { background: var(--accent) !important; border: 1px solid var(--accent) !important; color: var(--accent-ink) !important;
  border-radius: 999px !important; font-weight: 700 !important; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary:hover:not(:disabled), .approve:hover:not(:disabled) { background: var(--brand-indigo-hover) !important; color: #fff !important; }
.approve[data-active="true"] { background: var(--good-bg) !important; color: var(--good) !important; border-color: color-mix(in srgb, var(--good) 40%, var(--border)) !important; box-shadow: none; }
.btn.danger:hover:not(:disabled), .reject:hover:not(:disabled) { border-color: var(--bad) !important; color: var(--bad) !important; }
button:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- tabs and pills ---------- */
.tab { border-radius: 999px !important; padding: 8px 16px !important; font-weight: 600 !important; border: 1px solid var(--border) !important;
  background: var(--surface) !important; color: var(--text-dim) !important; }
.tab:hover { color: var(--text) !important; border-color: var(--brand-periwinkle) !important; }
.tab[aria-selected="true"] { background: var(--accent) !important; color: var(--accent-ink) !important; border-color: var(--accent) !important; }
.pill { border-radius: 999px !important; padding: 6px 14px !important; }
.pill[aria-pressed="true"] { background: var(--accent-soft) !important; border-color: var(--accent) !important; color: var(--accent) !important; }

/* ---------- surfaces ---------- */
.card, .tile, .wa-kpi, .stat, .group-card, .setup-step, .table-wrap, .table-scroll, .login-card, .form-section {
  border-radius: var(--radius) !important; border-color: var(--border) !important; }
.card { box-shadow: var(--shadow); }
.card:hover { box-shadow: var(--shadow-lift); }
.badge, .status, .chip { border-radius: 999px !important; font-weight: 600; }
.badge.status-approved, .status.active, .status.approved, .status.auto, .status.manual { background: var(--good-bg) !important; color: var(--good) !important; }
.badge.cat { background: var(--accent-soft) !important; color: var(--accent) !important; }

/* ---------- forms ---------- */
input, select, textarea { font-family: var(--font); border-radius: var(--radius-sm) !important; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand-periwinkle) 70%, var(--border)); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }

/* ---------- tables ---------- */
.data-table th, table th { font-size: 11.5px !important; font-weight: 700 !important; color: var(--text-faint) !important; letter-spacing: .03em;
  background: var(--table-head) !important; text-transform: none !important; }
.data-table td, table td { border-color: var(--border) !important; }
.data-table tr.clickable:hover td, tr.clickable:hover td { background: color-mix(in srgb, var(--accent) 5%, var(--surface)) !important; }

/* ---------- KPI tiles ---------- */
.stat .n, .tile .n, .wa-kpi .n { font-weight: 700; letter-spacing: -0.02em; }
.wa-kpi.bill { border-inline-start-color: var(--brand-lime) !important; }
.wa-kpi.wait { border-inline-start-color: #F2B859 !important; }
.wa-kpi.on { outline: 2px solid var(--accent) !important; outline-offset: 0; }

/* ---------- toasts ---------- */
.toast, .toasts > * { border-radius: 999px !important; background: var(--brand-navy) !important; color: #fff !important; box-shadow: var(--shadow-lift); }

/* ---------- the dashboard's navigation: a navy sidebar on wide screens, a navy bar on a phone ---------- */
body.has-shell header.top .navbar {
  background: var(--brand-navy) !important; color: #fff; box-shadow: none !important;
}
body.has-shell .brand { display: flex; align-items: center; gap: 10px; color: #fff; }
body.has-shell .brand-logo { filter: brightness(0) invert(1); height: 22px; }
body.has-shell .brand-name { color: #fff; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; opacity: .85; }
body.has-shell .whoami { color: rgba(255, 255, 255, .55) !important; }
body.has-shell .whoami a, body.has-shell .whoami button { color: var(--brand-periwinkle) !important; }
body.has-shell #modeToggle .tab {
  background: transparent !important; border: 0 !important; color: rgba(255, 255, 255, .72) !important; font-weight: 500 !important;
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
body.has-shell #modeToggle .tab:hover { background: rgba(255, 255, 255, .06) !important; color: #fff !important; }
body.has-shell #modeToggle .tab[aria-selected="true"] { background: var(--brand-indigo) !important; color: #fff !important; font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(93, 76, 246, .45); }
body.has-shell #modeToggle .tab .nav-badge { background: rgba(255, 255, 255, .14) !important; color: #fff !important; }
body.has-shell #modeToggle .tab[aria-selected="true"] .nav-badge { background: rgba(255, 255, 255, .25) !important; }
body.has-shell .nav-icon { width: 18px; height: 18px; flex: 0 0 18px; opacity: .9; }

@media (min-width: 1000px) {
  body.has-shell { padding-inline-start: calc(var(--sidebar) + 28px) !important; padding-inline-end: 28px !important; }
  body.has-shell .wrap, body.has-shell.wide .wrap { max-width: 1240px; }
  body.has-shell header.top .navbar {
    position: fixed !important; inset-block: 0; inset-inline-start: 0; width: var(--sidebar); margin: 0 !important; padding: 26px 16px 20px !important;
    display: flex; flex-direction: column; gap: 22px; overflow-y: auto; z-index: 30;
    /* the brand's gradient as a soft glow at the bottom of the navigation - never behind data */
    background:
      radial-gradient(120% 50% at 30% 105%, rgba(93, 76, 246, .55), transparent 60%),
      radial-gradient(90% 40% at 90% 100%, rgba(175, 230, 127, .22), transparent 65%),
      var(--brand-navy) !important;
  }
  body.has-shell .navbar .title-row { flex-direction: column; align-items: flex-start; gap: 6px; margin: 0 0 4px !important; padding-inline: 8px; }
  body.has-shell #modeToggle { flex-direction: column; flex-wrap: nowrap; gap: 4px; }
  body.has-shell #modeToggle .tab { width: 100%; justify-content: flex-start; padding: 10px 12px !important; border-radius: 12px !important; font-size: 14px !important; }
  body.has-shell #modeToggle .tab .nav-badge { margin-inline-start: auto; }
  body.has-shell .page-intro { margin-top: 26px; }
}
@media (max-width: 999px) {
  body.has-shell header.top .navbar { margin-inline: -16px; padding: 12px 16px 10px !important; border-radius: 0 0 18px 18px; }
  body.has-shell #modeToggle .tab { padding: 7px 12px !important; }
}

/* ---------- sign-in: the brand's gradient as the hero ---------- */
.login { background:
    radial-gradient(70% 60% at 15% 85%, rgba(93, 76, 246, .55), transparent 60%),
    radial-gradient(60% 50% at 90% 15%, rgba(175, 230, 127, .35), transparent 60%),
    var(--brand-navy) !important; }

/* ---------- commissions page ---------- */
body.brand-page header { padding-bottom: 6px; }
body.brand-page header h1 { font-size: 22px; }
body.brand-page nav .pill { font-weight: 600; }
body.brand-page nav .pill[aria-pressed="true"] { background: var(--accent) !important; color: var(--accent-ink) !important; border-color: var(--accent) !important; }
body.brand-page .badge { background: color-mix(in srgb, var(--brand-lime) 55%, var(--surface)); color: var(--brand-moss); }
body.brand-page .settings-section > h2 { border-bottom-color: var(--brand-periwinkle); }
body.brand-page .chat-fab { background: var(--brand-navy) !important; color: #fff !important; box-shadow: var(--shadow-lift); }
body.brand-page .msg.user { background: var(--accent-soft) !important; }
body.brand-page .seg button[aria-pressed="true"] { background: var(--accent) !important; }
body.brand-page.signed-out { background:
    radial-gradient(60% 55% at 12% 90%, rgba(93, 76, 246, .55), transparent 60%),
    radial-gradient(50% 45% at 92% 10%, rgba(175, 230, 127, .35), transparent 60%),
    var(--brand-navy) !important; }
body.brand-page.signed-out .login-card { box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- the dashboard's sign-in ---------- */
body.signed-out { background:
    radial-gradient(60% 55% at 12% 90%, rgba(93, 76, 246, .55), transparent 60%),
    radial-gradient(50% 45% at 92% 10%, rgba(175, 230, 127, .35), transparent 60%),
    var(--brand-navy) !important; min-height: 100vh; }
/* The dashboard: its sign-in card sits outside .wrap. On the commissions page it is inside - never hide it there. */
body.signed-out:not(.brand-page) .wrap { display: none; }
body.signed-out .login { background: none !important; min-height: calc(100vh - 80px); display: grid; place-items: center; border: 0; box-shadow: none; max-width: none; padding: 0; }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 34px 28px 24px;
  display: grid; gap: 14px; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.login-card .brand-logo { height: 28px; margin: 0 auto; }
.login-card h2 { margin: 0; font-size: 24px; }
.login-card .login-sub { margin: 0; color: var(--text-dim); }
.login-card .login-foot { margin: 0; color: var(--text-faint); font-size: 12.5px; }
.login-card .btn.primary { justify-self: stretch; padding: 11px 16px !important; font-size: 15px !important; }

/* ---------- page heading: one title per screen, then its line of explanation ---------- */
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 0; color: var(--text); font-family: var(--font) !important; }
.page-title:empty { display: none; }
.page-intro { margin-top: 6px !important; color: var(--text-dim) !important; font-size: 14px !important; max-width: 72ch; }
@media (min-width: 1000px) { body.has-shell .page-title { margin-top: 28px; } }

/* ---------- the sidebar's brand block: the logo, the product name under it ---------- */
@media (min-width: 1000px) {
  body.has-shell .navbar .brand { flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; }
  body.has-shell .navbar .brand-name { font-size: 13px; opacity: .65; font-weight: 500; border: 0 !important; padding: 0 !important; }
  body.has-shell .navbar .brand-logo { height: 24px; }
  body.has-shell .navbar .title-row { gap: 14px !important; padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
}

/* ---------- toasts: compact, in the corner, never over the work ---------- */
.toasts { position: fixed !important; inset-inline: auto 20px !important; bottom: 20px !important; left: 20px !important; right: auto !important;
  width: auto !important; max-width: min(380px, calc(100vw - 40px)); display: grid; gap: 8px; z-index: 60; transform: none !important; }
.toasts > * { width: auto !important; max-width: 100%; padding: 10px 16px !important; font-size: 13.5px !important; line-height: 1.45; }
.savebadge { border-radius: 999px !important; background: var(--brand-lime) !important; color: var(--brand-moss) !important; font-weight: 700; }
.toasts > .toast.error, .toast.error { background: var(--bad) !important; }

/* ---------- the commissions page: the same shell - a navy sidebar with the logo, the who, the views ---------- */
body.brand-page.has-shell .page-title { margin: 4px 0 0; }
body.brand-page.has-shell header .who { color: rgba(255, 255, 255, .55) !important; }
body.brand-page.has-shell header .who .linklike { color: var(--brand-periwinkle) !important; }
@media (min-width: 1000px) {
  body.brand-page.has-shell { padding-inline-start: calc(var(--sidebar) + 28px) !important; padding-inline-end: 28px !important; }
  body.brand-page.has-shell::before { content: ""; position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar); z-index: 29;
    background:
      radial-gradient(120% 50% at 30% 105%, rgba(93, 76, 246, .55), transparent 60%),
      radial-gradient(90% 40% at 90% 100%, rgba(175, 230, 127, .22), transparent 65%),
      var(--brand-navy); }
  body.brand-page.has-shell header { position: fixed; top: 0; inset-inline-start: 0; width: var(--sidebar); z-index: 30; padding: 26px 24px 16px;
    flex-direction: column; align-items: flex-start; gap: 8px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  body.brand-page.has-shell header img { filter: brightness(0) invert(1); height: 24px; }
  body.brand-page.has-shell header h1 { color: #fff; font-size: 13px; font-weight: 500; opacity: .65; letter-spacing: 0; }
  body.brand-page.has-shell header .who { margin: 0 !important; font-size: 12px; }
  body.brand-page.has-shell nav#nav { position: fixed; top: 150px; inset-inline-start: 0; width: var(--sidebar); z-index: 30; padding: 8px 16px;
    flex-direction: column; flex-wrap: nowrap; gap: 4px; }
  body.brand-page.has-shell nav#nav .pill { width: 100%; justify-content: flex-start; display: flex; align-items: center; gap: 8px; text-align: start;
    background: transparent !important; border: 0 !important; color: rgba(255, 255, 255, .72) !important; padding: 10px 12px !important; border-radius: 12px !important; font-size: 14px; }
  body.brand-page.has-shell nav#nav .pill:hover { background: rgba(255, 255, 255, .06) !important; color: #fff !important; }
  body.brand-page.has-shell nav#nav .pill[aria-pressed="true"] { background: var(--brand-indigo) !important; color: #fff !important; box-shadow: 0 4px 14px rgba(93, 76, 246, .45); }
  body.brand-page.has-shell nav#nav .pill .badge { margin-inline-start: auto; background: var(--brand-lime) !important; color: var(--brand-moss) !important; }
  body.brand-page.has-shell .wrap { max-width: 1240px; }
  body.brand-page.has-shell .page-title { margin-top: 18px; }
}
@media (max-width: 999px) {
  body.brand-page.has-shell header { background: var(--brand-navy); margin: -20px -16px 0; padding: 14px 16px; border-radius: 0 0 18px 18px; }
  body.brand-page.has-shell header img { filter: brightness(0) invert(1); }
  body.brand-page.has-shell header h1 { color: #fff; }
}

/* ---------- the navigation's groups ---------- */
.nav-group { display: none; }
@media (min-width: 1000px) {
  body.has-shell .nav-group { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: rgba(255, 255, 255, .38); padding: 14px 12px 4px; }
  body.has-shell .nav-group:first-child { padding-top: 0; }
}

/* ---------- today (home): one list of what's waiting ---------- */
.home-hello { margin-bottom: 18px; }
.home-hello .page-intro { margin-top: 4px !important; }
.home-tasks { display: grid; gap: 10px; max-width: 760px; }
.home-task { font: inherit; text-align: start; cursor: pointer; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
  padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s, border-color .12s; }
.home-task:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); border-color: var(--brand-periwinkle); }
.home-task.first { border-color: var(--accent); box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 18%, transparent); }
.home-task-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.home-task-icon .nav-icon { width: 22px; height: 22px; }
.home-task-text { display: grid; gap: 2px; min-width: 0; }
.home-task-title { font-weight: 700; font-size: 16px; }
.home-task-sub { color: var(--text-dim); font-size: 13.5px; }
.home-task-n { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); letter-spacing: -0.02em; }
.home-task-cta { font-weight: 700; font-size: 13.5px; color: var(--accent); white-space: nowrap; }
.home-task.first .home-task-cta { background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 999px; }
.home-done { max-width: 520px; padding: 40px 28px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.home-done-mark { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 800;
  background: var(--brand-lime); color: var(--brand-moss); }
.home-done h2 { margin: 0 0 6px; }
.home-done p { margin: 0; color: var(--text-dim); }
@media (max-width: 640px) {
  .home-task { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .home-task-cta { grid-column: 2 / -1; justify-self: start; }
}

/* ---------- the approval queue: one summary line, one action; filters on demand ---------- */
.queue-summary { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 12px;
  padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.qs-text { font-size: 15px; color: var(--text); }
.qs-n { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.qs-meta { color: var(--text-dim); }
.qs-meta.faint { color: var(--text-faint); }
.queue-controls { margin: 10px 0 6px !important; }
.queue-controls input[type=search] { max-width: 420px; }
.filter-toggle { font-weight: 600 !important; }
.filter-panel { display: grid; gap: 10px; padding: 14px 16px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.filter-panel[hidden] { display: none !important; }
.filter-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filter-row[hidden] { display: none !important; }
.filter-label { font-size: 12.5px; font-weight: 700; color: var(--text-faint); min-width: 80px; }
.quick-help { color: var(--text-faint) !important; font-size: 12.5px !important; }

/* ---------- projects: filters in one row, a next step per project, folded done steps ---------- */
.project-filters { justify-content: space-between; }
.pill.pill-attention:not([aria-pressed="true"]) { border-color: #F2B859 !important; color: var(--warn) !important; }
.inbox-link { font-weight: 700; }
.next-step { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.next-step.done { background: var(--good-bg); color: var(--good); }
.readiness-bar { display: inline-block; width: 64px; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; vertical-align: middle; }
.readiness-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
details.setup-step > summary { list-style: none; cursor: pointer; }
details.setup-step > summary::-webkit-details-marker { display: none; }
details.setup-step > summary h4 { margin: 0; }
details.setup-step:not([open]) { padding-block: 10px !important; }
details.setup-step:not([open]) > summary h4::after { content: "הצגה"; margin-inline-start: auto; font-size: 12px; font-weight: 600; color: var(--text-faint); }
details.setup-step[open] > summary { margin-bottom: 6px; }
details.setup-step.done .step-n { background: var(--good-bg) !important; color: var(--good) !important; }

/* ---------- segmented pills (WhatsApp time: all / WhatsApp / meetings) ---------- */
.seg-pills { display: inline-flex; gap: 0; border: 1px solid var(--border); border-radius: 999px; padding: 2px; background: var(--surface); }
.seg-pills .pill { border: 0 !important; padding: 5px 12px !important; }
.seg-pills .pill[aria-pressed="true"] { background: var(--accent) !important; color: var(--accent-ink) !important; }

/* ---------- a side sheet for settings: plain sections, saved as you go ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(21, 32, 47, .35); display: flex; justify-content: flex-start; }
.sheet { width: min(460px, 100vw); height: 100%; overflow-y: auto; background: var(--bg); box-shadow: 0 0 40px rgba(0, 0, 0, .25); padding: 22px 22px 40px; display: grid; gap: 14px; align-content: start; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; font-size: 21px; }
.sheet-close { font: inherit; border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--text-dim); width: 36px; height: 36px; border-radius: 50%; }
.sheet-close:hover { background: var(--accent-soft); color: var(--accent); }
.sheet-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.sheet-section h3 { margin: 0; font-size: 15px; }
.sheet-help { display: block; color: var(--text-dim); font-size: 13px; }
.switch-line { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.switch-line strong { display: block; }
.sheet-number { width: 96px; font-size: 15px; padding: 7px 10px; }
.inline-number { width: 56px; padding: 3px 6px; text-align: center; }
.rate-default { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; }
.rate-list { display: grid; gap: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.rate-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.rate-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rate-add { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--border); }
.sheet-advanced > summary { list-style: none; cursor: pointer; }
.sheet-advanced > summary::-webkit-details-marker { display: none; }
.sheet-advanced > summary h3::after { content: " ▾"; color: var(--text-faint); }
.sentences { margin: 0; padding-inline-start: 18px; display: grid; gap: 10px; line-height: 2; }

/* ---------- Loading skeletons: shaped like what's coming, so nothing jumps when it lands ---------- */
.skel { display: inline-block; border-radius: 6px; max-width: 100%;
  background: linear-gradient(90deg, var(--skel-a) 0%, var(--skel-b) 50%, var(--skel-a) 100%); background-size: 200% 100%;
  animation: skel-shimmer 1.3s ease-in-out infinite; }
.skel.round { border-radius: 12px; }
.skel.pill { border-radius: 999px; }
:root { --skel-a: color-mix(in srgb, var(--border) 55%, var(--surface)); --skel-b: color-mix(in srgb, var(--border) 20%, var(--surface)); }
@keyframes skel-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.skel-wrap { display: grid; gap: 10px; }
.skel-tasks { max-width: 760px; }
.skel-task { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.skel-lines { display: grid; gap: 8px; }
.skel-card { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.skel-row-end { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.skel-table { gap: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.skel-trow { display: grid; grid-template-columns: 2fr 1.6fr 1.2fr 1fr; gap: 18px; padding: 15px 16px; border-top: 1px solid var(--border); }
.skel-trow:first-child { border-top: 0; }
.skel-trow.head { padding-block: 11px; }
.skel-text { gap: 12px; max-width: 720px; }
/* The shell, before the first data: the nav slots hold their place. */
.skel-nav { display: grid; gap: 4px; }
.skel-nav .skel { height: 38px; border-radius: 12px; width: 100%; --skel-a: rgba(255,255,255,.06); --skel-b: rgba(255,255,255,.12); }
body.brand-page nav#nav .nav-skel { display: block; height: 36px; width: 110px; border-radius: 999px; }
@media (min-width: 1000px) {
  body.brand-page.has-shell nav#nav .nav-skel { width: 100%; height: 40px; border-radius: 12px; margin-bottom: 4px; --skel-a: rgba(255,255,255,.06); --skel-b: rgba(255,255,255,.13); }
}
body.has-shell .whoami { min-height: 1.5em; }
/* English names on the Hebrew page stay right-aligned like everything around them (their letters still run left to right). */
html[dir="rtl"] [dir="auto"]:not(input):not(textarea):not(select), html[dir="rtl"] td[dir="ltr"] { text-align: right; }
.brand-logo, body.brand-page header img { width: auto; }
/* The commissions page on a phone: wide tables scroll inside themselves, never the page. */
@media (max-width: 760px) {
  body.brand-page main table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  body.brand-page header .who { flex-basis: 100%; margin-inline-start: 0; overflow-wrap: anywhere; }
  body.brand-page { overflow-x: hidden; }
}
@media (max-width: 999px) { body.has-shell .navbar .whoami { flex-basis: 100%; } }

/* ---------- Settings as cards: a title, then labelled fields ---------- */
.setting-cards { display: grid; gap: 12px; margin-bottom: 28px; max-width: 980px; }
.setting-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.setting-card.paused { opacity: .7; }
.setting-card.new-digest, .setting-card.new-credential { border-color: var(--accent); border-style: dashed; }
.setting-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.setting-card-head > strong { color: var(--accent); font-size: 13px; }
.setting-card-actions { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 12px; }
.setting-title-input { font: inherit !important; font-size: 16px !important; font-weight: 700 !important; border: 1px solid transparent !important; background: transparent !important;
  padding: 4px 8px !important; border-radius: 8px !important; flex: 1 1 220px; min-width: 0; color: var(--text) !important; }
.setting-title-input:hover, .setting-title-input:focus { border-color: var(--border) !important; background: var(--bg) !important; }
.setting-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
.setting-field { display: grid; gap: 5px; min-width: 0; }
.setting-label { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.setting-field input, .setting-field select { width: 100%; min-width: 0; }
.add-card-button { font: inherit; font-weight: 600; color: var(--accent); background: transparent; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: var(--radius); padding: 14px; cursor: pointer; text-align: center; }
.add-card-button:hover { background: var(--accent-soft); }
.expiry-badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.expiry-badge.good { background: var(--good-bg); color: var(--good); }
.expiry-badge.warn { background: var(--warn-bg); color: var(--warn); }
.expiry-badge.bad { background: var(--bad-bg); color: var(--bad); }
.switch-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); cursor: pointer; }

/* ---------- WhatsApp time: the bar, the month, one summary at a time ---------- */
.wa-bar { align-items: center; gap: 10px; flex-wrap: wrap; }
.wa-bar-end { margin-inline-start: auto; display: inline-flex; gap: 8px; flex-wrap: wrap; }
.month-step { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.month-step strong { min-width: 112px; text-align: center; font-size: 14px; }
.month-arrow { font: inherit; font-size: 18px; line-height: 1; width: 32px; height: 32px; border-radius: 999px; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.month-arrow:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.month-arrow:disabled { opacity: .3; cursor: default; }
.wa-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.wa-chips { margin-bottom: 12px; }
.wa-summaries.one { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.wa-by { justify-self: start; }
@media (max-width: 640px) { .wa-bar-end { margin-inline-start: 0; } }
.wa-bar { justify-content: flex-start !important; }
.setting-field select, .setting-field .bucket-select { max-width: none !important; width: 100% !important; }
.setting-field input[dir="ltr"] { text-align: right; }
@media (max-width: 640px) {
  .wa-bar { gap: 8px; }
  .wa-bar .seg-pills { order: 3; }
  .wa-bar-end { order: 4; width: 100%; }
  .wa-bar-end .pill { flex: 1; }
}
@media (max-width: 640px) { .wa-bar { flex-direction: row !important; align-items: center !important; } }

/* ---------- Insights: the work, day to day ---------- */
.ops-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ops-head .meeting-line { max-width: 70ch; }
.ops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; }
.ops-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px 14px;
  display: grid; gap: 8px; box-shadow: var(--shadow); overflow: hidden; }
.ops-card::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--text-faint); }
.ops-card.good::before { background: var(--good); }
.ops-card.warn::before { background: var(--warn); }
.ops-card.bad::before { background: var(--bad); }
.ops-card.info::before { background: var(--accent); }
.ops-card.open { grid-column: 1 / -1; }
.ops-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ops-title { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.ops-value { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ops-card.bad .ops-value { color: var(--bad); }
.ops-card.warn .ops-value { color: var(--warn); }
.ops-headline { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text); text-wrap: pretty; }
.ops-trend { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.ops-trend.good { background: var(--good-bg); color: var(--good); }
.ops-trend.bad { background: var(--bad-bg); color: var(--bad); }
.ops-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; min-height: 30px; }
.ops-more { font-size: 13px; font-weight: 600; }
.ops-details { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px; }
.ops-details li { border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; background: var(--bg); display: grid; gap: 2px; min-width: 0; }
.ops-details li.t-bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.ops-marks { display: flex; gap: 14px; margin-top: 4px; }
.ops-mark { font-size: 12px; }
.ops-details li.t-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.ops-details li.ops-sub { grid-column: 1 / -1; border: 0; background: none; padding: 8px 0 0; font-weight: 700; font-size: 13px; color: var(--text-dim); }
.ops-d-main { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ops-d-label { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.ops-details .meeting-line { overflow-wrap: anywhere; }
.ops-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; align-items: stretch; }
@media (max-width: 760px) { .ops-grid { grid-template-columns: minmax(0, 1fr); } }
.settings-index { display: flex; flex-wrap: wrap; gap: 6px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; padding: 8px 0; margin-bottom: 6px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); }
.settings-index .pill { font-size: 13px; padding: 5px 12px; }
.settings-section .card, .settings-section { scroll-margin-top: 64px; }
.sheet.wide { width: min(620px, 100vw); }
body.brand-page tr.picked td { background: var(--accent-soft) !important; }

/* ---------- Empty states: a soft frame instead of a stray grey line ---------- */
.list > .empty, .wrap .empty { border: 1.5px dashed var(--border); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 60%, transparent);
  padding: 36px 20px; color: var(--text-dim); font-size: 14.5px; display: grid; place-items: center; gap: 8px; text-align: center; }
.list > .empty::before, .wrap .empty::before { content: ""; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft);
  -webkit-mask: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.sheet-points { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }

/* The drafts insights: the bottom line in a sentence, and a verdict per row */
.bottom-line { font-size: 15px; font-weight: 600; line-height: 1.5; padding: 12px 16px; margin-block: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--text); }
.verdict { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; white-space: nowrap; background: var(--surface-2, rgba(0,0,0,.05)); }
.verdict.good { background: var(--good-bg); color: var(--good); }
.verdict.warn { background: var(--warn-bg); color: var(--warn); }
.verdict.bad { background: var(--bad-bg); color: var(--bad); }

/* A client at risk in the work insights: the point first, then a quote, the next step, the other patterns */
.ops-d-point { font-size: 14.5px; font-weight: 600; line-height: 1.5; margin-block: 4px 2px; color: var(--text); }
.ops-d-quote { font-size: 13px; font-style: italic; color: var(--text-faint); margin-block: 2px; }
.ops-d-action { font-size: 13.5px; line-height: 1.5; margin-block: 4px; color: var(--text); }
.ops-d-lines { margin: 4px 0; padding-inline-start: 18px; font-size: 12.5px; color: var(--text-faint); display: grid; gap: 2px; }
.ops-details .ops-d-lines { border: 0; background: none; padding-block: 0; }
.ops-details .ops-d-lines li { border: 0; background: none; padding: 0; box-shadow: none; }

/* Waiting 2 hours and more: an emergency - bright red (Liran, 2026-11-04) */
.ops-details li.t-emergency { background: var(--bad); color: #fff; border-color: var(--bad); }
.ops-details li.t-emergency .meeting-line, .ops-details li.t-emergency .ops-mark, .ops-details li.t-emergency strong { color: #fff !important; }
.ops-details li.ops-sub.t-emergency { background: none; color: var(--bad); font-weight: 700; border: 0; }
