:root{--ink:#0a2236;--steel:#1d4f73;--paper:#f4f6f8;--line:#dde5ea;--signal:#e5483c;--ok:#157a4d;--amber:#c9922a}
*{box-sizing:border-box}
body{margin:0;font-family:"IBM Plex Sans",Inter,system-ui,-apple-system,sans-serif;background:var(--paper);color:var(--ink);line-height:1.55}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--ink);color:#fff;padding:14px 22px}
.topbar .back{color:#cfe0ea;text-decoration:none;font-weight:600;font-size:15px}
.topbar .back:hover{color:#fff;text-decoration:underline}
.topbar .brand{font-size:14px;letter-spacing:.08em;text-transform:uppercase;color:#9db7c7}
.topbar .brand b{color:#fff;letter-spacing:0;text-transform:none;font-size:16px;margin-left:6px}
.wrap{max-width:1180px;margin:0 auto;padding:28px 22px 60px}
.intro h1{font-size:30px;line-height:1.15;letter-spacing:-.02em;margin:0 0 8px}
.intro p{margin:0;color:#4d6475;max-width:80ch}
.message{min-height:22px;margin:10px 0 0;font-size:14px;font-weight:600;color:#4d6475}
.message.error{color:var(--signal)}

/* Los pasos del proceso */
.flow{margin:24px 0 8px}
.flow ol{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.flow li{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px;display:grid;gap:4px}
.flow li.ready{border-left:4px solid var(--ok)}
.flow li.later{opacity:.72}
.flow .n{font-size:12px;font-weight:700;color:#8499a6}
.flow .t{font-size:14px;font-weight:650;line-height:1.3}
.flow .soon{font-size:11px;color:#8499a6}

.block{margin-top:34px}
.block h2{font-size:21px;margin:0 0 6px}
.block .hint{margin:0 0 14px;color:#5d7788;font-size:14px}

.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;display:grid;gap:7px;align-content:start}
.card h3{margin:0;font-size:17px;line-height:1.3}
.card .meta{margin:0;font-size:14px;color:#5d7788}
.tag{justify-self:start;font-size:12px;font-weight:700;padding:4px 11px;border-radius:999px;background:#e6eff4;color:#2b5b77}
.tag.bad{background:#fdecea;color:#9b2c20}
.tag.warn{background:#fdf3e2;color:#8a5a12}

.list{display:grid;gap:14px}
.order{background:#fff;border:1px solid var(--line);border-left:5px solid var(--steel);border-radius:14px;padding:18px 20px}
.order.is-cancelled{border-left-color:#9db7c7;opacity:.8}
.order-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap}
.order .code{font-family:"IBM Plex Mono",ui-monospace,monospace;font-size:12px;letter-spacing:.04em;color:#5d7788}
.order h3{margin:3px 0 4px;font-size:19px;line-height:1.25}
.order .meta{margin:0;font-size:14px;color:#5d7788}
.state{font-size:13px;font-weight:700;padding:6px 12px;border-radius:999px;background:#e6eff4;color:#2b5b77;white-space:nowrap}
.state-reported{background:#fdf3e2;color:#8a5a12}
.state-confirmed{background:#e8f3ec;color:#1d6b33}
.state-cancelled{background:#eef1f3;color:#5d7788}
.order .fault,.order .note{margin:12px 0 0;font-size:15px;color:#3d5565}
.order .note.bad{color:#9b2c20}
.order .next{margin:12px 0 0;font-size:14px;color:#5d7788;background:#f4f8fa;border-radius:10px;padding:10px 12px}
.order .actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}

button{min-height:44px;padding:0 18px;border:1px solid #c5d3dc;background:#fff;color:var(--ink);border-radius:12px;font:inherit;font-weight:650;cursor:pointer}
button:hover{background:#eef4f8}
button.primary{background:var(--ok);border-color:var(--ok);color:#fff}
button.primary:hover{filter:brightness(1.08)}
button:disabled{opacity:.55;cursor:not-allowed}

.empty{background:#fff;border:1px dashed #c5d3dc;border-radius:14px;padding:26px;display:grid;gap:6px;text-align:center;color:#5d7788}
.empty b{font-size:17px;color:var(--ink)}

dialog{border:1px solid var(--line);border-radius:18px;padding:24px;width:min(540px,calc(100vw - 28px));color:var(--ink);background:#fff}
dialog::backdrop{background:rgba(7,29,45,.55)}
dialog h2{margin:0 0 6px;font-size:21px}
dialog .box-sub{margin:0 0 16px;color:#5d7788;font-size:15px}
dialog label{display:grid;gap:7px;font-size:14px;font-weight:650;color:#3d5565}
dialog textarea{border:1px solid #c5d3dc;border-radius:12px;padding:11px 13px;font:inherit;font-size:16px;resize:vertical}
dialog textarea:focus{border-color:var(--steel);outline:none;box-shadow:0 0 0 3px rgba(29,79,115,.14)}
.box-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px;flex-wrap:wrap}
.box-message{min-height:20px;margin:10px 0 0;color:var(--signal);font-size:14px;font-weight:600}

@media(max-width:700px){
 .wrap{padding:20px 14px 48px}
 .intro h1{font-size:25px}
 .cards{grid-template-columns:1fr}
 .order-head{flex-direction:column}
 .order .actions button,.box-actions button{flex:1}
}
