/* VMGo · sistema visual compartido (manual de marca v1.0 + pantallas) */
:root {
  --navy: #0F2A44; --navy-2: #173A5E; --navy-3: #0B1F33;
  --teal: #0E9AA7; --teal-dark: #0B7C87; --teal-100: #E0F3F5; --teal-50: #EEF8F9;
  --orange: #EE6A1F; --orange-100: #FDE3D3;
  --fog: #F2F6F8; --fog-2: #E9EEF3; --white: #FFFFFF;
  --gray: #5A6B7C; --gray-2: #8A97A5; --border: #DCE3EA; --border-2: #EEF2F5;
  --text: #0F2A44;
  --green: #1F7A4D; --green-100: #E4F3EB;
  --red: #C4322E; --red-100: #FBE7E6; --red-200: #F3B9B5;
  --amber: #B7791F; --amber-100: #FBF1DC;
  --blue-100: #E3EDF5; --slate-100: #E9EEF3;
  --sora: 'Sora', 'IBM Plex Sans', system-ui, sans-serif;
  --plex: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mont: 'Montserrat', 'IBM Plex Sans', system-ui, sans-serif;
  --radius: 14px; --radius-sm: 10px; --radius-xs: 8px;
  --shadow: 0 1px 2px rgba(15,42,68,.04), 0 6px 20px rgba(15,42,68,.06);
  --shadow-lg: 0 20px 60px rgba(15,42,68,.25);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--plex); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--fog); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { font-family: var(--sora); margin: 0; color: var(--navy); letter-spacing: -0.01em; }
