/* =====================================================================
   GEOFASE · Portal
   Estilo corporativo plano: barras navy, barra gris de sección, ruta de
   navegación y contenido a todo el ancho (sin tarjetas ni degradados).
   ===================================================================== */

:root {
    --c-navy: #000028;
    --c-navy-2: #10103c;
    --c-navy-line: #21245a;
    --c-accent: #00ffb9;
    --c-accent-d: #00d9a0;
    --c-accent-text: #007a5c;
    --c-gray-bar: #e9e9ec;
    --c-gray-bg: #f5f5f7;
    --c-line: #d9dae1;
    --c-line-2: #ececf0;
    --c-text: #000028;
    --c-body: #3b3f55;
    --c-muted: #6b6f80;
    --c-ok: #007a3d;
    --c-ok-bg: #e6f4ec;
    --c-warn: #8a6100;
    --c-warn-bg: #fdf3dc;
    --c-danger: #b00020;
    --c-danger-bg: #fbe9ec;
    --c-info: #1d3fb8;
    --c-info-bg: #e8edfb;
    --pad: 32px;
    --font: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --mono: 'Consolas', 'Courier New', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--c-text);
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.inline { display: inline; }
.skip { position: absolute; left: -999px; top: 0; background: var(--c-accent); color: var(--c-navy); padding: 8px 14px; z-index: 10000; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--c-accent-text); outline-offset: 2px; }

.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------------------------------------------
   Encabezado
   --------------------------------------------------------------- */
.hd-top, .hd-nav {
    background: var(--c-navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--pad);
}
.hd-top { height: 72px; border-bottom: 1px solid var(--c-navy-line); }
.hd-nav { height: 60px; }

.logo { display: flex; align-items: center; gap: 16px; }
.logo img { height: 46px; width: auto; filter: brightness(0) invert(1); }
.logo-tag {
    font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--c-accent);
    border-left: 2px solid #00a7a0; padding-left: 16px; line-height: 30px; white-space: nowrap;
}

