/* Hamgam — soft "neo" glass design system. Logical properties everywhere so RTL and LTR share one stylesheet. */
@font-face { font-family: Vazirmatn; src: url(../fonts/Vazirmatn.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --font: Vazirmatn, system-ui, -apple-system, "Segoe UI", sans-serif;
  --bg: #E9EEF5;
  --ink: #1A2238; --ink-2: #4A5578; --ink-3: #8790AD; --ink-4: #B5BCD2;
  --glass: rgba(255, 255, 255, .52); --glass-strong: rgba(250, 252, 255, .82); --glass-solid: #F6F8FC;
  --glass-border: rgba(255, 255, 255, .78); --glass-edge: rgba(255, 255, 255, .95);
  --line: rgba(26, 34, 56, .08); --line-2: rgba(26, 34, 56, .14);
  --accent: #1FB5A8; --accent-2: #178F86; --accent-ink: #0B7A71; --accent-soft: rgba(31, 181, 168, .14); --on-accent: #fff;
  --saffron: #F2A93B; --saffron-ink: #A86A0F; --saffron-soft: rgba(242, 169, 59, .16);
  --pom: #E2445C; --pom-soft: rgba(226, 68, 92, .13);
  --indigo: #5B6CF0; --indigo-soft: rgba(91, 108, 240, .13);
  --lapis: #141B3A;
  --raised: 5px 5px 12px rgba(150, 165, 192, .42), -5px -5px 12px rgba(255, 255, 255, .92);
  --raised-sm: 3px 3px 7px rgba(150, 165, 192, .38), -3px -3px 7px rgba(255, 255, 255, .9);
  --inset: inset 2px 2px 5px rgba(150, 165, 192, .42), inset -2px -2px 5px rgba(255, 255, 255, .9);
  --float: 0 28px 60px -28px rgba(20, 27, 58, .42), 0 2px 6px rgba(20, 27, 58, .05);
  --blur: blur(26px) saturate(1.5);
  --rk: 1; --r-xl: calc(28px * var(--rk)); --r-lg: calc(20px * var(--rk)); --r-md: calc(14px * var(--rk)); --r-sm: calc(10px * var(--rk));
  --amb-1: #F2A93B; --amb-2: #1FB5A8; --amb-3: #5B6CF0;
  --sidebar-w: 276px; --sheet-w: 440px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0D1229;
  --ink: #E7EBF8; --ink-2: #AAB3D4; --ink-3: #6E78A3; --ink-4: #454E78;
  --glass: rgba(28, 36, 76, .48); --glass-strong: rgba(24, 31, 66, .86); --glass-solid: #161D40;
  --glass-border: rgba(255, 255, 255, .08); --glass-edge: rgba(255, 255, 255, .12);
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13);
  --accent: #2CCBBD; --accent-2: #1FB5A8; --accent-ink: #5FE3D7; --accent-soft: rgba(44, 203, 189, .16);
  --saffron-ink: #F7C26E; --pom: #F0576E;
  --raised: 5px 5px 14px rgba(3, 6, 20, .55), -4px -4px 12px rgba(70, 84, 150, .14);
  --raised-sm: 3px 3px 8px rgba(3, 6, 20, .5), -2px -2px 7px rgba(70, 84, 150, .12);
  --inset: inset 2px 2px 6px rgba(3, 6, 20, .6), inset -2px -2px 6px rgba(70, 84, 150, .14);
  --float: 0 30px 70px -26px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; font: 400 15px/1.65 var(--font); color: var(--ink); background: var(--bg); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; flex: none; }
button { cursor: pointer; }
a { color: var(--accent-ink); }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------------------------------------------------------- ambient */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; transition: background 3s ease; }
.ambient i:nth-child(1) { width: 52vmax; height: 52vmax; inset-inline-start: -14vmax; top: -18vmax; background: var(--amb-1); }
.ambient i:nth-child(2) { width: 46vmax; height: 46vmax; inset-inline-end: -12vmax; top: 18vh; background: var(--amb-2); opacity: .42; }
.ambient i:nth-child(3) { width: 40vmax; height: 40vmax; inset-inline-start: 26vw; bottom: -22vmax; background: var(--amb-3); opacity: .35; }
:root[data-theme="dark"] .ambient i { opacity: .28; }
.ambient::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, transparent 40%, color-mix(in srgb, var(--bg) 55%, transparent)); }

/* ----------------------------------------------------------- glass */
.glass { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-border); }
.glass-strong { background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-border); }

/* ---------------------------------------------------------- layout */
.app { height: 100%; display: grid; grid-template-columns: var(--sidebar-w) 1fr; }
.sidebar { margin: 12px; margin-inline-end: 0; border-radius: var(--r-xl); display: flex; flex-direction: column; min-height: 0; overflow: hidden; box-shadow: var(--float); }
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 30px clamp(18px, 4vw, 56px) 120px; scroll-behavior: smooth; }
.view.wide { padding-inline: clamp(12px, 2vw, 28px); }
.view-inner { max-width: 820px; margin: 0 auto; }

/* --------------------------------------------------------- sidebar */
.sb-head { display: flex; align-items: center; gap: 10px; padding: 18px 18px 10px; }
.brand-logo { width: 34px; height: 34px; flex: none; }
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -.01em; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-search { margin: 4px 14px 10px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-md); border: 0; background: transparent; box-shadow: var(--inset); color: var(--ink-3); font-size: 13.5px; text-align: start; }
.sb-search svg { width: 16px; height: 16px; }
.sb-search kbd { white-space: nowrap; margin-inline-start: auto; font: 600 11px var(--font); padding: 1px 6px; border-radius: calc(6px * var(--rk, 1)); background: var(--line); color: var(--ink-3); }
.sb-scroll { flex: 1; overflow-y: auto; padding: 4px 10px 12px; scrollbar-width: thin; }
.sb-group { margin-top: 14px; }
.sb-group-title { display: flex; align-items: center; gap: 8px; padding: 4px 10px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); cursor: pointer; user-select: none; }
.sb-group-title svg { width: 15px; height: 15px; }
.sb-group-title .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sb-group-title .grow { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-group-title button { opacity: 0; border: 0; background: none; padding: 2px; color: var(--ink-3); border-radius: calc(6px * var(--rk, 1)); display: grid; }
.sb-group-title:hover button, .sb-group-title button:focus-visible { opacity: 1; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; background: none; border-radius: calc(12px * var(--rk, 1)); text-align: start; font-size: 14.5px; color: var(--ink); text-decoration: none; position: relative; transition: background .15s, box-shadow .2s; }
.nav-item:hover { background: color-mix(in srgb, var(--glass-strong) 60%, transparent); }
.nav-item.active { background: var(--glass-strong); box-shadow: var(--raised-sm); font-weight: 600; }
.nav-item .ic { width: 20px; height: 20px; flex: none; display: grid; place-items: center; }
.nav-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nav-item .count.hot { color: #fff; background: var(--pom); border-radius: calc(10px * var(--rk, 1)); padding: 0 7px; font-weight: 700; }
.nav-item.drop-hover { box-shadow: 0 0 0 2px var(--accent) inset; background: var(--accent-soft); }
.nav-item.sub { padding-inline-start: 20px; font-size: 14px; }
.nav-item.dim .label { color: var(--ink-2); }
.sb-foot { display: flex; align-items: center; gap: 6px; padding: 10px 12px 14px; border-top: 1px solid var(--line); }
.sb-foot .who { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; border: 0; background: none; padding: 4px; border-radius: calc(12px * var(--rk, 1)); text-align: start; }
.sb-foot .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.ic-today { color: var(--saffron); } .ic-inbox { color: var(--indigo); } .ic-upcoming { color: var(--pom); } .ic-anytime { color: var(--accent); } .ic-someday { color: #B49A6A; } .ic-logbook { color: #43AA8B; } .ic-cal { color: var(--accent); } .ic-assigned { color: #9B5DE5; } .ic-delegated { color: #2EA8E6; }

/* ------------------------------------------------------- headings */
.vh { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.vh-icon { width: 46px; height: 46px; border-radius: calc(16px * var(--rk, 1)); display: grid; place-items: center; flex: none; box-shadow: var(--raised); background: var(--glass-strong); }
.vh-icon svg { width: 24px; height: 24px; }
.vh-text { flex: 1; min-width: 0; }
.vh h1 { margin: 0; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.25; font-weight: 800; letter-spacing: -.02em; outline: none; }
:root[dir="rtl"] .vh h1 { letter-spacing: 0; }
.vh .sub { margin-top: 2px; color: var(--ink-2); font-size: 14px; }
.vh-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 30px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; color: var(--ink); }
.section-title .muted { font-weight: 500; font-size: 13px; color: var(--ink-3); }
.section-title.day-head { font-size: 15px; }
.section-title .big { font-size: 26px; font-weight: 800; color: var(--ink); min-width: 1.4em; }
.section-title.today-head .big { color: var(--saffron-ink); }
.section-title.evening { color: var(--indigo); }
.section-title .grow { flex: 1; }
.section-title button { border: 0; background: none; color: var(--ink-3); padding: 2px; border-radius: calc(8px * var(--rk, 1)); display: grid; }

/* ------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: calc(13px * var(--rk, 1)); padding: 8px 15px; font-weight: 600; font-size: 14px; background: var(--glass-strong); box-shadow: var(--raised-sm); color: var(--ink); white-space: nowrap; transition: box-shadow .15s, transform .1s, background .15s; text-decoration: none; }
.btn:hover { background: var(--glass-solid); }
.btn:active, .btn.pressed { box-shadow: var(--inset); transform: translateY(1px); }
.btn.primary { color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 22px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--pom); }
.btn.danger.solid { color: #fff; background: var(--pom); box-shadow: 0 10px 22px -12px var(--pom); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--line); }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: calc(11px * var(--rk, 1)); }
.btn.block { width: 100%; padding: 12px; font-size: 15px; border-radius: calc(15px * var(--rk, 1)); }
.btn svg { width: 17px; height: 17px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.icon-btn { width: 36px; height: 36px; border-radius: calc(12px * var(--rk, 1)); border: 0; display: inline-grid; place-items: center; background: transparent; color: var(--ink-2); flex: none; transition: background .15s, box-shadow .15s; position: relative; }
.icon-btn:hover { background: var(--line); color: var(--ink); }
.icon-btn.raised { background: var(--glass-strong); box-shadow: var(--raised-sm); }
.icon-btn.raised:active, .icon-btn.on { box-shadow: var(--inset); background: transparent; color: var(--accent-ink); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: calc(9px * var(--rk, 1)); }
.icon-btn.sm svg { width: 16px; height: 16px; }
.badge-dot { position: absolute; top: 4px; inset-inline-end: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: calc(9px * var(--rk, 1)); background: var(--pom); color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; }

.field { display: block; margin-bottom: 14px; }
.field > span, .label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.input, .select, textarea.input { width: 100%; border: 1px solid transparent; border-radius: var(--r-md); padding: 10px 13px; background: color-mix(in srgb, var(--glass-strong) 70%, transparent); box-shadow: var(--inset); outline: none; transition: border-color .15s, box-shadow .15s; font-size: 15px; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: var(--inset), 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--ink-3); }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.7; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-size: 5px 5px; background-repeat: no-repeat; background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; padding-inline-end: 34px; }
:root[dir="rtl"] .select { background-position: 13px 50%, 18px 50%; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hint { font-size: 12.5px; color: var(--ink-3); margin: 4px 0 0; }

.seg { display: inline-flex; padding: 3px; border-radius: calc(13px * var(--rk, 1)); box-shadow: var(--inset); background: color-mix(in srgb, var(--glass) 50%, transparent); gap: 2px; }
.seg button { border: 0; background: none; border-radius: calc(10px * var(--rk, 1)); padding: 5px 13px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--glass-strong); box-shadow: var(--raised-sm); color: var(--ink); }
.seg button svg { width: 16px; height: 16px; }

.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: calc(20px * var(--rk, 1)); box-shadow: var(--inset); background: color-mix(in srgb, var(--glass) 60%, transparent); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--glass-solid); box-shadow: var(--raised-sm); transition: transform .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
:root[dir="rtl"] .switch input:checked + i::after { transform: translateX(-18px); }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.switch-row .grow > div:first-child { font-weight: 600; font-size: 14.5px; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: calc(9px * var(--rk, 1)); font-size: 12.5px; font-weight: 600; background: var(--line); color: var(--ink-2); white-space: nowrap; border: 0; line-height: 1.7; }
.chip svg { width: 13px; height: 13px; }
.chip.tag { background: color-mix(in srgb, var(--c, #8892B0) 16%, transparent); color: color-mix(in srgb, var(--c, #8892B0) 80%, var(--ink)); }
.chip.today { background: var(--saffron-soft); color: var(--saffron-ink); }
.chip.evening { background: var(--indigo-soft); color: var(--indigo); }
.chip.danger { background: var(--pom-soft); color: var(--pom); }
.chip.accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip.btn-chip { cursor: pointer; }
.chip .x { display: grid; opacity: .6; margin-inline-start: 2px; border: 0; background: none; padding: 0; color: inherit; }

.avatar { --c: #1FB5A8; width: 26px; height: 26px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #141B3A)); box-shadow: 0 0 0 2px var(--glass-strong); text-transform: uppercase; }
.avatar.lg { width: 38px; height: 38px; font-size: 14px; }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-inline-start: -7px; }

/* ----------------------------------------------------------- tasks */
.task-list { list-style: none; margin: 0; padding: 0; }
.task { position: relative; display: flex; align-items: flex-start; gap: 11px; padding: 8px 10px; margin: 0 -10px; border-radius: calc(14px * var(--rk, 1)); cursor: default; transition: background .15s, box-shadow .2s, opacity .3s; user-select: none; -webkit-user-select: none; }
.task:hover { background: color-mix(in srgb, var(--glass-strong) 55%, transparent); }
.task.selected { background: var(--glass-strong); box-shadow: var(--raised-sm); }
.task.done-anim { opacity: .45; }
.task .body { flex: 1; min-width: 0; cursor: pointer; }
.task .t-title { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.task.is-done .t-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-4); }
.task .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 3px; font-size: 12.5px; color: var(--ink-3); }
.task .meta .m { display: inline-flex; align-items: center; gap: 4px; }
.task .meta svg { width: 13px; height: 13px; }
.task .meta .proj-dot { width: 7px; height: 7px; border-radius: 50%; }
.task .meta .late { color: var(--pom); font-weight: 600; }
.task .meta .soon { color: var(--saffron-ink); font-weight: 600; }
.task .prio { color: var(--pom); font-weight: 800; letter-spacing: -1px; font-size: 13px; }
.task .side { display: flex; align-items: center; gap: 6px; padding-top: 2px; }
.task .grip { opacity: 0; color: var(--ink-4); cursor: grab; padding: 4px 0; touch-action: none; display: grid; }
.task:hover .grip { opacity: 1; }
.task.dragging { opacity: .35; }
.drag-ghost { position: fixed; z-index: 999; pointer-events: none; padding: 8px 14px; border-radius: calc(14px * var(--rk, 1)); background: var(--glass-strong); box-shadow: var(--float); font-size: 14px; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--glass-border); }
.drop-line { height: 3px; border-radius: 3px; background: var(--accent); margin: -1.5px 0; box-shadow: 0 0 10px var(--accent); position: relative; z-index: 2; }

.check { --c: var(--ink-4); width: 22px; height: 22px; flex: none; margin-top: 1px; border-radius: 50%; border: 0; padding: 0; background: var(--glass-strong); box-shadow: var(--raised-sm), inset 0 0 0 1.6px var(--c); display: grid; place-items: center; transition: background .2s, box-shadow .2s, transform .15s; color: transparent; }
.check svg { width: 14px; height: 14px; stroke-width: 3; transform: scale(.4); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.check:hover { --c: var(--accent); }
.check:active { transform: scale(.9); }
.check.on { background: var(--accent); --c: var(--accent); color: var(--on-accent); box-shadow: 0 4px 12px -4px var(--accent); }
.check.on svg { transform: scale(1); }
.check.canceled { background: var(--ink-4); --c: var(--ink-4); color: #fff; }
.check.p3 { --c: var(--pom); } .check.p2 { --c: var(--saffron); }
.check.today-due { --c: var(--saffron); }

.add-row { display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 2px -10px; border-radius: calc(14px * var(--rk, 1)); color: var(--ink-3); border: 0; background: none; width: calc(100% + 20px); text-align: start; font-size: 14.5px; }
.add-row:hover { color: var(--accent-ink); background: var(--accent-soft); }
.add-row .plus { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px currentColor; }
.add-row .plus svg { width: 14px; height: 14px; }
.inline-new { display: flex; gap: 11px; align-items: flex-start; padding: 8px 10px; margin: 2px -10px; border-radius: calc(14px * var(--rk, 1)); background: var(--glass-strong); box-shadow: var(--raised-sm); }
.inline-new input { flex: 1; border: 0; background: none; outline: none; font-size: 15px; padding: 0; }

.heading-block { margin-top: 26px; }
.heading-row { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.heading-row h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--accent-ink); flex: 1; outline: none; }
.heading-row .count { color: var(--ink-3); font-size: 12.5px; }

.empty { text-align: center; padding: 60px 20px; color: var(--ink-3); max-width: 420px; margin: 0 auto; }
.empty .empty-ic { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: calc(26px * var(--rk, 1)); display: grid; place-items: center; box-shadow: var(--raised); background: var(--glass-strong); }
.empty .empty-ic svg { width: 34px; height: 34px; opacity: .8; }
.empty p { margin: 0; line-height: 1.8; }

.today-events { display: grid; gap: 6px; margin: 4px 0 18px; }
.today-event { display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-radius: calc(14px * var(--rk, 1)); background: color-mix(in srgb, var(--c, var(--accent)) 10%, var(--glass)); border-inline-start: 3px solid var(--c, var(--accent)); font-size: 14px; cursor: pointer; }
.today-event .tm { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; min-width: 88px; }
.today-event.now { box-shadow: 0 0 0 1.5px var(--c, var(--accent)); }

.progress-ring { --p: 0; --c: var(--accent); width: 18px; height: 18px; border-radius: 50%; flex: none; background: conic-gradient(var(--c) calc(var(--p) * 1%), transparent 0); box-shadow: inset 0 0 0 1.6px var(--c); position: relative; }
.progress-ring::after { content: ""; position: absolute; inset: 3.2px; border-radius: 50%; background: var(--glass-solid); opacity: 0; }
.progress-ring.lg { width: 34px; height: 34px; box-shadow: inset 0 0 0 2.4px var(--c); }

.project-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: calc(16px * var(--rk, 1)); background: var(--glass); border: 1px solid var(--glass-border); margin-bottom: 8px; cursor: pointer; transition: box-shadow .2s; }
.project-card:hover { box-shadow: var(--raised-sm); }
.project-card .pc-title { font-weight: 600; }
.project-card .pc-meta { font-size: 12.5px; color: var(--ink-3); }

