/* SSI Workspace — one stylesheet, no build step.
   Tokens → base → layout shell → components → pages → responsive. */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef0f3;
  --border: #e4e7ec;
  --border-strong: #cfd4dc;
  --text: #1a1d23;
  --text-2: #4b5563;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --accent: #1aa400;
  --accent-hover: #158500;
  --accent-soft: #e6f6e0;
  --accent-text: #146e00;
  --brand-black: #111111;
  --green: #16a34a;  --green-soft: #dcfce7;  --green-text: #15803d;
  --amber: #d97706;  --amber-soft: #fef3c7;  --amber-text: #b45309;
  --red: #dc2626;    --red-soft: #fee2e2;    --red-text: #b91c1c;
  --purple: #7c3aed; --purple-soft: #ede9fe; --purple-text: #6d28d9;
  --blue: #2563eb;   --blue-soft: #e8efff;   --blue-text: #1e40af;
  --gray-soft: #eef0f3; --gray-text: #4b5563;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .08);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, .16);
  --sidebar-w: 240px;
  --sidebar-w-collapsed: 64px;
  --topbar-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark;
  --bg: #0f1115; --surface: #171a21; --surface-2: #1d2129; --surface-3: #252a34;
  --border: #2a2f3a; --border-strong: #3a404d; --text: #e6e8ec; --text-2: #b4bac6; --muted: #8b93a1; --muted-2: #6b7280;
  --accent: #22c20a; --accent-hover: #4ad630; --accent-soft: #15301a; --accent-text: #7ee868;
  --green-soft: #15291d; --green-text: #4ade80; --amber-soft: #2e2410; --amber-text: #fbbf24;
  --red-soft: #341a1a; --red-text: #f87171; --purple-soft: #261d3a; --purple-text: #c4b5fd;
  --blue-soft: #1e2a44; --blue-text: #93c5fd;
  --gray-soft: #252a34; --gray-text: #b4bac6;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 4px 12px rgba(0,0,0,.4); --shadow-lg: 0 16px 40px rgba(0,0,0,.6);
}

