/* Ops Pocket — from the Claude Design mockups ("Ops Pocket Mockups.dc.html").
   Warm neutrals, Geist + JetBrains Mono, vermilion only for what's broken. */
:root {
  --bg: oklch(0.972 0.009 75);
  --surface: oklch(0.995 0.004 75);
  --surface2: oklch(0.94 0.013 75);
  --ink: oklch(0.28 0.02 55);
  --ink2: oklch(0.47 0.02 60);
  --ink3: oklch(0.6 0.017 65);
  --line: oklch(0.91 0.012 70);
  --alarm: oklch(0.62 0.2 35);
  --alarmTint: oklch(0.94 0.04 38);
  --alarmInk: oklch(0.5 0.18 35);
  --warn: oklch(0.75 0.14 72);
  --warnTint: oklch(0.95 0.045 82);
  --warnInk: oklch(0.5 0.11 62);
  --ok: oklch(0.64 0.1 155);
  --okTint: oklch(0.95 0.03 150);
  --okInk: oklch(0.46 0.09 155);
  --scrim: oklch(0.2 0.02 50 / 0.35);
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(0.21 0.014 55); --surface: oklch(0.255 0.016 55); --surface2: oklch(0.305 0.017 55);
    --ink: oklch(0.95 0.012 75); --ink2: oklch(0.78 0.016 70); --ink3: oklch(0.62 0.016 65); --line: oklch(0.33 0.016 55);
    --alarm: oklch(0.68 0.19 36); --alarmTint: oklch(0.33 0.075 36); --alarmInk: oklch(0.82 0.12 40);
    --warn: oklch(0.78 0.13 75); --warnTint: oklch(0.31 0.05 70); --warnInk: oklch(0.86 0.11 80);
    --ok: oklch(0.66 0.1 155); --okTint: oklch(0.3 0.04 155); --okInk: oklch(0.8 0.08 155);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: oklch(0.21 0.014 55); --surface: oklch(0.255 0.016 55); --surface2: oklch(0.305 0.017 55);
  --ink: oklch(0.95 0.012 75); --ink2: oklch(0.78 0.016 70); --ink3: oklch(0.62 0.016 65); --line: oklch(0.33 0.016 55);
  --alarm: oklch(0.68 0.19 36); --alarmTint: oklch(0.33 0.075 36); --alarmInk: oklch(0.82 0.12 40);
  --warn: oklch(0.78 0.13 75); --warnTint: oklch(0.31 0.05 70); --warnInk: oklch(0.86 0.11 80);
  --ok: oklch(0.66 0.1 155); --okTint: oklch(0.3 0.04 155); --okInk: oklch(0.8 0.08 155);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mono { font-family: var(--mono); }

/* ---------- Layout ---------- */
#view {
  max-width: 480px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 8px) 20px calc(env(safe-area-inset-bottom) + 112px);
  display: flex; flex-direction: column; gap: 28px;
}
.topline { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.topline .when { font: 400 13px var(--mono); color: var(--ink3); }
.gear {
  width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--surface2); color: var(--ink2);
  display: flex; align-items: center; justify-content: center;
}
.head { display: flex; flex-direction: column; gap: 6px; margin-top: -12px; }
.headline { font: 700 34px/1.1 var(--mono); letter-spacing: -0.05em; color: var(--ink); text-wrap: balance; }
.headline .rest { color: var(--ink3); font-weight: 500; }
.sub { font-size: 16px; font-weight: 600; color: var(--ink2); text-wrap: pretty; }
.label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font: 600 13px var(--mono); color: var(--ink3); text-transform: lowercase; }
.label .n { font-weight: 400; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 2px 0; }

/* ---------- Status ---------- */
.cells { display: flex; flex-wrap: wrap; gap: 3px; margin-top: -14px; }
.cells i { width: 7px; height: 20px; border-radius: 2px; background: var(--ok); }
.cells i.warn { background: var(--warn); }
.cells i.fail { background: var(--alarm); }
.cells i.unknown { background: var(--line); }