.hd-util { display: flex; align-items: center; gap: 24px; font-size: 15px; }
.hd-util .item { position: relative; display: flex; align-items: center; gap: 8px; color: #fff; cursor: pointer; background: none; border: 0; font-size: 15px; }
.hd-util .item:hover { color: var(--c-accent); }
.hd-util .ico { width: 22px; height: 22px; }
.hd-util .count {
    position: absolute; top: -8px; left: 12px; min-width: 18px; height: 18px; padding: 0 4px;
    background: var(--c-accent); color: var(--c-navy); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.hd-divider { width: 2px; height: 30px; background: #00a7a0; }
.avatar {
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--c-accent); color: var(--c-accent); font-size: 13px; font-weight: 700; letter-spacing: 1px;
}
.user-item .lbl { display: flex; flex-direction: column; line-height: 1.15; }
.user-item .u-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-item small { font-size: 11px; color: #9a9dbd; letter-spacing: .5px; text-transform: uppercase; }

.hd-nav ul { list-style: none; display: flex; gap: 30px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.hd-nav ul::-webkit-scrollbar { display: none; }
.hd-nav li { display: flex; }
.hd-nav li a {
    display: flex; align-items: center; gap: 8px; font-size: 16px; color: #fff; white-space: nowrap;
    border-bottom: 2px solid transparent; border-top: 2px solid transparent; transition: color .15s, border-color .15s;
}
.hd-nav li a .ico { width: 18px; height: 18px; color: #9a9dbd; }
.hd-nav li a:hover, .hd-nav li a.active { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.hd-nav li a:hover .ico, .hd-nav li a.active .ico { color: var(--c-accent); }

.hd-sub {
    background: var(--c-gray-bar); min-height: 61px; padding: 0 var(--pad);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    position: sticky; top: 0; z-index: 50;
}
.hd-sub .prod { font-size: 15px; font-weight: 700; color: var(--c-text); white-space: nowrap; }
.hd-sub nav { display: flex; align-items: center; gap: 30px; overflow-x: auto; scrollbar-width: none; }
.hd-sub nav::-webkit-scrollbar { display: none; }
.hd-sub nav a {
    font-size: 14px; font-weight: 600; color: var(--c-text); display: flex; align-items: center; gap: 6px;
    padding: 4px 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.hd-sub nav a:hover, .hd-sub nav a.active { border-color: var(--c-text); }
.btn-try {
    background: var(--c-accent); color: var(--c-navy) !important; font-weight: 700 !important;
    padding: 11px 16px !important; border: 0 !important; transition: background .15s;
}
.btn-try:hover { background: var(--c-accent-d); }
.btn-try .ico { width: 16px; height: 16px; stroke-width: 2.2; }

.breadcrumb {
    background: #fff; padding: 0 var(--pad); height: 54px; display: flex; align-items: center; gap: 10px;
    font-size: 14px; color: #4a4e63; border-bottom: 1px solid var(--c-line-2); overflow-x: auto; white-space: nowrap;
}
.breadcrumb .ico { width: 20px; height: 20px; }
.breadcrumb .sep { width: 12px; height: 12px; stroke-width: 2.5; }
.breadcrumb a:hover { color: var(--c-text); text-decoration: underline; }
.breadcrumb .cur { color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------
   Contenido
   --------------------------------------------------------------- */
.main { flex: 1; width: 100%; }

.intro {
    padding: 28px var(--pad) 28px; color: var(--c-text);
    display: grid; grid-template-columns: 1fr; gap: 32px; align-items: end;
    border-bottom: 1px solid var(--c-line);
}
.intro.has-aside { grid-template-columns: minmax(0, 1fr) auto; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--c-accent-text); }
.intro h1 { font-size: 34px; font-weight: 700; margin: 6px 0 8px; line-height: 1.15; }
.intro .lead-text { font-size: 16px; line-height: 1.55; color: var(--c-body); max-width: 900px; }
.intro-aside { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 14px; font-size: 14px; color: var(--c-body); }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.meta-row .ico { width: 16px; height: 16px; color: var(--c-muted); }

/* Banda con imagen a todo el ancho */
.band {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 260px;
    background: var(--c-navy); color: #fff; border-top: 4px solid var(--c-accent);
}
.band-text { padding: 36px var(--pad); display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.band-text .eyebrow { color: var(--c-accent); }
.band-text h1, .band-text h2 { font-size: 32px; line-height: 1.15; }
.band-text p { color: #c9cbe0; max-width: 620px; }
.band-img { background-size: cover; background-position: center; min-height: 220px; }

/* Bloques de contenido (secciones a todo el ancho separadas por líneas) */
.block { padding: 28px var(--pad); border-bottom: 1px solid var(--c-line); }
.block:last-child { border-bottom: 0; }
.block.alt { background: var(--c-gray-bg); }
.block.tight { padding-top: 18px; padding-bottom: 18px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--c-line); }
.cols > .block { border-bottom: 0; }
.cols > .block + .block { border-left: 1px solid var(--c-line); }
.cols.c-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cols.c-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }

.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; scroll-margin-top: 80px; }
.sec-head h2 { font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; color: var(--c-text); }
.sec-head h2::after { content: ""; display: block; width: 28px; height: 2px; background: var(--c-accent); margin-top: 8px; }
.sec-head .note { font-size: 13px; color: var(--c-muted); margin-top: 6px; }
.sec-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
h3.sub { font-size: 15px; font-weight: 700; margin: 0 0 12px; }

.prose { max-width: 860px; color: var(--c-body); }
.prose p + p { margin-top: 10px; }
.muted { color: var(--c-muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

/* ---------------------------------------------------------------
   Indicadores (sin tarjetas: celdas con divisores)
   --------------------------------------------------------------- */
.kpis {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    border-bottom: 1px solid var(--c-line);
}
.kpi {
    padding: 22px var(--pad) 20px; display: flex; flex-direction: column; gap: 4px;
    border-right: 1px solid var(--c-line); transition: background .15s;
}
.kpi:last-child { border-right: 0; }
a.kpi:hover { background: var(--c-gray-bg); }
.kpi-v { font-size: 32px; font-weight: 700; line-height: 1.1; color: var(--c-text); }
.kpi-v.long { font-size: 24px; white-space: nowrap; }
.kpi-v.t-warn { color: var(--c-warn); }
.kpi-v.t-danger { color: var(--c-danger); }
.kpi-v.t-ok { color: var(--c-ok); }
.kpi-l { font-size: 13px; color: var(--c-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ---------------------------------------------------------------
   Tablas
   --------------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
    text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--c-muted);
    font-weight: 600; padding: 10px 12px; border-bottom: 2px solid var(--c-text); white-space: nowrap;
}
table.data td { padding: 12px; border-bottom: 1px solid var(--c-line-2); vertical-align: top; }
table.data tr:hover td { background: #fafafb; }
table.data td.actions { white-space: nowrap; text-align: right; }
table.data td.actions form { display: inline; }
table.data .t-title { font-weight: 600; color: var(--c-text); }
table.data .t-title a:hover { text-decoration: underline; }
table.data .t-sub { font-size: 13px; color: var(--c-muted); }
table.data th:first-child, table.data td:first-child { padding-left: 0; }
table.data th:last-child, table.data td:last-child { padding-right: 0; }

/* ---------------------------------------------------------------
   Etiquetas de estado
   --------------------------------------------------------------- */
.badge {
    display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    padding: 3px 8px; border-left: 3px solid; white-space: nowrap; vertical-align: middle; line-height: 1.4;
}
.badge-ok     { color: var(--c-ok);     background: var(--c-ok-bg); }
.badge-warn   { color: var(--c-warn);   background: var(--c-warn-bg); }
.badge-danger { color: var(--c-danger); background: var(--c-danger-bg); }
.badge-info   { color: var(--c-info);   background: var(--c-info-bg); }
.badge-muted  { color: var(--c-muted);  background: var(--c-gray-bar); }

/* ---------------------------------------------------------------
   Botones
   --------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 18px; font-size: 14px; font-weight: 600; cursor: pointer;
    border: 1px solid var(--c-navy); background: #fff; color: var(--c-navy); transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.btn .ico { width: 18px; height: 18px; }
.btn:hover { background: var(--c-navy); color: #fff; }
.btn-primary { background: var(--c-navy); color: #fff; }
.btn-primary:hover { background: var(--c-navy-2); }
.btn-accent { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-navy); font-weight: 700; }
.btn-accent:hover { background: var(--c-accent-d); border-color: var(--c-accent-d); color: var(--c-navy); }
.btn-ghost { border-color: var(--c-line); }
.btn-ghost:hover { border-color: var(--c-navy); }
.btn-danger { border-color: var(--c-danger); color: var(--c-danger); }
.btn-danger:hover { background: var(--c-danger); color: #fff; }
.btn-ok { border-color: var(--c-ok); background: var(--c-ok); color: #fff; }
.btn-ok:hover { background: #005c2e; border-color: #005c2e; color: #fff; }
.btn-on-dark { background: transparent; color: #fff; border-color: #3b3f6e; }
.btn-on-dark:hover { background: transparent; color: var(--c-accent); border-color: var(--c-accent); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-sm .ico { width: 15px; height: 15px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link { color: var(--c-info); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }
.link .ico { width: 14px; height: 14px; }

/* ---------------------------------------------------------------
   Formularios
   --------------------------------------------------------------- */
.form { display: grid; gap: 18px; max-width: 980px; }
.form.wide { max-width: none; }
.row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-size: 13px; font-weight: 600; color: var(--c-text); }
.field .hint { font-size: 12px; color: var(--c-muted); }
.req::after { content: " *"; color: var(--c-danger); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=tel], input[type=search], select, textarea {
    width: 100%; height: 44px; padding: 0 12px; border: 1px solid #b9bbc6; background: #fff; border-radius: 0;
    font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000028' stroke-width='2'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-navy); box-shadow: 0 0 0 2px var(--c-accent); }
input[type=file] { width: 100%; padding: 10px; border: 1px dashed #9a9dbd; background: var(--c-gray-bg); font-size: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--c-body); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--c-navy); flex: none; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Barra de filtros */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 18px var(--pad); background: var(--c-gray-bg); border-bottom: 1px solid var(--c-line); }
.filters .field { width: auto; flex: 1 1 180px; max-width: 280px; }
.filters .field.grow { max-width: 420px; flex-basis: 260px; }
.filters input, .filters select { height: 40px; font-size: 14px; }
.filters .btn { height: 40px; }

/* Desplegables de acciones dentro de bloques */
details.disclosure { border-top: 1px solid var(--c-line); }
details.disclosure > summary {
    list-style: none; cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 14px;
    display: flex; align-items: center; gap: 8px; color: var(--c-text);
}
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary .ico { width: 16px; height: 16px; transition: transform .15s; }
details.disclosure[open] > summary .ico.chev { transform: rotate(90deg); }
details.disclosure > .disc-body { padding: 4px 0 22px; }

/* ---------------------------------------------------------------
   Tablero de estado (fases)
   --------------------------------------------------------------- */
.stepper { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; counter-reset: st; }
.stepper li { display: flex; flex-direction: column; gap: 8px; }
.stepper .st-bar { height: 8px; background: var(--c-line); }
.stepper li.done .st-bar { background: var(--c-navy); }
.stepper li.current .st-bar { background: var(--c-accent); }
.stepper li.done.current .st-bar { background: var(--c-ok); }
.stepper .st-n { font-family: var(--mono); font-size: 12px; color: var(--c-muted); }
.stepper .st-l { font-size: 14px; font-weight: 600; color: var(--c-muted); line-height: 1.25; }
.stepper li.done .st-l, .stepper li.current .st-l { color: var(--c-text); }
.stepper li.current .st-n { color: var(--c-accent-text); font-weight: 700; }
.stepper.compact { gap: 2px; min-width: 140px; }
.stepper.compact .st-bar { height: 6px; }

/* Distribución por fase (admin) */
.dist { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--c-line); }
.dist > div { padding: 14px 16px 0 0; }
.dist .d-v { font-size: 26px; font-weight: 700; }
.dist .d-l { font-size: 13px; color: var(--c-muted); }
.dist .d-bar { height: 6px; background: var(--c-line); margin-top: 8px; }
.dist .d-bar span { display: block; height: 100%; background: var(--c-navy); }

/* ---------------------------------------------------------------
   Cronograma (Gantt simplificado)
   --------------------------------------------------------------- */
.gantt { width: 100%; overflow-x: auto; }
.gantt-in { min-width: 760px; position: relative; }
.g-row { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--c-line-2); min-height: 46px; }
.g-row.g-head { border-bottom: 2px solid var(--c-text); min-height: 34px; }
.g-label { padding: 8px 16px 8px 0; font-size: 14px; }
.g-label .t-sub { font-size: 12px; color: var(--c-muted); }
.g-track { position: relative; height: 46px; }
.g-head .g-track { height: 34px; }
.g-month { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--c-line); font-size: 11px; color: var(--c-muted); padding: 9px 0 0 6px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.g-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--c-line-2); }
.g-bar { position: absolute; top: 14px; height: 18px; background: var(--c-navy); min-width: 6px; }
.g-bar.st-completado { background: var(--c-ok); }
.g-bar.st-en-curso { background: var(--c-accent); }
.g-bar.st-cancelado { background: #b9bbc6; }
.g-bar.late { outline: 2px solid var(--c-danger); outline-offset: 1px; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--c-danger); z-index: 2; pointer-events: none; }
.g-today span { position: absolute; top: -20px; left: -18px; font-size: 10px; font-weight: 700; color: var(--c-danger); letter-spacing: .5px; }
.g-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: 13px; color: var(--c-muted); }
.g-legend i { display: inline-block; width: 14px; height: 10px; margin-right: 6px; vertical-align: middle; background: var(--c-navy); }
.g-legend i.c-ok { background: var(--c-ok); } .g-legend i.c-acc { background: var(--c-accent); } .g-legend i.c-late { background: #fff; outline: 2px solid var(--c-danger); }

/* ---------------------------------------------------------------
   Línea de tiempo
   --------------------------------------------------------------- */
.timeline { list-style: none; position: relative; }
.tl-day { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--c-muted); padding: 14px 0 8px; }
.tl-day:first-child { padding-top: 0; }
.tl-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; position: relative; padding-bottom: 18px; }
.tl-item time { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--c-text); padding-top: 1px; }
.tl-body { border-left: 2px solid var(--c-line); padding: 0 0 0 20px; position: relative; }
.tl-body::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; background: #fff; border: 2px solid var(--c-navy); }
.ev-llegada .tl-body::before, .ev-inicio_labores .tl-body::before { background: var(--c-accent); border-color: var(--c-accent-text); }
.ev-fin_labores .tl-body::before, .ev-cierre_servicio .tl-body::before { background: var(--c-ok); border-color: var(--c-ok); }
.ev-correccion .tl-body::before { background: var(--c-warn-bg); border-color: var(--c-warn); }
.ev-documento .tl-body::before { background: var(--c-navy); }
.tl-title { font-weight: 600; }
.tl-body p { color: var(--c-body); font-size: 14px; margin-top: 4px; }
.tl-meta { font-size: 12px; color: var(--c-muted); margin-top: 4px; }
.tl-meta a { color: var(--c-info); }

/* ---------------------------------------------------------------
   Conversación (consultas)
   --------------------------------------------------------------- */
.thread { list-style: none; display: grid; gap: 0; }
.msg { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--c-line-2); }
.msg .avatar { border-color: var(--c-navy); color: var(--c-navy); width: 40px; height: 40px; }
.msg.staff .avatar { background: var(--c-navy); color: var(--c-accent); }
.msg-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 14px; }
.msg-head strong { font-weight: 700; }
.msg-head span { color: var(--c-muted); font-size: 12px; }
.msg-body { margin-top: 6px; color: var(--c-body); white-space: pre-wrap; word-wrap: break-word; }

/* ---------------------------------------------------------------
   Listas simples
   --------------------------------------------------------------- */
.list { list-style: none; }
.list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--c-line-2); align-items: flex-start; }
.list li:last-child { border-bottom: 0; }
.list .l-main { min-width: 0; }
.list .l-title { font-weight: 600; }
.list .l-title a:hover { text-decoration: underline; }
.list .l-sub { font-size: 13px; color: var(--c-muted); }
.list li.unread .l-title::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--c-accent-d); margin-right: 8px; vertical-align: middle; }