/* ---- Base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a.plain { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
kbd { font: 11px var(--mono); padding: 1px 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); background: var(--surface); }
.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.small { font-size: .8125rem; }
.strong { font-weight: 600; color: var(--text); }
.text-red { color: var(--red-text); }
.hidden { display: none !important; }
.grow { flex: 1; }
.inline { display: inline; }
.icon { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.icon-xs { width: 14px; height: 14px; vertical-align: -2px; }
.lead { color: var(--text-2); max-width: 70ch; margin-bottom: 1rem; white-space: pre-line; }
.prose { white-space: pre-line; color: var(--text-2); }

/* ---- App shell ------------------------------------------------------- */
.app { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 40; transition: width .15s ease, transform .2s ease; }
.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); transition: margin .15s ease; overflow-x: clip; }
.brand { display: flex; align-items: center; gap: 10px; height: var(--topbar-h); padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }
.brand-mark { width: 32px; height: 32px; display: none; flex: none; }
.brand-mark img { width: 100%; height: 100%; display: block; }
.nav { padding: 10px 10px; flex: 1; overflow-y: auto; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); padding: 14px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); color: var(--text-2); font-weight: 500; white-space: nowrap; width: 100%; background: none; border: 0; cursor: pointer; text-align: left; }
.nav-link:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: var(--accent-text); }
.nav-link .icon { width: 19px; height: 19px; }
.sidebar-footer { padding: 10px; border-top: 1px solid var(--border); }
.sidebar-credit { display: block; padding: 6px 10px 2px; font-size: .7rem; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-credit a { color: var(--muted); }
html.sb-collapsed .sidebar-credit { display: none; }
.sidebar-backdrop { display: none; }

html.sb-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
html.sb-collapsed .main { margin-left: var(--sidebar-w-collapsed); }
html.sb-collapsed .brand-logo, html.sb-collapsed .nav-label, html.sb-collapsed .nav-section { display: none; }
html.sb-collapsed .brand-mark { display: block; }
html.sb-collapsed .nav-link { justify-content: center; padding: 10px; }
html.sb-collapsed .brand { justify-content: center; padding: 0; }
html.sb-collapsed .sb-toggle .icon { transform: rotate(180deg); }

.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.menu-btn { display: none; }
.search { position: relative; flex: 1; min-width: 0; max-width: 520px; display: flex; align-items: center; }
.search-icon { position: absolute; left: 10px; color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.search input[type="search"] { width: 100%; min-width: 0; height: 36px; min-height: 0; padding: 0 40px 0 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: .9rem; }
.search input[type="search"]:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.search kbd { position: absolute; right: 10px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.theme-btn .icon-moon { display: none; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: block; }
:root[data-theme="dark"] .theme-btn .icon-sun { display: none; }
.dropdown-item .tick { margin-left: auto; width: 14px; height: 14px; opacity: 0; }
.dropdown-item.is-active .tick { opacity: 1; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 0; background: none; border-radius: 999px; cursor: pointer; font-weight: 500; }
.user-btn:hover { background: var(--surface-3); }
.badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.content { padding: 24px; max-width: 1280px; margin: 0 auto; }

/* ---- Buttons ---------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 500; font-size: .9rem; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .1s, border-color .1s; }
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: var(--muted-2); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-danger-ghost { border-color: transparent; background: transparent; color: var(--red-text); }
.btn-danger-ghost:hover { background: var(--red-soft); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: .8125rem; }
.btn-block { width: 100%; justify-content: center; height: 40px; }
.btn.disabled { opacity: .4; pointer-events: none; }
.btn-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius); border: 0; background: none; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.icon-btn-sm { width: 28px; height: 28px; }
.icon-btn-sm .icon { width: 15px; height: 15px; }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red-text); }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: .8125rem; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.segmented { display: inline-flex; background: var(--surface-3); border-radius: var(--radius); padding: 3px; }
.segmented a { padding: 5px 12px; border-radius: 6px; font-size: .85rem; font-weight: 500; color: var(--text-2); }
.segmented a:hover { text-decoration: none; color: var(--text); }
.segmented a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---- Dropdowns -------------------------------------------------------- */
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.dropdown-right { left: auto; right: 0; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-wide { width: 360px; max-width: calc(100vw - 32px); right: 0; left: auto; padding: 0; }
.dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 6px; border: 0; background: none; text-align: left; color: var(--text); cursor: pointer; font-size: .9rem; }
.dropdown-item:hover { background: var(--surface-3); text-decoration: none; }
.dropdown-item .icon { width: 16px; height: 16px; color: var(--muted); }
.dropdown-item kbd { margin-left: auto; }
.dropdown-item.danger { color: var(--red-text); }
.dropdown-item.danger:hover { background: var(--red-soft); }
.dropdown-sep { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.dropdown-wide .dropdown-head { padding: 12px 14px; }
.dropdown-menu:not(.dropdown-wide) .dropdown-head { margin: -6px -6px 6px; }
.dropdown-foot { display: block; text-align: center; padding: 10px; font-size: .85rem; border-top: 1px solid var(--border); }
.dropdown-empty { padding: 24px; text-align: center; color: var(--muted); font-size: .85rem; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); font-size: .875rem; align-items: flex-start; }
.notif-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-item.unread { background: var(--accent-soft); }
.notif-item.unread:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface-3)); }
.notif-item .when { display: block; color: var(--muted); font-size: .75rem; margin-top: 2px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.notif-item:not(.unread) .notif-dot { background: transparent; }

/* ---- Alerts & toasts -------------------------------------------------- */
.alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: .9rem; border: 1px solid; }
.alert-success { background: var(--green-soft); color: var(--green-text); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.alert-error { background: var(--red-soft); color: var(--red-text); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.alert-close { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .7; display: flex; }
.toast-stack { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { padding: 10px 14px; border-radius: var(--radius); background: var(--text); color: var(--bg); font-size: .875rem; box-shadow: var(--shadow-lg); animation: toast-in .2s ease; max-width: 360px; }
.toast.error { background: var(--red); color: #fff; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---- Page structure ------------------------------------------------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head > * { min-width: 0; max-width: 100%; }
.page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head p { margin: 2px 0 0; }
.page-title-row { display: flex; align-items: center; gap: 14px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; color: var(--muted); margin-bottom: 4px; }
.back:hover { color: var(--text); text-decoration: none; }
.count { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--muted); vertical-align: middle; }
.count-red { background: var(--red-soft); color: var(--red-text); }
.meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.grid-1-2 { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2.2fr); gap: 20px; align-items: start; }
.grid-2-1 > *, .grid-1-2 > *, .stack > *, .card { min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head-actions { display: flex; gap: 6px; }
.card-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.card > .table-wrap { margin: -18px -20px; }
.card > .table-wrap + .pagination { margin-top: 18px; }
.card .empty { margin: 4px 0; }

/* ---- Stats ------------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: inherit; box-shadow: var(--shadow); transition: border-color .1s, transform .1s; }
.stat:hover { text-decoration: none; border-color: var(--border-strong); transform: translateY(-1px); }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.stat-icon .icon { width: 20px; height: 20px; }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.stat-label { font-size: .8125rem; color: var(--muted); }
.stat-alert .stat-value { color: var(--red-text); }
.tone-blue { background: var(--blue-soft); color: var(--blue-text); }
.tone-green { background: var(--green-soft); color: var(--green-text); }
.tone-amber { background: var(--amber-soft); color: var(--amber-text); }
.tone-red { background: var(--red-soft); color: var(--red-text); }
.tone-purple { background: var(--purple-soft); color: var(--purple-text); }
.tone-gray { background: var(--gray-soft); color: var(--gray-text); }

/* ---- Tables ----------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover tbody tr[data-href] { cursor: pointer; }
.table-hover tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .col-actions { text-align: right; white-space: nowrap; width: 1%; }
.table .col-actions .icon-btn { opacity: 0; }
.table tr:hover .col-actions .icon-btn, .table .col-actions .icon-btn:focus { opacity: 1; }
.table tr.is-muted td { opacity: .6; }
.cell-main { display: flex; align-items: center; gap: 10px; }
.group-row td { padding: 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.group-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; }
.progress-cell { display: flex; align-items: center; gap: 8px; min-width: 160px; }
.col-progress { width: 200px; }

/* Task rows with inline controls */
.table-tasks { min-width: 760px; }
.table-tasks th:first-child, .table-tasks td.col-check { width: 36px; padding-right: 0; }
.table-tasks .col-title { min-width: 220px; }
.table-tasks .col-status { width: 150px; }
.table-tasks .col-priority { width: 125px; }
.table-tasks .col-assignee { width: 160px; }
.table-tasks .col-due { width: 150px; }
.task-title { color: var(--text); font-weight: 500; }
.task-row.is-done .task-title { text-decoration: line-through; color: var(--muted); }
.task-row.is-done .col-title .muted { opacity: .7; }
.checkbox { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: transparent; padding: 0; flex: none; transition: all .1s; }
.checkbox:hover { border-color: var(--accent); color: var(--accent); }
.checkbox.on { background: var(--green); border-color: var(--green); color: #fff; }
.checkbox .icon { width: 13px; height: 13px; stroke-width: 3; }
.checkbox-lg { width: 28px; height: 28px; border-radius: 8px; }
.checkbox-lg .icon { width: 18px; height: 18px; }
.task-heading { font-size: 1.4rem; }
.task-heading.is-done span { text-decoration: line-through; color: var(--muted); }

/* Inline selects styled as pills */
.select-pill, .select-plain, .input-plain { appearance: none; -webkit-appearance: none; border: 1px solid transparent; background: transparent; font: inherit; font-size: .8125rem; color: var(--text); padding: 4px 8px; border-radius: 6px; cursor: pointer; max-width: 100%; }
.select-pill { font-weight: 600; width: auto; max-width: 100%; padding-right: 24px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; }
.select-pill.tone-todo, .select-pill.tone-planning { background-color: var(--gray-soft); color: var(--gray-text); }
.select-pill.tone-in_progress, .select-pill.tone-active { background-color: var(--blue-soft); color: var(--blue-text); }
.select-pill.tone-review, .select-pill.tone-on_hold { background-color: var(--amber-soft); color: var(--amber-text); }
.select-pill.tone-done, .select-pill.tone-completed { background-color: var(--green-soft); color: var(--green-text); }
.select-pill.tone-archived { background-color: var(--surface-3); color: var(--muted); }
.select-pill.prio-low { background-color: var(--surface-3); color: var(--muted); }
.select-pill.prio-normal { background-color: var(--gray-soft); color: var(--gray-text); }
.select-pill.prio-high { background-color: var(--amber-soft); color: var(--amber-text); }
.select-pill.prio-urgent { background-color: var(--red-soft); color: var(--red-text); }
.select-plain:hover, .input-plain:hover { border-color: var(--border); background: var(--surface-2); }
.select-plain:focus, .input-plain:focus, .select-pill:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-plain { color: var(--text-2); }
.input-plain.is-overdue { color: var(--red-text); font-weight: 600; }
.input-plain:not([value=""]) { color: var(--text); }
.select-pill:disabled, .select-plain:disabled, .input-plain:disabled { opacity: .5; }

/* ---- Pills, chips, avatars, dots ------------------------------------ */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.pill-xs { padding: 1px 6px; font-size: .7rem; }
.pill-gray { background: var(--gray-soft); color: var(--gray-text); }
.pill-blue { background: var(--blue-soft); color: var(--blue-text); }
.pill-amber { background: var(--amber-soft); color: var(--amber-text); }
.pill-green { background: var(--green-soft); color: var(--green-text); }
.pill-red { background: var(--red-soft); color: var(--red-text); }
.pill-purple { background: var(--purple-soft); color: var(--purple-text); }
.pill-muted { background: var(--surface-3); color: var(--muted); }
.pill-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 500; background: var(--surface-3); color: var(--text-2); border: 0; cursor: pointer; font-family: inherit; }
.chip-link:hover { background: var(--accent-soft); color: var(--accent-text); text-decoration: none; }
button.chip:hover { background: var(--accent-soft); color: var(--accent-text); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; font-size: .7rem; font-weight: 700; letter-spacing: .02em; color: hsl(var(--h, 220) 45% 30%); background: hsl(var(--h, 220) 70% 88%); flex: none; }
:root[data-theme="dark"] .avatar { color: hsl(var(--h, 220) 70% 85%); background: hsl(var(--h, 220) 40% 28%); }
.avatar-sm { width: 26px; height: 26px; font-size: .65rem; }
.avatar-xs { width: 22px; height: 22px; font-size: .6rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.avatars { display: inline-flex; align-items: center; }
.avatars .avatar { margin-left: -6px; border: 2px solid var(--surface); }
.avatars .avatar:first-child { margin-left: 0; }
.avatar-add { background: var(--surface-3) !important; color: var(--muted) !important; border: 2px dashed var(--border-strong) !important; cursor: pointer; }
.avatar-add:hover { color: var(--accent) !important; border-color: var(--accent) !important; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pc, var(--accent)); margin-right: 6px; vertical-align: 1px; flex: none; }
.dot-lg { width: 12px; height: 12px; }
.due { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--muted); font-weight: 500; }
.due-overdue { color: var(--red-text); }
.due-today { color: var(--amber-text); }
.due-soon { color: var(--blue-text); }

/* ---- Forms ------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: .8125rem; font-weight: 600; color: var(--text-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.req { color: var(--red); }
.hint { font-size: .75rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="search"], input[type="number"], input[type="date"], input[type="datetime-local"], select, textarea { width: 100%; font: inherit; font-size: .9rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 8px 10px; min-height: 36px; }
textarea { resize: vertical; line-height: 1.5; }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
.field-error { font-size: .78rem; color: var(--red-text); }
.field:has(.field-error) input, .field:has(.field-error) select { border-color: var(--red); }
.form-narrow { max-width: 680px; }
.form-narrow-wide { max-width: 820px; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--border); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch span { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--c); border: 3px solid transparent; transition: transform .1s; }
.swatch input:checked + span { border-color: var(--surface); box-shadow: 0 0 0 2px var(--c); transform: scale(1.1); }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card input { margin-top: 3px; accent-color: var(--accent); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters select, .filters input { width: auto; min-width: 140px; }
.filters .check { padding: 0 6px; }
.search-field { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search-field .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.search-field input { width: 100%; padding-left: 32px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 14px; }
.inline-form input, .inline-form select { width: auto; }
.inline-form .grow { flex: 1; min-width: 180px; }
.quick-when { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- Tabs ------------------------------------------------------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; color: var(--muted); font-weight: 500; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--accent-text); border-bottom-color: var(--accent); }

/* ---- Empty state ----------------------------------------------------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; color: var(--muted-2); }
.empty-icon .icon { width: 24px; height: 24px; }
.empty h3 { color: var(--text); margin-bottom: 4px; font-size: 1rem; }
.empty p { max-width: 36ch; margin: 0 auto 14px; font-size: .9rem; }

/* ---- Details list ---------------------------------------------------- */
.details > div { display: flex; gap: 10px; padding: 7px 0; font-size: .9rem; }
.details dt { color: var(--muted); flex: none; padding-top: 2px; }
.details dd { word-break: break-word; }
.prop-list { display: flex; flex-direction: column; gap: 4px; }
.prop { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.prop:last-child { border-bottom: 0; }
.prop > label { font-size: .8125rem; color: var(--muted); font-weight: 500; flex: none; }
.prop select, .prop input { max-width: 180px; text-align: right; }

/* ---- Activity --------------------------------------------------------- */
.activity li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .875rem; }
.activity li:last-child { border-bottom: 0; }
.activity-body { min-width: 0; }
.activity-link { color: var(--text-2); }
.activity-link:hover { color: var(--accent); }

/* ---- Notes ------------------------------------------------------------ */
.note-add { padding: 12px 14px; margin-bottom: 16px; }
.note-add textarea { border: 0; padding: 4px 2px; min-height: 40px; box-shadow: none; background: transparent; }
.note-add textarea:focus { box-shadow: none; }
.note-add-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.note-list { display: flex; flex-direction: column; gap: 10px; }
.note { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px; }
.note.pinned, .note-card.pinned { border-color: color-mix(in srgb, var(--amber) 40%, var(--border)); background: color-mix(in srgb, var(--amber-soft) 35%, var(--surface)); }
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: .85rem; }
.note-meta { flex: 1; }
.note-actions { display: flex; gap: 2px; margin-left: auto; opacity: 0; transition: opacity .1s; }
.note:hover .note-actions, .note-card:hover .note-actions, .note-actions:focus-within { opacity: 1; }
.note-body { white-space: pre-line; word-break: break-word; font-size: .9rem; color: var(--text); }
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 16px; }
.note-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.note-card .note-body { flex: 1; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.note-foot { display: flex; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }

/* ---- Reminders -------------------------------------------------------- */
.reminder-list { display: flex; flex-direction: column; }
.reminder { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.reminder:last-child { border-bottom: 0; }
.reminder-check { padding-top: 2px; }
.reminder-body { flex: 1; min-width: 0; }
.reminder-title { font-weight: 500; }
.reminder.done .reminder-title { text-decoration: line-through; color: var(--muted); }
.reminder.overdue .reminder-body .small { color: var(--red-text); }
.row-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .1s; }
.reminder:hover .row-actions, .row-actions:focus-within { opacity: 1; }

/* ---- Projects --------------------------------------------------------- */
.project-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.project-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: inherit; box-shadow: var(--shadow); transition: border-color .1s, transform .1s; }
.project-card:hover { text-decoration: none; border-color: var(--pc); transform: translateY(-1px); }
.project-card-head { display: flex; align-items: center; gap: 8px; }
.project-card-head strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; flex: 1; min-width: 60px; }
.progress-bar { height: 100%; background: var(--pc, var(--green)); border-radius: 999px; transition: width .3s; }
.table .progress-bar { background: var(--green); }


