/* Chamber Diary — mobile-first, boring on purpose. */
:root {
  --navy: #1f3864; --blue: #2e5395; --bg: #f4f6f9; --card: #ffffff;
  --text: #1a1a1a; --muted: #667085; --line: #e3e8ef;
  --ok: #1a7f37; --warn: #b54708; --bad: #b42318;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif; }

header#topbar { position: sticky; top: 0; z-index: 5; background: var(--navy); color: #fff;
  display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem;
  padding-top: calc(.5rem + env(safe-area-inset-top)); }
#chamber-name { font-weight: 700; font-size: .95rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }
#tabs { display: flex; gap: .25rem; margin-left: auto; }
#tabs button { background: transparent; color: #cdd8ee; border: 0; padding: .45rem .6rem;
  border-radius: 8px; font-size: .9rem; }
#tabs button.active { background: var(--blue); color: #fff; font-weight: 600; }
#btn-switch { background: transparent; border: 0; color: #cdd8ee; font-size: 1.1rem; }

main { max-width: 720px; margin: 0 auto; padding: .9rem .8rem 4rem; }
h1 { font-size: 1.25rem; color: var(--navy); margin: .4rem 0 .8rem; }
h2 { font-size: 1.05rem; color: var(--navy); margin: 1rem 0 .5rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: .8rem .9rem; margin-bottom: .7rem; }
.card.tap { cursor: pointer; }
.card.tap:active { background: #eef2f8; }
.row { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.muted { color: var(--muted); font-size: .85rem; }
.big { font-size: 1.05rem; font-weight: 600; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: .1rem .5rem;
  border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.pill.warn { color: var(--warn); border-color: var(--warn); }
.pill.bad { color: var(--bad); border-color: var(--bad); }

button.primary { background: var(--navy); color: #fff; border: 0; border-radius: 10px;
  padding: .7rem 1rem; font-size: 1rem; font-weight: 600; width: 100%; }
button.secondary { background: #fff; color: var(--navy); border: 1px solid var(--navy);
  border-radius: 10px; padding: .6rem 1rem; font-size: .95rem; width: 100%; }
button.danger { background: #fff; color: var(--bad); border: 1px solid var(--bad);
  border-radius: 10px; padding: .6rem 1rem; font-size: .95rem; width: 100%; }
button.link { background: none; border: 0; color: var(--blue); text-decoration: underline;
  font-size: .9rem; padding: .3rem 0; }
button:disabled { opacity: .55; }

form .field { margin-bottom: .8rem; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .25rem; }
input, textarea, select { width: 100%; padding: .6rem .7rem; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); }
textarea { min-height: 5.5rem; resize: vertical; }
.choice { display: flex; gap: .5rem; margin-bottom: .8rem; }
.choice button { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: .55rem; font-size: .95rem; color: var(--muted); }
.choice button.on { border-color: var(--navy); color: var(--navy); font-weight: 700; }

.login-wrap { display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 80vh; text-align: center; gap: 1rem; padding: 1rem; }
.login-wrap .logo { font-size: 2.6rem; }
.datebar { display: flex; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.datebar input { flex: 1; }

.hearing { border-left: 3px solid var(--line); padding-left: .7rem; margin: .6rem 0; }
.hearing.superseded { opacity: .55; }
.invite-token { word-break: break-all; background: #f0f4fa; border: 1px dashed var(--blue);
  padding: .6rem; border-radius: 8px; font-family: ui-monospace, monospace; font-size: .85rem; }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 1.2rem;
  background: #222; color: #fff; padding: .6rem 1rem; border-radius: 10px;
  font-size: .9rem; max-width: 92vw; z-index: 10; }
#toast.err { background: var(--bad); }
.spacer { height: .6rem; }

/* ---------- print (the causelist is a court-corridor document) ---------- */
.print-only { display: none; }
@media print {
  #topbar, #tabs, #toast, .no-print { display: none !important; }
  .print-only { display: block; }
  .print-head { font-weight: 700; font-size: 1.1rem; margin-bottom: .6rem; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #999; border-radius: 0; box-shadow: none;
    break-inside: avoid; page-break-inside: avoid; }
  .card.tap { cursor: default; }
}
