/* SafeStop Command Center - no JavaScript, mobile-first, system fonts only. */
:root { --brand: #0b4f6c; --brand-dark: #083a50; --bg: #f4f6f8; --card: #fff; --text: #1d2730; --muted: #5b6875;
        --ok: #1f7a3d; --err: #b3261e; --warn: #a15c00; --line: #d9dfe5; --radius: 10px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand); }
h1 { font-size: 1.5rem; margin: .5rem 0 1rem; }
.h2 { font-size: 1.3rem; } .h3 { font-size: 1.1rem; margin: 0 0 .5rem; }
.topbar { background: var(--brand); color: #fff; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .6rem 1rem; }
.topbar a, .topbar .link { color: #fff; }
.brand { font-weight: 700; text-decoration: none; margin-right: auto; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; order: 3; width: 100%; }
.nav a { text-decoration: none; padding: .4rem .7rem; border-radius: 6px; }
.nav a[aria-current="page"], .nav a:hover { background: var(--brand-dark); }
.account { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.container { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.narrow { max-width: 420px; margin: 2rem auto; }
.muted { color: var(--muted); } .empty { color: var(--muted); font-style: italic; }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: .4rem; }
.inline { display: inline; margin: 0; }
label { font-weight: 600; font-size: .9rem; }
input, select, textarea, button { font: inherit; padding: .55rem .7rem; border-radius: 6px; border: 1px solid var(--line); max-width: 100%; }
button { cursor: pointer; background: #e8edf1; min-height: 44px; }
button.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
button.danger { background: var(--err); color: #fff; border-color: var(--err); }
button.link { background: none; border: 0; padding: 0; min-height: 0; text-decoration: underline; }
.flash { padding: .6rem .8rem; border-radius: 6px; }
.flash-ok { background: #e3f3e8; color: var(--ok); } .flash-error { background: #fbe7e5; color: var(--err); }
.badge { display: inline-block; font-size: .78rem; padding: .1rem .5rem; border-radius: 999px; background: #e8edf1; }
.badge.escalation, .badge.overdue, .prio-urgent, .risk-red { background: #fbe7e5; color: var(--err); }
.prio-high, .risk-yellow { background: #fff1dc; color: var(--warn); } .risk-green { background: #e3f3e8; color: var(--ok); }
.facts { display: grid; grid-template-columns: 1fr; gap: .25rem 1rem; margin: .5rem 0; }
.facts div { display: flex; justify-content: space-between; gap: .5rem; border-bottom: 1px dashed var(--line); }
.facts dt { color: var(--muted); } .facts dd { margin: 0; text-align: right; }
.label { font-weight: 600; margin: .75rem 0 .25rem; } .subject { font-weight: 600; margin: 0; }
.message { white-space: pre-wrap; margin: 0; padding: .75rem; background: #f7fafc; border-left: 4px solid var(--brand); border-radius: 4px; overflow-wrap: anywhere; }
.actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.reject { display: flex; flex-direction: column; gap: .4rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-bottom: 1rem; }
.filters label { display: flex; flex-direction: column; font-weight: 600; }
.list { list-style: none; padding: 0; margin: 0; }
.task .title { font-weight: 600; display: block; margin-bottom: .3rem; }
.task.overdue { border-left: 4px solid var(--err); }
.meta { display: flex; flex-wrap: wrap; gap: .35rem .75rem; font-size: .88rem; color: var(--muted); align-items: center; }
.description, .note-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.note { border-bottom: 1px solid var(--line); margin-bottom: .5rem; } .note p { margin: .2rem 0; }
.grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.span-all { grid-column: 1 / -1; margin: 0; }
.kpi { display: flex; flex-direction: column; align-items: center; margin: 0; }
.kpi-value { font-size: 2rem; font-weight: 700; margin: 0; }
.kpi-label { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.warn { color: var(--err); font-weight: 700; }
.placeholder .no-data { color: var(--muted); font-style: italic; }
.plain { padding-left: 1.1rem; margin: .25rem 0; font-size: .9rem; }
.langs { text-align: center; margin-top: 1rem; }
@media (min-width: 720px) {
  .nav { order: 0; width: auto; }
  .facts { grid-template-columns: 1fr 1fr; }
  .actions { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .reject { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid.kpis { grid-template-columns: repeat(3, 1fr); }
}