/* ---- Modals ----------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; background: rgba(10, 14, 22, .5); backdrop-filter: blur(2px); overflow-y: auto; }
.modal[hidden] { display: none; }
.modal-box { width: 100%; max-width: 560px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); animation: modal-in .15s ease; border: 1px solid var(--border); }
@keyframes modal-in { from { transform: translateY(-8px); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.modal-body { padding: 16px 20px 4px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--border); }

/* ---- Notifications page, search ------------------------------------- */
.notif-page li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.notif-page li:last-child { border-bottom: 0; }
.notif-page li.unread .notif-text { font-weight: 600; }
.notif-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); color: var(--muted); display: flex; align-items: center; justify-content: center; flex: none; }
.notif-page li.unread .notif-icon { background: var(--accent-soft); color: var(--accent-text); }
.notif-text { flex: 1; color: var(--text); }
.search-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.result-list li a { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--text); flex-wrap: wrap; }
.result-list li:last-child a { border-bottom: 0; }
.result-list li a:hover { text-decoration: none; color: var(--accent); }

/* ---- Pagination ------------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; }
.pager { display: flex; align-items: center; gap: 8px; }

/* ---- Auth & error ----------------------------------------------------- */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-brand { display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.auth-brand img { height: 52px; width: auto; max-width: 100%; }
.auth-foot { text-align: center; margin-top: 18px; font-size: .78rem; color: var(--muted); }
.auth-foot a { color: var(--muted); }
.auth-card { padding: 28px; }
.auth-card h1 { margin-bottom: 4px; }
.auth-card p { margin-bottom: 20px; }
.error-page { text-align: center; padding: 60px 20px; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--border-strong); letter-spacing: -.04em; line-height: 1; margin-bottom: 8px; }
.error-page h1 { margin-bottom: 8px; }
.error-page p { max-width: 40ch; margin: 0 auto 20px; }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
  .search-results { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; box-shadow: var(--shadow-lg); }
  html.sb-open .sidebar { transform: translateX(0); }
  html.sb-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 39; }
  html.sb-collapsed .brand-logo-light, html.sb-collapsed .nav-label, html.sb-collapsed .nav-section { display: initial; }
  html.sb-collapsed .brand-mark { display: none; }
  html.sb-collapsed:root[data-theme="dark"] .brand-logo-light { display: none; }
  html.sb-collapsed:root[data-theme="dark"] .brand-logo-dark { display: block; }
  html.sb-collapsed .nav-link { justify-content: flex-start; padding: 8px 10px; }
  .sb-toggle { display: none; }
  .main { margin-left: 0 !important; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; gap: 8px; }
  .search kbd, .hide-sm { display: none; }
  .content { padding: 16px; }
  .field-row, .radio-cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { min-width: 0; }
  .stat-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-head { gap: 10px; }
  .stat { padding: 12px 14px; gap: 10px; }
  .stat-value { font-size: 1.25rem; }
  .page-head h1 { font-size: 1.3rem; }
  .table .col-actions .icon-btn, .note-actions, .row-actions { opacity: 1; }
  .card { padding: 14px 16px; }
  .card > .table-wrap { margin: -14px -16px; }
  .dropdown-wide { position: fixed; left: 8px; right: 8px; top: calc(var(--topbar-h) + 4px); width: auto; }
}
@media print {
  .sidebar, .topbar, .toast-stack, .modal { display: none !important; }
  .main { margin: 0 !important; }
}

/* ---- Notes: switchable list / cards ---------------------------------- */
.notes-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.segmented-sm button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 0; background: none; border-radius: 6px; font-size: .8rem; font-weight: 500; color: var(--text-2); cursor: pointer; }
.segmented-sm button:hover { color: var(--text); }
.segmented-sm button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.notes-wrap[data-notes-view="list"] .notes-cards-view { display: none; }
.notes-wrap[data-notes-view="cards"] .notes-list-view { display: none; }
.notes-list-view { padding: 0; overflow: hidden; }
.notes-list-view > .table-wrap { margin: 0; }
.table-notes td { vertical-align: top; }
.table-notes .col-pin { width: 28px; padding-right: 0; color: var(--amber-text); }
.table-notes .col-by { width: 160px; white-space: nowrap; }
.table-notes .col-when { width: 130px; white-space: nowrap; }
.table-notes .col-note { min-width: 260px; }
.table-notes .col-actions { width: 1%; white-space: nowrap; }
.table-notes .col-actions .inline { display: inline; }
.table-notes tr.pinned td { background: color-mix(in srgb, var(--amber-soft) 35%, var(--surface)); }
.note-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; word-break: break-word; cursor: pointer; color: var(--text); }
.note-text.expanded { -webkit-line-clamp: unset; display: block; cursor: default; }
.pin-flag { display: inline-flex; margin-top: 3px; }
@media (max-width: 768px) {
  .table-notes { min-width: 640px; }
  .notes-list-view > .table-wrap { overflow-x: auto; }
}

