:root {
  --navy: #14273F; --green: #2F7A35; --blue: #1F5FAE; --ink: #14273F; --text: #3E4A59; --muted: #6A7482;
  --bg: #F6F7F3; --paper: #FFFFFF; --line: #DCE1DA; --warn: #B4570F; --ok: #2F7A35; --err: #B42318;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 'Public Sans', system-ui, sans-serif; }
h1, h2, h3 { font-family: 'Rubik', system-ui, sans-serif; color: var(--ink); margin: 0; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; }
.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--navy); color: #fff; }
.brand { display: flex; align-items: center; gap: 8px; font: 600 1.1rem 'Rubik', sans-serif; }
.logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--green); }
.who { font-size: .85rem; opacity: .85; text-align: right; }
main { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.accent { border-top: 5px solid var(--green); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 140px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
button { font: 600 1rem 'Public Sans', sans-serif; border: 0; border-radius: 10px; padding: 12px 16px; background: var(--green); color: #fff; cursor: pointer; }
button.ghost { background: transparent; color: var(--blue); border: 1px solid var(--line); }
button.small { padding: 6px 10px; font-size: .85rem; }
button:disabled { opacity: .5; }
.muted { color: var(--muted); font-size: .9rem; }
.msg { font-size: .9rem; min-height: 1.2em; }
.msg.err { color: var(--err); } .msg.ok { color: var(--ok); }
.list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.list li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding: 8px 0; font-size: .95rem; }
.pill { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #E9EEF5; color: var(--blue); white-space: nowrap; align-self: center; }
.pill.Pendiente, .pill.Borrador { background: #FBF0E3; color: var(--warn); }
.pill.Aprobado, .pill.Entregado, .pill.Enviado { background: #E6F2E7; color: var(--ok); }
.pill.Rechazado { background: #FCE9E7; color: var(--err); }
.tramo { border: 1px dashed var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--paper); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
.tabs a { flex: 1; text-align: center; padding: 12px 4px; font-size: .8rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabs a.on { color: var(--green); box-shadow: inset 0 3px 0 var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.chips input { width: auto; }
[hidden] { display: none !important; }
.pick { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.pick button { width: 100%; text-align: left; font-weight: 400; color: var(--ink); }
.ticket-vista img { max-width: 100%; max-height: 240px; border-radius: 8px; border: 1px solid var(--line); margin-top: 8px; }
