/* Cadre Crew office clock - Hive Desk style shell.
   Dark rail, light desk, one accent. Numbers tabular so hours line up. */
:root {
  --ink: #0f1115;
  --rail: #14161d;
  --rail2: #1b1e27;
  --line: #e6e8ee;
  --bg: #f6f7fa;
  --card: #ffffff;
  --text: #171a21;
  --muted: #6b7280;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --ok: #12946b;
  --ok-soft: #e7f7f1;
  --warn: #b7791f;
  --warn-soft: #fdf3e3;
  --bad: #c0392b;
  --bad-soft: #fdeceb;
  --r: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(16, 24, 40, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
h1 { font-size: 22px; margin: 0; letter-spacing: -.2px; }
h2 { font-size: 14px; margin: 0; letter-spacing: .2px; text-transform: none; }
a { color: var(--accent); text-decoration: none; }
code { background: #f0f1f5; padding: 2px 5px; border-radius: 6px; font-size: 12px; }
.muted { color: var(--muted); }
.err { color: var(--bad); font-size: 13px; margin: 8px 0 0; }
.ok-chip, .bad-chip {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px;
}
.ok-chip { background: var(--ok-soft); color: var(--ok); }
.bad-chip { background: var(--bad-soft); color: var(--bad); }

/* ---------------- shell ---------------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  background: var(--rail); color: #e8eaf0; display: flex; flex-direction: column;
  padding: 18px 14px; gap: 18px; position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 10px; }
.side-brand b { display: block; font-size: 14px; letter-spacing: .2px; }
.side-brand span { display: block; font-size: 11px; color: #8b90a0; }
.logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(145deg, #6366f1, #4338ca); color: #fff; font-weight: 700; font-size: 13px;
  letter-spacing: .3px;
}
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  color: #b9bece; font-size: 13.5px; font-weight: 500; border: 0; background: none;
  width: 100%; text-align: left; cursor: pointer; font-family: inherit;
}
.nav-item .ico { width: 18px; text-align: center; opacity: .8; font-size: 14px; }
.nav-item:hover { background: var(--rail2); color: #fff; }
.nav-item.on { background: #262a36; color: #fff; }
.nav-item.quiet { padding-left: 10px; color: #8b90a0; font-size: 13px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.pill-gate {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 99px;
  background: var(--rail2); color: #9aa0b2; width: fit-content;
}
.pill-gate.ok { background: rgba(18, 148, 107, .16); color: #4ade9f; }
.pill-gate.bad { background: rgba(192, 57, 43, .18); color: #ff9184; }
.pill-gate.warn { background: rgba(183, 121, 31, .18); color: #f0b862; }
.side-person { display: flex; gap: 9px; align-items: center; padding: 8px; background: var(--rail2); border-radius: 12px; }
.side-person .pw { line-height: 1.25; min-width: 0; }
.side-person b { display: block; font-size: 13px; }
.side-person span { font-size: 11px; color: #8b90a0; }
.side-person .dev { color: #6f7488; font-size: 10.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 30px; height: 30px; border-radius: 9px; background: #2f3444; color: #cfd4e4;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: 0 0 auto;
}
.avatar.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 10px; }
.avatar.big { width: 44px; height: 44px; border-radius: 12px; font-size: 14px; }
.main { padding: 22px 26px 40px; max-width: 1180px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; gap: 12px; }
.topbar .sub { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.topright { display: flex; gap: 8px; align-items: center; }
.topright .pill-gate { background: #eef0f5; color: #4b5162; }
.topright .pill-gate.ok { background: var(--ok-soft); color: var(--ok); }
.topright .pill-gate.bad { background: var(--bad-soft); color: var(--bad); }
.topright .pill-gate.warn { background: var(--warn-soft); color: var(--warn); }

/* ---------------- cards ---------------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.alert {
  background: var(--warn-soft); border: 1px solid #f2dfbe; color: #7a5312;
  border-radius: 10px; padding: 9px 12px; font-size: 13px; margin: 0 0 12px;
}
.alert-card { border-color: #cfd3ff; background: var(--accent-soft); margin-bottom: 14px; }
.link { display: block; margin-top: 4px; padding: 9px 10px; background: #fff; border: 1px dashed #b9bdf5;
  border-radius: 8px; font-size: 12px; word-break: break-all; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.stat .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.stat .v { font-size: 26px; font-weight: 650; letter-spacing: -.5px; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.stat .s { font-size: 12px; color: var(--muted); }
.cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 12px; }

/* ---------------- status ---------------- */
.status { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 12px; }
.status.on { border-left: 4px solid var(--ok); }
.status.brk { border-left: 4px solid var(--warn); }
.status.off { border-left: 4px solid #cfd3dd; }
.pill {
  display: inline-block; font-size: 11.5px; font-weight: 650; letter-spacing: .3px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px; background: #eef0f5; color: #4b5162;
}
.status.on .pill { background: var(--ok-soft); color: var(--ok); }
.status.brk .pill { background: var(--warn-soft); color: var(--warn); }
.elapsed {
  font-size: 46px; font-weight: 680; letter-spacing: -1.4px; line-height: 1.05; margin: 8px 0 2px;
  font-variant-numeric: tabular-nums;
}
.sub2 { color: var(--muted); font-size: 13px; }
.status-actions { display: flex; flex-direction: column; gap: 8px; min-width: 210px; }

/* ---------------- buttons ---------------- */
.btn {
  font-family: inherit; font-size: 14px; font-weight: 600; border-radius: 11px; padding: 10px 16px;
  border: 1px solid transparent; cursor: pointer; transition: transform .04s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #4338ca; }
.btn.ghost { background: #fff; border-color: #d6d9e2; color: #2c3040; }
.btn.ghost:hover { background: #f6f7fb; }
.btn.big { padding: 14px 18px; font-size: 15px; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn.danger { color: var(--bad); border-color: #f0c9c4; }
.btn[disabled] { opacity: .55; cursor: default; }
.inline { display: inline; }

/* ---------------- charts ---------------- */
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; gap: 10px; }
.chart-head .muted { font-size: 12px; }
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 148px; position: relative; padding-top: 14px; }
.chart-bars.tall { height: 190px; }
.target { position: absolute; left: 0; right: 0; border-top: 1px dashed #c9cdd9; }
.target span { position: absolute; right: 0; top: -16px; font-size: 10px; color: var(--muted); }
.cb { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.cbv { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 3px; height: 13px; }
.cbtrack { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.cbfill { width: 100%; border-radius: 7px 7px 3px 3px; background: #d9dce7; min-height: 3px; }
.cbfill.full { background: linear-gradient(180deg, #6d70f5, #4f46e5); }
.cbfill.part { background: #a5a8f0; }
.cbl { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ---------------- feed ---------------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid #f0f1f5; font-size: 13.5px; }
.feed li:last-child { border-bottom: 0; }
.feed b { font-weight: 600; }
.feed .t { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.dot, .dotp { width: 8px; height: 8px; border-radius: 99px; display: inline-block; background: #cfd3dd; }
.dot { margin-right: 7px; }
.dot.login, .dotp.on { background: var(--ok); }
.dot.break_start, .dotp.brk { background: var(--warn); }
.dot.logout, .dotp.off { background: #b6bbca; }
.dot.break_end { background: #6d70f5; }

/* ---------------- tables ---------------- */
.table-card { padding: 6px 0 0; overflow-x: auto; }
.table-card .chart-head { padding: 10px 18px 0; }
.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.grid th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
  font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.grid td { padding: 11px 14px; border-bottom: 1px solid #f1f2f6; vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
.grid .nm { display: flex; align-items: center; gap: 9px; }
.grid .nm b { font-weight: 650; }
.grid .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.grid .tag { font-size: 10.5px; color: var(--muted); background: #f2f3f7; padding: 1px 6px; border-radius: 6px; margin-left: 6px; }
.grid .warnc { color: var(--warn); font-weight: 600; }
.grid .px { font-size: 12px; }
.mini-grid td.mini, .mini-grid th.mini { padding: 7px 6px; text-align: center; font-variant-numeric: tabular-nums; font-size: 12px; }
.mini-grid td.mini.ok { background: var(--ok-soft); color: #0e6b4f; font-weight: 600; }
.mini-grid td.mini.dim { color: #c3c7d2; }

/* ---------------- auth pages ---------------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 28px 16px; }
.auth-brand { text-align: center; max-width: 380px; }
.auth-brand .logo { margin: 0 auto 10px; }
.auth-brand h1 { font-size: 21px; }
.auth-brand h1 span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .4px; text-transform: uppercase; margin-top: 4px; }
.auth-brand p { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; }
.auth-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.lab { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; }
.field {
  font-family: inherit; font-size: 15px; padding: 11px 12px; border: 1px solid #d6d9e2; border-radius: 10px;
  background: #fff; color: var(--text); width: 100%;
}
.field:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.hint.small { font-size: 12px; }
.enroll-who { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.enroll-who b { display: block; font-size: 15px; }
.enroll-who span { font-size: 12px; color: var(--muted); }
.net { font-size: 12px; color: var(--muted); text-align: center; max-width: 420px; }

.foot { margin-top: 14px; font-size: 11.5px; color: var(--muted); }
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; }
  .side-brand { padding: 0; }
  .side-brand span { display: none; }
  .side-nav { flex-direction: row; gap: 4px; overflow-x: auto; }
  .nav-item { padding: 7px 9px; font-size: 12.5px; white-space: nowrap; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .side-person { display: none; }
  .main { padding: 16px 14px 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: 1fr; }
  .status { flex-direction: column; align-items: stretch; }
  .status-actions { flex-direction: row; }
  .elapsed { font-size: 38px; }
}

/* standup card */
.card.standup { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px; }
.card.standup .sup-t { font-size: 18px; font-weight: 600; margin-top: 4px; }
.card.standup .sup-s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card.standup.live { border-left: 3px solid var(--warn); }
.card.standup.done { border-left: 3px solid var(--ok); }
.card.standup.idle { opacity: .82; }
.card.standup .pill { margin-bottom: 2px; }
@media (max-width: 880px) {
  .card.standup { flex-direction: column; align-items: stretch; }
  .card.standup .btn { width: 100%; }
}