/* ------------------------------------------------------------ board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 20px; align-items: start; }
.board-col { border-radius: var(--r-lg); padding: 12px; min-height: 160px; background: color-mix(in srgb, var(--glass) 70%, transparent); border: 1px solid var(--glass-border); }
.board-col.drop-hover { box-shadow: 0 0 0 2px var(--accent) inset; }
.board-col h4 { margin: 2px 4px 10px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.board-col h4 .n { color: var(--ink-3); font-weight: 500; font-size: 12.5px; }
.board-col h4 .dot { width: 9px; height: 9px; border-radius: 50%; }
.card { border-radius: calc(15px * var(--rk, 1)); padding: 11px 12px; background: var(--glass-strong); box-shadow: var(--raised-sm); margin-bottom: 9px; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.card .t-title { font-size: 14.5px; line-height: 1.55; }
.card .meta { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--ink-3); }
.card .meta .grow { flex: 1; }
.card.dragging { opacity: .35; }

/* ------------------------------------------------- sheet & dialogs */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(13, 18, 41, .22); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes slide-in { from { transform: translateX(var(--from, 30px)); opacity: 0; } }
:root[dir="rtl"] { --from: -30px; }
.sheet { position: fixed; z-index: 61; top: 12px; bottom: 12px; inset-inline-end: 12px; width: min(var(--sheet-w), calc(100vw - 24px)); border-radius: var(--r-xl); box-shadow: var(--float); display: flex; flex-direction: column; animation: slide-in .26s cubic-bezier(.2, .9, .3, 1); overflow: hidden; }
.sheet-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px 6px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 22px 30px; }
.modal { position: fixed; z-index: 61; left: 50%; top: 9vh; transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); max-height: 82vh; display: flex; flex-direction: column; border-radius: var(--r-xl); box-shadow: var(--float); animation: rise .22s cubic-bezier(.2, .9, .3, 1); }
.modal.wide { width: min(760px, calc(100vw - 24px)); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 8px; }
.modal-head h2 { margin: 0; font-size: 19px; flex: 1; }
.modal-body { padding: 8px 22px 18px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 22px 18px; border-top: 1px solid var(--line); }
.modal-foot .grow { flex: 1; }

.popover { position: fixed; z-index: 80; min-width: 220px; max-width: min(340px, calc(100vw - 16px)); max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; border-radius: calc(18px * var(--rk, 1)); box-shadow: var(--float); animation: rise .16s ease; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 11px; border: 0; background: none; border-radius: calc(11px * var(--rk, 1)); text-align: start; font-size: 14px; color: var(--ink); }
.menu-item:hover, .menu-item.kb { background: var(--accent-soft); }
.menu-item svg { width: 17px; height: 17px; color: var(--ink-2); flex: none; }
.menu-item .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item .tick { color: var(--accent); }
.menu-item.danger, .menu-item.danger svg { color: var(--pom); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 8px; }
.menu-label { font-size: 11.5px; font-weight: 700; color: var(--ink-3); padding: 8px 11px 3px; }
.menu-search { width: 100%; border: 0; outline: none; background: var(--line); border-radius: calc(10px * var(--rk, 1)); padding: 7px 10px; margin-bottom: 4px; font-size: 14px; }

/* ------------------------------------------------------ date picker */
.dp { width: 286px; padding: 8px; }
.dp-quick { display: grid; gap: 2px; margin-bottom: 6px; }
.dp-head { display: flex; align-items: center; gap: 4px; padding: 4px 2px 6px; }
.dp-head .grow { text-align: center; font-weight: 700; font-size: 14.5px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-grid .wd { font-size: 11.5px; color: var(--ink-3); font-weight: 600; padding: 4px 0; }
.dp-grid button { border: 0; background: none; height: 34px; border-radius: calc(10px * var(--rk, 1)); font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--ink); position: relative; }
.dp-grid button:hover { background: var(--line); }
.dp-grid button.out { color: var(--ink-4); }
.dp-grid button.off { color: var(--pom); }
.dp-grid button.today { color: var(--accent-ink); font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--accent); }
.dp-grid button.sel { background: var(--accent); color: var(--on-accent); font-weight: 700; box-shadow: 0 6px 14px -6px var(--accent); }
.dp-grid button.past { opacity: .55; }
.dp-foot { display: flex; gap: 6px; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--line); align-items: center; }
.dp-foot input[type=time] { flex: 1; }
.dp-alt { font-size: 11.5px; color: var(--ink-3); text-align: center; margin-top: 4px; }