h1 { font-size: 32px; line-height: 1.15; font-weight: 700; }
h2 { font-size: 22px; line-height: 1.2; font-weight: 700; }
h3 { font-size: 19px; line-height: 1.3; font-weight: 600; }
h4 { font-size: 16px; line-height: 1.3; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--text); }
svg.i { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i.sm { width: 16px; height: 16px; } svg.i.xs { width: 14px; height: 14px; } svg.i.lg { width: 24px; height: 24px; }
.muted { color: var(--gray); } .small { font-size: 13px; } .tiny { font-size: 12px; } .bold { font-weight: 600; } .strong { font-weight: 700; }
.label { font-family: var(--mont); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gray); }
.label.light { color: rgba(255,255,255,.6); }
.row { display: flex; align-items: center; gap: 8px; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; } .row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 4px; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; }
.hidden { display: none !important; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right { text-align: right; } .center { text-align: center; }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- Logo */
.logo { font-family: var(--sora); font-weight: 800; letter-spacing: -0.02em; display: inline-flex; align-items: center; line-height: 1; white-space: nowrap; }
.logo .vm { color: var(--navy); } .logo .go { color: var(--teal); }
.logo .arrow { color: var(--orange); display: inline-block; margin: 0 .04em; }
.logo .arrow svg { width: .48em; height: .7em; stroke: currentColor; fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.logo.neg .vm { color: #fff; }
.logo-block { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.logo-block .tag { font-family: var(--mont); font-weight: 600; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--teal); }
.logo-block .tag b { font-weight: 800; }
.logo-block .sub { font-family: var(--mont); font-weight: 700; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--teal); }
.isotipo { width: 40px; height: 40px; border-radius: 10px; background: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.isotipo svg { width: 18px; height: 18px; stroke: var(--orange); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------- Layout desktop */
.app { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #fff; display: flex; flex-direction: column; padding: 28px 20px 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 0 8px 22px; }
.sidebar .brand .logo { font-size: 28px; }
.sidebar .brand .sub { display: block; margin-top: 6px; font-family: var(--mont); font-weight: 700; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--teal); }
.ctx-card { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 12px 14px; margin-bottom: 26px; color: #fff; }
.ctx-card svg.i { color: rgba(255,255,255,.8); }
.ctx-card .t { font-weight: 600; font-size: 15px; } .ctx-card .s { font-size: 13px; color: rgba(255,255,255,.7); }
.nav-sec { font-family: var(--mont); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.55); padding: 14px 10px 8px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; color: rgba(255,255,255,.88); font-size: 16px; margin-bottom: 2px; border-left: 3px solid transparent; }
.nav a svg.i { color: rgba(255,255,255,.85); }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a.active { background: rgba(255,255,255,.12); border-left-color: var(--teal); color: #fff; font-weight: 600; }
.sidebar .user { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 18px 8px 0; border-top: 1px solid rgba(255,255,255,.15); }
.sidebar .user .t { font-weight: 600; font-size: 15px; } .sidebar .user .s { font-size: 13px; color: rgba(255,255,255,.65); }
.main { min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid var(--border-2); padding: 14px 40px; display: flex; align-items: center; gap: 20px; position: sticky; top: 0; z-index: 20; }
.search { flex: 0 1 620px; display: flex; align-items: center; gap: 12px; background: var(--fog); border: 1px solid var(--border); border-radius: 10px; padding: 11px 16px; color: var(--gray); }
.search input { border: 0; background: transparent; outline: 0; flex: 1; font-size: 16px; color: var(--text); }
.search input::placeholder { color: var(--gray-2); }
.topbar .icons { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.iconbtn { position: relative; background: none; border: 0; padding: 4px; color: var(--navy); display: inline-flex; border-radius: 8px; }
.iconbtn:hover { background: var(--fog); }
.iconbtn .badge { position: absolute; top: -4px; right: -6px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid #fff; }
.content { padding: 32px 40px 48px; max-width: 1560px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-head .sub { color: var(--gray); font-size: 16px; margin-top: 4px; }
.page-head .actions { display: flex; gap: 12px; flex-shrink: 0; }
.crumbs { font-size: 14px; color: var(--gray); margin-bottom: 4px; } .crumbs a:hover { color: var(--navy); text-decoration: underline; }
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.grid.c4 { grid-template-columns: repeat(4, 1fr); } .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c21 { grid-template-columns: 1.55fr 1fr; } .grid.c12 { grid-template-columns: 1fr 1.55fr; }
@media (max-width: 1300px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } .grid.c21, .grid.c12 { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- Cards / KPIs */
.card { background: #fff; border: 1px solid var(--border-2); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card.tight { padding: 0; overflow: hidden; overflow-x: auto; }
.card.dark { background: var(--navy); color: #fff; border-color: var(--navy); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-head h3 { font-size: 20px; }
.link { color: var(--navy); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; background: none; border: 0; padding: 0; font-size: 15px; }
.link:hover { text-decoration: underline; }
.link.teal { color: var(--teal-dark); }
.kpi { display: flex; gap: 16px; align-items: flex-start; }
.kpi .ic { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi .ic.teal { background: var(--teal-100); color: var(--teal-dark); } .kpi .ic.red { background: var(--red-100); color: var(--red); } .kpi .ic.amber { background: var(--amber-100); color: var(--amber); } .kpi .ic.navy { background: var(--blue-100); color: var(--navy); } .kpi .ic.green { background: var(--green-100); color: var(--green); }
.kpi .n { font-family: var(--sora); font-size: 34px; font-weight: 700; line-height: 1.1; margin: 6px 0 4px; color: var(--navy); }
.kpi .s { color: var(--gray); font-size: 14px; }
.card.dark .kpi .n, .card.dark .label { color: #fff; } .card.dark .kpi .s { color: rgba(255,255,255,.7); } .card.dark .label { color: rgba(255,255,255,.75); }
.card.dark .n.money { font-size: 30px; white-space: nowrap; }
.nav a { font-size: 15px; }

/* ------------------------------------------------------------- Chips & badges */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--radius-xs); font-family: var(--mont); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; background: var(--slate-100); color: var(--navy); line-height: 1.2; }
.chip svg.i { width: 14px; height: 14px; }
.chip.teal { background: var(--teal-100); color: var(--teal-dark); }
.chip.green { background: var(--green-100); color: var(--green); }
.chip.red { background: var(--red-100); color: var(--red); }
.chip.amber { background: var(--amber-100); color: var(--amber); }
.chip.blue { background: var(--blue-100); color: var(--navy); }
.chip.gray { background: var(--slate-100); color: var(--gray); }
.chip.navy { background: var(--navy); color: #fff; }
.chip.outline { background: #fff; border: 1px solid var(--border); color: var(--navy); }
.chip.lg { font-size: 12px; padding: 7px 12px; }
.plate { display: inline-block; border: 2px solid var(--navy); border-radius: 6px; padding: 1px 8px; font-family: var(--mont); font-weight: 700; font-size: 13px; letter-spacing: .12em; color: var(--navy); background: #fff; white-space: nowrap; }
.plate.sm { font-size: 11px; padding: 0 6px; }
.dest { display: inline-flex; align-items: center; gap: 6px; background: var(--navy); color: #fff; border-radius: var(--radius-xs); padding: 5px 10px; font-family: var(--mont); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; max-width: 100%; }
.dest svg.i { width: 13px; height: 13px; }
.dest span { overflow: hidden; text-overflow: ellipsis; }
.dest.light { background: #fff; color: var(--navy); border: 1px solid var(--border); }
.dest.sm { padding: 3px 8px; font-size: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--sora); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; } .avatar.lg { width: 56px; height: 56px; font-size: 18px; } .avatar.xl { width: 72px; height: 72px; font-size: 24px; }
.avatar.light { background: var(--blue-100); color: var(--navy); } .avatar.teal { background: var(--teal-100); color: var(--teal-dark); } .avatar.amber { background: var(--amber-100); color: var(--amber); } .avatar.red { background: var(--red-100); color: var(--red); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--gray); }
.dot.green { background: var(--green); } .dot.red { background: var(--red); } .dot.amber { background: var(--amber); } .dot.teal { background: var(--teal); }

/* ------------------------------------------------------------- Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: #fff; color: var(--navy); font-weight: 600; font-size: 16px; line-height: 1.2; white-space: nowrap; transition: background .15s, transform .05s; }
.btn:hover { background: var(--fog); } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: var(--navy); }
.btn.primary:hover { background: #0C8A96; }
.btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; } .btn.navy:hover { background: var(--navy-2); }
.btn.danger { background: #fff; border-color: var(--red-200); color: var(--red); } .btn.danger:hover { background: var(--red-100); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 8px 14px; font-size: 14px; border-radius: 8px; }
.btn.xs { padding: 5px 10px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn.block { width: 100%; }
.btn.lg { padding: 16px 24px; font-size: 17px; border-radius: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; align-items: center; }
.btn-row > .btn { flex: 1; }

/* ------------------------------------------------------------- Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-weight: 600; font-size: 14px; color: var(--navy); }
.input, .select, .textarea { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: #fff; outline: 0; font-size: 15px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-100); }
.input.error { border-color: var(--red); }
.field .hint { font-size: 13px; color: var(--gray); } .field .hint.error { color: var(--red); }
.select-wrap { position: relative; display: flex; align-items: center; }
.select-wrap svg.i.lead { position: absolute; left: 14px; color: var(--gray); pointer-events: none; }
.select-wrap select { appearance: none; padding-left: 44px; padding-right: 40px; }
.select-wrap svg.i.trail { position: absolute; right: 14px; color: var(--gray); pointer-events: none; }
.filters { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.filters .field { min-width: 240px; }
.filters .search { flex: none; width: 100%; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.pill { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 16px; font-weight: 600; font-size: 15px; color: var(--navy); }
.pill .n { background: var(--slate-100); border-radius: 6px; padding: 1px 7px; font-size: 13px; font-weight: 700; }
.pill.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill.active .n { background: rgba(255,255,255,.18); color: #fff; }
.pill:hover:not(.active) { background: var(--fog); }
.seg { display: inline-flex; background: var(--fog); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; border-radius: 8px; padding: 9px 14px; font-weight: 600; color: var(--gray); }
.seg button.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(15,42,68,.12); }
.opt { display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; cursor: pointer; background: #fff; text-align: left; width: 100%; }
.opt .t { font-weight: 600; } .opt .s { font-size: 13px; color: var(--gray); }
.opt.active { border-color: var(--teal); background: var(--teal-50); box-shadow: 0 0 0 2px var(--teal-100); }
.opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; margin-left: auto; }
.opt.active .radio { border-color: var(--teal); background: radial-gradient(var(--teal) 45%, transparent 50%); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--gray); }
.check input { margin-top: 3px; accent-color: var(--teal); width: 18px; height: 18px; }
.upload { border: 1.5px dashed var(--border); border-radius: 12px; padding: 18px; text-align: center; color: var(--gray); font-size: 14px; background: var(--fog); cursor: pointer; }
.upload:hover { border-color: var(--teal); background: var(--teal-50); }
.upload b { color: var(--navy); }

/* ------------------------------------------------------------- Tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-family: var(--mont); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gray); padding: 16px 20px; border-bottom: 1px solid var(--border-2); background: #FBFCFD; white-space: nowrap; }
.table td { padding: 18px 20px; border-bottom: 1px solid var(--border-2); vertical-align: middle; font-size: 15px; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: #FAFBFC; }
.table tr.alert td { background: #FDF3F1; }
.table .t { font-weight: 600; color: var(--navy); } .table .s { font-size: 13px; color: var(--gray); margin-top: 2px; }
.table td.actions { text-align: right; white-space: nowrap; }
.table.compact td { padding: 12px 16px; } .table.compact th { padding: 12px 16px; }
.table-foot { padding: 14px 20px; color: var(--gray); font-size: 14px; border-top: 1px solid var(--border-2); display: flex; justify-content: space-between; align-items: center; }
.route { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.route .o { color: var(--gray); font-size: 14px; } .route .d { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.route .d .arr { color: var(--gray); }

/* ------------------------------------------------------------- Lists (intervención / actividad) */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-2); }
.list-item:last-child { border-bottom: 0; }
.list-item .ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ic.red { background: var(--red-100); color: var(--red); } .ic.amber { background: var(--amber-100); color: var(--amber); } .ic.teal { background: var(--teal-100); color: var(--teal-dark); } .ic.navy { background: var(--blue-100); color: var(--navy); } .ic.slate { background: var(--slate-100); color: var(--gray); } .ic.green { background: var(--green-100); color: var(--green); } .ic.info { background: var(--teal-100); color: var(--teal-dark); } .ic.warn { background: var(--amber-100); color: var(--amber); } .ic.error { background: var(--red-100); color: var(--red); }
.list-item .t { font-weight: 600; font-size: 16px; color: var(--navy); } .list-item .s { color: var(--gray); font-size: 14px; }
.list-item .act { margin-left: auto; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--navy); }
.activity { display: flex; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--border-2); }
.activity:last-child { border-bottom: 0; }
.activity .h { font-family: var(--mont); font-weight: 700; font-size: 13px; color: var(--gray); width: 48px; flex-shrink: 0; padding-top: 3px; }
.activity .t { font-weight: 600; } .activity .s { color: var(--gray); font-size: 14px; }
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 48px; align-items: center; gap: 16px; }
.bar { height: 8px; background: var(--fog-2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--teal); }
.bar i.teal { background: var(--teal); } .bar i.slate { background: var(--gray); } .bar i.green { background: var(--green); } .bar i.amber { background: var(--amber); } .bar i.gray { background: var(--gray-2); } .bar i.red { background: var(--red); }
.bar-row .n { text-align: right; font-weight: 700; }

/* ------------------------------------------------------------- Banners / toasts */
.banner { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 12px; font-weight: 600; margin-bottom: 22px; }
.banner.error { background: var(--red-100); border: 1px solid var(--red-200); color: var(--red); }
.banner.warn { background: var(--amber-100); border: 1px solid #F0DDB0; color: #7A5410; }
.banner.info { background: var(--teal-100); border: 1px solid #BFE3E7; color: var(--teal-dark); }
.banner.navy { background: var(--blue-100); border: 1px solid #C9D9E8; color: var(--navy); }
.banner .link { margin-left: auto; color: inherit; }
.note { background: var(--fog); border-radius: 12px; padding: 14px 16px; color: var(--gray); font-size: 14px; }
.note.teal { background: var(--teal-50); color: var(--teal-dark); }
.note.amber { background: var(--amber-100); color: #7A5410; }
.note.red { background: var(--red-100); color: var(--red); }
.note b { color: var(--navy); }
#toasts { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--navy); color: #fff; padding: 14px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; display: flex; gap: 12px; align-items: center; max-width: 420px; animation: toastin .2s ease-out; }
.toast.ok { border-left: 4px solid var(--teal); } .toast.error { border-left: 4px solid var(--red); }
@keyframes toastin { from { transform: translateY(12px); } to { transform: none; } }

/* ------------------------------------------------------------- Drawer / modal */
.overlay { position: fixed; inset: 0; background: rgba(15,42,68,.45); z-index: 100; display: flex; justify-content: flex-end; animation: fadein .15s; }
.overlay.center { justify-content: center; align-items: center; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.drawer { width: 560px; max-width: 100%; height: 100%; background: #fff; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slidein .2s ease-out; }
.drawer.wide { width: 760px; }
@keyframes slidein { from { transform: translateX(40px); } to { transform: none; } }
.drawer-head { padding: 24px 28px 18px; border-bottom: 1px solid var(--border-2); display: flex; align-items: flex-start; gap: 16px; }
.drawer-head h2 { font-size: 24px; } .drawer-head .sub { color: var(--gray); margin-top: 4px; }
.drawer-body { padding: 24px 28px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 22px; }
.drawer-foot { padding: 18px 28px; border-top: 1px solid var(--border-2); display: flex; gap: 12px; justify-content: flex-end; align-items: center; background: #fff; }
.modal { width: 520px; max-width: calc(100% - 32px); background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 28px; animation: slidein .2s ease-out; }
.modal h2 { font-size: 22px; margin-bottom: 8px; }
.close { margin-left: auto; background: none; border: 0; color: var(--gray); padding: 4px; border-radius: 8px; } .close:hover { background: var(--fog); color: var(--navy); }
.section-title { font-family: var(--mont); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gray); margin-bottom: 10px; }

/* ------------------------------------------------------------- Timeline / stepper / docs */
.timeline { position: relative; display: flex; flex-direction: column; gap: 0; }
.tl-item { display: grid; grid-template-columns: 56px 24px 1fr; gap: 12px; padding: 0 0 22px; position: relative; }
.tl-item .h { font-family: var(--mont); font-weight: 700; font-size: 13px; color: var(--gray); padding-top: 2px; }
.tl-item .dot-col { display: flex; flex-direction: column; align-items: center; }
.tl-item .dot-col .dt { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--teal); background: #fff; flex-shrink: 0; margin-top: 4px; }
.tl-item .dot-col .dt.red { border-color: var(--red); } .tl-item .dot-col .dt.fill { background: var(--teal); } .tl-item .dot-col .dt.gray { border-color: var(--gray-2); }
.tl-item .dot-col .ln { width: 2px; flex: 1; background: var(--border); margin-top: 4px; }
.tl-item:last-child .dot-col .ln { display: none; }
.tl-item .t { font-weight: 600; font-size: 16px; } .tl-item .s { color: var(--gray); font-size: 14px; margin-top: 2px; } .tl-item .o { color: var(--gray-2); font-size: 13px; margin-top: 2px; }
.steps { display: flex; align-items: center; gap: 0; margin: 14px 0; }
.steps .st { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; position: relative; font-size: 11px; color: var(--gray); font-weight: 600; text-align: center; }
.steps .st .c { width: 12px; height: 12px; border-radius: 50%; background: var(--border); border: 2px solid var(--border); z-index: 1; }
.steps .st.done .c { background: var(--teal); border-color: var(--teal); } .steps .st.now .c { background: #fff; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-100); }
.steps .st.now { color: var(--navy); }
.steps .st::before { content: ''; position: absolute; top: 5px; left: -50%; right: 50%; height: 2px; background: var(--border); }
.steps .st:first-child::before { display: none; }
.steps .st.done::before, .steps .st.now::before { background: var(--teal); }
.steps.dark .st { color: rgba(255,255,255,.6); } .steps.dark .st.now { color: #fff; } .steps.dark .st .c { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.2); } .steps.dark .st::before { background: rgba(255,255,255,.2); }
.steps.dark .st.done .c, .steps.dark .st.done::before, .steps.dark .st.now::before { background: var(--teal); border-color: var(--teal); }
.doc-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-2); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .t { font-weight: 600; } .doc-row .s { font-size: 13px; color: var(--gray); }
.doc-row .chip { margin-left: auto; }
.rt { display: grid; grid-template-columns: 18px 1fr; column-gap: 12px; row-gap: 0; }
.rt .m { display: flex; flex-direction: column; align-items: center; }
.rt .m .o { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--navy); background: #fff; margin-top: 5px; }
.rt .m .l { width: 2px; flex: 1; background: var(--border); margin: 3px 0; min-height: 14px; }
.rt .m .d { width: 12px; height: 12px; border-radius: 3px; background: var(--teal); margin-top: 5px; }
.rt .p { padding-bottom: 12px; min-width: 0; } .rt .p:last-child { padding-bottom: 0; }
.rt .p .n { font-weight: 600; font-size: 16px; } .rt .p .a { color: var(--gray); font-size: 13px; } .rt .p .j { color: var(--gray); font-size: 13px; font-weight: 600; margin-top: 2px; }
.rt .p .dest { margin-top: 6px; }
.rt.dark .m .o { border-color: #fff; background: var(--navy); } .rt.dark .m .l { background: rgba(255,255,255,.25); } .rt.dark .p .a, .rt.dark .p .j { color: rgba(255,255,255,.7); } .rt.dark .p .n { color: #fff; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 15px; }
.kv .k { color: var(--gray); } .kv .v { font-weight: 600; text-align: right; }
.meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--navy); font-weight: 600; font-size: 14px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg.i { color: var(--gray); width: 16px; height: 16px; }
.dark .meta, .dark .meta svg.i { color: #fff; }
.progress { height: 6px; background: var(--fog-2); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--teal); border-radius: 3px; transition: width 1s linear; }
.progress.red i { background: var(--red); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs button { background: none; border: 0; padding: 12px 18px; font-weight: 600; color: var(--gray); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--navy); border-bottom-color: var(--teal); }
.empty { padding: 40px; text-align: center; color: var(--gray); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse { animation: pulse 1.6s ease-in-out infinite; } @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* ------------------------------------------------------------- Mapa ilustrativo */
.mapa { position: relative; border-radius: 12px; overflow: hidden; background: #EAE5DA; min-height: 240px; }
.mapa svg { display: block; width: 100%; height: 100%; }
.mapa .cred { position: absolute; right: 12px; bottom: 10px; background: rgba(255,255,255,.85); color: var(--gray); font-size: 11px; padding: 3px 8px; border-radius: 6px; }
.mapa .mk { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; transition: left 1s linear, top 1s linear; }
.mapa .mk .car { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px rgba(15,42,68,.15); }
.mapa .mk .car.teal { background: var(--teal); box-shadow: 0 0 0 8px rgba(14,154,167,.2); }
.mapa .mk .lbl { background: var(--navy); color: #fff; font-weight: 700; font-size: 13px; padding: 5px 10px; border-radius: 8px; white-space: nowrap; }
.mapa .mk .pin { width: 18px; height: 18px; background: var(--teal); border-radius: 4px; box-shadow: 0 0 0 4px rgba(14,154,167,.25); }
.mapa .mk .pin.o { border-radius: 50%; background: #fff; border: 4px solid var(--navy); }
.mapa .mk.stop .lbl { background: #fff; color: var(--navy); border: 1px solid var(--border); }

/* ------------------------------------------------------------- Mobile (marco de celular) */
body.mobile { background: #DCE4EB; display: flex; justify-content: center; align-items: flex-start; min-height: 100vh; padding: 28px 0; }
.phone { width: 390px; height: 844px; background: var(--fog); border-radius: 44px; border: 10px solid #111; box-shadow: 0 30px 80px rgba(15,42,68,.35); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.phone .notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 30px; background: #111; border-radius: 0 0 18px 18px; z-index: 5; }
.phone .status { height: 44px; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 26px 6px; font-family: var(--sora); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.screen { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 20px 110px; scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }
.screen.nonav { padding-bottom: 32px; }
.screen.dark { background: var(--navy); color: #fff; }
.bottom-nav { position: absolute; left: 0; right: 0; bottom: 0; height: 86px; background: #fff; border-top: 1px solid var(--border-2); display: flex; align-items: flex-start; justify-content: space-around; padding: 10px 8px 0; z-index: 4; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--gray); font-weight: 600; font-size: 13px; width: 84px; }
.bottom-nav a .ib { width: 56px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; position: relative; }
.bottom-nav a.active { color: var(--navy); } .bottom-nav a.active .ib { background: var(--orange-100); }
.bottom-nav a .n { position: absolute; top: -2px; right: 8px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid #fff; }
.bottom-nav a .n.teal { background: var(--teal); }
.m-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.m-head .kicker { font-family: var(--mont); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gray); }
.m-head h1 { font-size: 28px; margin-top: 2px; }
.m-head .right { display: flex; align-items: center; gap: 16px; padding-top: 6px; }
.m-section { font-family: var(--mont); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gray); margin: 22px 0 10px; }
.m-card { background: #fff; border: 1px solid var(--border-2); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.m-card.dark { background: var(--navy); color: #fff; border-color: var(--navy); }
.m-card.dark .muted { color: rgba(255,255,255,.7); }
.m-card + .m-card { margin-top: 12px; }
.m-card .time { font-family: var(--sora); font-weight: 700; font-size: 26px; color: var(--navy); line-height: 1; }
.m-card.dark .time { color: #fff; font-size: 44px; }
.m-card.dark .chip.hero { background: transparent; color: var(--teal); padding: 0; letter-spacing: .14em; font-size: 11px; white-space: normal; text-align: right; }
.m-card.dark .chip.hero:first-child { text-align: left; }
.m-card .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.m-card .head .num { color: var(--gray); font-size: 14px; }
.m-list { background: #fff; border: 1px solid var(--border-2); border-radius: 16px; overflow: hidden; }
.m-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border-2); }
.m-item:last-child { border-bottom: 0; }
.m-item .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-100); color: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.m-item .t { font-weight: 600; font-size: 16px; } .m-item .s { font-size: 13px; color: var(--gray); }
.m-item .tr { margin-left: auto; }
.tile { background: #fff; border: 1px solid var(--border-2); border-radius: 16px; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; text-align: left; }
.tile .ic { width: 48px; height: 48px; border-radius: 12px; background: var(--blue-100); color: var(--navy); display: flex; align-items: center; justify-content: center; }
.tile .t { font-family: var(--sora); font-weight: 600; font-size: 19px; } .tile .s { color: var(--gray); font-size: 13px; }
.tile.active { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-100); }
.searchbar { display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff; border-radius: 14px; padding: 18px 18px; font-family: var(--sora); font-weight: 600; font-size: 19px; cursor: pointer; }
.searchbar svg.i { color: var(--teal); width: 24px; height: 24px; }
.m-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 17px; border-radius: 14px; border: 1px solid var(--border); background: #fff; color: var(--navy); font-weight: 700; font-size: 17px; font-family: var(--sora); }
.m-btn.primary { background: var(--teal); border-color: var(--teal); color: var(--navy); }
.m-btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.m-btn.danger { border-color: var(--red-200); color: var(--red); }
.m-btn.ghost { background: transparent; border-color: transparent; }
.m-btn[disabled] { opacity: .5; }
.m-btn + .m-btn { margin-top: 10px; }
.m-input { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; font-size: 16px; background: #fff; outline: 0; }
.m-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-100); }
.m-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.m-field label { font-weight: 600; font-size: 14px; }
.m-stat { display: flex; justify-content: space-around; background: #fff; border: 1px solid var(--border-2); border-radius: 16px; padding: 16px; }
.m-stat .n { font-family: var(--sora); font-weight: 700; font-size: 26px; text-align: center; } .m-stat .s { text-align: center; color: var(--gray); font-size: 13px; }
.m-pills { display: flex; gap: 8px; margin: 14px 0; }
.m-pills button { border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 12px 18px; font-family: var(--sora); font-weight: 600; font-size: 15px; color: var(--navy); }
.m-pills button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.m-tabs { display: flex; gap: 4px; background: var(--fog-2); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.m-tabs button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 9px; font-weight: 600; color: var(--gray); }
.m-tabs button.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(15,42,68,.12); }
.auth { padding: 60px 28px 40px; display: flex; flex-direction: column; min-height: 100%; }
.auth .logo { font-size: 40px; }
.auth h2 { font-size: 24px; margin-top: 30px; } .auth .sub { color: var(--gray); margin-top: 6px; margin-bottom: 26px; }
.auth .or { display: flex; align-items: center; gap: 12px; color: var(--gray); font-size: 13px; margin: 18px 0; } .auth .or::before, .auth .or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.big-time { font-family: var(--sora); font-weight: 700; font-size: 44px; line-height: 1; color: #fff; }
.eta { font-family: var(--sora); font-weight: 700; font-size: 40px; line-height: 1; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-2); }
.person:last-child { border-bottom: 0; }
.person .t { font-weight: 600; } .person .s { color: var(--gray); font-size: 13px; }
.stepper-x { display: flex; align-items: center; gap: 12px; }
.stepper-x button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: #fff; font-size: 20px; font-weight: 700; }
.stepper-x .v { font-family: var(--sora); font-weight: 700; font-size: 22px; width: 28px; text-align: center; }
.aptitud { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aptitud .op { border: 1px solid var(--border-2); border-radius: 12px; padding: 12px; background: #fff; }
.aptitud .op .n { font-weight: 700; } .aptitud .op .st { font-weight: 600; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.aptitud .op .st.ok { color: var(--green); } .aptitud .op .st.no { color: var(--red); } .aptitud .op .f { font-size: 12px; color: var(--gray); margin-top: 2px; }
@media (max-width: 480px) {
  body.mobile { padding: 0; background: var(--fog); }
  .phone { width: 100%; height: 100vh; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .phone .notch { display: none; } .phone .status { display: none; }
}

/* ------------------------------------------------------------- Launcher */
.launcher { max-width: 1180px; margin: 0 auto; padding: 48px 24px 80px; }
.launcher .apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.launcher .appcard { background: #fff; border: 1px solid var(--border-2); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; transition: transform .15s, box-shadow .15s; }
.launcher .appcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.launcher .appcard .kind { font-family: var(--mont); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--teal); }
.launcher .appcard h3 { font-size: 22px; } .launcher .appcard p { color: var(--gray); font-size: 14px; flex: 1; }
.launcher .appcard .who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--navy); font-weight: 600; }
.launcher .steps-list { counter-reset: s; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.launcher .steps-list li { list-style: none; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; counter-increment: s; }
.launcher .steps-list li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--sora); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.launcher .steps-list li b { color: var(--navy); }
@media (max-width: 1000px) { .launcher .apps { grid-template-columns: repeat(2, 1fr); } .launcher .steps-list { grid-template-columns: 1fr; } }
@media print { .sidebar, .topbar, .bottom-nav { display: none; } }
