/* Metronome Console — "Night glass" theme
   Dark violet glass panels over a deep night gradient. Same classes and layout as 1.0.0. */
:root {
  color-scheme: dark;
  --bg: #090b1a; --bg-2: #0f1228;
  --panel: rgba(22, 24, 48, .58); --panel-solid: #15172e; --panel-hi: rgba(255, 255, 255, .055);
  --ink: #f1f0fb; --ink-2: #c4c2dc; --muted: #8b89a8; --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .05);
  --side: rgba(18, 19, 40, .62); --side-ink: #c9c7e2; --side-muted: #7f7d9c; --side-on: rgba(124, 92, 255, .16);
  --accent: #7c5cff; --accent-2: #a16bff; --accent-ink: #fff; --focus: #a58bff;
  --accent-grad: linear-gradient(135deg, #8a63ff 0%, #6a4bf5 55%, #5b3fe0 100%);
  --glow: 0 6px 22px rgba(124, 92, 255, .38);
  --late: #ff7a8a; --late-bg: rgba(255, 90, 110, .12); --blocked: #ffb45c; --blocked-bg: rgba(255, 170, 70, .12);
  --decision: #c3a8ff; --decision-bg: rgba(150, 110, 255, .16);
  --done: #6fdba0; --done-bg: rgba(80, 210, 140, .12); --prog: #7fb6ff; --prog-bg: rgba(90, 150, 255, .13);
  --warn: #f3cf68; --warn-bg: rgba(240, 200, 90, .12); --inbox: #79d6de; --inbox-bg: rgba(90, 200, 210, .12);
  --radius: 16px; --radius-s: 10px; --blur: blur(18px) saturate(140%);
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, "Noto Sans Arabic", "Noto Sans", Tahoma, sans-serif;
  --font-display: "Segoe UI Variable Display", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; color: var(--ink); font: 14px/1.5 var(--font); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 88% -8%, rgba(132, 92, 255, .34), transparent 60%),
    radial-gradient(900px 560px at 100% 72%, rgba(161, 107, 255, .20), transparent 62%),
    radial-gradient(800px 600px at -10% 105%, rgba(70, 60, 190, .28), transparent 60%),
    linear-gradient(180deg, #0b0d20 0%, #0a0b1c 55%, #07081a 100%);
  background-attachment: fixed;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: rgba(124, 92, 255, .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.boot { padding: 40px; color: var(--muted); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12.5px; margin: 0; }
.error { color: var(--late); }
.late { color: var(--late); }
code { font-size: 12px; background: var(--line-2); padding: 1px 5px; border-radius: 6px; }

/* shared glass surface */
.card, .rows, .tile, .pcard, .summary, .week, .month, .prose, .link-row, .target, .decided, .pipeline li, .card-i, .tbl, .seg, .modal, .drawer, .b-col {
  background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 10px 30px rgba(0, 0, 0, .25);
}

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  background: var(--side); color: var(--side-ink); display: flex; flex-direction: column;
  position: sticky; top: 14px; height: calc(100vh - 28px); overflow: auto; margin: 14px 0 14px 14px;
  border: 1px solid var(--line); border-radius: 22px; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}
.brandmark { display: flex; gap: 11px; align-items: center; padding: 18px 18px 14px; font-weight: 650; letter-spacing: .01em; line-height: 1.2; }
.brandmark img { border-radius: 10px; box-shadow: var(--glow); }
.brandmark small { font-weight: 400; color: var(--side-muted); }
.brandmark.big { color: var(--ink); font-size: 18px; padding: 0 0 10px; }
.brandmark.big small { color: var(--muted); }
.ws-nav { display: flex; flex-direction: column; padding: 4px 10px; gap: 3px; flex: 1; }
.ws-nav a { text-decoration: none; padding: 9px 12px; border-radius: 12px; color: var(--side-ink); display: block; transition: background .15s, color .15s; }
.ws-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.ws-nav a.on { background: var(--accent-grad); color: #fff; box-shadow: var(--glow); }
.ws-nav .brands a { padding-left: 26px; font-size: 13px; color: var(--side-muted); }
.ws-nav .brands a.on { color: #fff; }
.ws-nav .lock { font-size: 10px; color: var(--side-muted); text-transform: uppercase; letter-spacing: .05em; }
.side-foot { padding: 14px 18px; font-size: 11px; color: var(--side-muted); border-top: 1px solid var(--line-2); }
.side-scrim { display: none; }
.body { min-width: 0; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 14px 14px 0 14px;
  background: var(--side); border: 1px solid var(--line); border-radius: 18px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  position: sticky; top: 14px; z-index: 20; box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.top .menu { display: none; }
.tabs { display: flex; gap: 4px; }
.tabs a { text-decoration: none; padding: 7px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; }
.tabs a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.tabs a.on { background: var(--accent-grad); color: #fff; box-shadow: var(--glow); }
.badge:empty { display: none; }
.badge { background: #ff5f8f; color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; font-weight: 700; }
.search { margin-left: auto; }
.search input { width: 220px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .05); }
.search input::placeholder { color: var(--muted); }
#main { padding: 0; outline: none; }
.page { padding: 26px 28px 70px; max-width: 1320px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p.muted { margin: 4px 0 0; letter-spacing: .02em; }
h1 { font: 600 30px/1.15 var(--font-display); margin: 0 0 2px; letter-spacing: -.01em; }
h1 .sub, h2 .sub { font-weight: 500; font-size: 17px; margin-left: 8px; background: linear-gradient(90deg, #b59bff, #8a63ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 26px 0 10px; font-weight: 600; }
h3 { font-size: 14px; margin: 16px 0 6px; }
.count { background: rgba(124, 92, 255, .18); color: #cbb9ff; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; vertical-align: 2px; letter-spacing: 0; margin-left: 4px; }
.empty { color: var(--muted); padding: 14px 16px; margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.sec { margin-bottom: 8px; }

/* ---------- buttons, forms ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); text-decoration: none; cursor: pointer; font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); }
.btn.primary { background: var(--accent-grad); border-color: transparent; color: var(--accent-ink); box-shadow: var(--glow); }
.btn.primary:hover { box-shadow: 0 8px 28px rgba(124, 92, 255, .55); }
.btn.danger { color: var(--late); }
.btn.small { padding: 4px 11px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }
.ib { border: 0; background: transparent; cursor: pointer; width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; text-decoration: none; font-size: 14px; color: var(--ink-2); }
.ib:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.ib.user { background: var(--accent-grad); color: #fff; font-size: 11px; font-weight: 700; border-radius: 50%; width: 34px; height: 34px; box-shadow: var(--glow); }
.btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.btns.spread { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
label.inline { flex-direction: row; align-items: center; gap: 6px; display: inline-flex; margin-right: 10px; }
input, select, textarea { padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-s); background: rgba(255, 255, 255, .045); font-size: 14px; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(161, 107, 255, .7); box-shadow: 0 0 0 3px rgba(124, 92, 255, .22); }
select option { background: var(--panel-solid); color: var(--ink); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
textarea { resize: vertical; }
label.big input { font-size: 18px; padding: 11px 14px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 14px; margin: 0; }
legend { font-size: 12px; color: var(--muted); padding: 0 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sched { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sched [hidden] { display: none; }
details summary { cursor: pointer; color: var(--ink-2); font-weight: 500; padding: 4px 0; }
.card { border-radius: var(--radius); padding: 18px; }
.note { background: var(--prog-bg); color: var(--prog); padding: 9px 12px; border-radius: var(--radius-s); margin: 0; font-size: 13px; border: 1px solid rgba(90, 150, 255, .2); }
.seg { display: inline-flex; border-radius: 999px; overflow: hidden; padding: 3px; gap: 2px; }
.seg a { padding: 6px 14px; text-decoration: none; color: var(--ink-2); border-radius: 999px; font-weight: 500; }
.seg a:hover { color: #fff; }
.seg a.on { background: var(--accent-grad); color: #fff; box-shadow: var(--glow); }
.seg.small a { padding: 4px 10px; font-size: 12.5px; }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.inline-form input:not([type=date]):not([type=time]):not([type=number]) { flex: 1 1 180px; }

/* ---------- chips: outlined pills ---------- */
.chip { display: inline-block; font-size: 10.5px; font-weight: 650; letter-spacing: .04em; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--ink-2); border: 1px solid rgba(255, 255, 255, .12); white-space: nowrap; }
.chip + .chip { margin-left: 3px; }
.chip.late { background: var(--late-bg); color: var(--late); border-color: rgba(255, 122, 138, .45); }
.chip.blocked { background: var(--blocked-bg); color: var(--blocked); border-color: rgba(255, 180, 92, .45); }
.chip.decision { background: var(--decision-bg); color: var(--decision); border-color: rgba(195, 168, 255, .45); }
.chip.done { background: var(--done-bg); color: var(--done); border-color: rgba(111, 219, 160, .4); }
.chip.prog { background: var(--prog-bg); color: var(--prog); border-color: rgba(127, 182, 255, .45); }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(243, 207, 104, .45); }
.chip.inbox { background: var(--inbox-bg); color: var(--inbox); border-color: rgba(121, 214, 222, .4); }
.chip.muted { opacity: .75; }

/* ---------- rows: action, owner, deadline on one line ---------- */
.rows { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 118px minmax(0, 1fr) 150px 150px 100px; gap: 10px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line-2); position: relative; transition: background .12s; }
.row:first-child { border-top: 0; }
.row:hover { background: rgba(255, 255, 255, .035); }
.row.is-late { box-shadow: inset 3px 0 0 var(--late); }
.row.is-blocked { box-shadow: inset 3px 0 0 var(--blocked); }
.row.is-closed .r-title { text-decoration: line-through; color: var(--muted); }
.r-status { overflow: hidden; }
.r-main { text-decoration: none; min-width: 0; display: flex; flex-direction: column; }
.r-title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-ctx { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-ctx .kind { color: var(--ink-2); }
.r-owner, .r-due { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.r-owner.missing, .r-due.missing { color: var(--warn); font-style: italic; }
.r-due.late { color: var(--late); font-weight: 600; }
.r-due small { display: block; font-size: 11px; }
.r-acts { display: flex; justify-content: flex-end; gap: 0; }
.prow .r-due { color: var(--muted); }

/* ---------- today ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; margin: 8px 0 10px; }
.tile { border-radius: var(--radius); padding: 14px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; transition: transform .15s, border-color .15s, box-shadow .15s; position: relative; overflow: hidden; }
.tile::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 92, 255, .22), transparent 70%); pointer-events: none; }
.tile b { font: 300 34px/1.05 var(--font-display); letter-spacing: -.02em; }
.tile span { font-size: 12.5px; color: var(--muted); }
.tile.late:not(.zero) { border-color: rgba(255, 122, 138, .55); } .tile.late:not(.zero) b { color: var(--late); }
.tile.late:not(.zero)::after { background: radial-gradient(circle, rgba(255, 110, 130, .25), transparent 70%); }
.tile.blocked:not(.zero) b { color: var(--blocked); }
.tile.decision:not(.zero) b { color: var(--decision); }
.tile.warn:not(.zero) b { color: var(--warn); }
.tile.zero b { color: var(--ink-2); opacity: .55; }
.tile:hover { transform: translateY(-2px); border-color: rgba(161, 107, 255, .5); box-shadow: 0 14px 34px rgba(0, 0, 0, .35), 0 0 0 1px rgba(124, 92, 255, .2); }
.banner { display: block; width: 100%; text-align: left; border: 1px solid rgba(195, 168, 255, .4); background: var(--decision-bg); color: var(--decision); padding: 11px 16px; border-radius: var(--radius); cursor: pointer; font-weight: 600; margin-bottom: 8px; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }

/* ---------- inbox ---------- */
.inbox-rows { gap: 0; }
.inbox-item { border-top: 1px solid var(--line-2); }
.inbox-item:first-child { border-top: 0; }
.inbox-item .row { border-top: 0; }
.triage { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px 144px; align-items: center; }
.triage select { max-width: 200px; }

/* ---------- schedule ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.filters select { max-width: 170px; padding: 6px 10px; font-size: 13px; border-radius: 999px; }
.agenda-day { margin-bottom: 16px; }
.agenda-day h3 { margin: 10px 0 8px; }
.agenda-day.is-today h3 { color: #b59bff; }
.sub-h { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; margin: 6px 0 4px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: var(--radius); overflow: hidden; }
.wk-col { border-left: 1px solid var(--line-2); min-height: 380px; display: flex; flex-direction: column; min-width: 0; }
.wk-col:first-child { border-left: 0; }
.wk-col.is-today { background: rgba(124, 92, 255, .08); }
.wk-h { font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); }
.is-today .wk-h { color: #c3a8ff; }
.wk-allday { padding: 5px; border-bottom: 1px dashed var(--line); min-height: 34px; display: flex; flex-direction: column; gap: 4px; }
.wk-timed { padding: 5px; display: flex; flex-direction: column; gap: 4px; }
.ev { display: block; text-decoration: none; font-size: 12px; padding: 5px 8px; border-radius: 8px; overflow: hidden; min-width: 0; background: rgba(255, 255, 255, .045); }
.ev span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.ev small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.ev time { font-weight: 700; font-variant-numeric: tabular-nums; }
.ev.allday { background: var(--warn-bg); border-left: 3px solid var(--warn); }
.ev.timed { background: rgba(124, 92, 255, .14); border-left: 3px solid var(--accent); }
.ev.late { background: var(--late-bg); border-left-color: var(--late); }
.ev.blocked { border-left-color: var(--blocked); }
.ev.closed { opacity: .55; }
.ev.closed span { text-decoration: line-through; }
.ev time { display: inline; }
.ev.timed { display: block; }
.legend { margin-top: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.legend .ev { display: inline-block; }
.month { border-radius: var(--radius); overflow: hidden; }
.mo-head { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); text-align: center; }
.mo-head div { padding: 8px; }
.mo-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mo-cell { min-height: 104px; border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mo-cell:nth-child(7n+1) { border-left: 0; }
.mo-cell.out { background: rgba(0, 0, 0, .18); }
.mo-cell.out .mo-d { color: var(--muted); opacity: .6; }
.mo-cell.is-today { background: rgba(124, 92, 255, .07); }
.mo-cell.is-today .mo-d { background: var(--accent-grad); color: #fff; border-radius: 999px; min-width: 24px; height: 24px; display: inline-grid; place-items: center; padding: 0 6px; box-shadow: var(--glow); }
.mo-d { font-size: 12px; font-weight: 600; padding: 2px 5px; align-self: flex-start; color: var(--ink-2); }
.mo-cell .ev small { display: none; }
.more { font-size: 11px; color: var(--muted); padding: 0 4px; }

/* ---------- projects ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.pcard { border-radius: var(--radius); padding: 16px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; transition: transform .15s, border-color .15s; }
.pcard:hover { transform: translateY(-2px); border-color: rgba(161, 107, 255, .5); }
.pc-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.pc-name { font-weight: 650; font-size: 15.5px; }
.pc-meta, .pc-foot { font-size: 12px; color: var(--muted); }
.pc-next { font-size: 13px; color: var(--ink-2); }
.bar { height: 6px; background: rgba(255, 255, 255, .07); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent-grad); border-radius: 999px; box-shadow: 0 0 12px rgba(124, 92, 255, .6); }
.crumbs { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.crumbs a { color: var(--muted); }
.summary { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; border-radius: var(--radius); padding: 16px; }
.summary p { margin: 2px 0 0; }
.lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.ptabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 16px 0 12px; overflow-x: auto; }
.ptabs a { padding: 9px 14px; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.ptabs a:hover { color: #fff; }
.ptabs a.on { border-color: var(--accent); color: #fff; font-weight: 600; }
.pipeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pipeline li { border-radius: var(--radius-s); padding: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.pipeline li.done { border-color: rgba(111, 219, 160, .5); }
.pipeline li.next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--glow); }
.pipeline .step { font-weight: 650; }
.pipeline .chip, .card-i .chip { align-self: flex-start; }
.env { display: flex; gap: 10px; align-items: center; margin: 4px 0; }
.env .lbl { width: 110px; }
.prose { border-radius: var(--radius); padding: 12px 16px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.b-col { border-radius: var(--radius); padding: 10px; min-height: 200px; background: rgba(255, 255, 255, .025); }
.b-col h3 { margin: 2px 0 10px; font-size: 13px; color: var(--ink-2); }
.card-i { border-radius: var(--radius-s); padding: 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; }
.card-i a { text-decoration: none; font-weight: 550; }
.card-i small { color: var(--muted); }
.card-i select { font-size: 12px; padding: 3px 6px; }
.target { border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.pin { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line-2); align-items: center; }
.pin:first-child { border-top: 0; }
.decided { border-radius: var(--radius); padding: 10px 16px; margin-bottom: 8px; }
.decided p { margin: 4px 0 0; color: var(--ink-2); }
.days label.inline { font-size: 13px; }

/* ---------- links ---------- */
.link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.l-main { display: flex; flex-direction: column; min-width: 0; }
.l-main a { text-decoration: none; }
.l-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-main small.late { color: var(--late); white-space: normal; }
.purpose { font-weight: 600; color: var(--ink-2); }
.l-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line-2); padding: 9px 12px; text-align: left; vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; background: rgba(255, 255, 255, .025); }
.tbl tr.err td { background: var(--late-bg); }
.tbl td.indent { padding-left: 26px; color: var(--ink-2); }
.scroll { overflow-x: auto; }
dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: 5px 16px; margin: 4px 0; font-size: 13px; }
dl.meta dt { color: var(--muted); text-transform: capitalize; }
dl.meta dd { margin: 0; }
.history { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.history li { padding: 7px 0; border-top: 1px solid var(--line-2); }
.history time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 6px; }

/* ---------- modal, drawer, toast ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(5, 6, 18, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: start center; padding: 8vh 16px 16px; z-index: 60; overflow: auto; }
.modal { background: rgba(22, 24, 48, .9); border-radius: 20px; box-shadow: var(--shadow); padding: 22px 24px; width: min(520px, 100%); }
.modal.wide { width: min(820px, 100%); }
.modal h2 { text-transform: none; letter-spacing: 0; font-size: 18px; color: var(--ink); margin: 0 0 8px; }
.rem { border-top: 1px solid var(--line-2); padding: 8px 0; }
.rem .row { border: 0; padding-left: 0; padding-right: 0; }
.rem-kind { font-size: 12px; color: var(--muted); margin-left: 6px; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: rgba(18, 19, 40, .92); border-left: 1px solid var(--line); border-radius: 22px 0 0 22px; box-shadow: var(--shadow); transform: translateX(105%); transition: transform .2s ease; z-index: 40; overflow: auto; }
.drawer.open { transform: none; }
.drawer .pad { padding: 18px 22px 40px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 30px); background: rgba(30, 32, 62, .95); color: var(--ink); border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 80; max-width: calc(100% - 32px); box-shadow: var(--shadow); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #c2384f; color: #fff; border-color: transparent; }
.toast.warn { background: #9a7a12; color: #fff; border-color: transparent; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .card { width: min(400px, 100%); border-radius: 22px; padding: 26px; }

/* ---------- iPad: workspace switcher becomes a drawer ---------- */
@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; height: auto; margin: 10px; width: 260px; z-index: 50; transform: translateX(-110%); transition: transform .2s ease; background: rgba(16, 17, 36, .95); }
  body.side-open .side { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(5, 6, 18, .55); z-index: 45; }
  .top .menu { display: inline-grid; }
  .search input { width: 150px; }
  .summary { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 104px minmax(0, 1fr) 120px 130px 92px; }
  .triage { padding-left: 16px; }
}
/* ---------- phone: agenda-first, rows stay one record per line ---------- */
@media (max-width: 700px) {
  html, body { font-size: 15px; }
  .top { flex-wrap: wrap; padding: 8px 10px; gap: 6px; margin: 8px 8px 0; border-radius: 16px; top: 8px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  .tabs a { padding: 6px 11px; }
  .search { margin-left: auto; }
  .search input { width: 110px; }
  .capture-btn { padding: 6px 11px; }
  .page { padding: 16px 14px 80px; }
  h1 { font-size: 24px; }
  .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "st acts" "main due" "main owner"; gap: 2px 8px; padding: 10px 12px; }
  .r-status { grid-area: st; } .r-acts { grid-area: acts; } .r-main { grid-area: main; } .r-due { grid-area: due; text-align: right; } .r-owner { grid-area: owner; text-align: right; font-size: 12px; color: var(--ink-2); }
  .r-title { white-space: normal; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .tile b { font-size: 28px; }
  .grid2, .grid3, .summary { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; }
  .wk-col { min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
  .mo-cell { min-height: 64px; }
  .mo-cell .ev span { font-size: 10px; }
  .pipeline { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .filters { margin-left: 0; }
  .link-row { grid-template-columns: 1fr; }
  .modal-wrap { padding: 0; place-items: stretch; }
  .modal { border-radius: 0; min-height: 100vh; }
  .drawer { width: 100%; border-radius: 0; }
  .triage select, .triage input { flex: 1 1 140px; max-width: none; }
}