/* =====================================================================
   Visual enhancements: depth, motion, coloured icon tiles.
   Everything here overrides the base rules above. Motion is disabled
   under prefers-reduced-motion at the end of this section.
   ===================================================================== */
:root {
  --shadow-card: 0 1px 2px rgba(16,24,40,.04), 0 6px 16px -6px rgba(16,24,40,.10), 0 0 0 1px rgba(16,24,40,.03);
  --shadow-hover: 0 14px 30px -10px rgba(16,24,40,.22), 0 2px 6px rgba(16,24,40,.06), 0 0 0 1px rgba(16,24,40,.04);
  --shadow-pop: 0 24px 60px -16px rgba(16,24,40,.35), 0 0 0 1px rgba(16,24,40,.05);
  --ease: cubic-bezier(.2,.8,.2,1);
  --g-green: linear-gradient(135deg, #34c21a, #148a00);
  --g-blue: linear-gradient(135deg, #60a5fa, #2563eb);
  --g-purple: linear-gradient(135deg, #a78bfa, #6d28d9);
  --g-amber: linear-gradient(135deg, #fbbf24, #d97706);
  --g-red: linear-gradient(135deg, #f87171, #dc2626);
  --g-teal: linear-gradient(135deg, #2dd4bf, #0d9488);
  --g-pink: linear-gradient(135deg, #f472b6, #db2777);
  --g-orange: linear-gradient(135deg, #fb923c, #ea580c);
  --g-indigo: linear-gradient(135deg, #818cf8, #4338ca);
  --g-slate: linear-gradient(135deg, #94a3b8, #475569);
  --g-gray: linear-gradient(135deg, #cbd5e1, #64748b);
}
:root[data-theme="dark"] {
  --shadow-card: 0 1px 2px rgba(0,0,0,.5), 0 8px 20px -8px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04);
  --shadow-hover: 0 18px 36px -12px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.07);
  --shadow-pop: 0 30px 70px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.07);
}

/* Page canvas with a faint brand glow */
body { background: radial-gradient(900px 500px at 8% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%), radial-gradient(700px 400px at 100% 0%, color-mix(in srgb, #2563eb 6%, transparent), transparent 60%), var(--bg); }

/* Sidebar & topbar */
.sidebar { background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--surface) 92%, var(--bg)) 100%); box-shadow: 1px 0 0 var(--border), 8px 0 30px -20px rgba(16,24,40,.15); }
.topbar { box-shadow: 0 1px 0 var(--border), 0 6px 20px -16px rgba(16,24,40,.25); }
.nav-link { position: relative; gap: 12px; padding: 7px 10px; transition: background .15s var(--ease), color .15s, transform .15s var(--ease); }
.nav-link:hover { transform: translateX(2px); }
.nav-link.active { background: linear-gradient(90deg, var(--accent-soft), transparent 85%); }
.nav-link.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
.nav-icon { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--surface-3); color: var(--text-2); transition: all .2s var(--ease); box-shadow: inset 0 0 0 1px rgba(16,24,40,.04); }
.nav-icon .icon { width: 17px; height: 17px; }
.nav-link:hover .nav-icon { transform: scale(1.06); }
.nav-link.active .nav-icon { color: #fff; box-shadow: 0 6px 14px -6px rgba(16,24,40,.5), inset 0 1px 0 rgba(255,255,255,.25); }
.nav-link[data-tone="green"].active .nav-icon { background: var(--g-green); }
.nav-link[data-tone="blue"].active .nav-icon { background: var(--g-blue); }
.nav-link[data-tone="purple"].active .nav-icon { background: var(--g-purple); }
.nav-link[data-tone="teal"].active .nav-icon { background: var(--g-teal); }
.nav-link[data-tone="pink"].active .nav-icon { background: var(--g-pink); }
.nav-link[data-tone="orange"].active .nav-icon { background: var(--g-orange); }
.nav-link[data-tone="indigo"].active .nav-icon { background: var(--g-indigo); }
.nav-link[data-tone="slate"].active .nav-icon { background: var(--g-slate); }
.nav-link[data-tone="green"] .nav-icon { color: #148a00; background: #e6f6e0; }
.nav-link[data-tone="blue"] .nav-icon { color: #1d4ed8; background: #e8efff; }
.nav-link[data-tone="purple"] .nav-icon { color: #6d28d9; background: #ede9fe; }
.nav-link[data-tone="teal"] .nav-icon { color: #0f766e; background: #ccfbf1; }
.nav-link[data-tone="pink"] .nav-icon { color: #be185d; background: #fce7f3; }
.nav-link[data-tone="orange"] .nav-icon { color: #c2410c; background: #ffedd5; }
.nav-link[data-tone="indigo"] .nav-icon { color: #4338ca; background: #e0e7ff; }
.nav-link[data-tone="slate"] .nav-icon { color: #475569; background: #e2e8f0; }
:root[data-theme="dark"] .nav-link:not(.active) .nav-icon { background: var(--surface-3); color: var(--text-2); }
.nav-link.active .nav-icon { color: #fff !important; }
html.sb-collapsed .nav-link.active::before { display: none; }
html.sb-collapsed .nav-link { padding: 7px; }

/* Cards, stats, tiles */
.card { box-shadow: var(--shadow-card); border-color: transparent; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
:root[data-theme="dark"] .card { border-color: var(--border); }
.stat { box-shadow: var(--shadow-card); border-color: transparent; position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.5), transparent 50%); pointer-events: none; }
:root[data-theme="dark"] .stat::after { background: linear-gradient(135deg, rgba(255,255,255,.04), transparent 50%); }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.stat-icon { color: #fff !important; box-shadow: 0 8px 18px -8px rgba(16,24,40,.55), inset 0 1px 0 rgba(255,255,255,.3); }
.stat-icon.tone-blue { background: var(--g-blue); }
.stat-icon.tone-green { background: var(--g-green); }
.stat-icon.tone-purple { background: var(--g-purple); }
.stat-icon.tone-amber { background: var(--g-amber); }
.stat-icon.tone-red { background: var(--g-red); }
.stat-icon.tone-gray { background: var(--g-gray); }
.stat-value { background: linear-gradient(180deg, var(--text), var(--text-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-alert .stat-value { background: var(--g-red); -webkit-background-clip: text; background-clip: text; }
.stat-alert .stat-icon { animation: pulse-ring 2.4s ease-out infinite; }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.45), inset 0 1px 0 rgba(255,255,255,.3); } 70% { box-shadow: 0 0 0 12px rgba(220,38,38,0), inset 0 1px 0 rgba(255,255,255,.3); } 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0), inset 0 1px 0 rgba(255,255,255,.3); } }
.project-card { box-shadow: var(--shadow-card); border-color: transparent; position: relative; overflow: hidden; }
.project-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pc); }
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: transparent; }
.empty-icon { background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); box-shadow: inset 0 0 0 1px var(--border), 0 10px 24px -14px rgba(16,24,40,.3); }

/* Buttons */
.btn { box-shadow: 0 1px 2px rgba(16,24,40,.06), inset 0 1px 0 rgba(255,255,255,.6); transition: transform .12s var(--ease), box-shadow .15s var(--ease), background .12s, border-color .12s; }
:root[data-theme="dark"] .btn { box-shadow: 0 1px 2px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -6px rgba(16,24,40,.25), inset 0 1px 0 rgba(255,255,255,.6); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.btn-primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, #fff), var(--accent)); border-color: color-mix(in srgb, var(--accent) 80%, #000); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 2px rgba(0,0,0,.15), 0 6px 14px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 90%, #fff), var(--accent-hover)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 10px 20px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-ghost, .btn-danger-ghost { box-shadow: none; }
.btn-ghost:hover { transform: none; box-shadow: none; }
.icon-btn { transition: background .12s, transform .12s var(--ease); }
.icon-btn:active { transform: scale(.92); }
.segmented { box-shadow: inset 0 1px 2px rgba(16,24,40,.06); }
.segmented a.active, .segmented-sm button.active { box-shadow: 0 1px 2px rgba(16,24,40,.12), 0 0 0 1px rgba(16,24,40,.04); }

/* Pills & checkboxes */
.pill { box-shadow: inset 0 0 0 1px rgba(16,24,40,.05), inset 0 1px 0 rgba(255,255,255,.4); }
:root[data-theme="dark"] .pill { box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.select-pill { box-shadow: inset 0 0 0 1px rgba(16,24,40,.05); transition: transform .12s var(--ease), box-shadow .15s; }
.select-pill:hover { transform: translateY(-1px); box-shadow: 0 4px 10px -6px rgba(16,24,40,.35), inset 0 0 0 1px rgba(16,24,40,.06); }
.checkbox { transition: all .15s var(--ease); box-shadow: inset 0 1px 2px rgba(16,24,40,.06); }
.checkbox:hover { transform: scale(1.08); }
.checkbox.on { background: var(--g-green); border-color: transparent; box-shadow: 0 4px 10px -4px rgba(20,138,0,.7); animation: pop .3s var(--ease); }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.avatar { box-shadow: inset 0 0 0 1px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.08); background: linear-gradient(135deg, hsl(var(--h, 220) 75% 92%), hsl(var(--h, 220) 65% 82%)); }
:root[data-theme="dark"] .avatar { background: linear-gradient(135deg, hsl(var(--h, 220) 40% 34%), hsl(var(--h, 220) 40% 24%)); }

/* Tables */
.table thead th { background: linear-gradient(180deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 70%, var(--surface))); }
.table tbody tr { transition: background .12s; }
.table-hover tbody tr:hover td:first-child, .table-tasks tbody tr.task-row:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.progress { box-shadow: inset 0 1px 2px rgba(16,24,40,.08); }
.progress-bar { background: linear-gradient(90deg, color-mix(in srgb, var(--pc, var(--green)) 70%, #fff), var(--pc, var(--green))); box-shadow: 0 0 8px color-mix(in srgb, var(--pc, var(--green)) 50%, transparent); transform-origin: left; animation: grow .9s var(--ease); }
.table .progress-bar { background: var(--g-green); }
@keyframes grow { from { transform: scaleX(0); } }
.group-label { box-shadow: inset 0 0 0 1px rgba(16,24,40,.05); }


/* Dropdowns, modals, toasts, bell */
.dropdown-menu { box-shadow: var(--shadow-pop); transform-origin: top; animation: menu-in .16s var(--ease); }
.dropdown-right { transform-origin: top right; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.modal { animation: fade-in .15s ease; }
.modal-box { box-shadow: var(--shadow-pop); animation: modal-in .25s var(--ease); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { transform: translateY(-14px) scale(.97); opacity: 0; } }
.toast { animation: toast-in .3s var(--ease); box-shadow: var(--shadow-pop); }
@keyframes toast-in { from { transform: translateY(12px) scale(.96); opacity: 0; } }
.badge { box-shadow: 0 0 0 2px var(--surface), 0 2px 6px rgba(220,38,38,.5); }
[data-bell].ring .icon { animation: ring .9s var(--ease); transform-origin: top center; }
@keyframes ring { 0% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } 100% { transform: rotate(0); } }
.tab { position: relative; transition: color .12s; border-bottom-color: transparent !important; }
.tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform .2s var(--ease); }
.tab.active::after { transform: scaleX(1); }
.alert { box-shadow: var(--shadow-card); animation: rise .3s var(--ease); }

/* Entrance motion: content blocks rise in with a small stagger */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.content > * { animation: rise .45s var(--ease) both; }
.content > *:nth-child(2) { animation-delay: .04s; }
.content > *:nth-child(3) { animation-delay: .08s; }
.content > *:nth-child(4) { animation-delay: .12s; }
.content > *:nth-child(5) { animation-delay: .16s; }
.stats > .stat { animation: rise .5s var(--ease) both; }
.stats > .stat:nth-child(2) { animation-delay: .06s; }
.stats > .stat:nth-child(3) { animation-delay: .12s; }
.stats > .stat:nth-child(4) { animation-delay: .18s; }

/* Sign-in: glowing blobs behind a floating card */
.auth-body { position: relative; overflow: hidden; background: var(--bg); }
.auth-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.blob-1 { width: 520px; height: 520px; left: -140px; top: -160px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.blob-2 { width: 420px; height: 420px; right: -120px; bottom: -140px; background: rgba(37,99,235,.35); animation-delay: -6s; }
.blob-3 { width: 300px; height: 300px; right: 20%; top: -120px; background: rgba(17,17,17,.12); animation-delay: -12s; }
:root[data-theme="dark"] .blob { opacity: .35; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(40px, 30px) scale(1.08); } }
.auth-wrap { position: relative; z-index: 1; animation: rise .5s var(--ease) both; }
.auth-card { box-shadow: var(--shadow-pop); border-color: transparent; }
.auth-brand img { filter: drop-shadow(0 6px 14px rgba(16,24,40,.15)); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Project labels ----------------------------------------------------
   A label sets --lc (its colour); everything else is derived from it, so any
   colour reads well in both themes. */
:root { --g-cyan: linear-gradient(135deg, #22d3ee, #0e7490); }
.nav-link[data-tone="cyan"] .nav-icon { color: #0e7490; background: #cffafe; }
.nav-link[data-tone="cyan"].active .nav-icon { background: var(--g-cyan); }

.labels { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.label { --lc: #2563eb; display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 7px; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .01em; line-height: 1; white-space: nowrap;
  color: color-mix(in srgb, var(--lc) 75%, #000);
  background: linear-gradient(180deg, color-mix(in srgb, var(--lc) 9%, #fff), color-mix(in srgb, var(--lc) 17%, #fff));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lc) 26%, transparent), 0 1px 2px color-mix(in srgb, var(--lc) 16%, transparent), inset 0 1px 0 rgba(255,255,255,.7);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
a.label:hover { text-decoration: none; transform: translateY(-1px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lc) 45%, transparent), 0 6px 12px -6px color-mix(in srgb, var(--lc) 60%, transparent); }
.label-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--lc) 22%, transparent); flex: none; }
.label-lg { height: 32px; padding: 0 15px 0 12px; font-size: .88rem; gap: 8px; }
.label-lg .label-dot { width: 9px; height: 9px; }
:root[data-theme="dark"] .label { color: color-mix(in srgb, var(--lc) 50%, #fff); background: linear-gradient(180deg, color-mix(in srgb, var(--lc) 22%, var(--surface)), color-mix(in srgb, var(--lc) 15%, var(--surface))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lc) 40%, transparent); }
.cell-stack { display: flex; flex-direction: column; gap: 6px; min-width: 0; align-items: flex-start; }
.project-card .labels { margin-top: -2px; }

/* Filter bar on the projects list */
.label-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 14px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
:root[data-theme="dark"] .label-bar { box-shadow: var(--shadow-card), inset 0 0 0 1px var(--border); }
.label-bar-title { display: inline-flex; align-items: center; gap: 5px; margin-right: 4px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.label-filter { --lc: var(--accent); display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 5px 0 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--text-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s, color .15s; }
.label-filter:not([style]) { padding: 0 13px; }
.label-filter:hover { text-decoration: none; color: var(--text); transform: translateY(-1px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lc) 50%, transparent), 0 6px 14px -8px color-mix(in srgb, var(--lc) 70%, transparent); }
.label-filter.active { color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--lc) 78%, #fff), var(--lc)); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--lc) 75%, transparent), inset 0 1px 0 rgba(255,255,255,.3); }
.label-filter.active .label-dot { background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.label-filter-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: .7rem; color: var(--muted); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.label-filter.active .label-filter-count { color: #fff; background: rgba(255,255,255,.22); box-shadow: none; }
.label-bar-manage { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); }
.label-bar-manage:hover { background: var(--surface-3); color: var(--text); }

/* Labels on the project page */
.project-labels { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.label-add { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 10px; border-radius: 999px; border: 1px dashed var(--border-strong); background: none; color: var(--muted); font-size: .72rem; font-weight: 600; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.label-add:hover { color: var(--accent-text); border-color: var(--accent); background: var(--accent-soft); }
.label-menu { width: 270px; padding: 0; }
.label-menu-body { max-height: 300px; overflow-y: auto; padding: 6px; }
.label-menu-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.label-menu-item:hover { background: var(--surface-2); }
.label-menu-item input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
.label-menu-foot { padding: 8px; border-top: 1px solid var(--border); }

/* Toggle chips in forms */
.label-picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.label-pick { position: relative; cursor: pointer; }
.label-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.label-pick .label { height: 30px; padding: 0 12px 0 10px; font-size: .8rem; }
.label-pick:hover .label { transform: translateY(-1px); }
.label-pick input:checked + .label { color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--lc) 78%, #fff), var(--lc)); box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--lc) 75%, transparent), inset 0 1px 0 rgba(255,255,255,.3); }
.label-pick input:checked + .label .label-dot { background: #fff; box-shadow: none; }
.label-pick input:focus-visible + .label { outline: 2px solid var(--accent); outline-offset: 2px; }
.label-tick { width: 12px; height: 12px; stroke-width: 3; display: none; margin-left: -1px; }
.label-pick input:checked + .label .label-tick { display: inline-block; animation: pop .25s var(--ease); }
.label-manage { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); margin-left: 2px; }

/* Labels admin screen */
.label-preview-box { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 76px; padding: 16px; margin-bottom: 16px; border-radius: var(--radius); border: 1px dashed var(--border-strong); background: radial-gradient(circle at 50% 0%, var(--surface), var(--surface-2)); }
.label-edit .label-preview-box { justify-content: flex-start; min-height: 0; padding: 10px 12px; margin-bottom: 12px; }
.label-admin-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.label-admin-list li:last-child { border-bottom: 0; }
.label-admin-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.label-count { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--muted); padding: 3px 9px; border-radius: 999px; background: var(--surface-2); }
.label-count:hover { text-decoration: none; color: var(--accent-text); background: var(--accent-soft); }
.label-admin-list li:hover .row-actions { opacity: 1; }
.label-admin-list li.editing { display: block; margin: 0 -20px; padding: 16px 20px; background: var(--surface-2); }
.swatch-custom span { display: flex; align-items: center; justify-content: center; color: #fff; background: conic-gradient(#ef4444, #f59e0b, #84cc16, #10b981, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #ef4444); }
.swatch-custom input:checked + span { background: var(--c); }
.swatch-custom input:checked + span .icon { display: none; }
.swatch .color-well { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
@media (max-width: 768px) { .label-admin-list li.editing { margin: 0 -16px; padding: 14px 16px; } }

/* ---- Client profile (kept deliberately simple) ------------------------- */
.client-head-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; color: var(--muted); font-size: .85rem; }
.client-head-meta span { display: inline-flex; align-items: center; gap: 5px; }
.contact-list > div { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.contact-list > div:last-child { border-bottom: 0; }
.contact-list dt { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--surface-2); color: var(--muted); }
.contact-list dt .icon { width: 15px; height: 15px; }
.contact-list dd { flex: 1; min-width: 0; word-break: break-word; }
.contact-list dd small { display: block; font-size: .72rem; color: var(--muted); }
.contact-list .icon-btn { flex: none; }
[data-copy].copied { color: var(--green-text) !important; }
.simple-projects li { border-bottom: 1px solid var(--border); }
.simple-projects li:last-child { border-bottom: 0; }
.simple-projects a { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--text); }
.simple-projects a:hover { text-decoration: none; color: var(--accent-text); }
.simple-projects .sp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.client-section + .client-section { margin-top: 24px; }
.client-section > h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

/* One-line "add a task" under a project's task list */
.list-add { display: flex; align-items: center; gap: 10px; margin: 18px -20px -18px; padding: 10px 20px; border-top: 1px solid var(--border); color: var(--muted); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.list-add input[type="text"] { border: 0; background: transparent; box-shadow: none; padding: 6px 0; min-height: 32px; }
.list-add input[type="text"]:focus { box-shadow: none; }
.list-add:focus-within { color: var(--accent); background: var(--surface-2); }
@media (max-width: 768px) { .list-add { margin: 14px -16px -14px; padding: 10px 16px; } }

/* ---- Reminder form & repeating reminders ------------------------------- */
.rem-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.rem-preset { height: 30px; padding: 0 12px; }
.rem-preset.active { color: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.rem-repeat { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-3); box-shadow: inset 0 1px 2px rgba(16,24,40,.06); }
.rem-repeat label { position: relative; cursor: pointer; }
.rem-repeat input { position: absolute; opacity: 0; width: 0; height: 0; }
.rem-repeat span { display: inline-block; padding: 6px 14px; border-radius: 7px; font-size: .85rem; font-weight: 600; color: var(--text-2); transition: background .12s, color .12s, box-shadow .12s; }
.rem-repeat label:hover span { color: var(--text); }
.rem-repeat input:checked + span { background: var(--surface); color: var(--accent-text); box-shadow: 0 1px 2px rgba(16,24,40,.12), 0 0 0 1px rgba(16,24,40,.04); }
.rem-repeat input:focus-visible + span, .weekday-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.weekday-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.weekday-pick label { position: relative; cursor: pointer; }
.weekday-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.weekday-pick span { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 36px; border-radius: 10px; font-size: .82rem; font-weight: 600; color: var(--text-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong); transition: all .12s var(--ease); }
.weekday-pick label:hover span { box-shadow: inset 0 0 0 1px var(--accent); }
.weekday-pick input:checked + span { color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, #fff), var(--accent)); box-shadow: 0 6px 12px -6px color-mix(in srgb, var(--accent) 80%, transparent); }
.rem-form [hidden] { display: none !important; }
.rem-summary { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; padding: 10px 12px; border-radius: var(--radius); font-size: .86rem; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); }
.rem-summary::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.repeat-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; vertical-align: 1px; color: var(--purple-text); background: var(--purple-soft); }

/* ---- Web hosting --------------------------------------------------------- */
:root { --g-sky: linear-gradient(135deg, #38bdf8, #0369a1); }
.nav-link[data-tone="sky"] .nav-icon { color: #0369a1; background: #e0f2fe; }
.nav-link[data-tone="sky"].active .nav-icon { background: var(--g-sky); }
.count-amber { background: var(--amber-soft); color: var(--amber-text); }
.filters-inline { margin-bottom: 0; }
.table-hosting td { vertical-align: top; }
.table-hosting .cell-stack { gap: 3px; }
.host-domain { display: inline-flex; align-items: center; gap: 4px; }
.host-contact { display: flex; align-items: center; gap: 2px; }
.host-contact .icon-btn { opacity: .5; }
.host-row:hover .host-contact .icon-btn { opacity: 1; }
.host-remind { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--text-2); }
.host-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.table .host-actions .icon-btn { opacity: 1; }
.host-row.host-overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.host-row.host-due td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.host-row.host-cancelled td { opacity: .6; }
.form-section { display: flex; align-items: center; gap: 6px; margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--border); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.host-form .form-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---- Notes board: paper cards with depth ------------------------------ */
.notes-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.notes-hero h1 { font-size: 1.7rem; letter-spacing: -.02em; }
.notes-search { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notes-search .search-field { min-width: 260px; }
.notes-mine { white-space: nowrap; }

/* Composer: a single line that opens into a small writing pad */
.composer { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px 12px; margin-bottom: 18px; padding: 12px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
:root[data-theme="dark"] .composer { box-shadow: var(--shadow-card), inset 0 0 0 1px var(--border); }
.composer.open, .composer:focus-within { box-shadow: var(--shadow-pop); transform: translateY(-1px); }
.composer-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--g-amber); box-shadow: 0 6px 12px -6px rgba(217,119,6,.7), inset 0 1px 0 rgba(255,255,255,.3); }
.composer-icon .icon { width: 16px; height: 16px; }
.composer textarea { border: 0; background: transparent; box-shadow: none; padding: 7px 0; min-height: 34px; font-size: 1rem; resize: none; }
.composer textarea:focus { box-shadow: none; }
.composer-tools { grid-column: 2; display: none; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border); }
.composer.open .composer-tools { display: flex; }
.composer-tools select { width: auto; max-width: 320px; min-height: 32px; padding: 4px 30px 4px 10px; font-size: .85rem; }

/* Filter chips */
.note-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.note-filter { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--text-2); background: var(--surface); box-shadow: var(--shadow-card); transition: transform .15s var(--ease), box-shadow .15s var(--ease), color .15s; }
.note-filter span { font-size: .72rem; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.note-filter:hover { text-decoration: none; color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.note-filter.active { color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent) 80%, transparent), inset 0 1px 0 rgba(255,255,255,.3); }
.note-filter.active span { background: rgba(255,255,255,.22); color: #fff; }

/* The board */
.board-title { display: flex; align-items: center; gap: 6px; margin: 4px 0 12px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.board-title + .paper-board { margin-bottom: 26px; }
.paper-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px 20px; margin-bottom: 20px; perspective: 1200px; }
.paper { --nc: #eab308; position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 12px; border-radius: 6px 6px 10px 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--nc) 7%, var(--surface)) 0%, var(--surface) 38%);
  box-shadow: 0 1px 1px rgba(16,24,40,.06), 0 6px 14px -6px rgba(16,24,40,.18), 0 14px 32px -18px rgba(16,24,40,.25), inset 0 0 0 1px color-mix(in srgb, var(--nc) 16%, var(--border));
  transform: rotate(var(--tilt, 0deg)); transform-style: preserve-3d; transition: transform .25s var(--ease), box-shadow .25s var(--ease); animation: rise .5s var(--ease) both; color: var(--text); }
.paper::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 6px 6px 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--nc) 70%, #fff), var(--nc)); }
.paper::after { content: ""; position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; border-radius: 0 0 10px 0; background: linear-gradient(135deg, transparent 50%, color-mix(in srgb, var(--surface) 70%, #000 8%) 50%, color-mix(in srgb, var(--surface) 85%, var(--border)) 100%); box-shadow: -2px -2px 5px -3px rgba(16,24,40,.25); opacity: .9; pointer-events: none; }
.paper:hover { transform: rotate(0deg) translateY(-5px) scale(1.015); box-shadow: 0 2px 2px rgba(16,24,40,.05), 0 14px 24px -10px rgba(16,24,40,.25), 0 30px 50px -24px rgba(16,24,40,.35), inset 0 0 0 1px color-mix(in srgb, var(--nc) 35%, var(--border)); z-index: 2; }
.paper-board > .paper:nth-child(2) { animation-delay: .04s; } .paper-board > .paper:nth-child(3) { animation-delay: .08s; }
.paper-board > .paper:nth-child(4) { animation-delay: .12s; } .paper-board > .paper:nth-child(5) { animation-delay: .16s; } .paper-board > .paper:nth-child(n+6) { animation-delay: .2s; }
:root[data-theme="dark"] .paper { background: linear-gradient(180deg, color-mix(in srgb, var(--nc) 14%, var(--surface)) 0%, var(--surface) 40%); box-shadow: 0 1px 1px rgba(0,0,0,.4), 0 10px 24px -10px rgba(0,0,0,.7), inset 0 0 0 1px color-mix(in srgb, var(--nc) 30%, var(--border)); }
:root[data-theme="dark"] .paper::after { background: linear-gradient(135deg, transparent 50%, #0b0d12 50%, var(--surface-3) 100%); }

.paper.is-pinned { background: linear-gradient(180deg, color-mix(in srgb, #f59e0b 14%, var(--surface)) 0%, color-mix(in srgb, #f59e0b 4%, var(--surface)) 60%); }
.paper-tape { position: absolute; left: 50%; top: -11px; width: 84px; height: 22px; transform: translateX(-50%) rotate(-2deg); background: rgba(255, 255, 255, .55); border: 1px solid rgba(16,24,40,.08); box-shadow: 0 2px 4px rgba(16,24,40,.12); backdrop-filter: blur(1px); opacity: .9; }
:root[data-theme="dark"] .paper-tape { background: rgba(255,255,255,.14); }

.paper-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.paper-tag { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .01em; color: color-mix(in srgb, var(--nc) 75%, #000); background: color-mix(in srgb, var(--nc) 14%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nc) 30%, transparent); }
.paper-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.paper-tag:hover { text-decoration: none; background: color-mix(in srgb, var(--nc) 24%, #fff); }
:root[data-theme="dark"] .paper-tag { color: color-mix(in srgb, var(--nc) 55%, #fff); background: color-mix(in srgb, var(--nc) 22%, var(--surface)); }
.paper-pin { color: var(--amber-text); display: inline-flex; }
.paper-body { font-size: .95rem; line-height: 1.55; white-space: pre-line; word-break: break-word; color: var(--text); }
.paper-body.is-long:not(.expanded) { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.paper-more { align-self: flex-start; margin-top: -4px; border: 0; background: none; padding: 0; font-size: .78rem; font-weight: 600; color: var(--accent-text); cursor: pointer; }
.paper-more:hover { text-decoration: underline; }
.paper-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--nc) 25%, var(--border)); font-size: .76rem; color: var(--muted); }
.paper-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper-actions { display: flex; gap: 2px; opacity: 0; transform: translateY(2px); transition: opacity .15s, transform .15s; }
.paper:hover .paper-actions, .paper-actions:focus-within { opacity: 1; transform: none; }
.paper-btn { width: 26px; height: 26px; border: 0; border-radius: 7px; background: none; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.paper-btn .icon { width: 14px; height: 14px; }
.paper-btn:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.paper-btn.danger:hover { background: var(--red-soft); color: var(--red-text); }

.notes-empty { text-align: center; padding: 56px 20px 40px; }
.notes-empty-art { position: relative; width: 150px; height: 110px; margin: 0 auto 18px; }
.notes-empty-art span { position: absolute; left: 50%; top: 0; width: 96px; height: 96px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-card); transform: translateX(-50%) rotate(-8deg); }
.notes-empty-art span:nth-child(2) { transform: translateX(-50%) rotate(3deg); background: color-mix(in srgb, #eab308 12%, var(--surface)); }
.notes-empty-art span:nth-child(3) { transform: translateX(-50%) rotate(12deg) translateY(4px); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.notes-empty h3 { margin-bottom: 6px; }
.notes-empty p { max-width: 42ch; margin: 0 auto 14px; }

@media (max-width: 768px) {
  .paper-board { grid-template-columns: 1fr; gap: 16px; }
  .paper { transform: none; }
  .paper-actions { opacity: 1; transform: none; }
  .composer-tools select { max-width: 100%; }
  .notes-search .search-field { min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .paper { transform: none !important; } }

/* Toggle switch (hosting active / inactive) */
.switch { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--muted); font-size: .8rem; font-weight: 600; }
.switch-knob { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); box-shadow: inset 0 1px 2px rgba(16,24,40,.2); transition: background .2s var(--ease); flex: none; }
.switch-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.35); transition: transform .2s var(--ease); }
.switch.on { color: var(--green-text); }
.switch.on .switch-knob { background: linear-gradient(135deg, #34c21a, #148a00); box-shadow: 0 4px 10px -4px rgba(20,138,0,.7), inset 0 1px 0 rgba(255,255,255,.3); }
.switch.on .switch-knob::after { transform: translateX(16px); }
.switch:disabled { opacity: .6; cursor: wait; }
.switch:focus-visible .switch-knob { outline: 2px solid var(--accent); outline-offset: 2px; }
.host-renews { display: flex; flex-direction: column; gap: 2px; min-height: 36px; padding: 6px 10px; border-radius: var(--radius); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.host-row.host-cancelled .switch { color: var(--muted); }

/* ---- Notifications: prominent bell + rich list -------------------------- */
.bell-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 6px; border: 0; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-weight: 600; font-size: .85rem; cursor: pointer; transition: background .15s, color .15s, transform .15s var(--ease), box-shadow .15s var(--ease); }
.bell-btn:hover { background: var(--surface-2); color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.bell-ic { position: relative; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.bell-btn .badge { position: absolute; top: -4px; left: 20px; right: auto; min-width: 19px; height: 19px; line-height: 19px; font-size: 11px; box-shadow: 0 0 0 2px var(--surface), 0 3px 8px rgba(220,38,38,.5); }
.bell-btn.has-unread { color: #fff; background: linear-gradient(135deg, #f87171, #dc2626); box-shadow: 0 8px 18px -8px rgba(220,38,38,.8), inset 0 1px 0 rgba(255,255,255,.3); }
.bell-btn.has-unread:hover { background: linear-gradient(135deg, #fb7185, #b91c1c); color: #fff; }
.bell-btn.has-unread .bell-ic { background: rgba(255,255,255,.18); }
.bell-btn.has-unread .badge { background: #fff; color: #b91c1c; box-shadow: 0 0 0 2px #dc2626, 0 3px 8px rgba(0,0,0,.25); }
.bell-pulse { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.bell-btn.has-unread .bell-pulse { animation: bell-pulse 2.2s ease-out infinite; }
@keyframes bell-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); } 70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
[data-bell].ring .bell-ic .icon { animation: ring .9s var(--ease); transform-origin: top center; }
.dropdown-wide { width: 400px; border-radius: 16px; }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--border); }
.notif-head strong { display: block; font-size: 1rem; }
.notif-head-sub { font-size: .75rem; color: var(--muted); }
.notif-list { max-height: 420px; padding: 6px; }
.notif-item { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 12px; border-bottom: 0; color: var(--text); font-size: .875rem; transition: background .12s, transform .12s var(--ease); }
.notif-item + .notif-item { margin-top: 2px; }
.notif-item:hover { background: var(--surface-2); text-decoration: none; transform: translateX(2px); }
.notif-item.unread { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface) 70%); box-shadow: inset 3px 0 0 var(--accent); }
.notif-item.unread:hover { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.notif-ic { width: 38px; height: 38px; border-radius: 11px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff !important; box-shadow: 0 6px 14px -7px rgba(16,24,40,.55), inset 0 1px 0 rgba(255,255,255,.3); }
.notif-ic .icon { width: 18px; height: 18px; }
.notif-ic.tone-blue { background: var(--g-blue); } .notif-ic.tone-green { background: var(--g-green); } .notif-ic.tone-purple { background: var(--g-purple); }
.notif-ic.tone-amber { background: var(--g-amber); } .notif-ic.tone-red { background: var(--g-red); } .notif-ic.tone-gray { background: var(--g-gray); }
.notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-title { line-height: 1.35; }
.notif-item.unread .notif-title { font-weight: 600; }
.notif-item .when { display: block; color: var(--muted); font-size: .74rem; margin: 0; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); margin: 0; flex: none; }
.notif-go { color: var(--muted-2); flex: none; }
.notif-foot { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 12px; font-size: .85rem; font-weight: 600; border-top: 1px solid var(--border); color: var(--accent-text); }
.notif-foot:hover { background: var(--surface-2); text-decoration: none; }
.notif-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px; text-align: center; color: var(--muted); font-size: .82rem; }
.notif-empty strong { color: var(--text); font-size: .9rem; }
.notif-empty-ic { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; color: var(--muted); background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); box-shadow: inset 0 0 0 1px var(--border); }
.notif-empty-ic .icon { width: 24px; height: 24px; }
.notif-empty-lg { padding: 48px 16px; }
.notif-card { padding: 6px; margin-bottom: 20px; }
.notif-card .notif-item { padding: 12px 12px; }
.page-head h1 .icon { width: 24px; height: 24px; color: var(--accent); }
@media (max-width: 768px) { .bell-btn { padding: 0 6px; gap: 0; } .bell-text { display: none; } .dropdown-wide { width: auto; } }

/* ---- Files (Google Drive) ----------------------------------------------- */
.files-off { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); margin-bottom: 14px; }
.files-off-ic { width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--muted); flex: none; }
.uploader { margin-bottom: 16px; }
.uploader-zone { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--radius-lg); border: 2px dashed var(--border-strong); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s, transform .15s var(--ease), box-shadow .15s var(--ease); }
.uploader-zone:hover, .uploader-zone:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); outline: none; }
.uploader-zone.is-over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); box-shadow: var(--shadow-hover); }
.uploader-ic { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--g-blue); box-shadow: 0 8px 16px -8px rgba(37,99,235,.7), inset 0 1px 0 rgba(255,255,255,.3); flex: none; }
.uploader-text { flex: 1; min-width: 180px; display: flex; flex-direction: column; line-height: 1.3; }
.uploader-queue { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.upload-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card); font-size: .85rem; }
.upload-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.upload-bar-fill { height: 100%; width: 0; border-radius: 999px; background: var(--g-blue); transition: width .2s; }
.upload-row.is-done .upload-bar-fill { background: var(--g-green); }
.upload-row.is-error { box-shadow: inset 0 0 0 1px var(--red); }
.upload-row.is-error .upload-status { color: var(--red-text); }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.file-card { position: relative; display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
:root[data-theme="dark"] .file-card { box-shadow: var(--shadow-card), inset 0 0 0 1px var(--border); }
.file-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.file-thumb { position: relative; display: flex; align-items: center; justify-content: center; height: 118px; background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-ic { width: 52px; height: 52px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 10px 20px -10px rgba(16,24,40,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.file-ic .icon { width: 24px; height: 24px; }
.file-ic.tone-blue { background: var(--g-blue); } .file-ic.tone-green { background: var(--g-green); } .file-ic.tone-red { background: var(--g-red); } .file-ic.tone-amber { background: var(--g-amber); }
.file-ic.tone-purple { background: var(--g-purple); } .file-ic.tone-pink { background: var(--g-pink); } .file-ic.tone-gray { background: var(--g-gray); }
.file-kind { position: absolute; left: 10px; top: 10px; padding: 2px 8px; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); background: color-mix(in srgb, var(--surface) 85%, transparent); box-shadow: 0 1px 2px rgba(16,24,40,.15); }
.file-body { padding: 10px 12px 6px; min-width: 0; }
.file-name { display: block; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name:hover { color: var(--accent-text); text-decoration: none; }
.file-meta { margin-top: 2px; }
.file-actions { display: flex; gap: 2px; padding: 4px 8px 8px; opacity: 0; transition: opacity .15s; }
.file-card:hover .file-actions, .file-actions:focus-within { opacity: 1; }
.files-none { margin: 0; }
.gdrive-card { margin-top: 20px; }
.gdrive-card code { font: .8rem var(--mono); background: var(--surface-3); padding: 1px 6px; border-radius: 4px; word-break: break-all; }
@media (max-width: 768px) { .file-actions { opacity: 1; } .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Web development --------------------------------------------------- */
:root { --g-violet: linear-gradient(135deg, #a78bfa, #5b21b6); }
.nav-link[data-tone="violet"] .nav-icon { color: #5b21b6; background: #ede9fe; }
.nav-link[data-tone="violet"].active .nav-icon { background: var(--g-violet); }
.stage-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.stage-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--text-2); background: var(--surface); box-shadow: var(--shadow-card); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.stage-chip span { font-size: .72rem; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.stage-chip:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-hover); color: var(--text); }
.stage-chip.active { color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent)); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.stage-chip.active span { background: rgba(255,255,255,.22); color: #fff; }
.select-pill.tone-pink { background-color: var(--pink-soft, #fce7f3); color: #be185d; }
.select-pill.tone-purple { background-color: var(--purple-soft); color: var(--purple-text); }
.select-pill.tone-muted { background-color: var(--surface-3); color: var(--muted); }
.select-pill.tone-gray { background-color: var(--gray-soft); color: var(--gray-text); }
.select-pill.tone-green { background-color: var(--green-soft); color: var(--green-text); }
.select-pill.tone-amber { background-color: var(--amber-soft); color: var(--amber-text); }
.select-pill.tone-blue { background-color: var(--blue-soft); color: var(--blue-text); }
.wd-kind { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); }
.wd-live { color: var(--green-text); font-weight: 600; }
.wd-deadline.is-late { color: var(--red-text); font-weight: 600; }
.wd-deadline.is-soon { color: var(--amber-text); font-weight: 600; }
.table-webdev td { vertical-align: top; }
