/* Portal Nodo8 · mobile-first */
:root {
  --bg: #071A24; --bg-deep: #050F15; --surface: #0E2B3A; --surface-2: #12354A; --navy: #0B3D57;
  --amber: #F6AE10; --amber-hover: #FFC23D;
  --text: #EEF4F7; --soft: #B9CBD6; --muted: #9FB3C2;
  --line: rgba(238,244,247,.12); --line-strong: rgba(238,244,247,.26);
  --ok: #4FD18B; --info: #6EC3F0; --warn: #FFB547; --danger: #FF8A7A;
  --display: 'Sora', system-ui, sans-serif; --body: 'DM Sans', system-ui, sans-serif;
  --r: 16px; --r-lg: 20px; --topbar: 64px; --tabbar: 68px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-hover); }
h1, h2, h3 { font-family: var(--display); color: #fff; margin: 0; letter-spacing: -.015em; line-height: 1.2; }
h1 { font-size: clamp(24px, 6vw, 34px); }
h2 { font-size: 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 15px; margin: 18px 0 10px; }
p { margin: 0; }
code { background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 6px; }
.icon { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.block { display: block; }
.break { word-break: break-word; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; }
.eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.main { padding: 20px 0 calc(var(--tabbar) + 40px + env(safe-area-inset-bottom)); }
.is-guest .main { padding: 0; min-height: 100vh; display: flex; align-items: center; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(7,26,36,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { height: var(--topbar); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 24px; width: auto; }
.brand-tag { font-size: 11px; font-weight: 700; color: var(--bg); background: var(--amber); padding: 3px 8px; border-radius: 999px; }
.topnav { display: none; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.hide-mobile { display: none !important; }

.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; }
.usermenu summary::-webkit-details-marker { display: none; }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: 700 16px var(--display); flex-shrink: 0; border: 1px solid var(--line-strong); }
.avatar.lg { width: 48px; height: 48px; font-size: 19px; }
.usermenu-panel { position: absolute; right: 0; top: 50px; width: 250px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.5); z-index: 40; }
.usermenu-panel p { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 14px; }
.usermenu-panel p span { color: var(--muted); }
.usermenu-panel a, .usermenu-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border-radius: 10px; color: var(--text); background: none; border: 0; font: 500 15px var(--body); cursor: pointer; text-align: left; }
.usermenu-panel a:hover, .usermenu-panel button:hover { background: rgba(255,255,255,.06); }

/* ---------- Tab bar (celular) ---------- */
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(5,15,21,.97); border-top: 1px solid var(--line); display: flex; justify-content: space-around; align-items: stretch; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 500; min-width: 0; }
.tabbar a.is-active { color: var(--amber); }
.tab-new { flex: 0 0 72px !important; }
.tab-plus { width: 52px; height: 52px; border-radius: 18px; background: var(--amber); color: var(--bg); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(246,174,16,.3); margin-top: -18px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent; font: 700 15px/1 var(--body); cursor: pointer; transition: background .15s, border-color .15s, color .15s; text-align: center; }
.btn-lg { min-height: 54px; font-size: 16px; }
.btn-sm { min-height: 42px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn-xs { min-height: 36px; padding: 0 10px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--amber); color: var(--bg); }
.btn-primary:hover { background: var(--amber-hover); color: var(--bg); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; font-weight: 500; }
.btn-ghost:hover { border-color: var(--text); color: #fff; }
.btn-outline { border-color: var(--amber); color: var(--amber); background: transparent; }
.btn-outline:hover { background: var(--amber); color: var(--bg); }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger); color: var(--bg); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); background: rgba(255,255,255,.05); border: 0; cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.icon-btn.danger:hover { color: var(--danger); }