/* -------------------------------------------------- task detail */
.td-title { width: 100%; border: 0; background: none; outline: none; resize: none; font-size: 22px; font-weight: 700; line-height: 1.45; padding: 4px 0; margin: 0; overflow: hidden; }
.td-notes { width: 100%; border: 0; background: none; outline: none; resize: none; font-size: 14.5px; line-height: 1.8; color: var(--ink-2); padding: 0; min-height: 30px; overflow: hidden; }
.td-props { display: grid; gap: 2px; margin: 14px 0; padding: 6px; border-radius: calc(18px * var(--rk, 1)); background: color-mix(in srgb, var(--glass) 60%, transparent); box-shadow: var(--inset); }
.prop { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: calc(12px * var(--rk, 1)); border: 0; background: none; width: 100%; text-align: start; font-size: 14px; min-height: 40px; }
.prop:hover { background: var(--glass-strong); }
.prop > svg { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.prop .pl { color: var(--ink-3); min-width: 72px; font-size: 13px; }
.prop .pv { flex: 1; min-width: 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.prop .pv.empty-v { color: var(--ink-4); }
.td-section { margin-top: 22px; }
.td-section > h4 { margin: 0 0 8px; font-size: 13px; color: var(--ink-3); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.cl-item { display: flex; align-items: center; gap: 9px; padding: 4px 0; }
.cl-item .check { width: 18px; height: 18px; }
.cl-item .check svg { width: 11px; height: 11px; }
.cl-item input { flex: 1; border: 0; background: none; outline: none; font-size: 14.5px; padding: 3px 0; }
.cl-item.done input { color: var(--ink-3); text-decoration: line-through; }
.cl-item .icon-btn { opacity: 0; }
.cl-item:hover .icon-btn, .cl-item:focus-within .icon-btn { opacity: 1; }
.comment { display: flex; gap: 10px; margin-bottom: 12px; }
.comment .bubble { flex: 1; padding: 8px 12px; border-radius: 4px 16px 16px 16px; background: var(--glass-strong); box-shadow: var(--raised-sm); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
:root[dir="rtl"] .comment .bubble { border-radius: calc(16px * var(--rk, 1)) 4px 16px 16px; }
.comment .who { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; display: flex; gap: 8px; }
.comment.mine .bubble { background: var(--accent-soft); }
.comment-box { display: flex; gap: 8px; align-items: flex-end; }
.comment-box textarea { min-height: 42px; max-height: 160px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: calc(12px * var(--rk, 1)); background: var(--glass); margin-bottom: 6px; font-size: 13.5px; text-decoration: none; color: var(--ink); }
.file-row .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row img { width: 40px; height: 40px; object-fit: cover; border-radius: calc(8px * var(--rk, 1)); }
.activity-row { font-size: 12.5px; color: var(--ink-3); padding: 3px 0; display: flex; gap: 6px; }

/* ----------------------------------------------------- quick entry */
.qe-input { width: 100%; border: 0; background: none; outline: none; font-size: 19px; font-weight: 600; padding: 6px 0; }
.qe-notes { width: 100%; border: 0; background: none; outline: none; resize: none; font-size: 14.5px; color: var(--ink-2); min-height: 40px; padding: 0; }
.qe-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; min-height: 26px; }
.qe-tools { display: flex; gap: 4px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.qe-preview { font-size: 12.5px; color: var(--ink-3); }

/* ---------------------------------------------------------- toasts */
.toasts { position: fixed; z-index: 120; bottom: calc(22px + var(--safe-b)); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: calc(16px * var(--rk, 1)); background: var(--lapis); color: #fff; box-shadow: var(--float); font-size: 14px; animation: rise .2s ease; max-width: calc(100vw - 24px); }
:root[data-theme="dark"] .toast { background: #F0F3FB; color: var(--lapis); }
.toast button { border: 0; background: rgba(255, 255, 255, .14); color: inherit; border-radius: calc(10px * var(--rk, 1)); padding: 4px 10px; font-weight: 700; font-size: 13px; }
.toast.err { background: var(--pom); color: #fff; }

/* -------------------------------------------------------- palette */
.cmdk { top: 12vh; }
.cmdk .cmdk-input { width: 100%; border: 0; background: none; outline: none; font-size: 18px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cmdk .cmdk-list { max-height: 56vh; overflow-y: auto; padding: 6px; }

/* ----------------------------------------------------- calendar */
.cal-wrap { display: grid; grid-template-columns: 250px 1fr; gap: 16px; height: 100%; min-height: 0; }
.cal-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; padding-bottom: 20px; }
.cal-card { border-radius: var(--r-lg); padding: 12px; }
.cal-card h5 { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.cal-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-toolbar h1 { margin: 0; font-size: 24px; font-weight: 800; flex: 1; min-width: 160px; white-space: nowrap; }
.cal-nl { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: calc(16px * var(--rk, 1)); margin-bottom: 12px; }
:root[dir="rtl"] .cal-nl { padding: 6px 12px 6px 6px; }
.cal-nl input { flex: 1; border: 0; outline: none; background: none; font-size: 15px; padding: 6px 0; min-width: 0; }
.cal-nl .nl-preview { font-size: 12.5px; color: var(--accent-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.cal-grid-wrap { flex: 1; min-height: 0; border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.tg-head { display: grid; border-bottom: 1px solid var(--line); flex: none; }
.tg-head .dh { padding: 8px 4px 6px; text-align: center; font-size: 12.5px; color: var(--ink-2); cursor: pointer; border-inline-start: 1px solid var(--line); }
.tg-head .dh .dn { display: block; font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.tg-head .dh.today .dn { color: var(--on-accent); background: var(--accent); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; margin: 2px auto 0; font-size: 17px; box-shadow: 0 6px 14px -6px var(--accent); }
.tg-head .dh.off .dn, .tg-head .dh.off { color: var(--pom); }
.tg-head .dh .hol { display: block; font-size: 10.5px; color: var(--pom); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-head .gutter, .tg-allday .gutter { font-size: 10.5px; color: var(--ink-3); display: grid; place-items: center; }
.tg-allday { display: grid; border-bottom: 1px solid var(--line); flex: none; max-height: 120px; overflow-y: auto; }
.tg-allday .ad { border-inline-start: 1px solid var(--line); padding: 3px; display: grid; gap: 2px; align-content: start; min-height: 28px; }
.tg-body { flex: 1; overflow-y: auto; position: relative; }
.tg-cols { display: grid; position: relative; }
.tg-hours { position: relative; }
.tg-hours .hl { height: var(--hh); font-size: 10.5px; color: var(--ink-3); text-align: end; padding-inline-end: 6px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.tg-col { position: relative; border-inline-start: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hh) - 1px), var(--line) calc(var(--hh) - 1px), var(--line) var(--hh)); touch-action: pan-y; }
.tg-col.off { background-color: color-mix(in srgb, var(--pom) 4%, transparent); }
.tg-col .work { position: absolute; inset-inline: 0; background: color-mix(in srgb, var(--glass-strong) 45%, transparent); pointer-events: none; }
.tg-col.drop-hover { background-color: var(--accent-soft); }
.now-line { position: absolute; inset-inline: 0; height: 2px; background: var(--pom); z-index: 6; pointer-events: none; }
.now-line::before { content: ""; position: absolute; inset-inline-start: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--pom); }
.ev { --c: var(--accent); position: absolute; z-index: 3; border-radius: calc(10px * var(--rk, 1)); padding: 3px 7px; font-size: 12px; line-height: 1.45; overflow: hidden; cursor: pointer; color: color-mix(in srgb, var(--c) 55%, var(--ink)); background: color-mix(in srgb, var(--c) 20%, var(--glass-solid)); border-inline-start: 3px solid var(--c); box-shadow: 0 6px 14px -10px var(--c); user-select: none; -webkit-user-select: none; touch-action: none; transition: box-shadow .15s; }
:root[data-theme="dark"] .ev { color: color-mix(in srgb, var(--c) 40%, #fff); background: color-mix(in srgb, var(--c) 26%, #161D40); }
.ev:hover { box-shadow: 0 8px 20px -8px var(--c); z-index: 4; }
.ev .et { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.ev .em { opacity: .8; font-size: 11px; font-variant-numeric: tabular-nums; }
.ev.pending { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, var(--glass-solid)) 0 6px, color-mix(in srgb, var(--c) 6%, var(--glass-solid)) 6px 12px); }
.ev.declined { opacity: .45; text-decoration: line-through; }
.ev.block { border-inline-start-style: dashed; }
.ev.dragging { opacity: .8; z-index: 20; box-shadow: var(--float); }
.ev .rz { position: absolute; bottom: 0; inset-inline: 0; height: 8px; cursor: ns-resize; }
.ev.ghost { background: var(--accent-soft); border: 1.5px dashed var(--accent); color: var(--accent-ink); z-index: 10; }
.busy { position: absolute; z-index: 2; border-radius: calc(8px * var(--rk, 1)); pointer-events: auto; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, transparent) 0 4px, transparent 4px 9px); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); font-size: 10.5px; color: var(--ink-2); overflow: hidden; padding: 2px 4px; }
.allday-chip { --c: var(--accent); display: flex; gap: 4px; align-items: center; font-size: 11.5px; padding: 1px 6px; border-radius: calc(7px * var(--rk, 1)); background: color-mix(in srgb, var(--c) 18%, transparent); color: color-mix(in srgb, var(--c) 60%, var(--ink)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border: 0; text-align: start; width: 100%; }
.allday-chip.task { background: var(--glass-strong); color: var(--ink); box-shadow: var(--raised-sm); }
.allday-chip .mini-check { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1.4px var(--ink-3); flex: none; }
.allday-chip.task.done .mini-check { background: var(--accent); box-shadow: none; }
.allday-chip.task.done { text-decoration: line-through; color: var(--ink-3); }
.lane-head { font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-inline-start: 1px solid var(--line); overflow: hidden; }
.lane-head span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.month-head { display: grid; grid-template-columns: repeat(7, 1fr); flex: none; }
.month-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); min-height: 0; overflow-y: auto; }
.month-head .wdh { padding: 8px; font-size: 12.5px; color: var(--ink-3); font-weight: 700; text-align: center; border-bottom: 1px solid var(--line); }
.mc { border-inline-start: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; min-height: 84px; overflow: hidden; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.mc.out { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.mc.out .dn { color: var(--ink-4); }
.mc .dn { font-size: 13.5px; font-weight: 700; display: flex; gap: 4px; align-items: center; }
.mc .dn .alt { font-size: 10.5px; color: var(--ink-3); font-weight: 500; }
.mc.today .dn b { background: var(--accent); color: var(--on-accent); border-radius: 50%; width: 24px; height: 24px; display: inline-grid; place-items: center; }
.mc.off .dn b { color: var(--pom); }
.mc.today.off .dn b { color: #fff; }
.mc .more { font-size: 11px; color: var(--ink-3); padding-inline-start: 4px; }
.mc.drop-hover { background: var(--accent-soft); }

.mini-cal .dp-grid button { height: 30px; font-size: 12.5px; }
.mini-cal .dp-grid button.has::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); transform: translateX(-50%); }
.mini-cal .dp-grid button.inrange { background: var(--accent-soft); }
.person-toggle { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: calc(10px * var(--rk, 1)); font-size: 13.5px; cursor: pointer; }
.person-toggle:hover { background: var(--line); }
.person-toggle input { accent-color: var(--accent); }
.person-toggle .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-task { display: flex; gap: 8px; align-items: center; padding: 7px 9px; border-radius: calc(12px * var(--rk, 1)); background: var(--glass-strong); box-shadow: var(--raised-sm); margin-bottom: 6px; font-size: 13.5px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.side-task .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-day { margin-bottom: 16px; }
.agenda-day h4 { margin: 0 0 6px; font-size: 14px; }
.slot { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: calc(14px * var(--rk, 1)); background: var(--glass); margin-bottom: 6px; }
.slot .grow { font-variant-numeric: tabular-nums; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.att-row .st { font-size: 12px; }
.st-accepted { color: var(--accent-ink); } .st-declined { color: var(--pom); } .st-tentative { color: var(--saffron-ink); } .st-pending { color: var(--ink-3); }
.conflict-note { font-size: 12.5px; padding: 8px 10px; border-radius: calc(12px * var(--rk, 1)); margin-top: 8px; }
.conflict-note.bad { background: var(--pom-soft); color: var(--pom); }
.conflict-note.good { background: var(--accent-soft); color: var(--accent-ink); }
.color-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.color-dots button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--c); box-shadow: var(--raised-sm); }
.color-dots button.on { box-shadow: 0 0 0 3px var(--glass-strong), 0 0 0 5px var(--c); }

/* ------------------------------------------------------- settings */
.settings { display: grid; grid-template-columns: 220px 1fr; gap: 24px; max-width: 1040px; margin: 0 auto; }
.settings-nav { display: grid; gap: 2px; align-content: start; position: sticky; top: 0; }
.panel { border-radius: var(--r-xl); padding: 22px 24px; margin-bottom: 18px; }
.panel h2 { margin: 0 0 4px; font-size: 18px; }
.panel h3 { margin: 22px 0 10px; font-size: 15px; }
.panel .desc { margin: 0 0 16px; color: var(--ink-3); font-size: 13.5px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.member-row .grow div:first-child { font-weight: 600; }
.member-row .grow div + div { font-size: 12.5px; color: var(--ink-3); }
.code { direction: ltr; text-align: left; font: 500 12.5px ui-monospace, Menlo, monospace; padding: 10px 12px; border-radius: calc(12px * var(--rk, 1)); background: var(--lapis); color: #BFF5EF; overflow-x: auto; white-space: pre; }
.notif-row { display: flex; gap: 12px; padding: 11px 12px; border-radius: calc(14px * var(--rk, 1)); cursor: pointer; align-items: flex-start; }
.notif-row:hover { background: var(--glass-strong); }
.notif-row.unread { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.notif-row .nt { font-size: 14px; line-height: 1.6; }
.notif-row .nb { font-size: 12.5px; color: var(--ink-2); }
.notif-row .nd { font-size: 11.5px; color: var(--ink-3); }

/* ----------------------------------------------------------- auth */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; overflow-y: auto; height: 100%; }
.auth-card { width: min(420px, 100%); border-radius: var(--r-xl); padding: 34px 30px 28px; box-shadow: var(--float); }
.auth-card .brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; text-align: center; }
.auth-card .brand img { width: 64px; height: 64px; filter: drop-shadow(0 12px 20px rgba(31, 181, 168, .35)); }
.auth-card .brand h1 { margin: 0; font-size: 26px; font-weight: 800; }
.auth-card .brand p { margin: 0; color: var(--ink-3); font-size: 14px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13.5px; gap: 10px; flex-wrap: wrap; }
.auth-links a, .link-btn { color: var(--accent-ink); cursor: pointer; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; }
.form-err { background: var(--pom-soft); color: var(--pom); padding: 9px 12px; border-radius: calc(12px * var(--rk, 1)); font-size: 13.5px; margin-bottom: 12px; }
.form-ok { background: var(--accent-soft); color: var(--accent-ink); padding: 9px 12px; border-radius: calc(12px * var(--rk, 1)); font-size: 13.5px; margin-bottom: 12px; }
.lang-pick { display: flex; justify-content: center; gap: 4px; margin-top: 18px; }

/* --------------------------------------------------------- mobile */
.tabbar, .fab, .m-top { display: none; }
@media (max-width: 1100px) { .cal-wrap { grid-template-columns: 1fr; } .cal-side { display: none; } }
@media (max-width: 860px) {
  body { overflow: hidden; }
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .app.show-home .sidebar { display: flex; position: fixed; inset: 0; margin: 0; border-radius: 0; z-index: 5; padding-bottom: calc(72px + var(--safe-b)); background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .app.show-home .sidebar .sb-foot { display: none; }
  .app.show-home .nav-item { padding: 10px 12px; font-size: 16px; }
  .app.show-home .sb-scroll .sb-core { background: var(--glass); border: 1px solid var(--glass-border); border-radius: calc(20px * var(--rk, 1)); padding: 6px; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
  .view { padding: 16px 16px calc(110px + var(--safe-b)); }
  .vh { margin-bottom: 14px; flex-wrap: wrap; }
  .vh-text { flex-basis: calc(100% - 60px); }
  .vh-actions { flex-basis: 100%; justify-content: flex-start; }
  .vh h1 { font-size: 26px; overflow-wrap: anywhere; }
  .vh-icon { width: 40px; height: 40px; border-radius: calc(14px * var(--rk, 1)); }
  .m-top { display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 0; }
  .m-top .grow { font-weight: 700; text-align: center; }
  .tabbar { display: flex; position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); height: 62px; border-radius: calc(22px * var(--rk, 1)); box-shadow: var(--float); justify-content: space-around; align-items: center; padding: 0 6px; }
  .tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10.5px; font-weight: 600; color: var(--ink-3); padding: 6px 8px; border-radius: calc(14px * var(--rk, 1)); position: relative; min-width: 56px; }
  .tabbar button svg { width: 22px; height: 22px; }
  .tabbar button.on { color: var(--accent-ink); }
  .tabbar .spacer { width: 64px; }
  .fab { display: grid; place-items: center; position: fixed; z-index: 31; bottom: calc(26px + var(--safe-b)); left: 50%; transform: translateX(-50%); width: 60px; height: 60px; border-radius: calc(22px * var(--rk, 1)); border: 0; color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 14px 28px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .3); }
  .fab svg { width: 28px; height: 28px; }
  .toasts { bottom: calc(96px + var(--safe-b)); }
  .sheet { inset: 0; width: 100%; top: 0; bottom: 0; border-radius: 0; animation: rise .22s ease; padding-top: env(safe-area-inset-top, 0px); }
  .modal { top: auto; bottom: 0; transform: translateX(-50%); width: 100%; max-height: 92vh; border-radius: calc(26px * var(--rk, 1)) 26px 0 0; padding-bottom: var(--safe-b); }
  .modal.cmdk { top: 0; bottom: auto; border-radius: 0 0 22px 22px; }
  .settings { grid-template-columns: 1fr; }
  /* a 3-column grid of tiles: everything visible, nothing to scroll sideways */
  .settings-nav { display: grid; grid-template-columns: repeat(3, 1fr); position: static; gap: 6px; }
  .settings-nav .nav-item { flex-direction: column; justify-content: center; gap: 3px; padding: 9px 4px; text-align: center; font-size: 12.5px; background: var(--glass); border: 1px solid var(--glass-border); }
  .settings-nav .nav-item .label { white-space: normal; line-height: 1.35; }
  .grid2 { grid-template-columns: 1fr; }
  .panel { padding: 18px 16px; }
  .cal-toolbar { gap: 8px; }
  .cal-toolbar h1 { font-size: 19px; min-width: 0; flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; }
  .cal-toolbar .seg button { padding: 5px 10px; }
  .view.wide { padding-inline: 0; }
  .view.wide > div > .vh, .view.wide > div > .td-notes { padding-inline: 16px; }
  .board { grid-auto-columns: 82vw; scroll-snap-type: x mandatory; padding-inline: 16px; scroll-padding-inline: 16px; }
  .board-col { scroll-snap-align: center; }
  .task .grip { display: none; }
  .td-title { font-size: 20px; }
}
@media (min-width: 861px) { .only-mobile { display: none !important; } }
@media (max-width: 860px) { .only-desktop { display: none !important; } }

/* -------------------------------------------------------- loading */
.boot { height: 100%; display: grid; place-items: center; }
.boot img { width: 64px; height: 64px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.9) rotate(22.5deg); opacity: .7; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Mixed-language teams: let each title pick its own direction (Persian titles in an English UI and vice versa). */
.t-title, .ev .et, .allday-chip, .nav-item .label, .sb-group-title .grow, .person-toggle .grow, .pc-title, .today-event .grow, .side-task .grow, .notif-row .nt, .comment .bubble, .menu-item .grow, .card .t-title, .td-title, .chip { unicode-bidi: plaintext; }
/* …but keep them aligned with the interface, next to their checkbox / icon, instead of jumping to the far side. */
:root[dir="rtl"] :is(.t-title, .ev .et, .allday-chip, .nav-item .label, .sb-group-title .grow, .person-toggle .grow, .pc-title, .today-event .grow, .side-task .grow, .notif-row .nt, .menu-item .grow, .card .t-title, .td-title) { text-align: right; }
:root[dir="ltr"] :is(.t-title, .ev .et, .allday-chip, .nav-item .label, .sb-group-title .grow, .person-toggle .grow, .pc-title, .today-event .grow, .side-task .grow, .notif-row .nt, .menu-item .grow, .card .t-title, .td-title) { text-align: left; }
@media (max-width: 860px) {
  .view.wide .cal-main { padding-inline: 12px; }
}

/* ------------------------------------------------- team dashboard */
.ic-team { color: #9B5DE5; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 22px; }
.kpi { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); }
.kpi-ic { width: 40px; height: 40px; border-radius: calc(14px * var(--rk, 1)); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); box-shadow: var(--raised-sm); flex: none; }
.kpi.bad .kpi-ic { background: var(--pom-soft); color: var(--pom); }
.kpi.warn .kpi-ic { background: var(--saffron-soft); color: var(--saffron-ink); }
.kpi.good .kpi-ic { background: rgba(67, 170, 139, .16); color: #2E8A6E; }
.kpi-n { font-size: 24px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-l { font-size: 12.5px; color: var(--ink-3); }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 22px; }
.person-card { border-radius: var(--r-lg); padding: 14px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.person-card:hover { transform: translateY(-2px); box-shadow: var(--float); }
.pc-top { display: flex; align-items: center; gap: 10px; }
.pc-name { font-weight: 700; }
.pc-sub { font-size: 12.5px; color: var(--ink-3); }
.load { height: 8px; border-radius: calc(99px * var(--rk, 1)); background: var(--line); box-shadow: var(--inset); margin: 12px 0 10px; overflow: hidden; }
.load i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--c, var(--accent)), color-mix(in srgb, var(--c, var(--accent)) 60%, #fff)); min-width: 4px; }
.pc-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; }
.pc-stats .st b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.pc-stats .st span { display: block; font-size: 10.5px; color: var(--ink-3); line-height: 1.3; }
.proj-progress { display: grid; gap: 8px; margin-bottom: 22px; }
.pp-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: calc(16px * var(--rk, 1)); background: var(--glass); border: 1px solid var(--glass-border); cursor: pointer; }
.pp-row:hover { background: var(--glass-strong); }
.pp-name { font-weight: 600; font-size: 14.5px; unicode-bidi: plaintext; }
.pp-bar { height: 5px; border-radius: calc(99px * var(--rk, 1)); background: var(--line); margin-top: 6px; overflow: hidden; }
.pp-bar i { display: block; height: 100%; border-radius: inherit; }
.pp-meta { display: flex; align-items: center; gap: 8px; flex: none; }
.feed { border-radius: var(--r-lg); padding: 6px; margin-bottom: 30px; }
.feed-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: calc(12px * var(--rk, 1)); font-size: 14px; cursor: pointer; }
.feed-row:hover { background: var(--glass-strong); }
.feed-row .avatar { margin-top: 2px; }
.feed-task { color: var(--accent-ink); unicode-bidi: plaintext; }
.feed-quote { margin-top: 4px; padding: 6px 10px; border-radius: calc(10px * var(--rk, 1)); background: var(--line); color: var(--ink-2); font-size: 13px; unicode-bidi: plaintext; }
.nowrap { white-space: nowrap; }
@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi-n { font-size: 20px; }
  .pp-meta .muted { display: none; }
}

/* calendar side column as a drawer on tablets and phones */
.side-toggle { display: none; }
@media (max-width: 1100px) {
  .side-toggle { display: inline-grid; }
  .cal-wrap .cal-side { display: flex; position: fixed; z-index: 45; top: 12px; bottom: 12px; inset-inline-start: 12px; width: min(320px, calc(100vw - 40px)); padding: 12px; border-radius: var(--r-xl);
    background: var(--glass-strong); border: 1px solid var(--glass-border); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--float);
    transform: translateX(calc(-100% - 24px)); visibility: hidden; transition: transform .25s cubic-bezier(.2, .9, .3, 1), visibility .25s; }
  :root[dir="rtl"] .cal-wrap .cal-side { transform: translateX(calc(100% + 24px)); }
  .cal-wrap.side-open .cal-side, :root[dir="rtl"] .cal-wrap.side-open .cal-side { transform: none; visibility: visible; }
}
@media (max-width: 860px) {
  .cal-wrap .cal-side { bottom: calc(84px + var(--safe-b)); }
}

/* settings: never let long links / rows widen the page on phones */
.settings > * { min-width: 0; }
.set-part + .set-part { margin-top: 26px; }
.set-part { scroll-margin-top: 12px; }
.code { max-width: 100%; overflow-x: auto; }
@media (max-width: 860px) {
  .panel .row { flex-wrap: wrap; }
  .panel .row > .input { flex: 1 1 180px; min-width: 0; }
  .member-row .grow { min-width: 0; }
  .member-row .grow .ltr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* "plain" backdrop: no colored blobs */
.no-ambient .ambient { display: none; }
/* theme picker */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { width: 34px; height: 34px; border-radius: calc(12px * var(--rk, 1)); border: 0; background: var(--c); box-shadow: var(--raised-sm); cursor: pointer; position: relative; }
.swatch.on::after { content: ""; position: absolute; inset: -4px; border-radius: calc(15px * var(--rk, 1)); border: 2px solid var(--c); }
.swatch.custom { background: conic-gradient(#E2445C, #F2A93B, #43AA8B, #2E8FE6, #9B5DE5, #E2445C); overflow: hidden; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.backdrops { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.bd { border: 2px solid transparent; border-radius: calc(16px * var(--rk, 1)); padding: 0; overflow: hidden; background: var(--glass); cursor: pointer; text-align: center; font-size: 12.5px; color: var(--ink-2); }
.bd.on { border-color: var(--accent); }
.bd i { display: block; height: 54px; }
.bd span { display: block; padding: 5px 0; }
.theme-preview { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

/* ------------------------------------------------- AI planner */
.ic-ai { color: #9B5DE5; }
.ai-nav { width: 100%; border: 0; background: linear-gradient(135deg, color-mix(in srgb, #9B5DE5 14%, transparent), color-mix(in srgb, var(--accent) 12%, transparent)); margin-bottom: 8px; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.ai-text { font-size: 15.5px; min-height: 120px; }
.ai-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-examples .chip { cursor: pointer; border: 0; }
.ai-project { display: grid; gap: 8px; margin-bottom: 12px; padding: 12px; border-radius: calc(16px * var(--rk, 1)); background: var(--accent-soft); }
.ai-list { display: grid; gap: 8px; }
.ai-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: calc(16px * var(--rk, 1)); background: var(--glass); border: 1px solid var(--glass-border); }
.ai-row.off { opacity: .45; }
.ai-row > input[type=checkbox] { margin-top: 6px; width: 18px; height: 18px; accent-color: var(--accent); }
.ai-title { width: 100%; border: 0; background: none; outline: none; font: 600 15px/1.6 var(--font); color: var(--ink); padding: 2px 0; unicode-bidi: plaintext; }
.ai-notes { font-size: 13px; color: var(--ink-2); margin: 2px 0 4px; white-space: pre-wrap; }
.ai-cl { margin: 2px 0 6px; padding-inline-start: 18px; font-size: 13px; color: var(--ink-2); }
.ai-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ai-meta .chip { cursor: pointer; border: 0; font: inherit; font-size: 12.5px; }

/* ------------------------------------------------- admin panel */
.ic-admin { color: var(--indigo); }
.admin-tabs { display: flex; gap: 4px; padding: 5px; border-radius: calc(18px * var(--rk, 1)); margin-bottom: 18px; overflow-x: auto; }
.admin-tabs button { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 9px 16px; border-radius: calc(14px * var(--rk, 1)); font: inherit; font-weight: 600; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.admin-tabs button.on { background: var(--glass-strong); color: var(--accent-ink); box-shadow: var(--raised-sm); }
.admin-view { max-width: 1100px; }
.admin-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.admin-bar .input { flex: 1 1 220px; width: auto; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.admin-grid .panel { margin: 0; }
.kpi-s { font-size: 11.5px; color: var(--accent-ink); margin-top: 2px; }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; padding-top: 6px; }
.mini-bars i { flex: 1; border-radius: calc(6px * var(--rk, 1)) 6px 3px 3px; min-height: 4px; opacity: .85; }
.status-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.status-row:last-of-type { border-bottom: 0; }
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.company-card { border-radius: var(--r-lg); padding: 14px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.company-card:hover { transform: translateY(-2px); box-shadow: var(--float); }
.cc-top { display: flex; align-items: center; gap: 10px; }
.cc-logo { width: 38px; height: 38px; border-radius: calc(13px * var(--rk, 1)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; flex: none; box-shadow: var(--raised-sm); }
.cc-logo.lg { width: 54px; height: 54px; border-radius: calc(18px * var(--rk, 1)); font-size: 24px; }
.cc-name { font-weight: 700; unicode-bidi: plaintext; }
.cc-sub { font-size: 12.5px; color: var(--ink-3); }
.cc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; margin: 12px 0 8px; text-align: center; }
.cc-stats b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.cc-stats span { font-size: 11.5px; color: var(--ink-3); }
.cc-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 8px; }
.cc-foot svg { width: 14px; height: 14px; vertical-align: -2px; }
.chip.st-active { background: rgba(67, 170, 139, .16); color: #2E8A6E; }
.chip.st-suspended { background: var(--pom-soft); color: var(--pom); }
.chip.st-expired { background: var(--saffron-soft); color: var(--saffron-ink); }
.member-row.dim { opacity: .55; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.check-item { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: calc(12px * var(--rk, 1)); background: var(--glass); cursor: pointer; }
.check-item input { accent-color: var(--accent); }
@media (max-width: 860px) {
  .admin-tabs button span { display: none; }
  .admin-tabs button.on span { display: inline; }
}
.status-row .chip { white-space: normal; max-width: 60%; text-align: center; }
@media (max-width: 860px) { .company-head .row { flex-wrap: wrap; } .company-head .cc-stats { grid-template-columns: repeat(2, 1fr); } }

/* ------------------------------------------- wave 1: accounts & companies */
.auth-title { margin: 0 0 14px; font-size: 19px; font-weight: 800; text-align: center; }
.auth-tabs { display: flex; width: 100%; margin-bottom: 16px; }
.auth-tabs button { flex: 1; justify-content: center; }
.auth-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: calc(14px * var(--rk, 1)); background: var(--accent-soft); margin-bottom: 14px; font-size: 13.5px; }
.auth-step > svg { width: 22px; height: 22px; color: var(--accent-ink); flex: none; margin-top: 2px; }
.auth-step b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.input.big { font-size: 20px; padding: 13px 15px; letter-spacing: .04em; text-align: center; }
.otp-input { font-size: 26px; letter-spacing: .5em; text-align: center; font-weight: 700; padding: 12px; font-variant-numeric: tabular-nums; }
.otp-input::placeholder { letter-spacing: .4em; }
button.loading, .btn.loading { position: relative; color: transparent !important; pointer-events: none; }
button.loading::after, .btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--on-accent) transparent var(--on-accent) transparent; animation: spin .8s linear infinite; }
.btn:not(.primary).loading::after { border-color: var(--accent) transparent var(--accent) transparent; }
.flip-ltr { transform: scaleX(-1); }
[dir="rtl"] .flip-ltr { transform: none; }
.avatar.has-img { padding: 0; overflow: hidden; background: var(--glass-strong); }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chip.warn { background: var(--saffron-soft); color: var(--saffron-ink); }
.err-text { color: var(--pom); }
.select.sm { width: auto; padding: 6px 30px 6px 10px; font-size: 13.5px; border-radius: calc(11px * var(--rk, 1)); }
[dir="rtl"] .select.sm { padding: 6px 10px 6px 30px; }
.member-row.wrap { flex-wrap: wrap; }
.member-row .ic, .dev-ic { width: 36px; height: 36px; border-radius: calc(12px * var(--rk, 1)); display: grid; place-items: center; background: var(--glass-strong); box-shadow: var(--raised-sm); color: var(--ink-2); flex: none; }
.dev-ic svg, .member-row .ic svg { width: 19px; height: 19px; }
.lock-ic { width: 12px; height: 12px; opacity: .55; vertical-align: -1px; }
.sb-group-title button { position: relative; }
.mini-dot { position: absolute; top: 0; inset-inline-end: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--pom); }
.sb-group-title:has(.mini-dot) button:has(.mini-dot) { opacity: 1; }
.admin-tabs .count { font-size: 11px; padding: 0 6px; border-radius: calc(8px * var(--rk, 1)); background: var(--pom); color: #fff; line-height: 1.6; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.chips-row .chip { cursor: pointer; padding: 4px 11px; font-size: 13px; }
.chips-row .dot { width: 8px; height: 8px; border-radius: 50%; }

.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 18px; }
.role-card { border-radius: var(--r-lg); padding: 14px 15px; text-align: start; font: inherit; color: inherit; transition: transform .15s, box-shadow .15s; }
.role-card:hover { box-shadow: var(--raised-sm); }
.role-card.add { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 110px; border: 2px dashed var(--line); background: transparent; color: var(--ink-3); font-weight: 600; cursor: pointer; }
.role-card.add:hover { color: var(--accent-ink); border-color: var(--accent); }
.rc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rc-head .dot { width: 10px; height: 10px; border-radius: 4px; flex: none; }
.rc-head b { font-size: 15.5px; }
.perm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; color: var(--ink-2); }
.perm-list li { display: flex; gap: 6px; align-items: center; }
.perm-list svg { width: 14px; height: 14px; color: var(--accent); flex: none; }
.perm-edit .switch-row { padding: 9px 0; border-bottom: 1px solid var(--line); }
.switch-row.dim { opacity: .5; }

.join-code { display: flex; align-items: center; gap: 10px; }
.join-code > span { font-size: 30px; font-weight: 800; letter-spacing: .18em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; padding: 6px 16px; border-radius: calc(14px * var(--rk, 1)); background: var(--glass-strong); box-shadow: var(--inset); color: var(--accent-ink); }
.join-input { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.invite-card, .company-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); margin-bottom: 10px; color: inherit; text-decoration: none; }
.company-row:hover { box-shadow: var(--raised-sm); }
.company-row > svg, .invite-card > svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); margin-bottom: 14px; color: var(--accent-ink); text-decoration: none; font-weight: 600; background: var(--accent-soft); }
.banner svg { width: 18px; height: 18px; flex: none; }

.audit-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.audit-row:last-child { border-bottom: 0; }
.audit-ic { width: 30px; height: 30px; border-radius: calc(10px * var(--rk, 1)); display: grid; place-items: center; background: var(--glass-strong); color: var(--ink-3); flex: none; }
.audit-ic svg { width: 15px; height: 15px; }

.twofa-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: var(--r-lg); text-align: start; font: inherit; color: inherit; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.choice:hover:not(:disabled) { box-shadow: var(--raised-sm); transform: translateY(-1px); }
.choice:disabled { opacity: .5; cursor: not-allowed; }
.choice > svg { width: 24px; height: 24px; color: var(--accent-ink); margin-bottom: 4px; }
.steps { margin: 0 0 14px; padding-inline-start: 22px; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.totp-setup { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.qr-box { width: 172px; height: 172px; padding: 10px; border-radius: calc(16px * var(--rk, 1)); background: #fff; box-shadow: var(--raised-sm); flex: none; display: grid; place-items: center; }
.qr-box svg { width: 100%; height: 100%; }
.backup-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-bottom: 14px; }
.backup-codes code { padding: 8px; border-radius: calc(10px * var(--rk, 1)); background: var(--glass-strong); box-shadow: var(--inset); text-align: center; font-size: 15px; letter-spacing: .08em; }

.sub-panel { margin: 12px 0; padding: 12px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--glass-strong) 55%, transparent); box-shadow: var(--inset); }
.sub-panel h3 { margin-top: 0; }
.sms-log { margin-top: 16px; }
.sms-log summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.sms-log summary svg { width: 16px; height: 16px; }
.sms-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sms-row > span:first-child svg { width: 16px; height: 16px; color: var(--accent); }
.sms-row.bad > span:first-child svg { color: var(--pom); }
.sms-row .small { overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .join-code > span { font-size: 24px; }
  .member-row.wrap .select.sm { flex: 1 1 40%; }
}

/* =================================================== appearance (v2.2) */
/* text size: the whole interface scales */
:root.look-zoom body { zoom: var(--zoom); }
/* corners */
:root.look-r-sharp { --rk: .4; }
:root.look-r-round { --rk: 1.4; }
/* glass strength */
:root.look-g-solid { --glass: #F4F7FB; --glass-strong: #FBFCFE; --blur: none; }
:root.look-g-solid[data-theme="dark"] { --glass: #161D40; --glass-strong: #1B2350; }
:root.look-g-light { --glass: rgba(255, 255, 255, .7); --glass-strong: rgba(250, 252, 255, .9); --blur: blur(12px) saturate(1.2); }
:root.look-g-light[data-theme="dark"] { --glass: rgba(24, 31, 66, .74); --glass-strong: rgba(22, 29, 62, .92); }
:root.look-g-strong { --glass: rgba(255, 255, 255, .34); --glass-strong: rgba(250, 252, 255, .66); --blur: blur(38px) saturate(1.9); }
:root.look-g-strong[data-theme="dark"] { --glass: rgba(30, 38, 80, .32); --glass-strong: rgba(26, 33, 70, .7); }
:root.look-g-solid .ambient { opacity: .35; }
/* density */
:root.look-d-compact .task { padding-block: 4px; }
:root.look-d-compact .task .t-title { font-size: 14px; line-height: 1.45; }
:root.look-d-compact .nav-item { padding-block: 4px; font-size: 14px; }
:root.look-d-compact .section-title { margin-top: 20px; }
:root.look-d-compact .panel { padding: 16px 18px; margin-bottom: 12px; }
:root.look-d-compact .view { padding-top: 20px; }
:root.look-d-comfy .task { padding-block: 12px; }
:root.look-d-comfy .task .t-title { font-size: 16px; }
:root.look-d-comfy .nav-item { padding-block: 10px; }
:root.look-d-comfy .section-title { margin-top: 38px; }
:root.look-d-comfy .panel { padding: 26px 28px; }
/* high contrast preset */
:root.look-contrast { --ink: #000; --ink-2: #1A1A1A; --ink-3: #3D3D3D; --line: rgba(0, 0, 0, .22); --line-2: rgba(0, 0, 0, .35); --glass-border: rgba(0, 0, 0, .25); }
:root.look-contrast[data-theme="dark"] { --ink: #fff; --ink-2: #EDEDED; --ink-3: #C8C8C8; --line: rgba(255, 255, 255, .3); --line-2: rgba(255, 255, 255, .45); --glass-border: rgba(255, 255, 255, .35); }
:root.look-contrast .glass, :root.look-contrast .glass-strong { border-width: 1.5px; }
:root.look-contrast :focus-visible { outline-width: 3px; }

/* sidebar: brand, logos, pins, customize */
.brand-logo.co { border-radius: calc(10px * var(--rk, 1)); object-fit: cover; }
.brand-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-name .bn-co { font-size: 16.5px; }
.brand-name .bn-app { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
img.ws-logo { width: 16px; height: 16px; border-radius: 5px; object-fit: cover; flex: none; }
.sb-group.pins .sb-group-title { cursor: default; }
.nav-item.nav-edit { color: var(--ink-3); font-size: 13px; opacity: 0; transition: opacity .2s; }
.sb-core:hover .nav-edit, .nav-edit:focus-visible, .app.show-home .nav-edit { opacity: 1; }
.nav-item.nav-edit svg { width: 15px; height: 15px; }
.ic-dash { color: var(--accent); }
.tabbar button .tl { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sortable lists */
.sort-list { display: grid; gap: 6px; }
.sort-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: calc(13px * var(--rk, 1)); background: var(--glass); border: 1px solid var(--glass-border); }
.sort-item.off { opacity: .5; }
.sort-item .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sort-handle { display: grid; place-items: center; cursor: grab; color: var(--ink-3); touch-action: none; padding: 4px; margin: -4px; border-radius: 8px; }
.sort-handle:hover { background: var(--line); color: var(--ink); }
.sort-lifted { box-shadow: var(--float) !important; opacity: .96; cursor: grabbing; background: var(--glass-strong) !important; }
.sort-ph { visibility: hidden; }

/* appearance settings */
.seg.wide { display: flex; flex-wrap: wrap; }
.seg.wide button { flex: 1; justify-content: center; padding: 7px 10px; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.preset { border: 2px solid transparent; background: var(--glass); border-radius: var(--r-md); padding: 8px; display: grid; gap: 6px; text-align: center; font-weight: 600; font-size: 13px; color: var(--ink-2); box-shadow: var(--raised-sm); }
.preset.on { border-color: var(--accent); color: var(--ink); }
.preset .pv { display: flex; height: 40px; border-radius: calc(10px * var(--rk, 1)); overflow: hidden; }
.preset .pv i { flex: 1; }
.look-preview { margin-top: 16px; padding: 14px; border-radius: var(--r-lg); }
.task-like { display: flex; gap: 10px; align-items: center; }
.task-like .check { width: 20px; height: 20px; display: inline-grid; place-items: center; }
.avatar.xl { width: 72px; height: 72px; font-size: 24px; }
.avatar-edit { position: relative; border: 0; background: none; padding: 0; border-radius: 50%; flex: none; }
.avatar-edit .ae-ic { position: absolute; inset-inline-end: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 3px var(--glass-strong); }
.avatar-edit .ae-ic svg { width: 14px; height: 14px; }
.profile-head h2 { margin: 0; }

/* mobile tab picker */
.tab-preview { display: flex; align-items: center; justify-content: space-around; padding: 8px; border-radius: calc(20px * var(--rk, 1)); background: var(--glass-strong); box-shadow: var(--raised-sm); margin-bottom: 12px; max-width: 420px; }
.tab-preview .tp { display: grid; justify-items: center; gap: 1px; color: var(--ink-2); min-width: 54px; }
.tab-preview .tp small { font-size: 10.5px; font-weight: 600; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fab-dot { width: 40px; height: 40px; border-radius: calc(15px * var(--rk, 1)); display: grid; place-items: center; color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.tab-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-opt { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--glass); padding: 6px 12px; border-radius: 99px; font-size: 13.5px; position: relative; }
.tp-opt svg { width: 16px; height: 16px; }
.tp-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.tp-opt:disabled { opacity: .45; cursor: not-allowed; }
.tp-opt .tp-n { font-size: 10.5px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }

/* company brand */
img.cc-logo.img { width: 46px; height: 46px; border-radius: 16px; object-fit: cover; }
.logo-box { width: 84px; height: 84px; border-radius: calc(22px * var(--rk, 1)); overflow: hidden; display: grid; place-items: center; background: var(--glass-strong); box-shadow: var(--raised-sm); flex: none; }
.logo-box img { width: 100%; height: 100%; object-fit: cover; }
.bp { display: flex; gap: 14px; flex-wrap: wrap; }
.bp-side { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-md); background: var(--glass-strong); box-shadow: var(--raised-sm); min-width: 200px; }
.bp-side img, .bp-side .cc-logo { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; }
.bp-side small { display: block; color: var(--ink-3); font-size: 11.5px; }
.bp-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bp-btn { padding: 8px 16px; border-radius: 13px; color: #fff; font-weight: 700; background: var(--bc); box-shadow: 0 10px 20px -10px var(--bc); }
.bp-chip { padding: 3px 12px; border-radius: 99px; font-size: 13px; background: color-mix(in srgb, var(--bc) 16%, transparent); color: color-mix(in srgb, var(--bc) 70%, #000); }
.bp-check { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--bc); }
.bp-check svg { width: 14px; height: 14px; }

/* dashboard */
.dash-view { max-width: 1100px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.dw { border-radius: var(--r-lg); padding: 14px 16px; min-height: 120px; box-shadow: var(--raised-sm); }
.dw.full { grid-column: 1 / -1; }
.dw-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dw-head h3 { margin: 0; font-size: 15px; }
.dw-ic { width: 30px; height: 30px; border-radius: calc(10px * var(--rk, 1)); display: grid; place-items: center; background: var(--glass-strong); box-shadow: var(--raised-sm); }
.dw-ic svg { width: 16px; height: 16px; }
.dw-count { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.dw-grip { cursor: grab; color: var(--ink-3); touch-action: none; display: grid; padding: 4px; margin: -4px; }
.dash-view.editing .dw { outline: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.dw-empty { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13.5px; margin: 10px 0; }
.dw-empty svg { width: 16px; height: 16px; }
.dw-tasks .task { margin: 0 -8px; }
.dw-more { border: 0; background: none; color: var(--accent-ink); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; padding: 6px 0 0; }
.dw-more svg { width: 14px; height: 14px; }
.dw-people { display: grid; gap: 6px; }
.dw-person { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dw-projects { display: grid; gap: 4px; }
.dw-proj { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px 4px; border-radius: 10px; text-align: start; font-size: 14px; }
.dw-proj:hover { background: var(--glass-strong); }
.dw-proj .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.dw-notif { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 6px 4px; border-radius: 10px; text-align: start; font-size: 13.5px; color: var(--ink-2); }
.dw-notif.unread { color: var(--ink); font-weight: 600; }
.dw-notif:hover { background: var(--glass-strong); }
.dw-notif .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-quick { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: var(--r-md); background: var(--glass-strong); box-shadow: var(--inset); flex-wrap: wrap; }
:root[dir="rtl"] .dw-quick { padding: 6px 12px 6px 6px; }
.dw-quick > svg { color: var(--accent); }
.dw-quick-in { flex: 1 1 200px; border: 0; background: none; outline: none; font-size: 15px; padding: 6px 0; min-width: 0; }
.dw-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dw-day { border: 0; background: var(--glass-strong); border-radius: calc(14px * var(--rk, 1)); padding: 8px 2px; display: grid; justify-items: center; gap: 2px; box-shadow: var(--raised-sm); min-width: 0; }
.dw-day.on { background: var(--accent); color: var(--on-accent); }
.dw-day.off .dd-n { color: var(--pom); }
.dw-day.on.off .dd-n { color: inherit; }
.dd-w { font-size: 11px; opacity: .8; }
.dd-n { font-size: 18px; font-weight: 800; }
.dd-c { display: flex; gap: 3px; min-height: 18px; }
.dd-c i { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 8px; line-height: 17px; }
.dd-c i.t { background: var(--saffron-soft); color: var(--saffron-ink); }
.dd-c i.e { background: var(--indigo-soft); color: var(--indigo); }
.dw-day.on .dd-c i { background: rgba(255, 255, 255, .25); color: inherit; }
.dw-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; text-align: center; }
.dw-kpis b { display: block; font-size: 20px; }
.dw-kpis span { font-size: 11.5px; color: var(--ink-3); }
.dw-kpis .bad b { color: var(--pom); } .dw-kpis .good b { color: #2E8A6E; }
.dw-load { display: grid; gap: 6px; }
.dw-lrow { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.dw-lrow .nm { width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-lrow .load { flex: 1; margin: 0; }
.dash-add { margin-top: 20px; }
.dash-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.dg-item { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; text-align: start; border: 1px dashed var(--line-2); background: var(--glass); border-radius: var(--r-md); padding: 10px 12px; }
.dg-item .dg-ic { grid-row: span 2; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--glass-strong); }
.dg-item span:last-child { font-size: 12px; color: var(--ink-3); }
.dg-item:hover { border-color: var(--accent); }
@media (max-width: 860px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dw-week { gap: 4px; }
  .dd-n { font-size: 15px; }
}

/* landing editor */
.ld-bar { position: sticky; top: -10px; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r-lg); margin-bottom: 14px; box-shadow: var(--float); font-size: 13.5px; color: var(--ink-2); }
.ld-bar.dirty { box-shadow: var(--float), 0 0 0 2px var(--accent) inset; }
.ld-sec.off > :not(:first-child) { opacity: .45; }
.ld-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.ld-img { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r-md); background: var(--glass); margin-top: 12px; }
.ld-thumb { width: 120px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--line); display: grid; place-items: center; flex: none; }
.ld-thumb.tall { width: 60px; height: 76px; }
.ld-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ld-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ld-feat { display: grid; gap: 8px; align-content: start; padding: 12px; border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--glass-border); }
.ld-icons { display: flex; flex-wrap: wrap; gap: 4px; }
.ld-icons button { border: 0; background: var(--glass-strong); width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-3); }
.ld-icons button.on { background: var(--accent); color: var(--on-accent); }
.ld-icons svg { width: 15px; height: 15px; }
.ld-row { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.ld-row .input { flex: 1; min-width: 0; }
@media (max-width: 860px) { .ld-row { flex-wrap: wrap; } .ld-row .input { flex-basis: 40%; } }

/* =================================================== stage 3: work tools */
.ic-req { color: #2E8FE6; } .ic-notes { color: #9B5DE5; } .ic-search { color: var(--indigo); } .ic-tpl { color: #F3722C; } .ic-timeline { color: #43AA8B; } .ic-trash { color: var(--ink-3); } .ic-done { color: var(--accent); }
.only-wide { } @media (max-width: 1100px) { .only-wide { display: none; } }
.chip.warn { background: var(--saffron-soft); color: var(--saffron-ink); }
.icon-btn.on { color: var(--accent-ink); }

/* rows: selection, subtasks, blocked, timer */
.task.selecting .body { cursor: default; }
.task.picked { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.selbox { width: 22px; height: 22px; flex: none; margin-top: 1px; border-radius: calc(7px * var(--rk, 1)); border: 0; padding: 0; display: grid; place-items: center; color: transparent; background: var(--glass-strong); box-shadow: inset 0 0 0 1.6px var(--ink-4); }
.selbox svg { width: 14px; height: 14px; stroke-width: 3; }
.task.picked .selbox, tr.picked .selbox { background: var(--accent); color: #fff; box-shadow: none; }
.task .meta .parent { color: var(--ink-2); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task .meta .ok { color: var(--accent-ink); }
.task .meta .running { color: var(--pom); font-weight: 700; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* bulk bar */
.bulk-host { position: fixed; z-index: 40; inset-inline: 0; bottom: 18px; display: flex; justify-content: center; pointer-events: none; padding: 0 12px; }
.bulk-bar { pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: calc(20px * var(--rk, 1)); box-shadow: var(--float); max-width: 100%; animation: rise .2s ease; }
@media (min-width: 861px) { .bulk-host { padding-inline-start: calc(var(--sidebar-w) + 12px); } }
.bb-count { display: flex; align-items: baseline; gap: 6px; padding: 0 8px; white-space: nowrap; font-size: 13.5px; color: var(--ink-2); }
.bb-count b { font-size: 18px; color: var(--accent-ink); }
.bb-acts { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.bb-act { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; padding: 5px 9px; border-radius: calc(12px * var(--rk, 1)); font-size: 11.5px; font-weight: 600; color: var(--ink-2); min-width: 54px; white-space: nowrap; }
.bb-act:hover { background: var(--line); color: var(--ink); }
.bb-act.danger { color: var(--pom); }
.app.has-bulk .view { padding-bottom: 170px; }
@media (max-width: 860px) { .bulk-host { bottom: calc(82px + var(--safe-b)); } .bb-count span { display: none; } .bb-act { min-width: 46px; padding: 5px 6px; } }

/* timer */
.timer-pill { display: flex; align-items: center; gap: 8px; margin: -2px 14px 10px; padding: 5px 6px 5px 12px; border-radius: calc(14px * var(--rk, 1)); background: color-mix(in srgb, var(--pom) 12%, var(--glass-strong)); box-shadow: var(--raised-sm); font-size: 13px; }
[dir="rtl"] .timer-pill { padding: 5px 12px 5px 6px; }
.tp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pom); animation: pulse 1.4s ease-in-out infinite; flex: none; }
.tp-title { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: start; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tp-clock { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--pom); }
.m-timer { display: none; }
@media (max-width: 860px) {
  .m-timer { display: block; padding: 6px 12px 0; }
  .m-timer:empty { display: none; }
  .m-timer .timer-pill { margin: 0 auto; max-width: 480px; }
}
.nav-extras { display: flex; gap: 2px; padding: 6px 6px 0; }
.nav-extras a, .nav-extras button { width: 32px; height: 30px; display: grid; place-items: center; border-radius: calc(9px * var(--rk, 1)); color: var(--ink-3); border: 0; background: none; }
.nav-extras a:hover, .nav-extras button:hover, .nav-extras a.on { background: var(--line); color: var(--ink); }
.nav-extras svg { width: 16px; height: 16px; }

/* task sheet parts */
.td-parent, .td-request { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--line); border-radius: calc(10px * var(--rk, 1)); padding: 3px 10px; font-size: 12.5px; color: var(--ink-2); margin: 2px 0 4px; text-decoration: none; max-width: 100%; }
.td-parent b, .td-request b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); }
.td-request { background: color-mix(in srgb, #2E8FE6 13%, transparent); }
.td-fields-link { margin: -6px 0 0; }
.sub-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sub-progress .bar { flex: 1; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.sub-progress .bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .3s; }
.sub-row, .dep-row { display: flex; align-items: center; gap: 9px; padding: 4px 0; }
.sub-row .check { width: 19px; height: 19px; } .sub-row .check svg { width: 11px; height: 11px; }
.sub-title { flex: 1; min-width: 0; border: 0; background: none; padding: 2px 0; text-align: start; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-title:hover { color: var(--accent-ink); }
.sub-row.done .sub-title, .dep-row.done .sub-title { color: var(--ink-3); text-decoration: line-through; }
.sub-who { border: 0; background: none; padding: 0; display: grid; }
.sub-add { display: flex; align-items: center; gap: 9px; padding: 4px 0; color: var(--ink-3); }
.sub-add span { width: 19px; display: grid; place-items: center; }
.sub-add input { flex: 1; border: 0; background: none; outline: none; font-size: 14.5px; padding: 3px 0; }
.dep-row svg { color: var(--ink-3); }
.dep-row .icon-btn { opacity: .5; }
.time-total { display: flex; align-items: center; gap: 7px; font-size: 15px; }
.time-total svg { color: var(--ink-3); }
.time-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line); }
.time-row:last-child { border-bottom: 0; }

/* custom fields */
.fld-list { display: grid; gap: 4px; }
.fld-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); background: color-mix(in srgb, var(--glass-strong) 60%, transparent); }
.fld-ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: calc(9px * var(--rk, 1)); background: var(--indigo-soft); color: var(--indigo); flex: none; }
.fld-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.fld-types button { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--r-sm); border: 0; background: var(--glass-strong); box-shadow: var(--raised-sm); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fld-types button.on { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-ink); }
.fld-types button:disabled { opacity: .35; }

/* table view */
.proj-wide { min-width: 0; }
.tbl-wrap { min-width: 0; }
.tbl-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.tbl-scroll { overflow-x: auto; border-radius: var(--r-lg); background: color-mix(in srgb, var(--glass) 70%, transparent); border: 1px solid var(--glass-border); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { position: sticky; top: 0; background: var(--glass-strong); text-align: start; font-weight: 700; font-size: 12.5px; color: var(--ink-2); padding: 9px 10px; white-space: nowrap; cursor: pointer; user-select: none; border-bottom: 1px solid var(--line-2); }
.tbl th.sorted { color: var(--accent-ink); }
.tbl th .th-ic { width: 13px; height: 13px; vertical-align: -2px; margin-inline: 2px; opacity: .7; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.tbl td.ed { cursor: pointer; }
.tbl td.ed:hover { background: var(--accent-soft); }
.tbl tr:hover td { background: color-mix(in srgb, var(--glass-strong) 50%, transparent); }
.tbl tr.picked td { background: var(--accent-soft); }
.tbl tr.done .tc-link { color: var(--ink-3); text-decoration: line-through; }
.tbl tfoot td { font-size: 12.5px; background: var(--glass-strong); border-bottom: 0; }
.tbl .tc-t { min-width: 220px; max-width: 420px; white-space: normal; }
.tc-title { display: flex; align-items: center; gap: 8px; }
.check.sm { width: 18px; height: 18px; margin: 0; } .check.sm svg { width: 11px; height: 11px; }
.tc-link { border: 0; background: none; padding: 0; text-align: start; font-weight: 600; font-size: 14px; color: var(--ink); }
.tc-link:hover { color: var(--accent-ink); }
.tc-lock { width: 13px; height: 13px; color: var(--saffron-ink); }
.tbl .late { color: var(--pom); font-weight: 700; }
.tc-sel { width: 38px; }

/* gantt */
.gantt { --gt-side: 230px; min-width: 0; }
.gt-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.seg.sm button { padding: 3px 10px; font-size: 12.5px; }
.gt-main { display: flex; border-radius: var(--r-lg); overflow: hidden; background: color-mix(in srgb, var(--glass) 70%, transparent); border: 1px solid var(--glass-border); }
.gt-side { width: var(--gt-side); flex: none; border-inline-end: 1px solid var(--line-2); background: color-mix(in srgb, var(--glass-strong) 70%, transparent); z-index: 2; }
.gt-side-head { height: 54px; display: flex; align-items: flex-end; padding: 0 12px 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); border-bottom: 1px solid var(--line-2); }
.gt-name { display: flex; align-items: center; gap: 7px; width: 100%; border: 0; background: none; text-align: start; font-size: 13.5px; padding-inline-end: 10px; border-bottom: 1px solid var(--line); min-width: 0; }
.gt-name:hover { background: var(--glass-strong); }
.gt-name.done .gt-label { color: var(--ink-3); text-decoration: line-through; }
.gt-label { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gt-scroll { flex: 1; overflow-x: auto; overflow-y: hidden; min-width: 0; }
.gt-head { position: relative; height: 54px; border-bottom: 1px solid var(--line-2); }
.gt-months, .gt-days { position: relative; height: 27px; }
.gt-month { position: absolute; top: 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; padding-inline-start: 6px; border-inline-start: 1px solid var(--line-2); }
.gt-day { position: absolute; top: 4px; text-align: center; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.gt-day.off { color: var(--pom); }
.gt-day.today { color: #fff; } .gt-day.today::before { content: ""; position: absolute; inset: -1px 4px; border-radius: 6px; background: var(--saffron); z-index: -1; }
.gt-body { position: relative; }
.gt-grid { position: absolute; inset-block: 0; inset-inline-start: 0; }
.gt-off { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--pom) 5%, transparent); }
.gt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--saffron); opacity: .75; }
.gt-lanes { position: relative; background-image: linear-gradient(to bottom, transparent 37px, var(--line) 37px); background-size: 100% 38px; }
.gt-bar { position: absolute; height: 24px; border-radius: calc(8px * var(--rk, 1)); background: color-mix(in srgb, var(--c) 30%, var(--glass-strong)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, transparent); cursor: grab; overflow: hidden; touch-action: none; user-select: none; display: flex; align-items: center; }
.gt-bar.done { opacity: .6; }
.gt-bar.late { box-shadow: inset 0 0 0 2px var(--pom); }
.gt-bar.moving { cursor: grabbing; box-shadow: var(--float), inset 0 0 0 2px var(--c); z-index: 3; }
.gt-prog { position: absolute; inset-block: 0; inset-inline-start: 0; background: color-mix(in srgb, var(--c) 55%, transparent); }
.gt-txt { position: relative; padding: 0 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.gt-h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.gt-h.s { inset-inline-start: 0; } .gt-h.e { inset-inline-end: 0; }
.gt-bar:hover .gt-h { background: color-mix(in srgb, var(--c) 40%, transparent); }
.gt-arrows { position: absolute; top: 0; left: 0; pointer-events: none; overflow: visible; }
.gt-arrows path { fill: none; stroke: var(--ink-3); stroke-width: 1.5; }
.gt-arrows path.hd { stroke-width: 1.8; }
.gt-unsched { margin-top: 10px; }
.gt-un-row { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .gantt { --gt-side: 130px; } .gt-tools { padding-inline: 16px; } .tbl-tools { padding-inline: 16px; } .gt-main, .tbl-scroll { border-radius: 0; border-inline: 0; } }

/* templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 8px 0 6px; }
.tpl-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--glass-strong) 75%, transparent); box-shadow: var(--raised-sm), inset 0 3px 0 var(--c); }
.tpl-top { display: flex; align-items: center; gap: 10px; }
.tpl-sum { min-height: 1.6em; }
.tpl-ic { width: 36px; height: 36px; border-radius: calc(11px * var(--rk, 1)); display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); flex: none; }
.tpl-name { font-weight: 700; font-size: 14.5px; }
.tpl-acts { display: flex; gap: 4px; align-items: center; margin-top: auto; }
.view-inner.wide-inner { max-width: none; }
.tpl-head { margin-bottom: 10px; padding: 8px; border-radius: var(--r-md); background: var(--line); }
.tpl-head .input { padding: 6px 10px; }

/* requests */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.form-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 0; text-align: start; border-radius: var(--r-lg); background: var(--glass-strong); box-shadow: var(--raised-sm); transition: transform .12s; }
.form-card:hover { transform: translateY(-2px); }
.fc-ic { width: 40px; height: 40px; border-radius: calc(13px * var(--rk, 1)); display: grid; place-items: center; background: color-mix(in srgb, var(--c, #5B6CF0) 16%, transparent); color: var(--c, #5B6CF0); flex: none; }
.fc-go { color: var(--ink-4); }
.rq-list { display: grid; gap: 6px; }
.rq-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; text-align: start; border-radius: var(--r-md); background: color-mix(in srgb, var(--glass-strong) 70%, transparent); }
.rq-row:hover { background: var(--glass-strong); box-shadow: var(--raised-sm); }
.rq-row.todo { box-shadow: inset 3px 0 0 var(--saffron); }
[dir="rtl"] .rq-row.todo { box-shadow: inset -3px 0 0 var(--saffron); }
.rq-row .fc-ic { width: 34px; height: 34px; }
.rq-title { font-weight: 600; }
.rq-status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: calc(10px * var(--rk, 1)); font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.rq-status svg { width: 14px; height: 14px; }
.rq-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; padding: 10px; border-radius: var(--r-md); background: var(--line); font-size: 13px; color: var(--ink-2); }
.rq-flow .sep { width: 14px; height: 14px; color: var(--ink-4); }
.rq-h { margin: 8px 0 2px; font-size: 21px; }
.rq-data { display: grid; gap: 2px; margin: 14px 0; padding: 8px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--glass) 60%, transparent); box-shadow: var(--inset); }
.rq-kv { display: flex; gap: 12px; padding: 6px 8px; font-size: 14px; }
.rq-kv > span { min-width: 120px; }
.rq-kv b { font-weight: 600; white-space: pre-wrap; }
.rq-timeline { position: relative; padding-inline-start: 4px; }
.rq-ev { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.rq-ev::before { content: ""; position: absolute; inset-inline-start: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line-2); }
.rq-ev:last-child::before { display: none; }
.rq-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--glass-strong); box-shadow: var(--raised-sm); color: var(--ink-3); }
.rq-dot svg { width: 15px; height: 15px; }
.rq-ev.ok .rq-dot { background: var(--accent); color: #fff; }
.rq-ev.no .rq-dot { background: var(--pom); color: #fff; }
.rq-ev.cur .rq-dot { background: var(--saffron); color: #fff; }
.rq-note { margin-top: 4px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--line); font-size: 13.5px; }
.rq-decide { margin-top: 16px; padding: 14px; border-radius: var(--r-lg); display: grid; gap: 10px; }
.chip-btn { border: 0; padding: 4px 11px; border-radius: calc(10px * var(--rk, 1)); background: var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chip-btn.on { background: var(--accent-soft); color: var(--accent-ink); }
.form-adm-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.form-adm-row:last-child { border-bottom: 0; }
.form-adm-row.off { opacity: .55; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick button { width: 36px; height: 36px; border-radius: calc(10px * var(--rk, 1)); border: 0; background: var(--glass-strong); box-shadow: var(--raised-sm); display: grid; place-items: center; color: var(--ink-2); }
.icon-pick button.on { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-ink); }
.fb-fields, .fb-steps { display: grid; gap: 8px; margin-bottom: 8px; }
.fb-row { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: var(--r-md); background: var(--line); }
.fb-row .sort-handle { padding-top: 10px; }
.fb-main { flex: 1; display: grid; gap: 6px; min-width: 0; }
.fb-main .input, .fb-main .select, .fb-step .select { padding: 7px 11px; font-size: 14px; }
.fb-step { display: flex; gap: 8px; align-items: center; }
.fb-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 13px; flex: none; }

/* notes / wiki */
.wiki { display: grid; grid-template-columns: 270px 1fr; gap: 18px; max-width: 1240px; margin: 0 auto; min-height: 100%; align-items: start; }
.wiki-side { border-radius: var(--r-xl); padding: 14px; position: sticky; top: 0; max-height: calc(100vh - 80px); overflow-y: auto; }
.wiki-side-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.wiki-side-head h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.input.sm { padding: 7px 11px; font-size: 13.5px; margin-bottom: 8px; }
.select.sm { padding: 6px 30px 6px 10px; font-size: 13px; width: auto; }
.wt-group { margin-top: 10px; }
.wt-head { display: flex; align-items: center; gap: 7px; padding: 4px 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.wt-head .dot { width: 8px; height: 8px; border-radius: 50%; }
.wt-head button, .wt-proj button { border: 0; background: none; color: var(--ink-3); padding: 2px; display: grid; border-radius: 6px; opacity: .6; }
.wt-head button:hover, .wt-proj button:hover { opacity: 1; background: var(--line); }
.wt-item { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: calc(10px * var(--rk, 1)); color: var(--ink); text-decoration: none; font-size: 14px; }
.wt-item .grow { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wt-item:hover { background: color-mix(in srgb, var(--glass-strong) 60%, transparent); }
.wt-item.on { background: var(--glass-strong); box-shadow: var(--raised-sm); font-weight: 600; }
.wt-ic { width: 20px; text-align: center; flex: none; }
.wt-proj { display: flex; align-items: center; gap: 6px; padding: 6px 8px 2px; font-size: 13px; font-weight: 600; }
.wt-proj a { flex: 1; display: flex; align-items: center; gap: 7px; color: var(--ink-2); text-decoration: none; }
.wiki-hit { display: block; padding: 7px 8px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.wiki-hit:hover { background: var(--line); }
.wiki-main { min-width: 0; }
.wiki-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 8px; }
.wiki-card { display: grid; gap: 2px; padding: 14px; border-radius: var(--r-lg); background: var(--glass-strong); box-shadow: var(--raised-sm); text-decoration: none; color: var(--ink); }
.wiki-card:hover { transform: translateY(-2px); }
.wc-ic { font-size: 22px; }
.wiki-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wiki-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-3); min-width: 0; }
.wiki-crumbs a { color: var(--ink-2); text-decoration: none; }
.wiki-crumbs .sep { color: var(--ink-4); }
.wiki-status { white-space: nowrap; }
.wiki-head { display: flex; align-items: center; gap: 10px; }
.wiki-icon { font-size: 34px; width: 54px; height: 54px; border-radius: calc(16px * var(--rk, 1)); border: 0; background: var(--glass-strong); box-shadow: var(--raised-sm); flex: none; line-height: 1; }
.wiki-title { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.01em; padding: 4px 0; }
.wiki-meta { margin: 6px 0 14px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.wiki-body { min-height: 200px; }
.wiki-edit { border-radius: var(--r-lg); background: color-mix(in srgb, var(--glass-strong) 75%, transparent); box-shadow: var(--inset); overflow: hidden; }
.wiki-tools { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 0; background: var(--glass-strong); }
.wiki-tools button { width: 32px; height: 30px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; color: var(--ink-2); flex: none; }
.wiki-tools button:hover { background: var(--line); color: var(--ink); }
.wiki-ta { width: 100%; min-height: 320px; border: 0; background: none; outline: none; resize: none; padding: 16px 18px; font-size: 15px; line-height: 1.9; overflow: hidden; }
.wiki-conflict { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 10px; border-radius: var(--r-md); background: var(--saffron-soft); color: var(--saffron-ink); }
.emoji-pick { display: grid; grid-template-columns: repeat(8, 34px); gap: 4px; padding: 8px; }
.emoji-pick button { border: 0; background: none; font-size: 20px; height: 34px; border-radius: 8px; }
.emoji-pick button:hover { background: var(--line); }
.md { font-size: 15.5px; line-height: 1.95; overflow-wrap: anywhere; }
.md h2 { font-size: 23px; margin: 22px 0 8px; } .md h3 { font-size: 19px; margin: 18px 0 6px; } .md h4 { font-size: 16px; margin: 14px 0 4px; }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 12px; padding-inline-start: 24px; }
.md li.cb { list-style: none; margin-inline-start: -22px; display: flex; gap: 9px; align-items: flex-start; cursor: pointer; }
.md .mdcb { width: 18px; height: 18px; border-radius: 6px; flex: none; margin-top: 6px; box-shadow: inset 0 0 0 1.6px var(--ink-4); background: var(--glass-strong); }
.md li.cb.on { color: var(--ink-3); text-decoration: line-through; }
.md li.cb.on .mdcb { background: var(--accent); box-shadow: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-size: 12px; background-position: center; background-repeat: no-repeat; }
.md blockquote { margin: 0 0 12px; padding: 8px 14px; border-inline-start: 3px solid var(--accent); background: var(--accent-soft); border-radius: 8px; }
.md code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88em; padding: 1px 6px; border-radius: 6px; background: var(--line); direction: ltr; unicode-bidi: isolate; }
.md pre { direction: ltr; text-align: left; padding: 12px 14px; border-radius: var(--r-md); background: var(--lapis); color: #E7EBF8; overflow-x: auto; }
.md pre code { background: none; padding: 0; color: inherit; }
.md table { border-collapse: collapse; margin: 0 0 14px; font-size: 14px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line-2); padding: 6px 10px; text-align: start; }
.md th { background: var(--line); }
.md hr { border: 0; border-top: 1px solid var(--line-2); margin: 18px 0; }
@media (max-width: 860px) {
  .wiki { grid-template-columns: 1fr; padding-inline: 16px; }
  .wiki-side { position: static; max-height: none; }
  .wiki.has-page .wiki-side { display: none; }
  .wiki:not(.has-page) .wiki-main { display: none; }
  .wiki-ta { padding: 12px; }
  .rq-kv > span { min-width: 90px; }
}

/* search & trash */
.search-bar { border-radius: var(--r-xl); padding: 12px 14px; margin-bottom: 16px; }
.search-bar .sq-ic { color: var(--ink-3); }
.search-q { flex: 1; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 5px 11px; border-radius: calc(11px * var(--rk, 1)); background: var(--glass-strong); box-shadow: var(--raised-sm); font-size: 13px; font-weight: 600; color: var(--ink-2); max-width: 260px; }
.fchip span:not(.x) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fchip svg { width: 15px; height: 15px; }
.fchip.on { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 40%, transparent); }
.fchip .x { display: grid; opacity: .7; }
.trash-list { padding: 6px 14px; }
.trash-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.trash-row:last-child { border-bottom: 0; }
.tr-ic { width: 36px; height: 36px; border-radius: calc(11px * var(--rk, 1)); display: grid; place-items: center; background: var(--line); color: var(--ink-2); flex: none; }

/* ======================================================= stage 4: chat */
.ic-chat { color: #2E8FE6; } .ic-ann { color: #F3722C; }
.view.chat-view { padding-top: 18px; padding-bottom: 18px; }
.chat { display: grid; grid-template-columns: 300px 1fr; gap: 14px; height: 100%; max-width: 1400px; margin: 0 auto; min-height: 0; }
.chat-side { border-radius: var(--r-xl); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ch-side-in { display: flex; flex-direction: column; min-height: 0; height: 100%; padding: 12px; }
.ch-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ch-head h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 6px; }
.ch-list { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 0 6px; scrollbar-width: thin; }
.ch-group { display: flex; align-items: center; gap: 6px; margin: 12px 4px 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.ch-group button { border: 0; background: none; color: var(--ink-3); padding: 2px; display: grid; border-radius: 6px; }
.ch-group button:hover { background: var(--line); color: var(--ink); }
.ch-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: calc(13px * var(--rk, 1)); text-decoration: none; color: var(--ink); }
.ch-item:hover { background: color-mix(in srgb, var(--glass-strong) 60%, transparent); }
.ch-item.on { background: var(--glass-strong); box-shadow: var(--raised-sm); }
.ch-item.muted { opacity: .7; }
.ch-ic { width: 32px; height: 32px; border-radius: calc(10px * var(--rk, 1)); display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--indigo)) 14%, transparent); color: var(--c, var(--indigo)); flex: none; }
.ch-ic svg { width: 17px; height: 17px; }
.ch-item .avatar.sm, .ch-item .avatar { width: 32px; height: 32px; }
.ch-txt { flex: 1; min-width: 0; }
.ch-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-last { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-item.unread .ch-name { font-weight: 800; } .ch-item.unread .ch-last { color: var(--ink-2); }
.ch-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.ch-time { font-size: 11px; color: var(--ink-3); }
.ch-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.ch-badge.at { background: var(--pom); }
.muted-ic { width: 14px; height: 14px; color: var(--ink-4); }
.chat-main { border-radius: var(--r-xl); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-empty { margin: auto; text-align: center; padding: 30px; max-width: 360px; }
.chat-empty .empty-ic { width: 76px; height: 76px; margin: 0 auto 12px; border-radius: calc(26px * var(--rk, 1)); display: grid; place-items: center; box-shadow: var(--raised); background: var(--glass-strong); }
.chat-empty .empty-ic svg { width: 34px; height: 34px; color: var(--ink-3); }
.chat-empty h2 { margin: 0 0 4px; }
.th-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.th-title { min-width: 0; } .th-title b { font-size: 16px; }
.th-title .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-scroll { flex: 1; overflow-y: auto; padding: 10px 14px; min-height: 0; overscroll-behavior: contain; }
.th-top { text-align: center; }
.th-day { text-align: center; margin: 14px 0 8px; }
.th-day span { font-size: 12px; color: var(--ink-3); background: var(--glass-strong); padding: 3px 12px; border-radius: 12px; box-shadow: var(--raised-sm); }
.th-empty { text-align: center; padding: 50px 20px; }
.th-empty .empty-ic { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 22px; display: grid; place-items: center; background: var(--glass-strong); box-shadow: var(--raised); }
.msg { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.msg.grouped { margin-top: 2px; }
.msg.mine { flex-direction: row-reverse; }
.msg-av { width: 34px; flex: none; }
.msg-main { max-width: min(76%, 640px); min-width: 0; display: flex; flex-direction: column; }
.msg.mine .msg-main { align-items: flex-end; }
.msg-who { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; margin: 0 4px 2px; }
.msg-row { display: flex; align-items: flex-start; gap: 4px; max-width: 100%; }
.msg.mine .msg-row { flex-direction: row-reverse; }
.msg-bubble { position: relative; padding: 7px 12px; border-radius: calc(16px * var(--rk, 1)); background: var(--glass-strong); box-shadow: var(--raised-sm); min-width: 0; font-size: 14.5px; line-height: 1.75; }
.msg.mine .msg-bubble { background: color-mix(in srgb, var(--accent) 16%, var(--glass-strong)); }
.msg.at-me .msg-bubble { box-shadow: var(--raised-sm), inset 0 0 0 1.5px var(--saffron); }
.msg-text { overflow-wrap: anywhere; unicode-bidi: plaintext; }
.msg-text a { word-break: break-all; }
.mention { color: var(--accent-ink); font-weight: 700; background: var(--accent-soft); border-radius: 6px; padding: 0 3px; }
.msg-reply { border-inline-start: 3px solid var(--accent); padding: 2px 8px; margin-bottom: 4px; font-size: 12.5px; background: var(--line); border-radius: 6px; display: grid; }
.msg-reply span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-edited { font-size: 11px; color: var(--ink-3); margin-inline-start: 6px; }
.msg-time { font-size: 10.5px; color: var(--ink-3); margin-inline-start: 8px; float: inline-end; margin-top: 6px; }
.msg-del { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.msg-acts { display: flex; gap: 0; opacity: 0; transition: opacity .15s; padding-top: 2px; }
.msg:hover .msg-acts { opacity: 1; }
@media (hover: none) { .msg-acts { display: none; } }
.msg.uploading { opacity: .6; }
.msg-img { display: block; margin: 4px 0; }
.msg-img img { max-width: 260px; max-height: 260px; border-radius: 10px; display: block; }
.msg-file, .bubble .msg-file { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin: 4px 0; border-radius: 10px; background: var(--line); color: var(--ink); text-decoration: none; font-size: 13.5px; min-width: 180px; }
.ap { display: flex; align-items: center; gap: 8px; min-width: 210px; padding: 4px 0; }
.ap-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 6px 14px -6px var(--accent); }
.ap-btn svg { width: 16px; height: 16px; }
.ap-bar { flex: 1; height: 6px; border-radius: 4px; background: var(--line-2); cursor: pointer; overflow: hidden; }
.ap-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.ap-time { font-size: 11.5px; color: var(--ink-3); min-width: 34px; font-variant-numeric: tabular-nums; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react { display: inline-flex; align-items: center; gap: 4px; border: 0; padding: 1px 8px; border-radius: 12px; background: var(--glass-strong); box-shadow: var(--raised-sm); font-size: 13px; }
.react.mine { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.react .rn { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.react-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 6px; }
.react-pick button { border: 0; background: none; font-size: 22px; height: 38px; border-radius: 10px; }
.react-pick button:hover { background: var(--line); transform: scale(1.12); }
.poll { min-width: 240px; display: grid; gap: 6px; }
.poll-q { display: flex; align-items: center; gap: 6px; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; border-radius: 10px; background: var(--line); overflow: hidden; text-align: start; font-size: 14px; color: var(--ink); }
.poll-opt i { position: absolute; inset-block: 0; inset-inline-start: 0; background: color-mix(in srgb, var(--accent) 22%, transparent); transition: width .3s; }
.poll-opt > *:not(i) { position: relative; }
.poll-opt.mine { box-shadow: inset 0 0 0 1.5px var(--accent); }
.poll-opt .po-check svg { width: 16px; height: 16px; color: var(--ink-3); }
.poll-opt.mine .po-check svg { color: var(--accent); }
.po-avs { display: flex; } .po-avs .avatar { margin-inline-start: -6px; box-shadow: 0 0 0 2px var(--glass-strong); }
.poll-opt:disabled { cursor: default; }
.th-compose { border-top: 1px solid var(--line); padding: 10px 12px; }
.th-row { display: flex; align-items: flex-end; gap: 6px; }
.th-input { flex: 1; min-width: 0; border: 0; outline: none; resize: none; max-height: 160px; padding: 9px 13px; border-radius: calc(16px * var(--rk, 1)); background: color-mix(in srgb, var(--glass-strong) 70%, transparent); box-shadow: var(--inset); font-size: 15px; line-height: 1.6; }
.send-btn { color: var(--accent-ink); }
.th-replying { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; }
.th-replying .grow { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rec-bar { flex: 1; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 14px; background: var(--pom-soft); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pom); animation: pulse 1s ease-in-out infinite; }
.rec-clock { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--pom); }
.mention-pop { max-height: 260px; overflow-y: auto; padding: 4px; }
@media (max-width: 860px) {
  .view.chat-view { padding: 0 0 calc(80px + var(--safe-b)); }
  .chat { grid-template-columns: 1fr; gap: 0; }
  .chat-side, .chat-main { border-radius: 0; border-inline: 0; }
  .chat.has-thread .chat-side { display: none; }
  .chat:not(.has-thread) .chat-main { display: none; }
  .msg-main { max-width: 84%; }
  .msg-img img { max-width: 200px; }
}
/* comments: voice, reactions, mentions */
.comment .bubble { white-space: normal; }
.comment .c-act { opacity: 0; }
.comment:hover .c-act { opacity: 1; }
@media (hover: none) { .comment .c-act { opacity: .6; } }
.comment.at-me .bubble { box-shadow: var(--raised-sm), inset 0 0 0 1.5px var(--saffron); }
.comment .who .grow { flex: 1; }
.comment-box .rec-bar { min-height: 42px; }

/* announcements */
.ann { border-radius: var(--r-xl); padding: 18px 22px; margin-bottom: 14px; }
.ann.unread { box-shadow: inset 4px 0 0 var(--accent); }
[dir="rtl"] .ann.unread { box-shadow: inset -4px 0 0 var(--accent); }
.ann.important { box-shadow: inset 4px 0 0 var(--pom); }
[dir="rtl"] .ann.important { box-shadow: inset -4px 0 0 var(--pom); }
.ann.expired { opacity: .6; }
.ann-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ann-title { margin: 8px 0 6px; font-size: 21px; }
.ann-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.dw-ann { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 6px; border-radius: 10px; text-align: start; font-size: 13.5px; color: var(--ink-2); justify-content: space-between; }
.dw-ann.unread { color: var(--ink); } .dw-ann.important b { color: var(--pom); }
.dw-ann:hover { background: var(--glass-strong); }

/* ---------------------------------------------------------- stage 5: calendars, rooms, booking */
.cals-card .cal-src { display: flex; align-items: center; }
.cals-card .cal-src .person-toggle { flex: 1; min-width: 0; }
.cals-card .src-more { opacity: 0; transition: opacity .15s; }
.cals-card .cal-src:hover .src-more, .cals-card .src-more:focus-visible { opacity: 1; }
@media (hover: none) { .cals-card .src-more { opacity: .7; } }
.cals-card .src-ic { width: 13px; height: 13px; color: var(--ink-3); flex: none; }
.cals-card .src-ic.bad { color: var(--pom); }
.cdot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; vertical-align: middle; }
.cdot.sq { border-radius: 3px; box-shadow: inset 0 0 0 1.6px var(--ink-3); }
.ev.ext { border-inline-start-style: dotted; cursor: default; }
.ev-links { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.ev-links .muted { display: flex; align-items: center; gap: 6px; }
.feed-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 14px 0; }
.feed-step { padding: 12px 14px; border-radius: var(--r-lg); background: var(--glass); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.feed-step b { display: flex; gap: 6px; align-items: center; }
.feed-step ol { margin: 0; padding-inline-start: 18px; font-size: 13px; color: var(--ink-2); line-height: 1.8; }
.feed-step .hint { margin: 0; }
.meet-defs .field { margin-bottom: 8px; }
.room-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.room-pick button { --c: var(--accent); display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 6px 11px; border-radius: calc(12px * var(--rk, 1)); background: var(--glass); box-shadow: var(--raised-sm); font-size: 13px; color: var(--ink-2); cursor: pointer; }
.room-pick button svg { width: 15px; height: 15px; color: var(--c); }
.room-pick button.on { background: color-mix(in srgb, var(--c) 18%, var(--glass-strong)); color: var(--ink); box-shadow: inset 0 0 0 1.6px var(--c); }
.room-pick button.busy { opacity: .55; text-decoration: line-through; }
.room-pick button.busy.on { opacity: 1; box-shadow: inset 0 0 0 1.6px var(--pom); }
.guest-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
@media (max-width: 640px) { .guest-row { grid-template-columns: 1fr 1fr auto; } .guest-row input[type=email] { grid-column: 1 / 3; } }
.cal-grid-wrap.rooms { overflow-x: auto; }
.cal-grid-wrap.rooms .tg-head, .cal-grid-wrap.rooms .tg-body { min-width: var(--minw); }
.cal-grid-wrap.rooms .tg-col { cursor: copy; }
.cal-grid-wrap.rooms .ev.other { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 18%, var(--glass-solid)) 0 5px, color-mix(in srgb, var(--c) 8%, var(--glass-solid)) 5px 10px); cursor: default; }
.rooms-view { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.room-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.res-row { --c: #5B6CF0; display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.res-row:last-child { border-bottom: 0; }
.res-row.off { opacity: .55; }
.bp-card { --c: var(--accent); margin-bottom: 16px; border-top: 3px solid var(--c); }
.bp-card.off { opacity: .7; }
.bp-card h3 { font-size: 14px; margin: 16px 0 8px; }
.bp-link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 8px 10px; border-radius: calc(12px * var(--rk, 1)); background: var(--glass); font-size: 13px; }
.bp-link a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 160px; }
.bp-rules { display: flex; flex-direction: column; gap: 6px; }
.bp-day { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.bp-day.off b { color: var(--ink-3); }
.bp-ranges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }
.bp-range { display: inline-flex; align-items: center; gap: 4px; }
.bp-range input { width: auto; padding: 4px 6px; }
.slot.bk-row { align-items: flex-start; flex-wrap: wrap; }
.slot.bk-row > svg { margin-top: 4px; }
.slot.bk-row .grow { min-width: 140px; line-height: 1.8; }

/* ---------------------------------------------------------- stage 6: assistant, planner, reports, import, billing */
.as-view { display: flex; flex-direction: column; min-height: 100%; }
.as-list { flex: 1; display: flex; flex-direction: column; gap: 14px; padding-bottom: 16px; }
.as-msg { display: flex; gap: 10px; align-items: flex-start; }
.as-msg.me { justify-content: flex-end; }
.as-bub { padding: 10px 14px; border-radius: 18px; line-height: 1.85; max-width: min(640px, 88%); overflow-wrap: anywhere; }
.as-msg.me .as-bub { background: var(--accent); color: var(--on-accent); border-end-end-radius: 6px; white-space: pre-wrap; }
.as-msg.bot .as-bub { background: var(--glass-strong); box-shadow: var(--raised-sm); border-end-start-radius: 6px; max-width: 100%; }
.as-bub.md p { margin: 0 0 6px; } .as-bub.md p:last-child, .as-bub.md ul:last-child, .as-bub.md ol:last-child { margin-bottom: 0; }
.as-bub.md ul, .as-bub.md ol { margin: 4px 0 6px; padding-inline-start: 20px; }
.as-av { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #9B5DE5, #5B6CF0); color: #fff; box-shadow: var(--raised-sm); }
.as-av svg { width: 17px; height: 17px; }
.as-msg.bot .grow { min-width: 0; }
.as-bub.typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.as-bub.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: asdot 1.2s infinite ease-in-out; }
.as-bub.typing i:nth-child(2) { animation-delay: .15s; } .as-bub.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes asdot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.as-acts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.as-act { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.as-act.done { opacity: .7; }
.as-act-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.as-act .grow { min-width: 0; } .as-act b, .as-act a { font-weight: 700; color: var(--ink); }
.as-hello { text-align: center; margin: 6vh auto 10px; max-width: 560px; }
.as-hello-ic { width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 10px; display: grid; place-items: center; background: linear-gradient(135deg, #9B5DE5, #5B6CF0); color: #fff; box-shadow: var(--float); }
.as-hello-ic svg { width: 30px; height: 30px; color: #fff; }
.as-hello h2 { margin: 6px 0; }
.as-sugs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.as-sugs .chip { cursor: pointer; padding: 6px 12px; font-size: 13px; white-space: normal; }
.as-bar { position: sticky; bottom: 0; display: flex; align-items: flex-end; gap: 8px; padding: 8px; border-radius: 20px; box-shadow: var(--float); margin-top: 8px; z-index: 5; }
.as-bar .as-input { flex: 1; border: 0; background: transparent; box-shadow: none; resize: none; max-height: 160px; min-height: 40px; }
.as-bar .rec-bar { flex: 1; }
.as-send { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 14px; }
@media (max-width: 860px) { .as-bar { bottom: calc(84px + var(--safe-b)); } }
.mic-btn svg { color: var(--pom); }
.voice-wait { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 6px; }
.voice-live { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-voice { align-items: center; }
.wp-opts { gap: 8px; margin: 8px 0 14px; align-items: center; }
.wp-row { cursor: pointer; }
.wp-row.off { opacity: .45; }
.wp-row.off .grow { text-decoration: line-through; }
.wp-time { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 108px; color: var(--accent-ink); }
.wp-un { margin: 10px 0; } .wp-un summary { cursor: pointer; color: var(--pom); font-weight: 600; margin-bottom: 8px; }
.cal-plan { width: 100%; justify-content: flex-start; border-radius: var(--r-lg); padding: 12px; font-weight: 700; }
.as-sum { font-size: 15px; line-height: 1.95; margin-top: 0; }
.h4-act { margin-inline-start: auto; font-weight: 600; }
.td-section h4 { display: flex; align-items: center; gap: 6px; }
.digest-text { white-space: pre-wrap; font: inherit; font-size: 13.5px; line-height: 1.9; background: var(--glass); padding: 12px 14px; border-radius: 14px; margin: 8px 0; max-height: 340px; overflow: auto; }
.digest-box .person-toggle.off { opacity: .5; }
.rep-kinds { margin-bottom: 12px; }
.rep-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; padding: 12px; border-radius: var(--r-lg); margin-bottom: 16px; align-items: end; }
.rep-filters .field { margin: 0; }
.rep-actions { gap: 8px; margin: -8px 0 12px; align-items: center; }
.rep-table-wrap { overflow: auto; border-radius: var(--r-lg); max-height: 70vh; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rep-table th { position: sticky; top: 0; background: var(--glass-solid); text-align: start; padding: 9px 10px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap; border-bottom: 1px solid var(--line); z-index: 1; }
.rep-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rep-table td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rep-table td.t-title { min-width: 200px; }
.rep-table td.t-title a { color: var(--ink); font-weight: 600; }
.rep-table tr.bad td.t-title a { color: var(--pom); }
.rep-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.rep-bars h3 { margin-top: 0; font-size: 15px; }
.rb { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 8px; align-items: center; padding: 4px 0; font-size: 13px; }
.rb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-bar { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; } .rb-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.rb-v { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.imp-srcs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 6px 0 16px; }
.imp-src { display: flex; gap: 10px; align-items: center; text-align: start; padding: 12px; border-radius: var(--r-lg); border: 0; background: var(--glass); box-shadow: var(--raised-sm); cursor: pointer; color: var(--ink); }
.imp-src.on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.imp-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 12px; }
.imp-map .field { margin: 0; }
.imp-prog { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 12px; } .imp-prog i { display: block; width: 3%; height: 100%; background: var(--accent); transition: width .3s; }
.imp-trello { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-lg); background: var(--glass); }
.empty-ic.good { color: #2E8A6E; }
.bill-now h2 { font-size: 22px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.plan { padding: 18px; border-radius: var(--r-xl); display: flex; flex-direction: column; gap: 4px; }
.plan.cur { box-shadow: inset 0 0 0 2px var(--accent), var(--raised-sm); }
.plan h3 { margin: 0 0 6px; }
.plan-price { font-size: 22px; font-weight: 800; color: var(--accent-ink); }
.plan ul { list-style: none; padding: 0; margin: 10px 0 14px; flex: 1; font-size: 13.5px; color: var(--ink-2); }
.plan ul li { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rep-filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .as-list { padding-bottom: 70px; } }
@media (max-width: 860px) { .rep-view { padding-inline: 12px; } }

/* ---------------------------------------------------------- stage 7: offline, connections */
.offline-bar { position: fixed; z-index: 90; top: calc(6px + var(--safe-t, 0px)); left: 50%; transform: translate(-50%, -180%); display: flex; align-items: center; gap: 8px; padding: 5px 13px; border-radius: 99px;
  background: #3A3F55; color: #fff; font-size: 13px; box-shadow: var(--float); transition: transform .3s; white-space: nowrap; max-width: calc(100vw - 24px); }
.offline-bar.on { transform: translate(-50%, 0); }
@media (max-width: 860px) { .offline-bar { top: calc(8px + var(--safe-t, 0px)); } }
.offline-bar.sync { background: var(--accent); }
.offline-bar svg { width: 16px; height: 16px; }
.offline-bar b { font-weight: 700; opacity: .9; }
.offline-bar .spinner { width: 14px; height: 14px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.conn-code { font: 800 30px/1 ui-monospace, monospace; letter-spacing: 6px; padding: 14px 18px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); text-align: center; direction: ltr; user-select: all; }
.tok-new { padding: 12px; border-radius: 14px; background: var(--saffron-soft); margin: 10px 0; }
.tok-new code { display: block; direction: ltr; word-break: break-all; font-size: 13px; margin: 6px 0; user-select: all; }
.api-doc pre { direction: ltr; text-align: left; background: var(--glass); padding: 10px 12px; border-radius: 12px; overflow: auto; font-size: 12.5px; line-height: 1.6; }
.hook-ev { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; }
.hook-log td { font-size: 12px; }
.comment .c-wait { display: inline-grid; place-items: center; width: 26px; color: var(--ink-3); }
.comment .c-wait svg { width: 14px; height: 14px; }
/* connection check */
.net-check .net-ip { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: calc(12px * var(--rk, 1)); background: var(--accent-soft); }
.net-check .net-ip b { font-size: 17px; letter-spacing: .5px; }
.net-list { display: grid; gap: 2px; margin-top: 12px; }
.net-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.net-row .net-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
.net-row.ok .net-dot { background: #22B07D; }
.net-row.blocked .net-dot, .net-row.error .net-dot { background: var(--pom); }
.net-row.timeout .net-dot, .net-row.dns .net-dot { background: #E9A23B; }
.net-row:not(.ok) > .small { color: var(--pom); }
.net-row .net-err { flex-basis: 100%; color: var(--ink-3); padding-inline-start: 19px; word-break: break-word; text-align: start; }
.net-msg { font-size: 12.5px; line-height: 1.7; }

/* ---------------------------------------------------------- guided tours */
.tour-hub { position: fixed; z-index: 70; bottom: 22px; inset-inline-start: 22px; width: min(380px, calc(100vw - 24px)); max-height: calc(100dvh - 44px); overflow-y: auto; overscroll-behavior: contain; border-radius: var(--r-xl); box-shadow: var(--float); padding: 16px; animation: rise .3s cubic-bezier(.2, .9, .3, 1); }
.tour-hub .th-head { display: flex; gap: 12px; align-items: flex-start; }
.tour-hub .th-head b { font-size: 16px; }
.tour-hub .th-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.th-ic { width: 38px; height: 38px; border-radius: calc(12px * var(--rk, 1)); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.th-ic svg { width: 21px; height: 21px; }
.th-list { display: grid; gap: 4px; margin: 12px 0 10px; }
.th-item { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 8px; border-radius: calc(12px * var(--rk, 1)); text-align: start; color: var(--ink); width: 100%; }
.th-item:hover { background: var(--accent-soft); }
.th-item .grow b { display: block; font-size: 14px; font-weight: 600; }
.th-item .grow span { display: block; font-size: 12px; color: var(--ink-3); }
.th-ti { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink-2); flex: none; }
.th-ti svg { width: 16px; height: 16px; }
.th-item.done .th-ti { background: var(--accent-soft); color: var(--accent-ink); }
.th-len { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.th-ok { color: var(--accent); display: grid; }
.th-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.th-off { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.th-off input { accent-color: var(--accent); }
.tour-block { position: fixed; inset: 0; z-index: 90; }
.tour-spot { position: fixed; z-index: 91; pointer-events: none; border-radius: calc(14px * var(--rk, 1)); box-shadow: 0 0 0 200vmax rgba(10, 14, 30, .52), 0 0 0 2px var(--accent); transition: left .3s ease, top .3s ease, width .3s ease, height .3s ease; }
.tour-spot.none { left: 50% !important; top: 50% !important; width: 0 !important; height: 0 !important; box-shadow: 0 0 0 200vmax rgba(10, 14, 30, .52); }
.tour-tip { position: fixed; z-index: 92; border-radius: var(--r-lg); box-shadow: var(--float); padding: 14px 16px 12px; animation: fade .2s ease; }
.tour-tip h3 { margin: 4px 0 4px; font-size: 16px; }
.tour-tip p { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.tt-top { display: flex; align-items: center; }
.tt-n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tt-skip, .tt-never { border: 0; background: none; color: var(--ink-3); font-size: 12.5px; padding: 2px 4px; border-radius: 6px; }
.tt-skip:hover, .tt-never:hover { color: var(--ink); background: var(--line); }
.tt-dots { display: flex; gap: 5px; margin: 12px 0 10px; }
.tt-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--ink-4); transition: width .2s; }
.tt-dots i.on { width: 18px; background: var(--accent); }
.tt-foot { display: flex; align-items: center; gap: 6px; }
.tour-end { animation: rise .25s ease; }
.tour-end .tt-top { justify-content: center; }
.tour-end h3, .tour-end p { text-align: center; }
.tour-end .tt-foot { margin-top: 12px; }
.tour-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
@media (max-width: 860px) {
  .tour-hub { inset-inline-start: 12px; bottom: calc(84px + var(--safe-b)); max-height: calc(100dvh - 84px - var(--safe-b) - 12px - env(safe-area-inset-top)); }
  :root.flat .tour-hub { bottom: calc(136px + var(--safe-b)); }
}

/* ------------------------------------------------------------- habits */
.ic-habit { color: #F3722C; } .ic-goal { color: #E2445C; } .ic-review { color: #2E8FE6; } .ic-stats { color: #43AA8B; } .ic-focus { color: #E2445C; }
.hb-ring { --c: var(--accent); --p: 0; position: relative; width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), color-mix(in srgb, var(--c) 16%, transparent) 0); transition: transform .15s; }
.hb-ring::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--glass-solid); transition: background .2s; }
.hb-ring span { position: relative; font-size: 15px; line-height: 1; color: var(--ink-3); }
.hb-ring.on::before { background: color-mix(in srgb, var(--c) 22%, var(--glass-solid)); }
.hb-ring.on span { color: var(--c); }
.hb-ring:active { transform: scale(.9); }
.hb-ring.lg { width: 46px; height: 46px; }
.hb-ring.lg span { font-size: 21px; }
.hb-strip { margin: 0 0 18px; padding: 12px 14px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--glass) 70%, transparent); border: 1px solid var(--glass-border); }
.hb-strip-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.hb-strip-head .dw-more { padding: 0; }
.hb-strip-list { display: flex; gap: 14px; overflow-x: auto; padding: 10px 2px 2px; scrollbar-width: none; }
.hb-chip { display: grid; justify-items: center; gap: 4px; min-width: 56px; max-width: 76px; text-align: center; }
.hb-chip > span { font-size: 11.5px; color: var(--ink-2); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hb-list { display: grid; gap: 2px; }
.hb-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.hb-days-head { padding-block: 0 4px; border: 0; font-size: 11px; color: var(--ink-3); }
.hb-info { border: 0; background: none; text-align: start; display: grid; gap: 1px; padding: 0; color: var(--ink); min-width: 0; }
.hb-info b { font-size: 15px; font-weight: 600; }
.hb-info .muted { display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.hb-info .muted svg { width: 12px; height: 12px; }
.hb-meta { display: flex; gap: 10px; align-items: center; }
.hb-streak { font-size: 12.5px; font-weight: 700; color: #E8590C; }
:root[data-theme="dark"] .hb-streak { color: #FF8A3D; }
.hb-week { display: grid; grid-template-columns: repeat(7, 22px); gap: 5px; justify-items: center; }
.hb-week > span { width: 22px; text-align: center; }
.hb-dot { --c: var(--accent); width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0; background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 40%, transparent); cursor: pointer; }
.hb-dot.on { background: var(--c); box-shadow: none; }
.hb-dot.part { background: color-mix(in srgb, var(--c) 45%, transparent); }
.hb-dot.today { outline: 2px solid color-mix(in srgb, var(--c) 35%, transparent); outline-offset: 2px; }
.hb-dot.off { background: none; box-shadow: none; cursor: default; position: relative; }
.hb-dot.off::after { content: ""; position: absolute; inset: 9px 5px; border-radius: 2px; background: var(--line-2); }
.hb-menu-sp { width: 28px; }
.hb-detail { --c: var(--accent); padding: 12px 8px 16px 64px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
:root[dir="rtl"] .hb-detail { padding: 12px 64px 16px 8px; }
.hm { display: flex; gap: 3px; direction: ltr; }
:root[dir="rtl"] .hm { flex-direction: row-reverse; }
.hm-col { display: grid; gap: 3px; }
.hm i { width: 12px; height: 12px; border-radius: 3px; background: var(--line); }
.hm i.l0 { background: color-mix(in srgb, var(--c) 10%, var(--line)); }
.hm i.l1 { background: color-mix(in srgb, var(--c) 45%, transparent); }
.hm i.l3 { background: var(--c); }
.hm i.out, .hm i.off { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.hb-stats { display: flex; gap: 22px; }
.hb-stats div { display: grid; }
.hb-stats b { font-size: 22px; font-weight: 800; }
.hb-stats span { font-size: 12px; color: var(--ink-3); }
.hb-suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.hb-archived { margin-top: 20px; }
.hb-archived .hb-ic { width: 30px; text-align: center; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.emoji-row button { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; font-size: 19px; }
.emoji-row button.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.emoji-in { width: 64px !important; text-align: center; font-size: 18px; padding: 6px !important; }
.wd-pick { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 14px; }
.wd-pick button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: none; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.wd-pick button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 8px 0; cursor: pointer; }
.check-row input { accent-color: var(--accent); width: 17px; height: 17px; }
@media (max-width: 860px) {
  .hb-row { flex-wrap: wrap; }
  .hb-row .hb-info { flex: 1 1 calc(100% - 110px); }
  .hb-row .hb-week { order: 3; flex-basis: 100%; grid-template-columns: repeat(7, 1fr); padding-inline-start: 58px; }
  .hb-days-head { display: none; }
  .hb-detail, :root[dir="rtl"] .hb-detail { padding-inline: 8px; }
}

/* --------------------------------------------------------------- goals */
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.goal-card { --c: var(--accent); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 10px; align-content: start; border-top: 3px solid var(--c); }
.goal-card.closed { opacity: .75; }
.goal-top { display: flex; gap: 12px; align-items: flex-start; }
.goal-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); flex: none; }
.goal-title { font-size: 16px; line-height: 1.5; display: block; }
.goal-notes { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.goal-ring { --p: 0; --c: var(--accent); width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), color-mix(in srgb, var(--c) 14%, transparent) 0); position: relative; }
.goal-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--glass-solid); }
.goal-ring span { position: relative; font-size: 11.5px; font-weight: 800; }
.goal-ring.lg { width: 54px; height: 54px; }
.goal-ring.lg span { font-size: 12.5px; }
.goal-bar { --c: var(--accent); display: block; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--c) 14%, var(--line)); overflow: hidden; }
.goal-bar i { display: block; height: 100%; border-radius: 3px; background: var(--c); transition: width .4s; }
.goal-bar.sm { width: 70px; flex: none; height: 5px; }
.goal-card .goal-bar { --c: inherit; }
.goal-card .goal-bar i { background: var(--c); }
.goal-manual { display: flex; align-items: center; gap: 8px; }
.goal-val { flex: 1; border: 0; background: var(--line); border-radius: 10px; padding: 7px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.goal-items { display: grid; gap: 2px; }
.goal-item { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 5px 4px; border-radius: 8px; text-align: start; font-size: 13.5px; color: var(--ink); }
.goal-item:hover { background: var(--line); }
.goal-item svg { width: 15px; height: 15px; color: var(--ink-3); }
.goal-closed { margin-top: 22px; }
.goal-closed .goal-grid { margin-top: 12px; }
.link-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; align-items: center; }
.link-pick .proj-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.link-pick .sm-in { width: auto; flex: 1 1 200px; padding: 6px 10px; font-size: 13.5px; }
.link-results { border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 8px; }
.dw-goal { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 2px; text-align: start; color: var(--ink); font-size: 14px; border-bottom: 1px solid var(--line); }
.dw-focus { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.dw-big { font-size: 30px; font-weight: 800; }

/* --------------------------------------------------------------- focus */
.focus-screen { --fc: var(--accent); position: fixed; inset: 0; z-index: 58; display: flex; flex-direction: column; color: var(--ink); background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--fc) 18%, var(--bg)), var(--bg) 70%); animation: fade .25s ease; padding: env(safe-area-inset-top, 0px) 0 var(--safe-b); }
.focus-screen.ph-short, .focus-screen.ph-long { --fc: #43AA8B; }
.fs-top { display: flex; align-items: center; gap: 4px; padding: 14px 16px; }
.fs-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 0 20px; text-align: center; }
.fs-phase { font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--fc); text-transform: uppercase; }
.fs-task { border: 0; background: color-mix(in srgb, var(--glass-strong) 80%, transparent); border-radius: 99px; padding: 8px 16px; font-size: 16px; font-weight: 600; color: var(--ink); max-width: min(520px, 90vw); display: inline-flex; gap: 6px; align-items: center; box-shadow: 0 0 0 1px var(--line); }
.fs-task svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.fs-ring { --p: 0; width: min(300px, 72vw); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--fc) calc(var(--p) * 1%), color-mix(in srgb, var(--fc) 13%, transparent) 0); transition: background .5s linear; }
.fs-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--bg); }
.fs-clock { position: relative; font-size: clamp(54px, 15vw, 82px); font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.focus-screen.paused .fs-clock { opacity: .5; animation: blink 1.6s ease infinite; }
@keyframes blink { 50% { opacity: .25; } }
.fs-rounds { display: flex; gap: 6px; }
.fs-rounds i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--fc) 25%, transparent); }
.fs-rounds i.on { background: var(--fc); }
.fs-ctl { display: flex; align-items: center; gap: 18px; }
.fs-go { width: 74px; height: 74px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--fc); color: #fff; box-shadow: 0 14px 30px -12px var(--fc); }
.fs-go svg { width: 30px; height: 30px; }
.fs-done { margin-top: 4px; }
.fs-foot { display: flex; justify-content: center; gap: 22px; padding: 16px; font-size: 13px; color: var(--ink-3); }
.fs-foot span { display: inline-flex; align-items: center; gap: 4px; }
.fs-foot svg { width: 14px; height: 14px; }
.focus-pick { display: grid; gap: 2px; max-height: 60vh; overflow: auto; }
.focus-pill { position: fixed; z-index: 70; bottom: 22px; inset-inline-end: 22px; border: 0; border-radius: 99px; padding: 9px 16px; display: flex; gap: 8px; align-items: center; color: #fff; background: #E2445C; box-shadow: var(--float); font-weight: 700; font-variant-numeric: tabular-nums; }
.focus-pill.ph-short, .focus-pill.ph-long { background: #2E9C78; }
.focus-pill svg { width: 17px; height: 17px; }
@media (max-width: 860px) { .focus-pill { bottom: calc(84px + var(--safe-b)); } :root.flat .focus-pill { bottom: calc(140px + var(--safe-b)); } }

/* ---------------------------------------------------------- plan my day */
.plan-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 16px; border-radius: var(--r-lg); background: linear-gradient(120deg, color-mix(in srgb, var(--saffron) 18%, transparent), color-mix(in srgb, var(--accent) 10%, transparent)); border: 1px solid var(--glass-border); }
.plan-banner .pb-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--saffron-soft); color: var(--saffron-ink); flex: none; }
.plan-banner b { display: block; font-size: 14.5px; }
.plan-banner span { font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 600px) { .plan-banner { flex-wrap: wrap; } .plan-banner .grow { flex: 1 1 calc(100% - 60px); } }
.pd-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.pd-steps span { font-size: 12.5px; padding: 3px 10px; border-radius: 99px; background: var(--line); color: var(--ink-3); }
.pd-steps span.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.pd-steps span.done { color: var(--ink-2); }
.pd-row { display: flex; align-items: center; gap: 6px; padding: 8px 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pd-row .grow { min-width: 160px; }
.pd-row.pick { cursor: pointer; }
.pd-row.pick input { accent-color: var(--accent); width: 18px; height: 18px; }
.pd-fit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.pd-fit div { display: grid; padding: 10px; border-radius: 12px; background: var(--line); }
.pd-fit b { font-size: 24px; font-weight: 800; }
.pd-fit span { font-size: 12px; color: var(--ink-3); }
.pd-bar { height: 10px; border-radius: 5px; background: var(--accent-soft); overflow: hidden; }
.pd-bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.pd-bar.over i { background: var(--pom); }

/* ------------------------------------------------------------- review */
.rv-steps { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.rv-steps button { border: 0; background: none; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.rv-steps button i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11.5px; font-weight: 700; background: var(--line); }
.rv-steps button i svg { width: 13px; height: 13px; }
.rv-steps button.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.rv-steps button.on i { background: var(--accent); color: var(--on-accent); }
.rv-steps button.done i { background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent-ink); }
.rv-box { border-radius: var(--r-xl); padding: 18px 20px; }
.rv-box h2 { margin: 0 0 4px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.rv-intro { color: var(--ink-2); font-size: 14px; margin: 4px 0 12px; }
.rv-row { display: flex; align-items: center; gap: 8px; padding: 9px 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rv-title { flex: 1 1 220px; border: 0; background: none; text-align: start; font-size: 14.5px; color: var(--ink); padding: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rv-title .proj-dot { width: 9px; height: 9px; border-radius: 50%; }
.rv-acts { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.rv-foot { display: flex; gap: 8px; margin-top: 16px; }
.rv-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 10px 0 16px; }
.rv-day { border: 0; border-radius: 12px; background: var(--line); padding: 8px 2px; display: grid; justify-items: center; gap: 2px; color: var(--ink); }
.rv-day span { font-size: 11.5px; color: var(--ink-3); }
.rv-day b { font-size: 17px; }
.rv-day i { font-style: normal; font-size: 12px; color: var(--accent-ink); font-weight: 700; }
.rv-day.off b { color: var(--pom); }
.rv-big3 { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-done { text-align: center; padding: 10px 0 6px; }
.rv-badge { width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.rv-badge svg { width: 34px; height: 34px; }
.rv-remind { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.rv-remind .select, .rv-remind .input { width: auto; }
.routines .rv-remind { justify-content: flex-start; border: 0; padding: 0; margin: 4px 0 12px; }

/* -------------------------------------------------------------- stats */
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.st-tile { display: grid; gap: 2px; padding: 14px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--glass-border); }
.st-tile .st-ic { color: var(--ink-3); }
.st-tile .st-ic svg { width: 17px; height: 17px; }
.st-tile b { font-size: 26px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.st-tile span { font-size: 13px; color: var(--ink-2); }
.st-tile small { font-size: 11.5px; color: var(--ink-3); }
.st-tile.up small { color: var(--accent-ink); }
.st-tile.down small { color: var(--pom); }
.st-empty { display: flex; align-items: center; gap: 6px; }
.st-chart h3 { margin: 0 0 6px; font-size: 15px; }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.st-two .panel { margin: 0 0 18px; }
@media (max-width: 860px) { .st-two { grid-template-columns: 1fr; } }
.st-goal { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 2px; text-align: start; color: var(--ink); font-size: 14px; border-bottom: 1px solid var(--line); }
.st-goal .goal-bar { width: 120px; }
/* thin bars, 2px apart, rounded tops, a recessive baseline, hover read-out */
.bc { position: relative; padding-top: 18px; }
.bc-max { position: absolute; top: 0; inset-inline-start: 0; }
.bc-plot { display: flex; align-items: flex-end; gap: 2px; height: 130px; border-bottom: 1px solid var(--line-2); }
.bc-col { flex: 1; height: 100%; display: flex; align-items: flex-end; outline: none; cursor: default; min-width: 0; }
.bc-col i { display: block; width: 100%; max-width: 26px; margin: 0 auto; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--accent) 72%, transparent); transition: background .15s; }
.bc-col.mark i { background: var(--accent); }
.bc-col:hover i, .bc-col:focus-visible i { background: var(--accent-ink); }
.bc-axis { display: flex; gap: 2px; font-size: 10.5px; color: var(--ink-3); margin-top: 4px; }
.bc-axis span { flex: 1; text-align: center; white-space: nowrap; overflow: visible; min-width: 0; }
.bc-tip { position: absolute; top: -6px; transform: translateX(-50%); padding: 3px 9px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .1s; z-index: 2; }
:root[dir="rtl"] .bc-tip { transform: translateX(50%); }
.bc.tipping .bc-tip { opacity: 1; }

/* ------------------------------------------------------------ capture */
.cap-block { padding: 12px 0; border-top: 1px solid var(--line); }
.cap-block h3 { margin: 0 0 4px; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.cap-addr { font-size: 14px !important; padding: 7px 12px !important; letter-spacing: 0 !important; flex: 1; overflow-wrap: anywhere; }
.cap-steps { margin: 6px 0 10px; padding-inline-start: 22px; font-size: 13.5px; line-height: 1.9; color: var(--ink-2); }
.cap-bm { cursor: grab; }
.hb-grip { color: var(--ink-4); cursor: grab; display: grid; touch-action: none; margin-inline-end: -6px; opacity: 0; transition: opacity .15s; }
.hb-row:hover .hb-grip { opacity: 1; }
.hb-grip svg { width: 16px; height: 16px; }
.goal-ic { cursor: grab; }
@media (max-width: 860px) { .hb-grip { display: none; } }
.hb-strip-list.bare { padding-top: 4px; }

/* ---------- v2.12: approvals, pending sign-up, install */
.auth-pending { text-align: center; padding: 6px 0 2px; }
.auth-pending .ap-ic, .appr-empty .ap-ic { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.auth-pending .ap-ic svg, .appr-empty .ap-ic svg { width: 30px; height: 30px; }
.auth-pending p { margin: 6px 0; line-height: 1.8; }
.auth-pending .btn { margin-top: 14px; }
.reg-approve { display: flex; align-items: center; gap: 6px; margin: -4px 0 10px; }
.reg-approve svg { width: 16px; height: 16px; color: var(--accent-ink); flex: none; }
.sb-pending { margin: 0 14px 8px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 0; border-radius: var(--r-md); background: var(--saffron-soft); color: var(--saffron-ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; text-align: start; }
.sb-pending svg { width: 17px; height: 17px; flex: none; }
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--pom); color: #fff; font-size: 11.5px; font-weight: 800; margin-inline-start: 4px; }
.kpi-link { border: 0; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.kpi.warn .kpi-ic { background: var(--saffron-soft); color: var(--saffron-ink); }
.has-badge { position: relative; }
.appr-mode .appr-mode-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); flex: none; }
.appr-mode .switch-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.appr-head h2 { display: flex; align-items: center; gap: 6px; font-size: 17px; margin: 18px 4px 8px; }
.appr-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.appr-bar:empty { display: none; }
.appr-all { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; padding-inline-start: 4px; }
.appr-list { padding: 4px 14px; }
.appr-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.appr-row:last-child { border-bottom: 0; }
.appr-row > input, .appr-all input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.appr-row.on { background: color-mix(in srgb, var(--accent) 6%, transparent); margin: 0 -14px; padding-inline: 14px; }
.appr-act { display: flex; align-items: center; gap: 6px; flex: none; }
.appr-empty { padding: 34px 12px; text-align: center; }
.appr-empty b { display: block; font-size: 16px; }
@media (max-width: 600px) {
  .appr-row { flex-wrap: wrap; }
  .appr-row .grow { min-width: calc(100% - 90px); }
  .appr-act { width: 100%; justify-content: flex-end; }
  .appr-bar .btn { flex: 1; }
}
@media (min-width: 900px) { .kpis:has(> :nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.appr-mode > .row { flex-wrap: wrap; }
.appr-mode > .row > .grow { min-width: 200px; }
@media (max-width: 600px) { .appr-mode > .row > .btn { width: 100%; justify-content: center; } }

/* ---------- v2.13 */
.voice-help { display: flex; gap: 14px; align-items: flex-start; }
.voice-help .vh-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.voice-help p { margin: 0 0 10px; line-height: 1.85; }
.auth-credit { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: var(--ink-3); }

/* ---------- company profile */
.co-about { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.75; white-space: pre-wrap; max-width: 640px; }
.cc-desc { margin: 8px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.co-notes svg { width: 13px; height: 13px; vertical-align: -2px; opacity: .6; }
.co-logo-edit { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.co-logo-edit .hint { flex-basis: 100%; margin: 0; }
.cc-top img.cc-logo.img { width: 38px; height: 38px; border-radius: calc(13px * var(--rk, 1)); }
img.cc-logo.img.lg { width: 54px; height: 54px; border-radius: calc(18px * var(--rk, 1)); }

/* ---------- org chart */
.company-view.co-wide { max-width: none; }
.oc-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.oc-search { max-width: 240px; }
.oc-zoom { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 12px; box-shadow: var(--inset); }
.oc-zl { min-width: 46px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.oc-tips { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-3); font-size: 12.5px; margin: 0 2px 12px; line-height: 1.7; }
.oc-tips:empty { display: none; }
.oc-tips svg { width: 15px; height: 15px; flex: none; margin-top: 3px; }
.oc-viewport { overflow: auto; border-radius: var(--r-xl); background: color-mix(in srgb, var(--glass) 70%, transparent); box-shadow: var(--inset); padding: 26px 12px 34px; min-height: 360px; max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); }
.oc-canvas { --z: 1; zoom: var(--z); width: max-content; min-width: 100%; }
@supports not (zoom: 1) { .oc-canvas { transform: scale(var(--z)); transform-origin: top center; } }
.oc-tree, .oc-tree ul { --line: color-mix(in srgb, var(--ink) 22%, transparent); display: flex; justify-content: center; margin: 0; padding: 22px 0 0; list-style: none; position: relative; direction: ltr; }
.oc-tree { padding-top: 0; }
.oc-tree li { position: relative; padding: 22px 7px 0; display: flex; flex-direction: column; align-items: center; }
.oc-tree li::before, .oc-tree li::after { content: ''; position: absolute; top: 0; width: 50%; height: 22px; border-top: 2px solid var(--line); }
.oc-tree li::before { right: 50%; }
.oc-tree li::after { left: 50%; border-left: 2px solid var(--line); }
.oc-tree li:only-child::before, .oc-tree li:only-child::after { border-top: 0; }
.oc-tree li:only-child::before { display: none; }
.oc-tree li:first-child::before, .oc-tree li:last-child::after { border: 0 none; }
.oc-tree li:last-child::before { border-right: 2px solid var(--line); border-radius: 0 10px 0 0; }
.oc-tree li:first-child::after { border-radius: 10px 0 0 0; }
.oc-tree ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid var(--line); height: 22px; }
.oc-tree > li { padding-top: 0; }
.oc-tree > li::before, .oc-tree > li::after { display: none; }
.oc-card { direction: var(--page-dir, rtl); position: relative; width: 168px; padding: 14px 10px 16px; border-radius: 18px; background: var(--glass-strong); box-shadow: var(--raised-sm); border: 1px solid var(--glass-border); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
[dir=ltr] .oc-card { --page-dir: ltr; }
.oc-card:hover, .oc-card:focus-visible { transform: translateY(-2px); box-shadow: var(--float); outline: none; }
.oc-card .avatar { width: 52px; height: 52px; font-size: 18px; margin-bottom: 4px; box-shadow: 0 0 0 3px var(--glass-strong), 0 0 0 5px color-mix(in srgb, var(--c, var(--accent)) 35%, transparent); }
.oc-card.me { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.oc-card.hit, .oc-row.hit, .oc-li.hit { box-shadow: 0 0 0 3px var(--saffron), var(--float); }
.oc-card.oc-drop, .oc-row.oc-drop, .oc-li-main.oc-drop { box-shadow: 0 0 0 3px var(--accent), var(--float); transform: scale(1.03); }
.oc-card.dragging { opacity: .45; }
.oc-name { font-weight: 800; font-size: 14px; line-height: 1.45; color: var(--ink); }
.oc-title { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.oc-dept { --dc: var(--accent); display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; color: color-mix(in srgb, var(--dc) 75%, var(--ink)); background: color-mix(in srgb, var(--dc) 14%, transparent); }
.oc-dept::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--dc); }
.oc-toggle { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); min-width: 26px; height: 24px; padding: 0 7px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; font: inherit; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 3px var(--glass-strong); z-index: 1; }
.oc-toggle svg { width: 14px; height: 14px; }
.oc-company { width: 200px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--glass-strong)), var(--glass-strong)); }
.oc-company .cc-logo, .oc-company .oc-logo { width: 56px; height: 56px; border-radius: 18px; object-fit: cover; margin-bottom: 4px; }
.oc-company .oc-name { font-size: 15.5px; }
/* by department */
.oc-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.oc-dcol { --dc: var(--accent); border-radius: var(--r-xl); padding: 12px; border-top: 4px solid var(--dc); }
.oc-dcol header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.oc-dcol header .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dc); }
.oc-dhead { padding: 4px 0 10px; margin-bottom: 6px; border-bottom: 1px dashed var(--line, color-mix(in srgb, var(--ink) 14%, transparent)); }
.oc-dlabel { display: block; font-size: 11px; font-weight: 700; color: var(--ink-3); margin-bottom: 4px; }
.oc-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; cursor: pointer; }
.oc-row:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.oc-row .oc-name { font-size: 13.5px; }
.oc-row.big .oc-name { font-size: 14.5px; }
.oc-row .chip svg { width: 12px; height: 12px; }
/* list */
.oc-listwrap { max-width: 720px; }
.oc-li-co { margin-bottom: 8px; }
.oc-li-co .oc-company { width: auto; flex-direction: row; text-align: start; gap: 12px; padding: 10px 14px; }
.oc-li-co .oc-company .cc-logo, .oc-li-co .oc-company .oc-logo { width: 42px; height: 42px; margin: 0; }
.oc-list, .oc-list ul { list-style: none; margin: 0; padding: 0; }
.oc-list ul { padding-inline-start: 22px; margin-inline-start: 18px; border-inline-start: 2px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.oc-li { display: flex; align-items: center; gap: 6px; margin: 4px 0; border-radius: 14px; background: var(--glass-strong); box-shadow: var(--raised-sm); }
.oc-li-main { flex: 1; display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; min-width: 0; border-radius: 14px; }
.oc-li-main .grow { min-width: 0; }
.oc-li-main .oc-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-li-toggle { display: flex; align-items: center; gap: 4px; border: 0; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-ink); border-radius: 10px; padding: 5px 8px; margin-inline-end: 8px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.oc-li-toggle svg { width: 14px; height: 14px; }
/* person */
.oc-person { display: flex; gap: 16px; align-items: center; }
.oc-person h3 { margin: 0 0 2px; font-size: 18px; }
.oc-rel { margin: 16px 0 4px; padding: 12px 14px; border-radius: 14px; box-shadow: var(--inset); display: grid; gap: 8px; font-size: 14px; line-height: 1.8; }
.oc-edit { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, color-mix(in srgb, var(--ink) 10%, transparent)); }
.oc-edit h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; font-size: 14px; }
.oc-edit h4 svg { width: 15px; height: 15px; }
@media (max-width: 700px) {
  .oc-search { max-width: none; flex: 1 1 100%; order: 3; }
  .oc-viewport { max-height: none; min-height: 300px; padding: 18px 6px 26px; }
  .oc-card { width: 140px; }
  .oc-depts { grid-template-columns: 1fr; }
  .oc-list ul { padding-inline-start: 12px; margin-inline-start: 12px; }
}
.ic-org { color: #4361EE; }
/* a person: photo + full name */
.person-tag { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; padding: 2px 9px 2px 3px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 6%, transparent); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
[dir=rtl] .person-tag { padding: 2px 3px 2px 9px; }
.person-tag .pt-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.person-tag.sm { font-size: 11.5px; }
.task .side { min-width: 0; max-width: 40%; display: flex; }
.task .side .person-tag { max-width: 190px; }
.task .meta .m.by { font-weight: 600; color: var(--ink-2); }
@media (max-width: 600px) { .task .side .person-tag { max-width: 118px; } }
.card .person-tag { max-width: 150px; }
.lane-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* my name gets its own line in the sidebar footer, so it is never cut short */
.sb-foot { flex-wrap: wrap; row-gap: 4px; }
.sb-foot .who { flex: 1 1 100%; padding: 4px 6px; }
.sb-foot .who span { white-space: normal; overflow: visible; line-height: 1.4; }
.sb-foot > .icon-btn:first-of-type { margin-inline-start: auto; }

/* ---------- v2.14: grouped menu, spaces, all projects */
.nav-group { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; margin-top: 6px; border: 0; background: none; border-radius: calc(12px * var(--rk, 1)); text-align: start; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.nav-group:hover { background: color-mix(in srgb, var(--glass-strong) 50%, transparent); color: var(--ink-2); }
.nav-group .ic { width: 20px; height: 20px; flex: none; display: grid; place-items: center; }
.nav-group .ic svg { width: 17px; height: 17px; }
.nav-group .label { flex: 1; min-width: 0; }
.nav-group .ng-chev { width: 15px; height: 15px; opacity: .7; }
.nav-group.open { color: var(--ink-2); }
.nav-group-items { padding-inline-start: 10px; margin-inline-start: 19px; border-inline-start: 2px solid color-mix(in srgb, var(--ink) 8%, transparent); }
.nav-group-items .nav-item { padding-block: 6px; font-size: 14px; }
.ic-proj { color: #3A86FF; }
.space-switch { display: flex; align-items: center; gap: 10px; margin: 2px 14px 8px; padding: 7px 10px; border: 0; border-radius: var(--r-md); background: color-mix(in srgb, var(--glass-strong) 70%, transparent); box-shadow: var(--raised-sm); font: inherit; color: var(--ink); cursor: pointer; text-align: start; }
.space-switch .grow { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.space-switch small { font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.space-switch b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-switch > svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.space-switch.on { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent), var(--raised-sm); }
.ws-dot { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; color: #fff; font-weight: 800; font-size: 13px; }
.ws-dot svg { width: 15px; height: 15px; }
.ws-dot.all { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); }
.space-switch img.ws-logo { width: 28px; height: 28px; border-radius: 9px; object-fit: cover; flex: none; }
.ws-dot.sm, img.ws-logo.sm { width: 24px; height: 24px; border-radius: 8px; font-size: 11px; object-fit: cover; }
.sb-sec-title { display: flex; align-items: center; gap: 8px; margin: 16px 10px 2px; font-size: 11.5px; font-weight: 800; letter-spacing: .2px; color: var(--ink-3); text-transform: uppercase; }
.sb-sec-title svg { width: 14px; height: 14px; }
.sb-sec-title a { font-weight: 700; color: var(--accent-ink); text-decoration: none; text-transform: none; }
.space-bar { display: flex; align-items: center; gap: 10px; max-width: 1100px; margin: 0 auto 14px; padding: 8px 10px 8px 12px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 10%, var(--glass-strong)); box-shadow: var(--raised-sm); font-size: 13.5px; position: sticky; top: 0; z-index: 4; }
.space-bar .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view.wide .space-bar { margin-inline: 0; }
/* all projects */
.pv-space { margin-bottom: 26px; }
.pv-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pv-head h2 { margin: 0; font-size: 17px; }
.pv-logo { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-weight: 800; object-fit: cover; flex: none; box-shadow: var(--raised-sm); }
.pv-logo svg { width: 19px; height: 19px; }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pv-card { --c: var(--accent); display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 0; border-radius: var(--r-lg); background: var(--glass-strong); box-shadow: var(--raised-sm); text-align: start; font: inherit; color: var(--ink); cursor: pointer; border-top: 3px solid var(--c); transition: transform .15s ease, box-shadow .15s ease; }
.pv-card:hover { transform: translateY(-2px); box-shadow: var(--float); }
.pv-card.dim { opacity: .65; }
.pv-top { display: flex; gap: 10px; align-items: center; }
.pv-top b { font-size: 14.5px; line-height: 1.5; }
.pv-top .lock-ic svg { width: 13px; height: 13px; margin-inline-start: 4px; opacity: .6; }
.pv-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--ink-2); align-items: center; }
.pv-meta svg { width: 13px; height: 13px; vertical-align: -2px; }
.pv-meta .late { color: var(--pom); font-weight: 700; }
.pv-people .more { font-size: 11px; color: var(--ink-3); margin-inline-start: 6px; }
.pv-add { align-items: center; justify-content: center; min-height: 110px; color: var(--ink-3); border-top-style: dashed; font-weight: 700; }
.pv-add svg { width: 22px; height: 22px; }
@media (max-width: 860px) {
  .sb-head .only-desktop { display: none; }
  .pv-grid { grid-template-columns: 1fr 1fr; }
  .space-bar { margin: 0 12px 12px; }
}
@media (max-width: 480px) { .pv-grid { grid-template-columns: 1fr; } }
.sort-item .pin-top { opacity: .35; } .sort-item .pin-top.on { opacity: 1; color: var(--saffron); } .sort-item .pin-top.on svg { fill: currentColor; }
/* quick entry: where / who */
.qe-target { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 4px; }
.qe-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 12px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--ink) 5%, transparent); box-shadow: var(--inset); font: inherit; color: var(--ink); cursor: pointer; text-align: start; position: relative; min-width: 0; }
.qe-pick:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.qp-label { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.qp-val { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; max-width: 100%; min-width: 0; overflow: hidden; white-space: nowrap; }
.qp-val > span { overflow: hidden; text-overflow: ellipsis; }
.qp-val svg { width: 15px; height: 15px; flex: none; }
.qp-logo, .qp-dot { width: 18px; height: 18px; border-radius: 6px; object-fit: cover; flex: none; }
.qp-sep { color: var(--ink-3); }
.qe-pick .qp-chev { position: absolute; top: 10px; inset-inline-end: 10px; width: 14px; height: 14px; color: var(--ink-3); }
.qe-notify:empty { display: none; }
.qe-notify { display: grid; gap: 8px; margin: 6px 0 2px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.qn-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.qn-head svg { width: 15px; height: 15px; }
.qn-sms { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
@media (max-width: 480px) { .qe-target { grid-template-columns: 1fr; } }
/* swipe on a task */
.swipeable { touch-action: pan-y; position: relative; }
.swipeable.swiping { transition: none; z-index: 2; background: var(--glass-strong); box-shadow: var(--raised-sm); border-radius: 12px; }
.swipeable.swipe-back { transition: transform .2s ease; }
.swipe-layer { position: absolute; z-index: 1; border-radius: 12px; display: flex; align-items: center; padding: 0 18px; background: color-mix(in srgb, var(--sc) 22%, transparent); color: var(--sc); pointer-events: none; }
.swipe-layer.far { background: var(--sc); color: #fff; }
.swipe-layer.right { justify-content: flex-start; }
.swipe-layer.left { justify-content: flex-end; }
[dir=rtl] .swipe-layer.right { justify-content: flex-end; }
[dir=rtl] .swipe-layer.left { justify-content: flex-start; }
.swipe-act { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.swipe-act svg { width: 20px; height: 20px; }
.task-list, ul.tasks { position: relative; }
.verify-email { text-align: center; }
.verify-email .ap-ic { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.verify-email .ap-ic svg { width: 30px; height: 30px; }
.verify-email p { line-height: 1.8; margin: 6px 0; }
.verify-email .field { text-align: start; }
/* hands-on lessons */
.th-sec { display: flex; align-items: center; gap: 6px; margin: 12px 4px 6px; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.th-sec svg { width: 14px; height: 14px; }
.th-ti.hands { background: color-mix(in srgb, var(--saffron) 18%, transparent); color: var(--saffron-ink); }
@media (max-width: 860px) { .tour-hub { max-height: calc(100vh - 84px - var(--safe-b) - 24px); max-height: calc(100dvh - 84px - var(--safe-b) - 12px - env(safe-area-inset-top)); } }
.coach { position: fixed; z-index: 96; bottom: 22px; inset-inline-start: 22px; width: min(380px, calc(100vw - 24px)); border-radius: var(--r-xl); box-shadow: var(--float); padding: 14px 16px; animation: rise .3s cubic-bezier(.2, .9, .3, 1); transition: box-shadow .3s; }
.coach.ok { box-shadow: 0 0 0 3px #2BB673, var(--float); }
.co-head { display: flex; align-items: center; gap: 10px; }
.co-head small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 700; }
.co-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--saffron) 18%, transparent); color: var(--saffron-ink); flex: none; }
.co-ic svg { width: 18px; height: 18px; }
.co-bar { height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 8%, transparent); margin: 10px 0 8px; overflow: hidden; }
.co-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s ease; }
.co-text { margin: 4px 0 12px; font-size: 15px; line-height: 1.85; font-weight: 600; }
.coach.ok .co-text { color: #1F8A57; }
.co-text svg { width: 18px; height: 18px; vertical-align: -3px; }
.co-foot { display: flex; align-items: center; gap: 8px; }
.co-done { text-align: center; padding: 6px 0 10px; }
.co-party { font-size: 34px; display: block; }
.co-done p { margin: 4px 0 0; color: var(--ink-2); }
.coach-ring { position: fixed; z-index: 97; pointer-events: none; border-radius: 14px; box-shadow: 0 0 0 3px var(--saffron), 0 0 0 8px color-mix(in srgb, var(--saffron) 30%, transparent); animation: coach-pulse 1.1s ease-in-out infinite; }
@keyframes coach-pulse { 50% { box-shadow: 0 0 0 3px var(--saffron), 0 0 0 14px color-mix(in srgb, var(--saffron) 0%, transparent); } }
@media (max-width: 860px) { .coach { bottom: calc(84px + var(--safe-b)); inset-inline: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .coach-ring { animation: none; } }
/* org chart dragging */
.oc-card.drop-hover, .oc-row.drop-hover, .oc-li-main.drop-hover { box-shadow: 0 0 0 3px var(--accent), var(--float); transform: scale(1.04); }
.oc-dragging .oc-nodrop { opacity: .45; }
.oc-card.dragging, .oc-row.dragging, .oc-li-main.dragging { opacity: .4; }
.oc-up { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); cursor: pointer; opacity: 0; transition: opacity .15s; }
.oc-up svg { width: 15px; height: 15px; }
.oc-card:hover .oc-up, .oc-card:focus-within .oc-up { opacity: 1; }
@media (pointer: coarse) { .oc-up { opacity: .85; } }
.oc-card, .oc-row, .oc-li-main { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.oc-auto summary { cursor: pointer; color: var(--accent-ink); font-weight: 700; margin-top: 2px; } .oc-auto p { margin: 4px 0 0; }
.push-res { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.push-res li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.push-res li svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.push-res li.ok svg { color: #2BB673; } .push-res li.bad svg { color: var(--pom); }
.push-res .chip { margin-inline-start: 6px; }