dl.facts { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px 20px; font-size: 14px; }
dl.facts dt { color: var(--c-muted); }
dl.facts dd { color: var(--c-text); font-weight: 500; }

.empty { display: flex; align-items: center; gap: 14px; padding: 22px 0; color: var(--c-muted); font-size: 14px; }
.empty .ico { width: 28px; height: 28px; color: #9a9dbd; }

/* Catálogo de servicios (solicitud) */
.catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); border-top: 1px solid var(--c-line); }
.cat-group { padding: 18px 24px 18px 0; border-bottom: 1px solid var(--c-line); }
.cat-group h3 { font-size: 15px; margin-bottom: 4px; }
.cat-group p.cdesc { font-size: 13px; color: var(--c-muted); margin-bottom: 10px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; font-size: 14px; }
.opt input { margin-top: 3px; accent-color: var(--c-navy); width: 16px; height: 16px; flex: none; }
.opt:hover span { text-decoration: underline; }

/* Mapa */
.map-box { width: 100%; height: 460px; background: var(--c-gray-bar); border: 0; display: block; }
.map-box.sm { height: 320px; }

/* Visitas: acciones del técnico */
.visit-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.visit-actions form { display: inline-flex; }

/* Agenda */
.agenda-day { font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--c-muted); padding: 18px 0 6px; border-bottom: 2px solid var(--c-text); }
.agenda-item { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--c-line-2); align-items: center; }
.agenda-item .a-time { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.agenda-item .a-title { font-weight: 700; }
.agenda-item .a-sub { font-size: 13px; color: var(--c-muted); }

/* Paginación */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; font-size: 13px; color: var(--c-muted); }
.pager div { display: flex; gap: 8px; }