/* ---------- Mensajes ---------- */
.flash { padding: 14px 16px; border-radius: 14px; margin-bottom: 16px; font-size: 15px; border: 1px solid; }
.flash-ok { background: rgba(79,209,139,.1); border-color: rgba(79,209,139,.35); color: #BDF2D4; }
.flash-error { background: rgba(255,138,122,.1); border-color: rgba(255,138,122,.4); color: #FFD1CA; }
.flash-info { background: rgba(110,195,240,.08); border-color: rgba(110,195,240,.35); color: #CDEBFA; }
.notice { background: var(--surface-2); border: 1px solid var(--amber); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.notice.access h2 { margin: 0; color: var(--ok); }
.access-box { white-space: pre-wrap; word-break: break-word; background: var(--bg); border-radius: 12px; padding: 14px; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 0; color: var(--text); }

/* ---------- Encabezados de página ---------- */
.page-head { margin-bottom: 20px; display: flex; flex-direction: column; gap: 6px; }
.page-head.row { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head .muted { display: flex; align-items: center; gap: 6px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 4px; min-height: 32px; align-self: flex-start; }
.back:hover { color: var(--text); }
.badges { display: flex; gap: 6px; margin-top: 4px; }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; margin-bottom: 16px; }
.card.narrow { max-width: 560px; }
.card.highlight { border: 1px solid rgba(246,174,16,.5); }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.row-between h2 { margin-bottom: 4px; }
.block { margin-bottom: 28px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.block-head h2 { margin: 0; }
.block-head a { font-size: 14px; font-weight: 500; }
.empty { color: var(--muted); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 22px; text-align: center; }
.center-card { width: 100%; max-width: 420px; margin: 0 auto; padding: 32px 20px; display: flex; flex-direction: column; gap: 14px; }
.center-card h1 { font-size: 26px; }
.center-logo { height: 32px; width: auto; max-width: 100%; align-self: center; object-fit: contain; margin-bottom: 12px; }

/* Inicio cliente */
.cta-new { display: flex; align-items: center; gap: 14px; background: var(--amber); color: var(--bg); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 14px; }
.cta-new:hover { background: var(--amber-hover); color: var(--bg); }
.cta-new > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.cta-new strong { font: 700 18px var(--display); }
.cta-new small { font-size: 13px; color: #2B3A40; }
.cta-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--bg); color: var(--amber); display: flex; align-items: center; justify-content: center; }
.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.stat-card:hover { background: var(--surface-2); color: var(--text); }
.stat-card strong { font: 700 28px var(--display); color: #fff; }
.stat-card span { font-size: 13px; color: var(--muted); }
.stat-card.accent strong { color: var(--amber); }

/* Pedidos */
.req-list { display: grid; gap: 10px; }
.req-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: var(--r); padding: 14px 16px; color: var(--text); border: 1px solid transparent; transition: border-color .15s, background .15s; }
.req-card:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.req-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req-id { font-size: 13px; color: var(--muted); font-weight: 700; }
.req-title { font: 600 16px/1.3 var(--display); color: #fff; }
.req-meta { font-size: 14px; color: var(--soft); }
.req-dates { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.req-dates span { display: inline-flex; align-items: center; gap: 5px; }
.req-list.compact .req-card { background: var(--bg); }

.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.st-received { background: rgba(110,195,240,.15); color: var(--info); }
.st-progress { background: rgba(246,174,16,.15); color: var(--amber); }
.st-info { background: rgba(255,181,71,.12); color: var(--warn); }
.st-done { background: rgba(79,209,139,.14); color: var(--ok); }
.st-cancel { background: rgba(159,179,194,.14); color: var(--muted); }
.st-urgent { background: rgba(255,138,122,.16); color: var(--danger); }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; background: var(--surface); padding: 5px; border-radius: 14px; width: fit-content; }
.tabs a { padding: 9px 16px; border-radius: 10px; color: var(--soft); font-size: 14px; font-weight: 500; }
.tabs a.is-active { background: var(--amber); color: var(--bg); font-weight: 700; }

.progress { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.progress li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); text-align: center; position: relative; }
.progress li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--line-strong); z-index: 0; }
.progress li:first-child::before { display: none; }
.progress li span { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 2px solid var(--line-strong); font-weight: 700; color: var(--muted); }
.progress li.done span { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.progress li.done::before, .progress li.current::before { background: var(--ok); }
.progress li.current { color: #fff; font-weight: 700; }
.progress li.current span { background: var(--amber); border-color: var(--amber); color: var(--bg); }
.progress li.warn span { background: var(--warn); border-color: var(--warn); }

.detail-grid { display: grid; gap: 0 16px; }
.dl { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 0; font-size: 15px; }
.dl dt { color: var(--muted); font-size: 13px; margin-top: 10px; }
.dl dd { margin: 0; color: var(--text); }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.tl-dot { width: 14px; height: 14px; border-radius: 999px; background: var(--amber); margin-top: 4px; flex-shrink: 0; }
.from-client .tl-dot { background: var(--info); }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--muted); }
.tl-who { font-weight: 700; color: var(--soft); }
.tl-body p { margin-top: 6px; background: var(--bg); padding: 10px 12px; border-radius: 12px; font-size: 15px; color: var(--text); word-break: break-word; }
.from-client .tl-body p { background: rgba(110,195,240,.08); }
.reply { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 16px; }

/* Archivos */
.files { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.file { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 14px; padding: 8px; min-width: 0; }
.card .file { background: var(--bg); }
.main > .wrap > .files .file { background: var(--surface); }
.file-thumb { width: 52px; height: 52px; border-radius: 10px; background: var(--navy); color: var(--soft); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-info strong { font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-info span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-info .file-note { color: var(--soft); white-space: normal; }
.file-actions { display: flex; gap: 4px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 14px; padding: 0 14px; margin-bottom: 16px; color: var(--muted); }
.search input { flex: 1; min-height: 50px; background: none; border: 0; color: var(--text); font: 16px var(--body); }
.search input:focus { outline: none; }

/* ---------- Formularios ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend, .field .label { font-size: 14px; font-weight: 500; color: var(--text); padding: 0; }
.field legend { margin-bottom: 8px; }
.req { color: var(--amber); font-weight: 700; }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 50px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
  padding: 12px 14px; font: 16px/1.4 var(--body); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--amber); }
.field input::placeholder, .field textarea::placeholder { color: #6F8796; }
.field-error { color: var(--danger); font-size: 13px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 54px !important; }
.pw-toggle { position: absolute; right: 4px; top: 3px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--soft); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--amber); margin: 1px 0 0; flex-shrink: 0; }
.check.inline { display: inline-flex; }
.grid-2, .grid-3 { display: grid; gap: 16px; }
.inline-form { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 4px; gap: 12px; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: flex; align-items: center; min-height: 52px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 500; line-height: 1.25; transition: all .15s; }
.choice input:checked + span { border-color: var(--amber); background: rgba(246,174,16,.12); color: #fff; box-shadow: inset 0 0 0 1px var(--amber); }
.choice input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; padding: 4px; gap: 4px; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 9px; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--soft); }
.seg input:checked + span { background: var(--amber); color: var(--bg); font-weight: 700; }
.seg input:focus-visible + span { outline: 3px solid var(--amber); }

.dropzone { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 96px; padding: 16px; border: 2px dashed var(--line-strong); border-radius: 14px; color: var(--soft); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.dropzone.small { min-height: 60px; }
.dropzone span { display: flex; flex-direction: column; }
.dropzone small { color: var(--muted); font-size: 13px; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone:hover, .dropzone.is-over { border-color: var(--amber); background: rgba(246,174,16,.05); }
.dropzone:focus-within { border-color: var(--amber); }
.picked { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--soft); }
.picked:empty { display: none; }
.picked li { display: flex; justify-content: space-between; gap: 10px; background: var(--bg); padding: 8px 12px; border-radius: 10px; }
.picked li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-progress { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--amber); transition: width .2s; }
.help { font-size: 14px; color: var(--soft); background: var(--bg); border-radius: 12px; padding: 10px 14px; }
.help summary { cursor: pointer; color: var(--amber); font-weight: 500; }
.help ol { margin: 10px 0 4px; padding-left: 20px; display: grid; gap: 6px; }
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.danger-zone { margin-top: 8px; display: flex; justify-content: flex-end; }

/* Clientes */
.client-list { display: grid; gap: 10px; }
.client-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--r); padding: 14px; color: var(--text); }
.client-card:hover { background: var(--surface-2); color: var(--text); }
.client-card.is-off { opacity: .55; }
.client-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.client-info strong { font: 600 16px var(--display); color: #fff; }
.client-info small { color: var(--muted); font-size: 13px; }
.client-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.user-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.user-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--bg); padding: 10px; border-radius: 14px; }
.user-list .grow { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; }
.user-list small { color: var(--muted); font-size: 12px; word-break: break-word; }
.simple-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.simple-list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }

/* Informes */
.report-list { display: grid; gap: 10px; }
.report-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--r); padding: 14px 16px; color: var(--text); }
.report-card:hover { background: var(--surface-2); color: var(--text); }
.report-card > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.report-card strong { font: 600 16px/1.3 var(--display); color: #fff; }
.report-card small { color: var(--muted); font-size: 13px; }
.report-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(246,174,16,.14); color: var(--amber); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.summary-grid { display: grid; gap: 0 16px; }
.summary p { color: var(--soft); font-size: 16px; line-height: 1.65; }
.summary.next { border: 1px solid rgba(246,174,16,.4); }
.section-title { font-size: 18px; margin-bottom: 12px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi strong { font: 700 22px/1.15 var(--display); color: #fff; word-break: break-word; }
.kpi-main { background: var(--navy); }
.kpi-main strong { color: var(--amber); font-size: 26px; }
.kpi-help { font-size: 12px; color: var(--soft); line-height: 1.35; }
.type-list { display: grid; gap: 8px; }
.type-item { display: flex; justify-content: space-between; background: var(--surface); padding: 12px 14px; border-radius: 12px; }
.type-item strong { font-family: var(--display); }
.best { display: flex; gap: 14px; align-items: flex-start; border: 1px solid rgba(246,174,16,.45); }
.best h3 { margin: 2px 0 4px; font-size: 17px; }
.best-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--amber); color: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chart-box { position: relative; height: 260px; margin: 8px 0 4px; }
.chart-box.short { height: 220px; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table small { font-size: 12px; margin-top: 2px; }
.embed { position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: #fff; margin: 8px 0 12px; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* =========== Tablet / escritorio =========== */
@media (min-width: 720px) {
  .wrap { padding: 0 24px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 2fr 1fr 1fr; }
  .choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 24px; }
  .table-wrap { margin: 0 -24px; padding: 0 24px; }
  .filters { grid-template-columns: 220px 260px; }
  .embed { aspect-ratio: 16 / 10; }
}
@media (min-width: 1000px) {
  :root { --topbar: 72px; }
  .main { padding: 32px 0 64px; }
  .tabbar { display: none; }
  .hide-mobile { display: inline-flex !important; }
  .brand img { height: 28px; }
  .topnav { display: flex; gap: 4px; flex: 1; margin-left: 24px; }
  .topnav a { padding: 10px 14px; border-radius: 10px; color: var(--soft); font-size: 15px; font-weight: 500; }
  .topnav a:hover { color: #fff; background: rgba(255,255,255,.05); }
  .topnav a.is-active { color: #fff; background: rgba(255,255,255,.08); }
  .detail-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
  .detail-grid aside { position: sticky; top: calc(var(--topbar) + 20px); }
  .req-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .req-list.compact { grid-template-columns: 1fr; }
  .client-list, .report-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi strong { font-size: 26px; }
  .kpi-main strong { font-size: 30px; }
  .chart-box { height: 320px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (min-width: 720px) { .notice .btn, .notice .btn-row { align-self: flex-start; } .notice:not(.access) { flex-direction: row; align-items: center; justify-content: space-between; } }
