/* Cloudwise WorkHub — dark theme. Mobile-first app shell: bottom nav on phones, sidebar from 900px.
 * Every color below comes from these tokens; change the palette here and every screen follows. */
:root {
  /* Brand palette (from the Cloudwise logo artwork) */
  --midnight: #031426;       /* main background, mobile navigation */
  --deep: #062D55;           /* sidebar, headers, elevated surfaces */
  --cw-blue: #009FEF;        /* primary actions, active tabs, selected items */
  --sky: #43C9FF;            /* highlights, focus rings, subtle accents */
  --white: #FFFFFF;          /* logo, headings, primary text */
  --blue-gray: #B7C9DC;      /* secondary text, labels */
  --border: #214564;         /* card borders, dividers */

  /* Semantic roles */
  --bg: var(--midnight);
  --surface: #0A2342;        /* cards: a step lighter than the background */
  --surface-2: #0D2B4E;      /* hover / nested surface */
  --elevated: var(--deep);
  --input: #051B33;
  --text: var(--white);
  --text-2: var(--blue-gray);
  --text-3: #8AA3BD;         /* tertiary text, placeholders (6:1 on cards) */
  --heading: var(--white);
  --primary: var(--cw-blue);
  --primary-ink: var(--midnight);   /* text on Cloudwise Blue: 6.4:1 (white would be 2.9:1) */
  --link: var(--cw-blue);
  --accent: var(--sky);
  --border-strong: #2D5A82;
  --tint: rgba(0, 159, 239, .12);
  --tint-strong: rgba(0, 159, 239, .2);
  --glow: 0 0 0 1px rgba(67, 201, 255, .45), 0 0 18px rgba(0, 159, 239, .35);
  --focus: 0 0 0 3px rgba(67, 201, 255, .45);
  --grad-brand: linear-gradient(120deg, #062D55 0%, #074785 55%, #009FEF 100%);
  --grad-button: linear-gradient(135deg, #009FEF 0%, #2CB9F8 100%);
  --grad-button-hover: linear-gradient(135deg, #17ACF6 0%, #43C9FF 100%);

  /* Status colors (semantic; always paired with a text label) */
  --st-not_started: #A9B8C8;
  --st-working: #5AB4FF;
  --st-waiting: #F5B942;
  --st-blocked: #FF6B6B;
  --st-done: #3DD68C;
  --danger: #FF6B6B;
  --warning: #F5B942;
  --success: #3DD68C;
  /* Priority */
  --pr-low: #A9B8C8;
  --pr-normal: #5AB4FF;
  --pr-high: #FF9F43;
  --pr-urgent: #FF6B6B;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 6, 16, .35);
  --shadow-lg: 0 18px 50px rgba(0, 6, 16, .6);
  --font: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
a { color: var(--link); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(0, 159, 239, .45); color: #fff; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; text-wrap: balance; color: var(--heading); }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.logo { display: block; width: auto; flex: none; }

/* boot */
.boot { min-height: 100%; display: grid; place-items: center; align-content: center; gap: 28px; background: radial-gradient(90% 60% at 50% 0%, rgba(0, 159, 239, .18), transparent 70%), var(--bg); }
.boot-logo { height: 84px; width: auto; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 14px; padding: 11px 18px; font-weight: 600; font-size: 14px; background: var(--grad-button); color: var(--primary-ink); min-height: 44px; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .06s, border-color .15s; text-decoration: none; }
.btn:hover { background: var(--grad-button-hover); box-shadow: 0 6px 20px rgba(0, 159, 239, .35); }
.btn:active { transform: scale(.97); background: #0090DA; box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; box-shadow: var(--focus); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--border); color: var(--text-3); box-shadow: none; transform: none; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--tint); border-color: var(--primary); box-shadow: none; }
.btn.secondary:active { background: var(--tint-strong); }
.btn.secondary:disabled { background: transparent; color: var(--text-3); border-color: var(--border); }
.btn.ghost { background: transparent; color: var(--link); padding-inline: 10px; border-color: transparent; }
.btn.ghost:hover { background: var(--tint); box-shadow: none; }
.btn.ghost:active { background: var(--tint-strong); }
.btn.ghost.danger-text { color: var(--danger); }
.btn.ghost.danger-text:hover { background: rgba(255, 107, 107, .12); }
.btn.danger { background: var(--danger); color: #2A0709; }
.btn.danger:hover { background: #FF8585; box-shadow: 0 6px 20px rgba(255, 107, 107, .3); }
.btn.danger:active { background: #F25555; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 11px; }
.btn.block { width: 100%; }
.icon-btn { width: 42px; height: 42px; display: inline-grid; place-items: center; border: 0; border-radius: 13px; background: transparent; color: var(--text); position: relative; flex: none; transition: background .15s; }
.icon-btn:hover { background: var(--tint); }
.icon-btn:active { background: var(--tint-strong); }
.icon-btn.muted-btn { color: var(--text-2); }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.sm { width: 18px; height: 18px; }

/* ---------- form controls ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--border); background: var(--input); color: var(--text); border-radius: 13px; padding: 10px 12px; min-height: 44px; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: var(--text-3); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.55; }
.input:hover:not(:disabled) { border-color: var(--border-strong); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input:disabled { opacity: .6; cursor: not-allowed; }
select option { background: var(--surface); color: var(--text); }
input[type="color"].input { padding: 4px; height: 44px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.grow { flex: 1; min-width: 0; }
.error-text { color: var(--danger); font-size: 13px; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 99px; transition: background .2s, box-shadow .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: var(--blue-gray); border-radius: 50%; transition: transform .2s, background .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--white); }
.switch input:focus-visible + span { box-shadow: var(--focus); }

/* ---------- cards & small parts ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #2A0709; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.icon-btn .badge, .nav-item .badge { position: absolute; top: 2px; right: 4px; border: 2px solid var(--bg); height: 20px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: rgba(183, 201, 220, .12); color: var(--text-2); border: 1px solid rgba(183, 201, 220, .18); }
.tag.sample { background: rgba(245, 185, 66, .12); color: var(--warning); border-color: rgba(245, 185, 66, .3); }
.tag.crit { background: rgba(255, 107, 107, .12); color: var(--danger); border-color: rgba(255, 107, 107, .3); }
.tag.info { background: var(--tint); color: var(--accent); border-color: rgba(67, 201, 255, .3); }

/* status pills: tinted fill + colored label, readable on every surface */
:where(.pill, .pill-select, .cal-item) { --c: var(--st-not_started); }
.pill, select.pill-select { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 9px; white-space: nowrap; line-height: 1.4;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.st-not_started { --c: var(--st-not_started); }
.st-working { --c: var(--st-working); }
.st-waiting { --c: var(--st-waiting); }
.st-blocked { --c: var(--st-blocked); }
.st-done { --c: var(--st-done); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
select.pill-select { appearance: none; -webkit-appearance: none; padding: 6px 12px; font-size: 13px; text-align: center; min-height: 34px; cursor: pointer; }
select.pill-select:hover { background: color-mix(in srgb, var(--c) 26%, transparent); }
select.pill-select:focus { outline: none; box-shadow: var(--focus); }
select.pill-select option { color: var(--text); background: var(--surface); }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.prio::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--pr-normal); }
.prio.p-low::before { background: var(--pr-low); }
.prio.p-high::before { background: var(--pr-high); }
.prio.p-urgent::before { background: var(--pr-urgent); }
.prio.p-high { color: var(--pr-high); }
.prio.p-urgent { color: var(--pr-urgent); font-weight: 600; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 11px; font-weight: 600; flex: none; border: 2px solid var(--surface); text-transform: uppercase; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.avatar.lg { width: 46px; height: 46px; font-size: 15px; }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-left: -8px; }
.avatar.more { background: var(--border); color: var(--text-2); }
.progress { height: 8px; background: rgba(183, 201, 220, .12); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--sky)); border-radius: 99px; }
.statusbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: rgba(183, 201, 220, .12); gap: 2px; }
.statusbar > i { display: block; height: 100%; }
.empty { text-align: center; color: var(--text-2); padding: 30px 14px; font-size: 14px; }
.empty .icon { width: 38px; height: 38px; color: var(--text-3); margin-bottom: 8px; }
.dot-c { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: calc(28px + var(--safe-t)) 16px calc(28px + var(--safe-b));
  background: radial-gradient(120% 60% at 50% -8%, rgba(0, 159, 239, .38) 0%, rgba(6, 45, 85, .9) 38%, transparent 72%), linear-gradient(180deg, var(--deep) 0%, var(--midnight) 55%); }
.login-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.login-logo { height: 96px; width: auto; align-self: center; margin-bottom: 4px; filter: drop-shadow(0 6px 24px rgba(0, 159, 239, .35)); }
.login h1 { text-align: center; font-size: 21px; }
.login .lede { text-align: center; color: var(--text-2); font-size: 14px; margin-top: -12px; }
.login .search .input { background: rgba(5, 27, 51, .8); }
.acct-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; padding: 2px; }
.acct { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 16px; border: 1px solid var(--border); background: rgba(10, 35, 66, .85); text-align: left; width: 100%; color: var(--text); transition: border-color .15s, background .15s, box-shadow .15s; }
.acct:hover { border-color: var(--primary); background: var(--surface-2); }
.acct:active { background: var(--tint-strong); }
.acct:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.acct .avatar { width: 40px; height: 40px; font-size: 13px; border-color: transparent; }
.acct strong { display: block; font-weight: 600; font-size: 15px; }
.acct .icon { color: var(--text-3); }
.pin-dots { display: flex; justify-content: center; gap: 14px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--text-3); transition: background .12s, border-color .12s, box-shadow .12s; }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px rgba(67, 201, 255, .6); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { height: 60px; border-radius: 18px; border: 1px solid var(--border); background: rgba(10, 35, 66, .85); font-size: 22px; font-weight: 500; color: var(--text); transition: background .12s, border-color .12s, transform .06s; }
.keypad button:hover { border-color: var(--border-strong); background: var(--surface-2); }
.keypad button:active { background: var(--tint-strong); border-color: var(--primary); transform: scale(.97); }
.keypad button:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.keypad button:disabled { opacity: .5; cursor: wait; }
.keypad button.fn { background: transparent; border-color: transparent; font-size: 14px; color: var(--text-2); }
.pin-input { position: absolute; opacity: 0; pointer-events: none; height: 1px; width: 1px; }
.chosen { display: flex; align-items: center; gap: 12px; padding: 12px; background: rgba(10, 35, 66, .85); border: 1px solid var(--border); border-radius: 16px; }

/* ---------- shell ---------- */
.shell { min-height: 100%; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(6, 45, 85, .92); backdrop-filter: saturate(1.3) blur(12px); -webkit-backdrop-filter: saturate(1.3) blur(12px); border-bottom: 1px solid var(--border); padding: calc(8px + var(--safe-t)) 10px 8px 16px; display: flex; align-items: center; gap: 10px; min-height: 58px; }
.topbar .logo { height: 32px; }
.topbar .page-title { font-size: 17px; font-weight: 600; color: var(--heading); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { padding: 18px 16px calc(var(--nav-h) + var(--safe-b) + 26px); max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.main > *, .content { min-width: 0; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(3, 20, 38, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border); padding: 6px 6px calc(6px + var(--safe-b)); display: grid; grid-template-columns: repeat(5, 1fr); }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border: 0; background: none; color: var(--text-2); font-size: 11px; font-weight: 500; border-radius: 14px; position: relative; text-decoration: none; transition: color .15s, background .15s; }
.nav-item:hover { color: var(--text); }
.nav-item:active { background: var(--tint); }
.nav-item[aria-current="page"] { color: var(--primary); font-weight: 600; }
.nav-item[aria-current="page"] .icon { stroke-width: 2.3; filter: drop-shadow(0 0 6px rgba(0, 159, 239, .6)); }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); box-shadow: 0 0 10px rgba(0, 159, 239, .7); }
.sidebar { display: none; }
.netbar { position: sticky; top: calc(58px + var(--safe-t)); z-index: 25; padding: 9px 16px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; justify-content: center; text-align: center; flex-wrap: wrap; }
.netbar.offline { background: #3A2A0A; color: #FFD98A; border-bottom: 1px solid rgba(245, 185, 66, .35); }
.netbar.syncing { background: var(--deep); color: var(--text-2); border-bottom: 1px solid var(--border); }
.netbar.update { background: var(--grad-brand); color: var(--white); }
.netbar .btn { min-height: 30px; padding: 4px 12px; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); }
  .sidebar { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; background: var(--deep); border-right: 1px solid var(--border); padding: 22px 14px; overflow-y: auto; }
  .sidebar .logo-wrap { padding: 4px 12px 18px; display: flex; justify-content: flex-start; }
  .sidebar .logo { height: 50px; }
  .side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 13px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 14px; position: relative; border: 1px solid transparent; background: none; width: 100%; text-align: left; transition: background .15s, color .15s; }
  .side-link:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
  .side-link[aria-current="page"] { background: var(--tint-strong); color: var(--white); border-color: rgba(0, 159, 239, .45); box-shadow: 0 0 16px rgba(0, 159, 239, .18); }
  .side-link[aria-current="page"] .icon { color: var(--primary); }
  .side-link .badge { margin-left: auto; border: 0; }
  .side-section { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-3); margin: 20px 12px 6px; }
  .side-proj { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 11px; color: var(--text-2); text-decoration: none; font-size: 13px; }
  .side-proj:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
  .side-proj[aria-current="page"] { background: var(--tint); color: var(--white); }
  .side-proj i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
  .side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
  .side-foot .avatar { border-color: var(--deep); }
  .side-foot strong { display: block; font-size: 13px; }
  .bottomnav { display: none; }
  .topbar { padding-left: 28px; background: rgba(3, 20, 38, .9); }
  .topbar .logo { display: none; }
  .netbar { top: 58px; }
  .main { padding: 26px 30px 44px; }
}

