:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, "Segoe UI", sans-serif;
  --ink: #152c3c;
  --muted: #4e6170;
  --line: #d2dce3;
  --surface: #fff;
  --bg: #eef3f6;
  --navy: #17364c;
  --accent: #075d5b;
  --accent-bg: #e3f2ef;
  --notice: #663900;
  --notice-bg: #fff1d8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 4vw, 2.7rem); line-height: 1.09; letter-spacing: -.035em; }
h2 { font-size: 1.16rem; line-height: 1.24; }
h3 { font-size: 1.03rem; line-height: 1.26; }
button, select, textarea, input { font: inherit; }
button {
  border: 1px solid #9eb3c3; border-radius: .5rem; padding: .57rem .88rem;
  background: var(--surface); color: var(--ink); font-weight: 650; cursor: pointer;
}
button:hover:enabled { background: #eaf1f5; }
button:disabled { opacity: .62; cursor: wait; }
button.primary, button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: white; }
button.primary:hover:enabled, button[aria-pressed="true"]:hover:enabled { background: #064a49; }
:focus-visible { outline: 3px solid #397eb1; outline-offset: 3px; }
.top { background: var(--navy); color: white; }
.top-inner, main, footer { width: min(70rem, calc(100% - 2.5rem)); margin-inline: auto; }
.top-inner { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand strong, .brand div span { display: block; }
.brand div span { color: #d4e3ed; font-size: .83rem; }
.mark { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border: 1px solid #81a3b8; border-radius: .6rem; font-size: .84rem; font-weight: 800; }
.local { color: #e2f5f2; font-size: .87rem; text-align: right; }
main { padding-block: 2rem; }
.intro { max-width: 52rem; margin-bottom: 1.35rem; }
.intro > p:last-child { color: var(--muted); margin-top: .75rem; }
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .11em; color: #335f68; margin-bottom: .45rem; }
.profile, .panel { border: 1px solid var(--line); background: var(--surface); border-radius: .85rem; padding: 1.15rem; }
.profile { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.profile p, .panel p { margin-top: .42rem; color: var(--muted); }
.profile-actions, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.layout { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(15rem, 1fr); align-items: start; gap: 1rem; }
.workspace { display: grid; gap: 1rem; min-width: 0; }
.guide ol { margin: .95rem 0 0; padding-left: 1.25rem; }
.guide li { padding-left: .25rem; margin-bottom: .85rem; }
.guide li::marker { font-weight: 700; color: var(--accent); }
.guide li span { display: block; color: var(--muted); font-size: .94rem; }
.guide .guide-note { background: var(--notice-bg); color: var(--notice); padding: .68rem .8rem; border-radius: .45rem; font-size: .9rem; }
.message { margin-bottom: 1rem; padding: .67rem .9rem; border: 1px solid #afd3ca; border-radius: .5rem; background: var(--accent-bg); color: #164d44; overflow-wrap: anywhere; }
.message.error { background: var(--notice-bg); color: var(--notice); border-color: #e9c797; }
form { margin-top: .7rem; display: grid; gap: .56rem; }
label { font-weight: 650; }
.optional { margin-left: .3rem; font-size: .8rem; color: var(--muted); font-weight: 400; }
select, textarea, input:not([type="checkbox"]) { width: 100%; border: 1px solid #9eb3c3; border-radius: .42rem; background: #fff; color: var(--ink); padding: .52rem .63rem; }
textarea { resize: vertical; }
.check { display: flex; align-items: start; gap: .45rem; margin: .33rem 0; font-weight: 500; }
.check input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; margin-top: .22rem; }
form > button { justify-self: start; }
.panel-head, .case-head { display: flex; justify-content: space-between; align-items: start; gap: .8rem; }
.case { margin-top: .85rem; border: 1px solid var(--line); border-radius: .65rem; padding: .85rem; overflow-wrap: anywhere; }
.case-head p { font-size: .83rem; }
.pill { font-size: .8rem; line-height: 1.25; border-radius: 1rem; padding: .3rem .58rem; font-weight: 750; background: #e8eef2; color: #27465a; }
.pill.acuse_simulado { color: var(--accent); background: var(--accent-bg); }
.pill.unidad_confirmo, .pill.unidad_en_sitio, .pill.atendido { color: var(--accent); background: var(--accent-bg); }
.pill.asignado { color: var(--notice); background: var(--notice-bg); }
.pill.sin_confirmar { color: var(--notice); background: var(--notice-bg); }
.case.panico { border-left: .3rem solid #a32030; }
.case.panico h3 { color: #a32030; }
.case .actions, .case .details, .case .folio-sim, .case .mode { margin-top: .65rem; }
.case .folio-sim { font-weight: 750; color: var(--accent); }
.case .details { font-size: .91rem; }
.case .mode label { display: block; font-size: .87rem; margin-bottom: .2rem; }
.case .mode select { max-width: 22rem; }
details { margin-top: .7rem; color: var(--muted); font-size: .89rem; }
summary { cursor: pointer; font-weight: 650; }
details ol { padding-left: 1.2rem; margin: .4rem 0 0; }
dialog { width: min(92vw, 40rem); max-height: 92vh; border: 1px solid var(--line); border-radius: .85rem; padding: 1.1rem; color: var(--ink); }
dialog::backdrop { background: #0b2532c4; }
dialog form { margin-top: 0; }
dialog p { margin: .35rem 0; color: var(--muted); }
dialog img { display: block; width: 100%; height: min(62vh, 33rem); background: #102f40; object-fit: contain; border-radius: .55rem; }
dialog img[hidden] { display: none; }
footer { color: var(--muted); font-size: .83rem; padding-bottom: 1.25rem; }
@media (max-width: 46rem) {
  .layout { grid-template-columns: 1fr; }
  .profile { align-items: start; flex-direction: column; }
  .top-inner, main, footer { width: calc(100% - 1.4rem); }
  main { padding-block: 1.4rem; }
}