.alert { border-radius: 14px; padding: 16px 14px 16px 18px; display: flex; gap: 12px; align-items: flex-start; background: var(--alarmTint); }
.alert.important { background: var(--warnTint); }
.alert.seen { background: var(--surface2); }
.alert .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.alert .lvl { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.alert .lvl b { font-weight: 700; color: var(--alarmInk); }
.alert.important .lvl b { color: var(--warnInk); }
.alert.seen .lvl b { color: var(--ink3); }
.alert .lvl span { font-family: var(--mono); color: var(--ink2); }
.alert .title { font-size: 18px; font-weight: 600; line-height: 1.25; text-wrap: pretty; }
.alert.seen .title { color: var(--ink2); }
.alert .detail { font-size: 14px; font-weight: 600; color: var(--ink2); }
.alert .held { font-size: 13px; font-weight: 700; color: var(--ink2); margin-top: 2px; }
.alert .seen-btn { min-width: 64px; height: 44px; border-radius: 14px; border: 0; background: var(--surface); font-size: 15px; font-weight: 600; flex: none; }
.alert.seen .seen-btn { background: transparent; }

.grp + .grp { border-top: 1px solid var(--line); }
.grp-head { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border: 0; background: transparent; text-align: left; }
.grp-head .name { flex: 1; font-size: 17px; font-weight: 600; }
.grp-head .sum { font: 400 13px var(--mono); color: var(--ink3); }
.grp-head .sum.bad { color: var(--alarmInk); }
.grp-head .chev { color: var(--ink3); font-size: 18px; font-weight: 700; transition: transform .15s; }
.grp.open .chev { transform: rotate(90deg); }
.chk { margin: 0 8px 6px; padding: 10px 12px; border-radius: 10px; display: flex; gap: 10px; align-items: center; }
.chk.fail { background: var(--alarmTint); }
.chk .t { flex: 1; min-width: 0; }
.chk .title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk.fail .title { color: var(--alarmInk); }
.chk .meta { font: 400 12px var(--mono); color: var(--ink3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk .meta.warn { color: var(--warnInk); }
.chk.fail .meta, .chk .meta.bad { color: var(--alarmInk); }
.chk svg { flex: none; color: var(--ink3); }
.chk.fail svg { color: var(--alarm); }
.chk .right { font: 500 13px var(--mono); color: var(--ink2); min-width: 40px; text-align: right; flex: none; }
.chk.fail .right { color: var(--alarmInk); }
.chk .act { height: 32px; padding: 0 10px; border-radius: 16px; border: 0; background: var(--surface); font-size: 13px; font-weight: 600; flex: none; }
.more { width: 100%; height: 40px; border: 0; background: transparent; color: var(--ink3); font-size: 14px; font-weight: 700; margin: -4px 0 4px; }

.fixed .item { display: flex; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); align-items: baseline; }
.fixed .item .t { flex: 1; min-width: 0; }
.fixed .item .title { font-size: 15px; font-weight: 600; color: var(--ink2); }
.fixed .item .meta { font: 400 12px var(--mono); color: var(--ink3); margin-top: 2px; }
.fixed .item .when { font: 400 12px var(--mono); color: var(--okInk); text-align: right; }

.skel { border-radius: 14px; background: var(--surface2); }

.banner { border-radius: 18px; background: var(--surface2); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; margin-top: -16px; }
.banner b { font-size: 15px; font-weight: 600; }
.banner span { font-size: 14px; font-weight: 600; color: var(--ink2); }
.banner.warn { background: var(--warnTint); border-radius: 14px; padding: 16px 18px; flex-direction: row; align-items: center; gap: 12px; margin-top: 0; }
.banner.warn .t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.banner.warn b { font-size: 17px; }
.banner.alarm { background: var(--alarmTint); margin-top: 0; }

.btn { height: 44px; padding: 0 16px; border-radius: 14px; border: 0; background: var(--surface2); font-size: 15px; font-weight: 600; }
.btn.surface { background: var(--surface); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.block { width: 100%; }

/* ---------- Projects ---------- */
.proj { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border-radius: 16px; padding: 18px; border: 1px solid var(--line); }
.proj .ph { display: flex; align-items: baseline; gap: 8px; }
.proj .ph .name { font-size: 19px; font-weight: 700; }
.proj .ph .key { font: 400 12px var(--mono); color: var(--ink3); }
.proj .ph .go { margin-left: auto; color: var(--ink3); font-size: 15px; font-weight: 600; }
.nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.nums.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.num { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.num b { font: 500 22px var(--mono); color: var(--ink); }
.num b.zero { color: var(--ink3); }
.num b.bad { color: var(--alarmInk); }
.num small { font-size: 12px; font-weight: 700; color: var(--ink3); }
.urg { background: var(--alarmTint); border-radius: 14px; padding: 10px 12px; font-size: 14px; font-weight: 700; line-height: 1.35; text-wrap: pretty; display: block; }
.urg .id { font-family: var(--mono); font-weight: 500; color: var(--alarmInk); }
.bars-wrap { display: flex; flex-direction: column; gap: 6px; }
.bars-wrap .cap { font-size: 12px; font-weight: 700; color: var(--ink3); }
.bars { height: 64px; display: flex; align-items: flex-end; gap: 2px; }
.bars i { flex: 1; background: var(--ink3); border-radius: 3px; min-height: 2px; }
.bars i.last { background: var(--ink2); }
.bars i.bad { background: var(--alarm); }
.bars-axis { display: flex; justify-content: space-between; font: 400 11px var(--mono); color: var(--ink3); }

/* ---------- Reminders ---------- */
.composer { background: var(--surface); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); }
.composer input { width: 100%; border: 0; outline: none; background: var(--surface2); border-radius: 14px; padding: 0 14px; color: var(--ink); }
.composer .what { height: 48px; font-size: 17px; font-weight: 700; }
.composer .what::placeholder { color: var(--ink3); }
.composer .when { height: 44px; font: 400 16px var(--mono); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 36px; padding: 0 12px; border-radius: 18px; border: 0; background: var(--surface2); color: var(--ink2); font-size: 14px; font-weight: 600; }
.chip.on { background: var(--ink); color: var(--bg); }
.composer .add { height: 48px; border-radius: 16px; border: 0; background: var(--ink); color: var(--bg); font-size: 16px; font-weight: 600; }

.rem-list { background: var(--surface); border-radius: 14px; padding: 2px 0; }
.rem-list.overdue { background: var(--alarmTint); }
.rem { display: flex; gap: 6px; align-items: flex-start; padding: 8px 10px 8px 4px; }
.rem + .rem { border-top: 1px solid var(--line); }
.ring-btn { width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; flex: none; }
.ring-btn i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink3); }
.overdue .ring-btn i { border-color: var(--alarm); }
.ring-btn:active i { background: var(--ok); border-color: var(--ok); }
.rem .t { flex: 1; min-width: 0; padding-top: 10px; }
.rem .text { font-size: 16px; font-weight: 600; line-height: 1.3; text-wrap: pretty; }
.rem .whenline { font: 400 12px var(--mono); color: var(--ink3); margin-top: 3px; }
.overdue .rem .whenline { color: var(--alarmInk); }
.rem .opts { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.rem .opts button { height: 36px; padding: 0 12px; border-radius: 18px; border: 0; background: var(--surface2); font-size: 14px; font-weight: 600; }
.snooze { height: 36px; margin-top: 4px; padding: 0 12px; border-radius: 18px; border: 0; background: var(--surface2); color: var(--ink2); font-size: 13px; font-weight: 600; flex: none; }
.label.overdue { color: var(--alarmInk); }
.label .grp-name { color: var(--ink); }
.label.overdue .grp-name { color: var(--alarmInk); }

.exp { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.exp + .exp, .due + .due { border-top: 1px solid var(--line); }
.exp .t { flex: 1; min-width: 0; }
.exp .name { font-size: 15px; font-weight: 600; }
.exp .meta { font: 400 12px var(--mono); color: var(--ink3); margin-top: 2px; }
.days { font: 500 14px var(--mono); padding: 5px 10px; border-radius: 12px; color: var(--ink3); }
.days.warn { background: var(--warnTint); color: var(--warnInk); }
.days.bad { background: var(--alarmTint); color: var(--alarmInk); }
.due { display: flex; align-items: baseline; gap: 12px; padding: 12px 16px; }
.due .t { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; line-height: 1.35; }
.due .t .id { font-family: var(--mono); font-weight: 500; color: var(--ink3); }
.due .d { font: 400 12px var(--mono); color: var(--ink2); flex: none; }
.due.over .d { color: var(--alarmInk); }

.empty { text-align: center; padding: 20px 20px 4px; display: flex; flex-direction: column; gap: 4px; }
.empty b { font-size: 19px; font-weight: 700; }
.empty span { font-size: 15px; font-weight: 600; color: var(--ink2); }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; padding: 0 12px env(safe-area-inset-bottom); height: calc(56px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink3); max-width: 160px; margin: 0 auto; }
.tabbar a.active { color: var(--ink); }
.tabbar span { font: 500 10px var(--mono); text-transform: lowercase; }
.ti { position: relative; width: 24px; height: 24px; }
.ti-status { border-radius: 50%; border: 2.5px solid currentColor; }
.ti-projects { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.ti-projects i { border-radius: 4px; background: currentColor; }
.ti-reminders { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.ti-reminders i { height: 3px; border-radius: 2px; background: currentColor; }
.ti-reminders i:nth-child(1) { width: 24px; } .ti-reminders i:nth-child(2) { width: 18px; } .ti-reminders i:nth-child(3) { width: 21px; }
.tab-badge { position: absolute; top: -8px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--alarm); color: #fff; font: 700 11px/18px var(--sans); text-align: center; }

/* ---------- Settings sheet ---------- */
dialog#sheet {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: 480px; height: calc(100% - env(safe-area-inset-top) - 14px); max-height: none;
  margin: 0 auto; padding: 0; border: 0; border-radius: 28px 28px 0 0; background: var(--bg); color: var(--ink);
}
dialog#sheet[open] { animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { transform: translateY(40px); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { dialog#sheet[open] { animation: none; } }
dialog#sheet::backdrop { background: var(--scrim); }
.sheet { height: 100%; overflow-y: auto; padding: 8px 20px calc(env(safe-area-inset-bottom) + 40px); display: flex; flex-direction: column; gap: 22px; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line); align-self: center; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; font-size: 28px; font-weight: 700; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card .row { display: flex; align-items: center; gap: 12px; }
.card .row .t { flex: 1; }
.card .h { font-size: 17px; font-weight: 600; }
.card .p { font-size: 14px; font-weight: 600; color: var(--ink2); line-height: 1.4; text-wrap: pretty; margin-top: 2px; }
.toggle { width: 51px; height: 31px; border-radius: 16px; border: 0; padding: 0; background: var(--line); position: relative; flex: none; transition: background .2s; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: left .2s; }
.toggle[aria-checked="true"] { background: var(--ok); }
.toggle[aria-checked="true"]::after { left: 22px; }
.toggle:disabled { opacity: .5; }
.notif-preview { background: var(--surface2); border-radius: 18px; padding: 12px 14px; display: flex; gap: 10px; }
.notif-preview .t { flex: 1; min-width: 0; }
.notif-preview .top { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--ink3); }
.notif-preview .title { font-size: 15px; font-weight: 600; margin-top: 2px; }
.notif-preview .body { font-size: 14px; font-weight: 600; color: var(--ink2); line-height: 1.35; margin-top: 1px; }
.keys { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 0; }
.keys .h { font-size: 17px; font-weight: 600; padding: 10px 16px 4px; display: flex; justify-content: space-between; align-items: center; }
.keys .h button { height: 32px; padding: 0 12px; border-radius: 16px; border: 0; background: var(--surface2); font-size: 13px; font-weight: 600; }
.keys .k { display: flex; justify-content: space-between; padding: 10px 16px; font-size: 15px; font-weight: 700; }
.keys .k + .k { border-top: 1px solid var(--line); }
.keys .k span { font: 400 12px var(--mono); color: var(--ink3); }
.logout { height: 52px; border-radius: 18px; border: 0; background: var(--surface); color: var(--alarmInk); font-size: 16px; font-weight: 600; flex: none; }

/* ---------- App icon (CSS) ---------- */
.icon { position: relative; overflow: hidden; flex: none; background: oklch(0.93 0.045 72); }
.icon::before { content: ''; position: absolute; left: 39%; top: 20%; width: 22%; height: 22%; border-radius: 50%; background: oklch(0.68 0.12 155); }
.icon::after { content: ''; position: absolute; left: 22%; right: 22%; top: 36%; bottom: 18%; border-radius: 10% 10% 48% 48%; background: oklch(0.33 0.045 45); }

/* ---------- Login ---------- */
.login { min-height: 100vh; min-height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 96px) 28px calc(env(safe-area-inset-bottom) + 40px); }
.login .top { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.login .icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 8px 24px -10px oklch(0.4 0.06 50 / 0.5); }
.login h1 { margin: 6px 0 0; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.login .lead { font-size: 17px; font-weight: 600; color: var(--ink2); max-width: 260px; text-wrap: pretty; }
.login .field { width: 100%; display: flex; flex-direction: column; gap: 8px; text-align: left; margin-top: 24px; }
.login .field label { font-size: 15px; font-weight: 600; }
.login .field input { height: 52px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 16px; font: 400 16px var(--mono); outline: none; }
.login .field input:focus { border-color: var(--ink3); }
.login .field small { font-size: 13px; color: var(--ink3); font-weight: 600; }
.login .cta { height: 58px; border-radius: 20px; border: 0; background: var(--ink); color: var(--bg); font-size: 17px; font-weight: 600; }
.login .foot { text-align: center; font-size: 13px; font-weight: 600; color: var(--ink3); margin-top: 14px; }
.login .alt { background: none; border: 0; color: var(--ink3); font-size: 13px; font-weight: 600; margin-top: 10px; text-decoration: underline; }
.login .err { margin-top: 14px; border-radius: 14px; background: var(--alarmTint); color: var(--alarmInk); padding: 12px 14px; font-size: 14px; font-weight: 600; text-align: left; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60; bottom: calc(env(safe-area-inset-bottom) + 72px);
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; max-width: calc(100% - 40px);
}

.alert-acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.alert .close-btn { min-width: 64px; height: 36px; border-radius: 12px; border: 0; background: transparent; color: var(--ink2); font-size: 14px; font-weight: 600; }