/* ---------- dashboard ---------- */
.hello { display: flex; flex-direction: column; gap: 2px; }
.hello h1 { font-size: 22px; }
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 22px 20px; background: var(--grad-brand); border: 1px solid rgba(67, 201, 255, .25); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(67, 201, 255, .35), transparent 65%); pointer-events: none; }
.hero h1 { font-size: 24px; position: relative; }
.hero p { color: #D6E4F2; position: relative; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px 16px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; transition: border-color .15s, transform .1s; }
.stat:hover { border-color: var(--border-strong); }
.stat:active { transform: scale(.98); }
.stat b { font-size: 28px; font-weight: 700; color: var(--white); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--text-2); }
.stat.alert b { color: var(--danger); }
.dash-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .dash-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 16px; margin-top: 14px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text); }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 11px 6px; margin: 0 -6px; border-top: 1px solid var(--border); min-width: 0; text-decoration: none; color: inherit; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: calc(100% + 12px); text-align: left; border-radius: 10px; transition: background .12s; }
.list-row:hover { background: rgba(255, 255, 255, .03); }
.list-row:first-child { border-top: 0; }
.list-row .t { flex: 1; min-width: 0; }
.list-row .t strong { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 9px; background: rgba(183, 201, 220, .12); color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.date-chip.over { background: rgba(255, 107, 107, .15); color: var(--danger); }
.date-chip.today { background: rgba(245, 185, 66, .15); color: var(--warning); }
.workload-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(48px, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0; }
.workload-row .who { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.workload-row .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-bar { height: 10px; background: rgba(183, 201, 220, .12); border-radius: 99px; overflow: hidden; display: flex; }
.wl-bar i { height: 100%; }
.wl-open { background: var(--primary); }
.wl-late { background: var(--danger); }
.late { color: var(--danger); font-weight: 600; }
.activity-row { display: flex; gap: 10px; padding: 10px 0; font-size: 13px; border-top: 1px solid var(--border); color: var(--text-2); }
.activity-row b { color: var(--text); font-weight: 600; }
.activity-row:first-child { border-top: 0; }
.activity-row .avatar { width: 26px; height: 26px; font-size: 10px; }

/* ---------- projects ---------- */
.proj-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.proj-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; border-top: 3px solid var(--c, var(--primary)); transition: border-color .15s, transform .1s, box-shadow .15s; }
.proj-card:hover { border-left-color: var(--border-strong); border-right-color: var(--border-strong); border-bottom-color: var(--border-strong); box-shadow: var(--shadow), 0 0 0 1px rgba(0, 159, 239, .12); }
.proj-card:active { transform: scale(.99); }
.proj-card p { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.proj-head { display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--c, var(--primary)); }
.proj-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13px; color: var(--text-2); }
.proj-meta b { color: var(--text); font-weight: 500; }
.seg { display: inline-flex; background: var(--input); border: 1px solid var(--border); border-radius: 14px; padding: 4px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); font-weight: 600; box-shadow: 0 0 14px rgba(0, 159, 239, .45); }
.seg .count { font-size: 11px; background: rgba(183, 201, 220, .15); border-radius: 99px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] .count { background: rgba(3, 20, 38, .25); color: var(--primary-ink); }
.seg.views { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
.seg.views button { justify-content: center; padding: 8px 4px; }
.seg.tabs4 button { flex-direction: column; gap: 2px; font-size: 12px; }
@media (min-width: 700px) { .seg.views { display: inline-flex; width: auto; } .seg.views button { padding: 7px 14px; } .seg.tabs4 button { flex-direction: row; font-size: 13px; } }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { position: relative; flex: 1 1 200px; min-width: 0; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 18px; height: 18px; pointer-events: none; }
.search input { padding-left: 38px; }
.filter-select { width: auto; min-width: 0; flex: 1 1 0; padding: 6px 8px; min-height: 40px; font-size: 13px; }
@media (max-width: 699px) { .search { flex-basis: 100%; } }
@media (min-width: 700px) { .filter-select { flex: 0 1 180px; } }

/* task cards */
.group { display: flex; flex-direction: column; gap: 8px; }
.group-head { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-weight: 600; color: var(--text); font-size: 14px; }
.group-head i { width: 4px; height: 18px; border-radius: 2px; background: var(--c, var(--primary)); }
.group-head .muted { font-weight: 400; }
.tcard { background: var(--surface); border: 1px solid var(--border); border-radius: 15px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; color: inherit; position: relative; transition: border-color .15s, background .15s, transform .08s; }
.tcard:hover { border-color: var(--border-strong); background: var(--surface-2); }
.tcard:active { transform: scale(.99); }
.tcard:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.tcard .ttl { font-weight: 500; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; color: var(--text); }
.tcard.done .ttl { color: var(--text-3); text-decoration: line-through; }
.tmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.tmeta .sep { flex: 1; }
.tmeta .ico-count { display: inline-flex; align-items: center; gap: 3px; }
.tmeta .ico-count .icon { width: 14px; height: 14px; }
.tcard .proj-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.tcard .proj-dot i { width: 8px; height: 8px; border-radius: 2px; }
.tcard.saving { opacity: .6; }
.tcard.saving::after { content: "Saving…"; position: absolute; top: 8px; right: 10px; font-size: 11px; color: var(--accent); font-weight: 600; }

/* table */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table.tasks { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 860px; font-size: 13px; }
table.tasks th { text-align: left; font-weight: 600; color: var(--text-2); font-size: 12px; padding: 11px 12px; border-bottom: 1px solid var(--border); background: var(--deep); position: sticky; top: 0; white-space: nowrap; letter-spacing: .02em; }
table.tasks td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
table.tasks tr:last-child td { border-bottom: 0; }
table.tasks tr.grp td { background: var(--surface); font-weight: 600; color: var(--text); font-size: 14px; padding-top: 16px; border-left: 4px solid var(--c, var(--primary)); }
table.tasks tbody tr.trow { cursor: pointer; }
table.tasks tbody tr.trow:hover td { background: var(--surface-2); }
table.tasks td.title-cell { border-left: 4px solid var(--c, var(--primary)); font-weight: 500; max-width: 320px; }
table.tasks td.title-cell span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.tasks td.st { padding: 4px 6px; width: 150px; }
table.tasks td.st select { width: 100%; }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 82vw); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
@media (min-width: 700px) { .kanban { grid-auto-columns: minmax(250px, 1fr); } }
@media (min-width: 1200px) { .kanban { grid-auto-columns: minmax(196px, 1fr); } }
.kcol { background: rgba(6, 45, 85, .45); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; scroll-snap-align: start; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; }
.kcol-list { display: flex; flex-direction: column; gap: 8px; min-height: 120px; flex: 1; border-radius: 12px; }
.sortable-ghost { opacity: .35; }
.sortable-chosen.tcard, .sortable-drag.tcard { border-color: var(--accent); box-shadow: var(--glow), var(--shadow-lg); }
.kanban .tcard { cursor: grab; }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: 11px; font-weight: 600; color: var(--text-3); text-align: center; padding: 4px 0; text-transform: uppercase; letter-spacing: .05em; }
.cal-day { background: var(--input); border-radius: 11px; min-height: 58px; padding: 4px; display: flex; flex-direction: column; gap: 3px; border: 1px solid transparent; text-align: left; min-width: 0; color: var(--text); transition: border-color .12s, background .12s; }
.cal-day:hover { border-color: var(--border-strong); }
.cal-day.out { background: transparent; color: var(--text-3); }
.cal-day.today .dn { background: var(--primary); color: var(--primary-ink); }
.cal-day[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 12px rgba(67, 201, 255, .3); }
.cal-day .dn { font-size: 12px; font-weight: 600; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.cal-dots { display: flex; flex-wrap: wrap; gap: 3px; padding-left: 2px; }
.cal-dots i { width: 7px; height: 7px; border-radius: 50%; }
.cal-item { font-size: 11px; padding: 2px 6px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border-left: 2px solid var(--c); }
@media (min-width: 760px) {
  .cal-day { min-height: 104px; padding: 6px; }
  .cal-item { display: block; }
  .cal-dots { display: none; }
}

/* ---------- sheets (task details, forms) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(1, 8, 18, .72); backdrop-filter: blur(2px); z-index: 60; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 61; background: var(--bg); display: flex; flex-direction: column; inset: 0; animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@media (min-width: 900px) {
  .sheet { inset: 0 0 0 auto; width: min(580px, 100%); box-shadow: var(--shadow-lg); border-left: 1px solid var(--border); animation: slide .2s ease-out; }
  .sheet.center { inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); border-radius: 22px; border: 1px solid var(--border); overflow: hidden; animation: fade .15s; }
  @keyframes slide { from { transform: translateX(30px); opacity: .6; } }
}
.sheet-head { display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-t)) 12px 10px 14px; background: var(--deep); border-bottom: 1px solid var(--border); }
.sheet-head h2 { flex: 1; min-width: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body > * { flex-shrink: 0; }
.sheet-body { overflow-y: auto; padding: 18px 16px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; flex: 1; }
.sheet-foot { padding: 12px 16px calc(12px + var(--safe-b)); background: var(--deep); border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.title-input { font-size: 20px; font-weight: 600; color: var(--heading); border: 1px solid transparent; background: transparent; border-radius: 11px; padding: 6px 8px; margin: -6px -8px; width: calc(100% + 16px); resize: none; line-height: 1.35; field-sizing: content; min-height: 40px; overflow: hidden; }
.title-input:hover:not(:disabled) { border-color: var(--border); }
.title-input:focus { outline: none; border-color: var(--accent); background: var(--input); box-shadow: var(--focus); }
.props { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px 12px; align-items: center; font-size: 14px; }
.props > label, .props > .lbl { color: var(--text-2); font-size: 13px; }
.props .input { min-height: 40px; padding: 6px 10px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--text); }
.chip .avatar { width: 24px; height: 24px; font-size: 10px; border: 0; }
.chip button { border: 0; background: none; color: var(--text-3); padding: 0 0 0 2px; font-size: 16px; line-height: 1; }
.chip button:hover { color: var(--danger); }
.chip.add { padding: 4px 12px; color: var(--link); font-weight: 500; border-style: dashed; border-color: var(--border-strong); background: transparent; }
.chip.add:hover { background: var(--tint); border-color: var(--primary); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 500; font-size: 14px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; box-shadow: 0 8px 12px -10px rgba(0, 159, 239, .8); }
.check-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.check-row:first-child { border-top: 0; }
.check-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.check-row .t { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.check-row.done .t { text-decoration: line-through; color: var(--text-3); }
.check-row .x { border: 0; background: none; color: var(--text-3); font-size: 18px; padding: 0 6px; border-radius: 8px; }
.check-row .x:hover { color: var(--danger); background: rgba(255, 107, 107, .1); }
.add-row { display: flex; gap: 8px; margin-top: 10px; }
.add-row .input { min-height: 40px; }
.comment { display: flex; gap: 10px; }
.comment .bubble { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 4px 16px 16px 16px; padding: 10px 12px; }
.comment .bubble p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; color: var(--text); margin-top: 2px; }
.mention { color: var(--accent); font-weight: 600; background: rgba(67, 201, 255, .12); border-radius: 5px; padding: 0 4px; }
.composer { position: relative; display: flex; flex-direction: column; gap: 8px; }
.mention-pop { position: absolute; bottom: calc(100% + 4px); left: 0; right: 0; background: var(--deep); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 4px; z-index: 5; max-height: 220px; overflow-y: auto; }
.mention-pop button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 8px; border-radius: 10px; text-align: left; font-size: 14px; color: var(--text); }
.mention-pop button[aria-selected="true"], .mention-pop button:hover { background: var(--tint-strong); }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.file-row:first-child { border-top: 0; }
.file-row a { color: var(--link); text-decoration: none; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.file-row a:hover { text-decoration: underline; }
.save-state { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.save-state.err { color: var(--danger); font-weight: 600; }
.picker { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; }
.picker label { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 11px; font-size: 14px; cursor: pointer; color: var(--text); }
.picker label:hover { background: var(--tint); }
.picker input { width: 18px; height: 18px; accent-color: var(--primary); }
.confirm-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: rgba(255, 107, 107, .08); border: 1px solid rgba(255, 107, 107, .3); border-radius: 14px; color: var(--text-2); }
.confirm-box strong { color: var(--text); }

/* ---------- notifications ---------- */
.notif { display: flex; gap: 12px; padding: 13px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); text-align: left; width: 100%; color: inherit; align-items: flex-start; transition: background .15s, border-color .15s; }
.notif:hover { background: var(--surface-2); border-color: var(--border-strong); }
.notif.unread { background: linear-gradient(90deg, rgba(0, 159, 239, .14), rgba(0, 159, 239, .04) 60%, var(--surface)); border-color: rgba(0, 159, 239, .45); }
.notif .ni { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--tint); color: var(--accent); }
.notif .ni.warn { background: rgba(245, 185, 66, .14); color: var(--warning); }
.notif .ni.crit { background: rgba(255, 107, 107, .14); color: var(--danger); }
.notif .ni.ok { background: rgba(61, 214, 140, .14); color: var(--success); }
.notif strong { font-weight: 500; font-size: 14px; display: block; overflow-wrap: anywhere; color: var(--text); }
.notif .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 6px; box-shadow: 0 0 8px rgba(67, 201, 255, .8); }

