:root {
    --navy-950: #061722;
    --navy-900: #0a2230;
    --navy-800: #123445;
    --navy-700: #1d4b5f;
    --aqua-600: #0795a6;
    --aqua-500: #09b5bf;
    --aqua-300: #68d7d5;
    --aqua-100: #dff8f6;
    --paper: #f4f7f8;
    --white: #ffffff;
    --ink: #162b35;
    --muted: #667984;
    --line: #dce6e9;
    --amber: #d98b18;
    --red: #c84646;
    --green: #198f69;
    --violet: #7757b8;
    --shadow: 0 12px 35px rgba(17, 52, 69, .08);
    --radius: 16px;
    --sidebar: 252px;
}

/* Workflow forwarder 2.2 */
.row-action-stack{display:flex;flex-direction:column;gap:7px;min-width:250px}.row-action-stack .inline-form{flex-wrap:wrap}.row-action-stack input{max-width:145px}.panel-action{padding:14px 18px 18px}.timeline-list{max-height:560px;overflow:auto}.table-panel .filterbar select[name="view"]{min-width:190px}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
small { line-height: 1.45; }

/* Acceso */
.login-body { background: var(--navy-950); overflow-x: hidden; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(390px, .75fr); }
.login-brand { position: relative; isolation: isolate; overflow: hidden; padding: clamp(48px, 7vw, 110px); color: #fff; display: flex; flex-direction: column; justify-content: center; background: radial-gradient(circle at 72% 35%, rgba(9,181,191,.22), transparent 30%), linear-gradient(145deg, #061722 15%, #0c2e3c 100%); }
.login-brand::before { content: ""; position: absolute; inset: 0; z-index: -2; opacity: .28; background-image: linear-gradient(rgba(104,215,213,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(104,215,213,.14) 1px, transparent 1px); background-size: 54px 54px; transform: perspective(500px) rotateX(56deg) scale(1.6); transform-origin: bottom; }
.login-brand::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -170px; top: 50%; transform: translateY(-50%); border: 1px solid rgba(104,215,213,.2); border-radius: 50%; box-shadow: 0 0 0 58px rgba(104,215,213,.025), 0 0 0 118px rgba(104,215,213,.02); }
.login-route { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 38px; color: var(--aqua-300); border: 1px solid rgba(104,215,213,.4); border-radius: 50%; font-size: 30px; }
.login-brand > span { color: var(--aqua-300); font-size: 12px; letter-spacing: .22em; font-weight: 800; }
.login-brand h1 { max-width: 760px; margin: 18px 0 24px; font-family: Georgia, serif; font-size: clamp(48px, 6vw, 92px); font-weight: 400; line-height: .98; letter-spacing: -.045em; }
.login-brand h1 i { color: var(--aqua-300); font-weight: 400; }
.login-brand > p { max-width: 600px; margin: 0; color: #b7cbd2; font-size: 18px; line-height: 1.7; }
.login-modes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 44px; }
.login-modes b { padding: 10px 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 99px; background: rgba(255,255,255,.04); color: #cfdee3; font-size: 12px; }
.login-panel { display: grid; place-items: center; padding: 40px; background: #fff; }
.login-form { width: min(100%, 390px); }
.login-logo { display: flex; align-items: end; justify-content: space-between; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.login-logo strong { color: var(--navy-900); font-size: 20px; letter-spacing: -.04em; }
.login-logo strong i { color: var(--aqua-600); font-style: normal; }
.login-logo span { color: var(--muted); font-size: 9px; letter-spacing: .16em; }
.login-form h2 { margin: 40px 0 7px; font-family: Georgia, serif; font-size: 38px; font-weight: 500; }
.login-form > p { margin: 0 0 28px; color: var(--muted); }
.login-form label, .settings-form label:not(.switch) { display: grid; gap: 8px; margin-bottom: 18px; }
.login-form label span, .settings-form label > span, .form-grid label > span { color: #455e69; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.login-form input, .settings-form input, .form-grid input, .form-grid select, .form-grid textarea, .filterbar input, .filterbar select, .inline-form select, .service-update select { width: 100%; min-height: 45px; padding: 10px 13px; border: 1px solid #ccdadd; border-radius: 9px; outline: none; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s; }
.login-form input:focus, .settings-form input:focus, .form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .filterbar input:focus, .filterbar select:focus { border-color: var(--aqua-500); box-shadow: 0 0 0 3px rgba(9,181,191,.12); }
.login-form button { width: 100%; margin-top: 8px; padding: 14px 18px; border: 0; border-radius: 9px; color: #fff; background: var(--navy-900); font-weight: 800; transition: transform .2s, background .2s; }
.login-form button:hover { background: var(--aqua-600); transform: translateY(-1px); }
.login-form > small { display: block; margin-top: 18px; padding: 11px 12px; border-radius: 8px; background: var(--aqua-100); color: #2d7277; text-align: center; }
.login-alert { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #f0c8c8; border-radius: 8px; color: #9a3737; background: #fff0f0; font-size: 13px; }

/* Estructura principal */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; overflow-y: auto; color: #d7e5e8; background: var(--navy-950); box-shadow: 8px 0 30px rgba(3,21,31,.08); }
.brand { min-height: 84px; display: flex; gap: 11px; align-items: center; padding: 18px 21px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-mark { width: 31px; height: 31px; display: flex; align-items: end; gap: 3px; padding: 5px; border: 1px solid rgba(104,215,213,.4); border-radius: 50%; }
.brand-mark i { width: 5px; border-radius: 4px; background: var(--aqua-300); }
.brand-mark i:nth-child(1) { height: 9px; }.brand-mark i:nth-child(2) { height: 17px; }.brand-mark i:nth-child(3) { height: 12px; }
.brand > span:last-child { display: grid; grid-template-columns: auto auto; column-gap: 5px; align-items: baseline; }
.brand strong { color: #fff; font-size: 15px; letter-spacing: -.03em; }.brand b { color: var(--aqua-300); }.brand small { grid-column: 1 / -1; color: #6f919e; font-size: 7px; letter-spacing: .16em; }
.main-nav { flex: 1; padding: 12px 10px 24px; }
.nav-group { display: block; margin: 18px 11px 7px; color: #587784; font-size: 8px; font-weight: 800; letter-spacing: .2em; }
.main-nav a { position: relative; display: flex; align-items: center; gap: 11px; min-height: 38px; margin: 3px 0; padding: 8px 11px; border-radius: 8px; color: #9fb5bd; font-size: 12px; font-weight: 600; transition: color .16s, background .16s; }
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.main-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(9,181,191,.24), rgba(9,181,191,.07)); }
.main-nav a.active::before { content: ""; position: absolute; left: -10px; width: 3px; height: 24px; border-radius: 0 4px 4px 0; background: var(--aqua-300); }
.nav-icon { width: 20px; color: var(--aqua-300); text-align: center; font-size: 15px; }
.main-nav a em { margin-left: auto; min-width: 18px; padding: 2px 5px; border-radius: 99px; color: var(--navy-950); background: var(--aqua-300); text-align: center; font-size: 9px; font-style: normal; font-weight: 900; }
.sidebar-support { display: flex; align-items: center; gap: 9px; margin: 0 12px 12px; padding: 11px; border: 1px solid rgba(255,255,255,.07); border-radius: 9px; background: rgba(255,255,255,.025); }
.support-dot { width: 8px; height: 8px; border-radius: 50%; background: #38d18b; box-shadow: 0 0 0 4px rgba(56,209,139,.12); }
.sidebar-support div { display: grid; }.sidebar-support strong { color: #cfe0e4; font-size: 10px; }.sidebar-support small { color: #63808a; font-size: 9px; }
.sidebar-user { min-height: 64px; display: flex; gap: 10px; align-items: center; padding: 11px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.avatar { flex: 0 0 auto; width: 33px; height: 33px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg, var(--aqua-600), var(--navy-700)); font-size: 10px; font-weight: 900; }
.sidebar-user > span:nth-child(2) { display: grid; min-width: 0; }.sidebar-user strong { overflow: hidden; color: #eaf2f4; font-size: 10px; text-overflow: ellipsis; }.sidebar-user small { color: #6d8b96; font-size: 9px; }.sidebar-user a { margin-left: auto; color: #6d8b96; font-size: 16px; }
.app-content { grid-column: 2; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { position: sticky; z-index: 20; top: 0; min-height: 84px; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 14px clamp(20px, 3vw, 44px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.topbar-title { display: flex; align-items: center; gap: 12px; }.topbar-title h1 { margin: 0 0 2px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; letter-spacing: -.02em; }.topbar-title p { margin: 0; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }.quick-search { width: clamp(170px, 22vw, 310px); display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafb; color: #83949b; }.quick-search input { width: 100%; height: 35px; border: 0; outline: 0; background: transparent; font-size: 11px; }
.live-clock { display: grid; padding: 0 13px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; }.live-clock strong { font-size: 14px; }.live-clock small { color: var(--muted); font-size: 8px; }
.notification-button, .icon-button { position: relative; width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: #49636f; background: #fff; }.notification-button b { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 1px 4px; border: 2px solid #fff; border-radius: 99px; color: #fff; background: var(--red); font-size: 8px; text-align: center; }.menu-button { display: none; }
.workspace { flex: 1; width: 100%; max-width: 1720px; margin: 0 auto; padding: 32px clamp(20px, 3vw, 44px) 50px; }
.app-footer { display: flex; justify-content: space-between; padding: 18px clamp(20px, 3vw, 44px); border-top: 1px solid var(--line); color: #819299; font-size: 9px; }
.mobile-overlay { display: none; }

/* Cabeceras, botones y avisos */
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.section-heading > div:first-child > span, .panel-head > div > span, .settings-head + span { color: var(--aqua-600); font-size: 9px; font-weight: 900; letter-spacing: .19em; }
.section-heading h2 { margin: 5px 0 3px; font-family: Georgia, serif; font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.section-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.button { min-height: 38px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; font-size: 11px; font-weight: 800; transition: transform .16s, border-color .16s, background .16s; }
.button:hover { transform: translateY(-1px); }.button-primary { color: #fff; background: var(--aqua-600); }.button-primary:hover { background: #087f8d; }.button-dark { color: #fff; background: var(--navy-900); }.button-secondary { color: var(--navy-800); border-color: #c8d8dc; background: #fff; }.button-ghost { color: var(--muted); border-color: transparent; background: transparent; }.button-ghost:hover { background: #edf3f4; }
.flash { position: fixed; z-index: 80; top: 96px; right: 24px; width: min(400px, calc(100vw - 40px)); display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid; border-radius: 10px; box-shadow: 0 16px 42px rgba(10,34,48,.18); animation: flash-in .3s ease both; }.flash > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }.flash p { flex: 1; margin: 0; font-size: 12px; }.flash button { border: 0; background: transparent; color: inherit; font-size: 20px; }.flash-success { color: #126d50; border-color: #afdcca; background: #edfff8; }.flash-success > span { color: #fff; background: var(--green); }.flash-error { color: #913939; border-color: #ecc1c1; background: #fff1f1; }.flash-error > span { color: #fff; background: var(--red); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }

/* Paneles e indicadores */
.panel { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 4px 18px rgba(17,52,69,.035); }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 18px; }.panel-head h3 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 18px; font-weight: 500; }.panel-head a { color: var(--aqua-600); font-size: 10px; font-weight: 800; }.record-count { padding: 5px 9px; border-radius: 99px; color: var(--muted); background: #eef4f5; font-size: 9px; }.big-metric { color: var(--navy-800); font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi-card { position: relative; overflow: hidden; min-height: 122px; display: flex; align-items: center; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(17,52,69,.035); }
.kpi-card::after { content: ""; position: absolute; right: -28px; bottom: -36px; width: 90px; height: 90px; border-radius: 50%; background: currentColor; opacity: .045; }.kpi-icon { flex: 0 0 auto; width: 43px; height: 43px; display: grid; place-items: center; border-radius: 11px; color: var(--aqua-600); background: var(--aqua-100); font-weight: 900; }.kpi-card > div:last-child { min-width: 0; display: grid; }.kpi-card span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }.kpi-card strong { margin: 3px 0; overflow: hidden; color: var(--ink); font-family: Georgia, serif; font-size: clamp(21px, 2.1vw, 29px); font-weight: 500; line-height: 1.15; text-overflow: ellipsis; }.kpi-card small { color: #799099; font-size: 9px; }.tone-green .kpi-icon { color: var(--green); background: #e4f6ef; }.tone-amber .kpi-icon { color: var(--amber); background: #fff3dd; }.tone-violet .kpi-icon { color: var(--violet); background: #f0ebfa; }.tone-red .kpi-icon { color: var(--red); background: #fdeaea; }.compact-kpis .kpi-card { min-height: 105px; padding: 16px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 16px; }.panel-wide { min-height: 420px; }.activity-panel { margin-top: 16px; }
.operation-stack { display: grid; }.operation-row { display: grid; grid-template-columns: 38px minmax(250px, 1.3fr) minmax(180px, .7fr); align-items: center; gap: 13px; padding: 14px 0; border-top: 1px solid #edf2f3; }.operation-row:first-child { border-top: 0; }.operation-mode { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #edf7f7; font-size: 17px; }.operation-main > div { display: flex; align-items: center; gap: 7px; }.operation-main > div > strong { color: var(--aqua-600); font-size: 10px; }.operation-main h4 { margin: 5px 0 2px; font-size: 12px; }.operation-main h4 span { color: var(--aqua-500); }.operation-main p, .operation-progress span { margin: 0; color: var(--muted); font-size: 9px; }.operation-progress > div, .compliance > div, .collection-bar, .status-chart > div > div, .horizontal-chart > div > div { height: 5px; overflow: hidden; border-radius: 99px; background: #e8eff1; }.operation-progress > div { margin-top: 7px; }.operation-progress i, .compliance i, .collection-bar i, .status-chart i, .horizontal-chart i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--aqua-600), var(--aqua-300)); }
.network-panel { grid-row: span 2; }.network-score { display: grid; place-items: center; padding: 4px 0 18px; }.radial { --score: 0; width: 130px; height: 130px; display: grid; place-content: center; border-radius: 50%; background: radial-gradient(circle closest-side, white 73%, transparent 74%), conic-gradient(var(--aqua-500) calc(var(--score) * 1%), #e7eff0 0); text-align: center; }.radial strong { font-family: Georgia, serif; font-size: 26px; font-weight: 500; }.radial small { color: var(--muted); font-size: 9px; }.mode-summary { display: grid; }.mode-summary a { display: grid; grid-template-columns: 29px 1fr auto; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid #edf2f3; }.mode-summary a > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; background: #eef6f6; font-size: 13px; }.mode-summary div { display: grid; }.mode-summary strong { font-size: 10px; }.mode-summary small { color: var(--muted); font-size: 8px; }.mode-summary a > b { color: var(--navy-700); font-family: Georgia, serif; font-size: 17px; }
.alert-list, .timeline-list { display: grid; }.alert-list article { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid #edf2f3; }.alert-list article:first-child { border-top: 0; }.alert-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: var(--red); background: #fdecec; font-size: 11px; font-weight: 900; }.alert-list strong, .timeline-list strong { font-size: 10px; }.alert-list p, .timeline-list p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }.alert-list article > div:last-child { display: grid; justify-items: end; gap: 3px; }.alert-list small { color: var(--muted); font-size: 7px; }
.timeline-list article { display: grid; grid-template-columns: 35px 8px 1fr auto; gap: 8px; align-items: center; padding: 10px 0; }.timeline-list time { color: var(--navy-700); font-size: 9px; font-weight: 800; }.timeline-list > article > i { width: 7px; height: 7px; border: 2px solid var(--aqua-500); border-radius: 50%; box-shadow: 0 0 0 3px var(--aqua-100); }
.activity-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }.activity-grid article { display: flex; gap: 8px; padding: 11px; border-radius: 9px; background: #f7fafb; font-size: 9px; }.activity-grid article > span { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--navy-700); font-size: 9px; font-weight: 900; }.activity-grid p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }

/* Estados, modos y tablas */
.status { display: inline-flex; align-items: center; gap: 5px; width: max-content; padding: 4px 7px; border-radius: 99px; color: #4e6873; background: #edf3f4; font-size: 8px; font-weight: 800; white-space: nowrap; }.status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }.status-completada, .status-aprobado, .status-pagada, .status-activo, .status-disponible { color: #147756; background: #e5f6ef; }.status-en-transito, .status-en-camino, .status-confirmada, .status-enviada, .status-operando { color: #087b86; background: #e2f7f7; }.status-pendiente, .status-planificada, .status-borrador, .status-programado { color: #9a650f; background: #fff2d9; }.status-vencido, .status-vencida, .status-cancelada, .status-anulada, .status-mantenimiento { color: #a53e3e; background: #fde8e8; }.status-revision, .status-parcial, .status-en-terminal { color: #67479f; background: #eee8f9; }
.mode-badge { display: inline-flex; align-items: center; gap: 5px; width: max-content; margin-bottom: 5px; padding: 4px 7px; border: 1px solid #d8e7e9; border-radius: 6px; color: #315864; background: #f2f8f8; font-size: 8px; font-weight: 800; }.mode-badge b { font-size: 11px; }
.table-panel { padding: 0; overflow: hidden; }.table-panel > .panel-head { padding: 20px 21px 0; }.table-wrap { width: 100%; overflow-x: auto; }.data-table { width: 100%; border-collapse: collapse; font-size: 10px; }.data-table thead { background: #f3f7f8; }.data-table th { padding: 11px 13px; color: #6a818a; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }.data-table td { min-width: 90px; padding: 13px; border-bottom: 1px solid #eaf0f2; vertical-align: middle; }.data-table tr:last-child td { border-bottom: 0; }.data-table tbody tr { transition: background .16s; }.data-table tbody tr:hover { background: #fbfdfd; }.data-table td > strong, .data-table td > span:not(.status):not(.mode-badge):not(.number-chip) { display: block; }.data-table td > small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.55; }.reference { color: var(--aqua-600); font-size: 9px; }.route-arrow { display: inline !important; margin: 0 5px; color: var(--aqua-500); }.operations-table td:nth-child(3) { min-width: 190px; }.operations-table td:nth-child(5) { min-width: 135px; }.actions-col { text-align: right !important; }.row-actions { display: flex; justify-content: flex-end; gap: 5px; }.row-actions form { margin: 0; }.small-action { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1px solid #cfdde0; border-radius: 7px; color: var(--navy-700); background: #fff; font-weight: 900; }.small-action:hover { border-color: var(--aqua-500); color: var(--aqua-600); }.small-action.danger:hover { border-color: #e6b5b5; color: var(--red); background: #fff4f4; }.mini-progress { min-width: 90px; display: flex; align-items: center; gap: 7px; }.mini-progress span { width: 62px; height: 4px; overflow: hidden; border-radius: 99px; background: #e7eff0; }.mini-progress i { display: block; height: 100%; border-radius: inherit; background: var(--aqua-500); }.mini-progress b { font-size: 8px; }.number-chip { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: var(--aqua-600); background: var(--aqua-100); font-weight: 900; }.file-link { color: var(--aqua-600); font-size: 9px; font-weight: 800; }.muted { color: var(--muted); }
.filterbar { display: flex; align-items: center; gap: 8px; padding: 15px 20px; border-bottom: 1px solid var(--line); }.filterbar select { width: auto; min-width: 150px; min-height: 38px; font-size: 10px; }.filter-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 6px; padding-left: 10px; border: 1px solid #ccdadd; border-radius: 8px; color: var(--muted); }.filter-search input { min-height: 36px; border: 0; box-shadow: none !important; background: transparent; font-size: 10px; }.inline-form { display: flex; align-items: center; gap: 5px; }.inline-form select { width: 105px; min-height: 28px; padding: 4px 6px; font-size: 8px; }
.invoice-update input { width: 74px; min-height: 28px; padding: 4px 6px; border: 1px solid #ccdadd; border-radius: 7px; font-size: 8px; }
.empty-state { min-height: 250px; display: grid; place-content: center; justify-items: center; padding: 30px; color: var(--muted); text-align: center; }.empty-state > span { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 50%; color: var(--aqua-600); font-size: 22px; }.empty-state strong { color: var(--ink); }.empty-state p { margin: 4px 0; font-size: 11px; }

/* Flota, servicios y finanzas */
.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }.asset-card { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 5px 20px rgba(17,52,69,.04); }.asset-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }.asset-top > span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; background: var(--aqua-100); font-size: 18px; }.asset-card > div:nth-child(2) > small { color: var(--aqua-600); font-size: 8px; font-weight: 800; letter-spacing: .09em; }.asset-card h3 { margin: 6px 0 3px; font-family: Georgia, serif; font-size: 19px; font-weight: 500; }.asset-card p { margin: 0; color: var(--muted); font-size: 9px; }.asset-card dl { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0; padding: 12px 0; border-top: 1px solid #edf2f3; border-bottom: 1px solid #edf2f3; }.asset-card dl div { display: grid; gap: 3px; }.asset-card dt { color: var(--muted); font-size: 8px; }.asset-card dd { margin: 0; font-size: 10px; font-weight: 800; }.compliance > span { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 9px; }.compliance strong { color: var(--green); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(225px, 1fr)); gap: 12px; overflow-x: auto; }.kanban-column { min-width: 225px; padding: 11px; border-radius: 13px; background: #eaf0f2; }.kanban-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 3px 12px; color: #526b75; font-size: 9px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }.kanban-head b { min-width: 22px; padding: 3px 6px; border-radius: 99px; background: #d9e4e7; text-align: center; }.kanban-stack { display: grid; gap: 9px; }.service-card { padding: 14px; border: 1px solid #d9e4e6; border-radius: 10px; background: #fff; box-shadow: 0 4px 12px rgba(17,52,69,.04); }.service-card > div:first-child { display: flex; justify-content: space-between; align-items: center; }.service-card > div:first-child strong { color: var(--aqua-600); font-size: 8px; }.service-card h3 { margin: 10px 0 3px; font-size: 11px; }.service-card > p { margin: 0; color: var(--muted); font-size: 9px; }.service-card dl { display: grid; gap: 6px; margin: 13px 0; padding: 10px 0; border-top: 1px solid #edf2f3; border-bottom: 1px solid #edf2f3; }.service-card dl div { display: flex; justify-content: space-between; gap: 8px; }.service-card dt { color: var(--muted); font-size: 8px; }.service-card dd { margin: 0; text-align: right; font-size: 8px; font-weight: 800; }.service-update { display: flex; gap: 5px; }.service-update select { min-width: 0; min-height: 29px; padding: 4px 6px; font-size: 8px; }.service-update button { border: 0; border-radius: 6px; color: #fff; background: var(--navy-800); font-size: 8px; font-weight: 800; }.kanban-empty { padding: 22px 10px; color: #84969c; text-align: center; font-size: 9px; }.cancelled-note { margin: 12px 0 0; color: var(--muted); font-size: 9px; }
.finance-overview { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 25px; margin-bottom: 16px; }.finance-overview > div:first-child { min-width: 240px; }.finance-overview span { color: var(--aqua-600); font-size: 8px; font-weight: 900; letter-spacing: .13em; }.finance-overview strong { display: block; margin: 4px 0; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }.finance-overview p { margin: 0; color: var(--muted); font-size: 9px; }.collection-bar { height: 12px; }.collection-bar i { background: linear-gradient(90deg, var(--navy-700), var(--aqua-300)); }

/* Comunicaciones */
.communications-layout { display: grid; grid-template-columns: minmax(310px, .75fr) minmax(0, 1.35fr); gap: 15px; min-height: 620px; }.inbox-panel { padding: 0; overflow: hidden; }.inbox-head { display: flex; justify-content: space-between; align-items: center; padding: 17px; border-bottom: 1px solid var(--line); color: #58717b; font-size: 8px; font-weight: 900; letter-spacing: .1em; }.inbox-head b { color: var(--aqua-600); }.message-list { overflow-y: auto; max-height: 680px; }.message-item { position: relative; display: flex; gap: 10px; padding: 15px; border-bottom: 1px solid #eaf0f2; background: #fff; transition: background .15s; }.message-item:hover, .message-item.selected { background: #f3f9f9; }.message-item.selected { box-shadow: inset 3px 0 var(--aqua-500); }.message-item.unread h3, .message-item.unread > div > strong { color: var(--ink); font-weight: 900; }.small-avatar { width: 29px; height: 29px; font-size: 9px; }.message-item > div { min-width: 0; }.message-item strong { color: #4f6872; font-size: 9px; }.message-item h3 { margin: 3px 0; overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }.message-item p { margin: 0; overflow: hidden; color: var(--muted); font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }.message-item small { color: #93a1a6; font-size: 7px; }.message-item > i { position: absolute; top: 17px; right: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--aqua-500); }.message-reader { padding: 28px; }.reader-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }.reader-head span { color: var(--aqua-600); font-size: 8px; font-weight: 900; letter-spacing: .08em; }.reader-head h2 { margin: 7px 0 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }.sender-card { display: flex; align-items: center; gap: 11px; margin: 22px 0; }.sender-card strong { font-size: 11px; }.sender-card p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }.message-body { min-height: 230px; padding: 22px; border-radius: 11px; color: #38515b; background: #f6f9fa; font-family: Georgia, serif; font-size: 15px; line-height: 1.8; }.reader-actions { display: flex; gap: 8px; margin-top: 20px; }

/* Reportes */
.report-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); gap: 15px; }.report-main { min-height: 300px; }.horizontal-chart { display: grid; gap: 17px; }.horizontal-chart > div { display: grid; grid-template-columns: 115px 1fr 30px; align-items: center; gap: 10px; }.horizontal-chart span { color: #405d68; font-size: 9px; font-weight: 700; }.horizontal-chart > div > div { height: 9px; }.horizontal-chart strong { font-size: 10px; }.score-panel { display: grid; place-items: center; text-align: center; }.score-panel > span { color: var(--aqua-600); font-size: 9px; font-weight: 900; letter-spacing: .16em; }.large-radial { width: 155px; height: 155px; margin: 10px; }.large-radial strong { font-size: 33px; }.score-panel p { margin: 0; color: var(--muted); font-size: 9px; }.status-chart { display: grid; gap: 14px; }.status-chart > div { display: grid; grid-template-columns: 92px 1fr 25px; align-items: center; gap: 10px; }.status-chart > div > div { height: 7px; }.status-chart strong { font-size: 9px; }.finance-chart { height: 190px; display: flex; align-items: end; justify-content: space-around; gap: 20px; padding: 10px 10px 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 44px, #edf2f3 45px); }.finance-column { flex: 1; height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: end; gap: 8px; }.finance-column > div { height: 100%; display: flex; align-items: end; justify-content: center; gap: 5px; }.finance-column i { width: 19px; min-height: 2px; border-radius: 4px 4px 0 0; }.finance-column .billed { background: var(--navy-700); }.finance-column .collected { background: var(--aqua-300); }.finance-column span { text-align: center; color: var(--muted); font-size: 8px; }.chart-legend { display: flex; justify-content: center; gap: 18px; padding-top: 13px; }.chart-legend span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }.chart-legend i { width: 8px; height: 8px; border-radius: 2px; }.legend-billed { background: var(--navy-700); }.legend-collected { background: var(--aqua-300); }.report-wide { grid-column: 1 / -1; }.leader-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }.leader-list article { display: grid; grid-template-columns: 25px 1fr; gap: 8px; padding: 12px; border-radius: 9px; background: #f6f9fa; }.leader-list article > b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: var(--aqua-600); background: var(--aqua-100); font-size: 9px; }.leader-list article div { min-width: 0; display: grid; }.leader-list article div strong { overflow: hidden; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }.leader-list article small { color: var(--muted); font-size: 8px; }.leader-list article > span { grid-column: 2; color: var(--navy-700); font-family: Georgia, serif; font-size: 13px; }

/* Configuración */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-items: start; }.settings-card { padding: 25px; }.settings-head { display: flex; gap: 12px; align-items: start; margin-bottom: 23px; }.settings-head > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: var(--aqua-600); background: var(--aqua-100); font-size: 9px; font-weight: 900; }.settings-head h3 { margin: 0 0 3px; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }.settings-head p { margin: 0; color: var(--muted); font-size: 9px; }.settings-form label:not(.switch) { margin-bottom: 14px; }.settings-form fieldset { display: grid; gap: 5px; margin: 18px 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; }.settings-form legend { padding: 0 6px; color: #57707a; font-size: 9px; font-weight: 800; }.switch { display: grid; grid-template-columns: 35px 1fr; align-items: center; gap: 9px; padding: 8px 0; cursor: pointer; }.switch input { position: absolute; opacity: 0; pointer-events: none; }.switch > i { position: relative; width: 35px; height: 19px; border-radius: 99px; background: #cad7da; transition: background .2s; }.switch > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .2s; }.switch input:checked + i { background: var(--aqua-500); }.switch input:checked + i::after { transform: translateX(16px); }.switch > span { display: grid; }.switch b { font-size: 10px; }.switch small { color: var(--muted); font-size: 8px; }.account-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 14px; border-radius: 10px; background: #f4f8f9; }.large-avatar { width: 42px; height: 42px; }.account-summary strong { font-size: 11px; }.account-summary p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }.security-note { display: flex; gap: 9px; margin-top: 20px; padding: 12px; border-radius: 9px; color: #28775f; background: #eaf8f2; }.security-note > span { font-weight: 900; }.security-note p { display: grid; margin: 0; font-size: 8px; }.security-note strong { font-size: 9px; }.system-card { grid-column: 1 / -1; }.system-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }.system-card dl div { padding: 12px; border-radius: 9px; background: #f5f8f9; }.system-card dt { color: var(--muted); font-size: 8px; }.system-card dd { margin: 4px 0 0; font-size: 10px; font-weight: 800; }

/* Formularios modales */
.modal { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 15px; background: transparent; box-shadow: 0 30px 90px rgba(3,21,31,.28); }.modal::backdrop { background: rgba(4,20,30,.67); backdrop-filter: blur(3px); }.modal-card { margin: 0; padding: 0; background: #fff; }.modal-head { display: flex; justify-content: space-between; align-items: start; padding: 20px 23px; border-bottom: 1px solid var(--line); }.modal-head span { color: var(--aqua-600); font-size: 8px; font-weight: 900; letter-spacing: .17em; }.modal-head h2 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }.modal-head > button { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; font-size: 20px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; max-height: calc(100vh - 220px); overflow-y: auto; padding: 22px 23px; }.form-grid label { display: grid; align-content: start; gap: 7px; }.form-grid textarea { resize: vertical; }.span-2 { grid-column: 1 / -1; }.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 23px; border-top: 1px solid var(--line); background: #f8fafb; }

/* Plugins e integraciones */
.integration-notice { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; padding: 14px 16px; border: 1px solid #bcdfe0; border-radius: 11px; color: #2d5b65; background: #eefafa; }
.integration-notice > span { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--aqua-600); font-family: Georgia,serif; font-weight: 900; }
.integration-notice strong { font-size: 10px; }.integration-notice p { margin: 3px 0 0; color: #55747d; font-size: 9px; line-height: 1.55; }
.plugin-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-bottom: 16px; }
.plugin-card { display: flex; flex-direction: column; gap: 15px; }.plugin-card > p { flex: 1; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.plugin-card-head { display: grid; grid-template-columns: 41px 1fr auto; align-items: center; gap: 10px; }.plugin-card-head small { color: var(--aqua-600); font-size: 8px; font-weight: 900; letter-spacing: .1em; }.plugin-card-head h3 { margin: 4px 0 0; font-family: Georgia,serif; font-size: 18px; font-weight: 500; }
.plugin-mark { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 11px; color: var(--aqua-600); background: var(--aqua-100); font-family: Georgia,serif; font-size: 18px; font-weight: 900; }
.plugin-facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; padding: 10px; border-radius: 8px; background: #f5f8f9; }.plugin-facts span { display: grid; gap: 2px; color: var(--muted); font-size: 7px; }.plugin-facts b { overflow: hidden; color: #38535e; font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.module-pills { display: flex; flex-wrap: wrap; gap: 5px; }.module-pills form { margin: 0; }.module-pill { min-height: 26px; padding: 5px 8px; border: 1px solid #d5e1e3; border-radius: 99px; color: #647c84; background: #fff; font-size: 7px; font-weight: 800; }.module-pill.enabled { color: #167258; border-color: #b7ddce; background: #eaf8f3; }
.plugin-actions { display: flex; gap: 7px; flex-wrap: wrap; }.plugin-actions form { margin: 0; }.sync-form { display: grid; grid-template-columns: 1fr auto; gap: 7px; padding-top: 13px; border-top: 1px solid var(--line); }.sync-form select { min-width: 0; }
.form-hint { padding: 11px; border-radius: 8px; color: #5c747d; background: #f3f7f8; font-size: 8px; line-height: 1.55; }.form-hint b { color: #35525d; }
.fiscal-cell { min-width: 155px !important; }.fiscal-cell > strong { color: #147756; }.fiscal-form { display: grid; gap: 5px; }.fiscal-form select { max-width: 170px; min-height: 28px; padding: 4px; font-size: 8px; }.fiscal-form .small-action { width: auto; padding: 0 8px; }

/* Adaptación */
@media (max-width: 1180px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .activity-grid { grid-template-columns: repeat(3, 1fr); }
    .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .leader-list { grid-template-columns: repeat(3, 1fr); }
    .kanban { grid-template-columns: repeat(4, 270px); }
    .plugin-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    :root { --sidebar: 245px; }
    .app-shell { display: block; }
    .sidebar { transform: translateX(-105%); transition: transform .25s ease; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .mobile-overlay { position: fixed; z-index: 25; inset: 0; background: rgba(4,20,30,.55); }
    body.sidebar-open .mobile-overlay { display: block; }
    .app-content { display: flex; }
    .menu-button { display: grid; }
    .dashboard-grid, .report-grid { grid-template-columns: 1fr; }
    .network-panel { grid-row: auto; }
    .report-wide { grid-column: auto; }
    .communications-layout { grid-template-columns: 1fr; min-height: auto; }
    .message-list { max-height: 360px; }
    .settings-grid { grid-template-columns: 1fr; }.system-card { grid-column: auto; }
    .login-shell { grid-template-columns: 1fr; }.login-brand { min-height: 480px; }.login-panel { min-height: 620px; }
}

@media (max-width: 650px) {
    .workspace { padding: 22px 14px 40px; }
    .topbar { min-height: 72px; padding: 10px 14px; }.topbar-title h1 { font-size: 19px; }.topbar-title p { display: none; }.quick-search, .live-clock { display: none; }
    .section-heading { align-items: start; flex-direction: column; }.section-actions { width: 100%; }.section-actions .button { flex: 1; }
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }.kpi-card { min-height: 98px; padding: 13px; }.kpi-icon { width: 34px; height: 34px; }.kpi-card strong { font-size: 19px; }
    .operation-row { grid-template-columns: 35px 1fr; }.operation-progress { grid-column: 2; }
    .activity-grid, .asset-grid, .leader-list, .plugin-grid { grid-template-columns: 1fr; }
    .filterbar { align-items: stretch; flex-direction: column; }.filterbar select { width: 100%; }.filter-search { min-width: 0; }
    .finance-overview { grid-template-columns: 1fr; }.communications-layout { margin: 0 -1px; }.message-reader { padding: 18px; }.reader-head { flex-direction: column; }.message-body { padding: 15px; font-size: 14px; }
    .form-grid { grid-template-columns: 1fr; }.span-2 { grid-column: auto; }.modal-actions .button { flex: 1; }
    .system-card dl { grid-template-columns: 1fr 1fr; }
    .app-footer { flex-direction: column; gap: 4px; }
    .login-brand { min-height: 430px; padding: 40px 25px; }.login-brand h1 { font-size: 48px; }.login-brand > p { font-size: 15px; }.login-panel { min-height: 570px; padding: 30px 22px; }.login-logo { align-items: start; flex-direction: column; gap: 4px; }
}

@media (max-width: 420px) {
    .kpi-grid { grid-template-columns: 1fr; }.kpi-card { min-height: 88px; }.system-card dl { grid-template-columns: 1fr; }
}

@media print {
    .sidebar, .topbar, .app-footer, .section-actions, .filterbar, .row-actions, .flash { display: none !important; }
    .app-shell { display: block; }.app-content { display: block; }.workspace { max-width: none; padding: 0; }.panel, .kpi-card { box-shadow: none; break-inside: avoid; }
}

/* Portal público de tracking */
.tracking-body { min-height: 100vh; padding: 30px; background: linear-gradient(145deg, var(--navy-950), #10394a); }
.tracking-shell { width: min(1120px, 100%); margin: 0 auto; }
.tracking-brand { display: flex; justify-content: space-between; align-items: center; padding: 18px 4px 28px; color: #fff; }
.tracking-brand strong { font-size: 20px; }.tracking-brand strong i { color: var(--aqua-300); font-style: normal; }.tracking-brand span { color: #8fb5c1; font-size: 9px; letter-spacing: .18em; }
.tracking-search { max-width: 610px; margin: 8vh auto; padding: 44px; border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.tracking-search h1 { margin: 0; font-family: Georgia,serif; font-size: 42px; font-weight: 500; }.tracking-search p { color: var(--muted); }
.tracking-search form { display: flex; gap: 8px; margin: 25px 0; }.tracking-search input { flex: 1; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 9px; }.tracking-search button { padding: 0 20px; border: 0; border-radius: 9px; color: #fff; background: var(--aqua-600); font-weight: 800; }
.tracking-hero { padding: 35px; border-radius: 18px; color: #fff; background: radial-gradient(circle at 90% 0,rgba(104,215,213,.23),transparent 35%),var(--navy-900); box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.tracking-hero > span { color: var(--aqua-300); font-size: 10px; font-weight: 900; letter-spacing: .15em; }.tracking-hero h1 { margin: 12px 0 7px; font-family: Georgia,serif; font-size: clamp(28px,5vw,50px); font-weight: 500; }.tracking-hero h1 i { color: var(--aqua-300); font-style: normal; }.tracking-hero p { color: #a8c1ca; }
.tracking-progress { height: 8px; margin-top: 28px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.12); }.tracking-progress b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--aqua-500),var(--aqua-300)); }.tracking-hero > div:last-child { display: flex; justify-content: space-between; margin-top: 10px; }.tracking-hero .status { background: rgba(255,255,255,.08); }
.tracking-columns { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; margin-top: 16px; }.tracking-footer { padding: 22px; color: #789ba7; text-align: center; font-size: 10px; }
@media(max-width:760px){.tracking-body{padding:14px}.tracking-brand{align-items:flex-start;flex-direction:column;gap:5px}.tracking-search{padding:25px}.tracking-search form{flex-direction:column}.tracking-search button{padding:13px}.tracking-columns{grid-template-columns:1fr}.tracking-hero{padding:24px}}