/* ---------------------------------------------------------------
   Acceso (login / registro): pantalla dividida a todo el alto
   --------------------------------------------------------------- */
body.auth { background: #fff; }
.auth-wrap { flex: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: calc(100vh - 72px); }
.auth-visual { position: relative; background-color: var(--c-navy); background-size: cover; background-position: center; display: flex; align-items: flex-end; }
.auth-visual::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 40, .62); }
.auth-visual .av-text { position: relative; padding: 48px var(--pad); color: #fff; max-width: 640px; border-left: 4px solid var(--c-accent); margin: 0 0 48px var(--pad); padding-left: 28px; }
.auth-visual .eyebrow { color: var(--c-accent); }
.auth-visual h1 { font-size: 36px; line-height: 1.15; margin: 8px 0 12px; }
.auth-visual p { color: #d9dbee; font-size: 16px; }
.auth-form { padding: 56px var(--pad); display: flex; flex-direction: column; justify-content: center; }
.auth-form .inner { width: 100%; max-width: 440px; }
.auth-form.wide .inner { max-width: 640px; }
.auth-form h2 { font-size: 28px; margin: 6px 0 8px; }
.auth-form .lead { color: var(--c-body); margin-bottom: 26px; }
.auth-form .alt { margin-top: 22px; font-size: 14px; color: var(--c-body); }
.auth-form .alt a { color: var(--c-info); font-weight: 600; }
.captcha-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; align-items: center; }
.captcha-row img { border: 1px solid var(--c-line); height: 56px; }
.alert { padding: 12px 14px; border-left: 4px solid var(--c-danger); background: var(--c-danger-bg); color: var(--c-danger); font-size: 14px; margin-bottom: 18px; }
.alert.info { border-color: var(--c-info); background: var(--c-info-bg); color: var(--c-info); }

/* ---------------------------------------------------------------
   Avisos (toasts)
   --------------------------------------------------------------- */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; width: 360px; max-width: calc(100vw - 32px); }