/* ---------- more / settings ---------- */
.menu { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.menu > a, .menu > button { display: flex; align-items: center; gap: 12px; padding: 15px 16px; text-decoration: none; color: var(--text); border: 0; background: none; border-top: 1px solid var(--border); font-size: 15px; text-align: left; width: 100%; transition: background .12s; }
.menu > :first-child { border-top: 0; }
.menu > a:hover, .menu > button:hover { background: var(--surface-2); }
.menu > a:active, .menu > button:active { background: var(--tint); }
.menu > a > .icon:first-child, .menu > button > .icon:first-child { color: var(--primary); }
.menu .chev { margin-left: auto; color: var(--text-3); }
.menu .danger-item, .menu .danger-item > .icon:first-child { color: var(--danger); }
.pref-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--border); }
.pref-row:first-child { border-top: 0; }
.pref-row .t { flex: 1; min-width: 0; color: var(--text-2); }
.pref-row .t strong { display: block; font-weight: 500; font-size: 14px; color: var(--text); }
.notice { padding: 12px 14px; border-radius: 14px; background: var(--tint); border: 1px solid rgba(0, 159, 239, .3); color: #D6E4F2; font-size: 13px; }
.notice b { color: var(--white); }
.notice.warn { background: rgba(245, 185, 66, .1); border-color: rgba(245, 185, 66, .35); color: #FFE2A6; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--border); }
.user-row:first-child { border-top: 0; }
.user-row.inactive { opacity: .55; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); }
.steps b { color: var(--text); }

/* ---------- install call-to-action ---------- */
.install-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius); background: linear-gradient(120deg, rgba(6, 45, 85, .95), rgba(0, 159, 239, .22)); border: 1px solid rgba(0, 159, 239, .45); box-shadow: 0 0 22px rgba(0, 159, 239, .15); }
.install-cta img { width: 44px; height: 44px; border-radius: 12px; flex: none; border: 1px solid var(--border); }
.install-cta p { color: #D6E4F2; min-width: 160px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
@media (min-width: 900px) { .toasts { bottom: 24px; left: auto; right: 24px; transform: none; } }
.toast { background: var(--deep); color: var(--text); border: 1px solid var(--border-strong); padding: 12px 16px; border-radius: 15px; font-size: 14px; box-shadow: var(--shadow-lg); pointer-events: auto; display: flex; gap: 10px; align-items: center; animation: up .2s; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 8px rgba(67, 201, 255, .8); }
.toast.err { background: #2B1220; border-color: rgba(255, 107, 107, .5); color: #FFD1D1; }
.toast.err::before { background: var(--danger); box-shadow: none; }
.toast button { margin-left: auto; background: var(--primary); color: var(--primary-ink); border: 0; border-radius: 9px; padding: 4px 12px; font-weight: 600; font-size: 13px; }
.toast button:hover { background: var(--sky); }

.layer2 .scrim { z-index: 70; }
.layer2 .sheet { z-index: 71; }

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

/* ---------- Expenses, requests, members & departments ---------- */
.ftabs { width: 100%; overflow-x: auto; justify-content: flex-start; scrollbar-width: thin; }
.ftabs > button { flex: 0 0 auto; }
.fbar { display: flex; flex-direction: column; gap: 8px; }
.fcards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fcard { display: flex; flex-direction: column; gap: 2px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 14px; color: var(--text); min-width: 0; transition: border-color .15s, box-shadow .15s; }
.fcard strong { font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fcard.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 6px 22px rgba(0, 159, 239, .18); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kpi strong { font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi.wide { grid-column: 1 / -1; }
@media (min-width: 700px) { .fcards { grid-template-columns: repeat(4, 1fr); } .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .fgrid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; } .fgrid > section { margin: 0; } }
.fgrid { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 1100px) { .fgrid { display: grid; } }
.neg { color: var(--danger); } .pos { color: var(--success); }
.meter { display: block; height: 8px; border-radius: 99px; background: rgba(183, 201, 220, .12); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.meter.warn > i { background: var(--warning); } .meter.over > i { background: var(--danger); }
.chart svg { width: 100%; height: 190px; display: block; }
.catrow { display: flex; flex-direction: column; gap: 6px; background: none; border: 0; color: inherit; text-align: left; padding: 8px 4px; border-radius: 10px; font-size: 14px; }
.catrow:hover { background: rgba(255, 255, 255, .03); }
.fdet { border-top: 1px solid var(--border); padding: 4px 0; }
.fdet:first-of-type { border-top: 0; }
.fdet > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.fdet > summary::-webkit-details-marker { display: none; }
.fdet > summary strong { display: block; font-weight: 500; font-size: 14px; }
.fdet > summary .xs { display: block; }
.fdet > summary .icon { transition: transform .15s; color: var(--text-3); }
.fdet[open] > summary .icon { transform: rotate(90deg); }
.fdet > .btn { margin: 4px 0 10px; }
details > summary { cursor: pointer; }
.dl { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px 14px; font-size: 13px; }
.dl > span { color: var(--text-2); }
.dl > b { font-weight: 500; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.list-row .amt, .amt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.amt.big b { font-size: 22px; }
.list-row.void .t strong { text-decoration: line-through; color: var(--text-3); }
.list-row .t .xs { display: block; overflow-wrap: anywhere; }
.strike { text-decoration: line-through; color: var(--text-3); }
.ftag { display: inline-flex; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; background: rgba(183, 201, 220, .12); color: var(--text-2); border: 1px solid rgba(183, 201, 220, .18); }
.ftag.ok { background: rgba(46, 204, 138, .12); color: var(--success); border-color: rgba(46, 204, 138, .3); }
.ftag.warn { background: rgba(245, 185, 66, .12); color: var(--warning); border-color: rgba(245, 185, 66, .3); }
.ftag.crit { background: rgba(255, 107, 107, .12); color: var(--danger); border-color: rgba(255, 107, 107, .3); }
.ftag.info { background: var(--tint); color: var(--accent); border-color: rgba(67, 201, 255, .3); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb { position: relative; display: flex; flex-direction: column; gap: 4px; width: 96px; }
.thumb img, .thumb .pdf { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); background: var(--input); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); text-decoration: none; }
.thumb .xs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.thumb > button:not(.imgbtn) { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--deep); color: var(--text); line-height: 1; }
.imgbtn { padding: 0; border: 0; background: none; border-radius: 12px; }
.fullimg { max-width: 100%; height: auto; border-radius: 12px; margin: auto; }
.payrow { border: 1px solid var(--border); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.payline { display: flex; gap: 10px; align-items: flex-start; border-top: 1px solid var(--border); padding-top: 10px; }
.payline:first-of-type { border-top: 0; padding-top: 0; }
.link, a.link { color: var(--link); }
.itemrow { display: grid; grid-template-columns: 1fr 64px 12px 96px; gap: 6px; align-items: center; grid-template-areas: "d d d d" "q x u u" "s s s r"; }
.itemrow [name=id] { grid-area: d; } .itemrow [name=iq] { grid-area: q; } .itemrow .x { grid-area: x; color: var(--text-3); text-align: center; } .itemrow [name=iu] { grid-area: u; }
.itemrow .sub { grid-area: s; text-align: right; font-variant-numeric: tabular-nums; } .itemrow > button, .itemrow > span:last-child { grid-area: r; }
@media (min-width: 700px) { .itemrow { grid-template-columns: 1fr 70px 12px 120px 110px 34px; grid-template-areas: "d q x u s r"; } }
.items { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.slots { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 600px) { .slots { grid-template-columns: 1fr 1fr; } }
.slot { display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--input); }
.slot.approved { border-color: rgba(46, 204, 138, .5); } .slot.approved strong { color: var(--success); }
.slot.rejected { border-color: rgba(255, 107, 107, .5); } .slot.rejected strong { color: var(--danger); }
.slot.revision { border-color: rgba(245, 185, 66, .5); } .slot.revision strong { color: var(--warning); }
.advance, .budget { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.advance:first-of-type, .budget:first-of-type { border-top: 0; padding-top: 0; }
.chip.off { opacity: .55; }
.chip > button { border: 0; background: none; color: var(--text-2); padding: 0 2px; }
.tablewrap { overflow-x: auto; margin: -4px; }
table.ftable { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 560px; }
table.ftable th { text-align: left; color: var(--text-2); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
table.ftable td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.ftable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.ftable tfoot td { font-weight: 700; border-bottom: 0; border-top: 1px solid var(--border-strong); }
.member { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--border); }
.member:first-child { border-top: 0; padding-top: 0; }
.member.inactive, .card.inactive { opacity: .6; }
.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 900px) { .grid4 { grid-template-columns: repeat(4, 1fr); } }
.picklist { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 13px; margin-top: 6px; }
.picklist label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 14px; }
.picklist label:first-child { border-top: 0; }
.picklist label[hidden] { display: none; }
.audit { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--border); }
.audit:first-child { border-top: 0; }
.icon.xs { width: 13px; height: 13px; vertical-align: -2px; }
.imgbtn { display: block; width: 96px; height: 96px; flex: none; overflow: hidden; }
.imgbtn img { width: 96px; height: 96px; max-width: none; object-fit: cover; display: block; }
.thumb { flex: none; }
.amt.big { align-items: flex-start; }