.toast {
    background: #fff; color: var(--c-text); border: 1px solid var(--c-line); border-left: 4px solid var(--c-info);
    box-shadow: 0 8px 24px rgba(0, 0, 40, .18); display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px;
    animation: toast-in .3s ease-out both;
}
.toast.out { animation: toast-out .25s ease-in both; }
.toast-ok { border-left-color: var(--c-ok); }
.toast-error { border-left-color: var(--c-danger); }
.toast-warn { border-left-color: var(--c-warn); }
.toast .t-body { flex: 1; display: flex; flex-direction: column; font-size: 14px; }
.toast .t-body strong { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.toast .t-close { background: none; border: 0; cursor: pointer; color: var(--c-muted); padding: 2px; }
.toast .t-close .ico { width: 16px; height: 16px; }
@keyframes toast-in { from { transform: translateX(110%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateX(110%); opacity: 0; } }

/* ---------------------------------------------------------------
   Pie de página
   --------------------------------------------------------------- */
.site-footer { background: var(--c-navy); color: #c9cbe0; }
.ft-grid { padding: 56px var(--pad) 40px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 48px; }
.ft-logo { height: 48px; width: auto; filter: brightness(0) invert(1); }
.site-footer h4 { color: #fff; font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 18px; font-weight: 700; }
.site-footer h4::after { content: ""; display: block; width: 28px; height: 2px; background: var(--c-accent); margin-top: 8px; }
.ft-brand p { font-size: 14px; line-height: 1.6; margin: 16px 0 0; max-width: 360px; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 11px; font-size: 14px; }
.site-footer ul a { transition: color .15s, padding-left .15s; }
.site-footer ul a:hover { color: var(--c-accent); padding-left: 4px; }
.ft-contact li { display: flex; gap: 10px; line-height: 1.45; align-items: flex-start; }
.ft-contact .ico { width: 18px; height: 18px; margin-top: 1px; color: var(--c-accent); }
.ft-bottom { border-top: 1px solid var(--c-navy-line); }
.ft-bottom-in { padding: 18px var(--pad); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #9a9dbd; }
.ft-legal { display: flex; gap: 22px; flex-wrap: wrap; }
.ft-legal a:hover { color: var(--c-accent); }

/* ---------------------------------------------------------------
   Responsivo
   --------------------------------------------------------------- */
@media (max-width: 1100px) {
    .hd-nav ul { gap: 22px; }
    .hd-nav li a { font-size: 15px; }
    .ft-grid { grid-template-columns: 1fr 1fr; }
    .cols, .cols.c-2-1, .cols.c-1-2 { grid-template-columns: minmax(0, 1fr); }
    .cols > .block + .block { border-left: 0; border-top: 1px solid var(--c-line); }
    .user-item .u-name { max-width: 140px; }
}

@media (max-width: 860px) {
    :root { --pad: 16px; }
    body { font-size: 15px; }
    .hd-top { height: 64px; }
    .logo img { height: 38px; }
    .logo-tag { display: none; }
    .hd-util { gap: 16px; }
    .hd-util .lbl { display: none; }
    .hd-divider { display: none; }
    .hd-nav { height: 52px; }
    .hd-nav ul { gap: 20px; }
    .hd-nav li a { font-size: 14px; }
    .hd-nav li a .ico { display: none; }
    .hd-sub { min-height: 52px; gap: 14px; }
    .hd-sub .prod { display: none; }
    .hd-sub nav { gap: 18px; width: 100%; }
    .btn-try { padding: 9px 12px !important; }
    .intro { padding: 20px var(--pad); }
    .intro.has-aside { grid-template-columns: minmax(0, 1fr); }
    .intro-aside { justify-content: flex-start; }
    .intro h1 { font-size: 26px; }
    .band { grid-template-columns: minmax(0, 1fr); }
    .band-text h1, .band-text h2 { font-size: 26px; }
    .band-img { min-height: 180px; order: -1; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi { border-bottom: 1px solid var(--c-line); padding: 16px var(--pad); }
    .kpi:nth-child(2n) { border-right: 0; }
    .kpi-v { font-size: 26px; }
    .stepper .st-l { font-size: 12px; }
    .stepper .st-n { display: none; }
    .dist { grid-template-columns: repeat(2, 1fr); }
    dl.facts { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
    dl.facts dd { margin-bottom: 10px; }
    .agenda-item { grid-template-columns: 70px minmax(0, 1fr); }
    .agenda-item .visit-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .filters .field { max-width: none; }
    .ft-grid { grid-template-columns: minmax(0, 1fr); padding: 40px var(--pad) 24px; gap: 32px; }
    .auth-wrap { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .auth-visual { min-height: 220px; }
    .auth-visual .av-text { margin: 0 0 24px var(--pad); padding: 0 var(--pad) 0 18px; }
    .auth-visual h1 { font-size: 24px; }
    .auth-visual p { display: none; }
    .auth-form { padding: 32px var(--pad) 48px; }
    .map-box { height: 340px; }

    /* Tablas apiladas en móvil */
    table.data.stack thead { display: none; }
    table.data.stack, table.data.stack tbody, table.data.stack tr, table.data.stack td { display: block; width: 100%; }
    table.data.stack tr { padding: 12px 0; border-bottom: 1px solid var(--c-line); }
    table.data.stack td { border: 0; padding: 3px 0; display: flex; gap: 12px; justify-content: space-between; text-align: right; }
    table.data.stack td::before { content: attr(data-label); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--c-muted); text-align: left; flex: none; }
    table.data.stack td.primary { display: block; text-align: left; padding-bottom: 6px; }
    table.data.stack td.primary::before { display: none; }
    table.data.stack td.actions { justify-content: flex-start; padding-top: 8px; }
    table.data.stack td.actions::before { display: none; }
    table.data.stack tr:hover td { background: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
    .site-header, .site-footer, .breadcrumb, #toasts, .filters, .sec-actions, form, .btn { display: none !important; }
    .block { padding: 12px 0; }
}
