/*
 * RSC SE Admin · mismo estilo que el RSC SE Portal (copiado de su layout
 * resources/views/components/layouts/app.blade.php, sin las insignias de Formación).
 * Tokens --skf-* de skf.css: guía de marca SKF (Brand Hub + Design System).
 * Si cambia el estilo del portal, copiarlo aquí también para que las dos webs sean iguales.
 */
:root {
            /* Nombres de siempre del portal, ahora con los tokens SKF (public/css/skf.css). */
            --bg-main: var(--skf-bg-color-base-secondary);
            --bg-white: var(--skf-bg-color-base-primary);
            --bg-tint: var(--skf-bg-color-base-tertiary);
            --text-dark: var(--skf-text-color-base-primary);
            --text-mid: var(--skf-text-color-base-secondary);
            --text-muted: var(--skf-text-color-base-tertiary);
            --blue: var(--skf-bg-color-brand-primary);
            --blue-dark: var(--skf-bg-color-brand-pressed);
            --blue-light: var(--skf-bg-color-info-primary);
            --navy: var(--skf-bg-color-brand-secondary);
            --navy-2: var(--skf-bg-color-brand-secondary);
            --navy-line: rgba(255,255,255,.2);
            --on-navy: #fff;
            --on-navy-muted: var(--skf-bg-color-info-primary);
            --red: var(--skf-bg-color-error-primary);
            --red-light: var(--skf-bg-color-error-light);
            --amber: var(--skf-text-color-warning-primary);
            --amber-sm: var(--skf-text-color-warning-primary);
            --amber-light: var(--skf-bg-color-warning-primary);
            --green: var(--skf-text-color-success-primary);
            --green-light: var(--skf-bg-color-success-primary);
            --line: var(--skf-border-color-base-subtle);
            --line-strong: var(--skf-border-color-base-secondary);
            --radius: var(--skf-radius-md);
            --font-brand: var(--skf-font-family-sans);
            --font-display: var(--skf-font-family-display);
            --font-ui: var(--skf-font-family-sans);
            /* Barra lateral: tema claro del Design System (fondo blanco, texto negro, activo en azul SKF). */
            --side-bg: var(--skf-bg-color-base-primary);
            --side-fg: var(--skf-text-color-base-primary);
            --side-muted: var(--skf-text-color-base-tertiary);
            --side-line: var(--skf-border-color-base-subtle);
            --side-hover: var(--skf-bg-color-base-hover);
        }

        /* El portal solo tiene tema claro: sin esto, Edge/Chrome con Windows en modo oscuro pintan
           las listas de los <select> en oscuro y las opciones (texto oscuro) no se ven. */
        :root { color-scheme: light; }
        * { box-sizing: border-box; }
        body { margin: 0; background: var(--bg-main); color: var(--text-dark); font-family: var(--font-ui); }
        a { color: inherit; text-decoration: none; }
        button, input, select, textarea { font: inherit; }

        .shell { min-height: 100vh; display: grid; grid-template-columns: 264px 1fr; }
        /* Plegado de la barra lateral para ganar espacio */
        .nav-collapse-btn { position: absolute; top: 20px; right: 14px; width: 28px; height: 28px; border: 0; border-radius: var(--radius); background: transparent; color: var(--side-fg); cursor: pointer; font-size: 16px; line-height: 1; display: grid; place-items: center; }
        .nav-collapse-btn:hover { background: var(--side-hover); }
        .nav-reopen { position: fixed; top: 14px; left: 14px; z-index: 60; display: none; width: 38px; height: 38px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: #fff; color: var(--text-dark); cursor: pointer; font-size: 17px; }
        body.nav-collapsed .shell { grid-template-columns: 1fr; }
        body.nav-collapsed .sidebar { display: none; }
        body.nav-collapsed .nav-reopen { display: grid; place-items: center; }
        body.nav-collapsed .content { padding-left: 62px; }
        @media print { .nav-reopen, .nav-collapse-btn { display: none !important; } }
        .sidebar { background: var(--side-bg); color: var(--side-fg); border-right: 1px solid var(--side-line); padding: 26px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
        .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
        .brand-mark { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; }
        .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
        .brand-title { display: block; font: 700 20px/1 var(--font-brand); color: var(--text-dark); }
        .brand-subtitle { display: block; color: var(--text-muted); font-size: 12px; margin-top: 4px; }
        .sidebar .brand-title { color: var(--side-fg); }
        .sidebar .brand-subtitle { color: var(--side-muted); }
        .nav { display: grid; gap: 2px; }
        .nav-section { display: grid; gap: 2px; }
        .nav-section + .nav-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--side-line); }
        .nav-label { color: var(--side-muted); font-size: 12px; font-weight: 500; padding: 0 12px 4px; display: flex; align-items: center; gap: 7px; }
        .nav a, .nav button { width: 100%; border: 0; background: transparent; border-radius: var(--radius); color: var(--side-fg); display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; text-align: left; font-size: 14px; font-weight: 400; }
        .nav a:hover, .nav button:hover { background: var(--side-hover); }
        .nav a.active { background: var(--blue); color: #fff; font-weight: 500; }
        .nav a.disabled { color: var(--side-muted); cursor: not-allowed; opacity: .72; }
        .nav a.disabled:hover { background: transparent; color: var(--side-muted); }
        .nav-badge-hot { background: var(--red) !important; color: #fff !important; border-radius: var(--skf-radius-round) !important; font-size: 11px !important; padding: 2px 7px !important; }
        .nav-badge { margin-left: auto; font-size: 11px; font-weight: 500; background: var(--bg-tint); color: var(--text-mid); border-radius: var(--skf-radius-sm); padding: 2px 6px; }
        .nav a.active .nav-badge { background: rgba(255,255,255,.2); color: #fff; }
        .nav-icon { width: 18px; height: 18px; flex: 0 0 auto; }
        .logout-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--side-line); }
        .logout-button { color: var(--side-muted) !important; }
        .logout-button:hover { color: var(--skf-text-color-error-primary) !important; background: var(--red-light) !important; }
        .global-language-form { display: grid; gap: 7px; margin: 0 0 22px; }
        .global-language-form label { color: var(--side-muted); font-size: 12px; font-weight: 500; }
        .global-language-form select { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 9px 11px; background: #fff; color: var(--side-fg); }
        .global-language-form select option { color: var(--text-dark); }
        .content { padding: 36px; }
        .topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
        /* Sentence case y texto negro (Brand Hub); pesos y alturas de línea de los tokens de titular del Design System. */
        .eyebrow { color: var(--text-mid); font-size: 13px; font-weight: 500; margin-bottom: 8px; }
        h1, h2, h3 { font-family: var(--font-brand); margin: 0; letter-spacing: 0; font-weight: 500; }
        h1 { font-size: clamp(30px, 4vw, 40px); line-height: 1.15; }
        h2 { font-size: 26px; line-height: 1.15; }
        h3 { font-size: 20px; line-height: 1.3; }
        /* SKF Display solo para el titular principal de portada (login, inicio). */
        .display-title { font-family: var(--font-display); font-weight: 700; line-height: 1.1; }
        .muted { color: var(--text-muted); }
        .grid { display: grid; gap: 18px; }
        .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
        .card { background: var(--bg-white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
        .stat { display: grid; gap: 8px; }
        /* Cifras destacadas en Display Light (Brand Hub, Typography: "data emphasis"). */
        .stat-value { font: 300 34px/1.1 var(--font-display); color: var(--text-dark); }
        .stat-label { color: var(--text-muted); font-size: 13px; }
        .tag { display: inline-flex; align-items: center; border-radius: var(--skf-radius-sm); padding: 3px 8px; font-size: 13px; font-weight: 500; }
        .tag-blue { background: var(--skf-bg-color-info-primary); color: var(--skf-text-color-info-primary); }
        .tag-green { background: var(--skf-bg-color-success-primary); color: var(--skf-text-color-success-primary); }
        .tag-amber { background: var(--skf-bg-color-warning-primary); color: var(--skf-text-color-warning-primary); }
        .tag-red { background: var(--skf-bg-color-error-light); color: var(--skf-text-color-error-primary); }
        .tag-teal { background: #D9F2F0; color: #276770; }
        .tag-slate { background: var(--bg-tint); color: var(--text-mid); }
        .btn { border: 1px solid transparent; border-radius: var(--radius); padding: 10px 16px; font-weight: 500; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
        .btn-primary { background: var(--blue); color: white; }
        .btn-primary:hover { background: var(--skf-bg-color-brand-hover); }
        .btn-secondary { background: #fff; color: var(--text-dark); border-color: var(--skf-border-color-base-primary); }
        .btn-secondary:hover { background: var(--skf-bg-color-base-hover); }
        .form { display: grid; gap: 14px; }
        .field { display: grid; gap: 7px; }
        .field label { color: var(--text-dark); font-size: 14px; font-weight: 500; }
        .field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; background: white; color: var(--text-dark); }
        .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
        .field select option, .field select optgroup { background: #fff; color: var(--text-dark); }
        .alert { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px; font-size: 14px; }
        .alert-ok { background: var(--green-light); color: var(--skf-text-color-success-primary); border: 1px solid var(--skf-text-color-success-primary); }
        .alert-error { background: var(--red-light); color: var(--skf-text-color-error-primary); border: 1px solid var(--skf-text-color-error-primary); }
        .progress { height: 8px; background: var(--bg-tint); border-radius: var(--skf-radius-round); overflow: hidden; }
        .progress span { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
        .module-card { border-top: 4px solid var(--blue); min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; }
        .module-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
        .auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 480px; }
        .auth-hero { padding: 54px; display: flex; flex-direction: column; justify-content: space-between; }
        .auth-panel { background: white; border-left: 1px solid var(--line); padding: 54px; display: flex; align-items: center; }
        .auth-panel > div { width: 100%; }
        .language-row { display: flex; gap: 8px; flex-wrap: wrap; }
        .language-row span { border: 1px solid var(--line-strong); background: white; color: var(--text-mid); border-radius: var(--skf-radius-sm); padding: 5px 9px; font-size: 13px; font-weight: 500; }
        .profile-hero { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
        .avatar { width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: white; font: 500 24px var(--font-brand); }
        .detail-list { display: grid; gap: 12px; }
        .detail-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
        .detail-row:last-child { border-bottom: 0; padding-bottom: 0; }
        .detail-label { color: var(--text-muted); font-size: 13px; font-weight: 500; }
        .toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-main); }
        .actions-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
        .btn-small { padding: 8px 10px; font-size: 12px; }
        .table-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
        .table-wrap { width: 100%; overflow-x: auto; }
        .data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
        .data-table th { color: var(--text-dark); font-size: 13px; font-weight: 500; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-strong); }
        .data-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-dark); }
        .data-table tr:last-child td { border-bottom: 0; }
        [readonly] { background: var(--bg-main) !important; color: var(--text-muted) !important; }
        @media (max-width: 900px) {
            .shell { grid-template-columns: 1fr; }
            .sidebar { position: static; height: auto; }
            .content { padding: 22px; }
            .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
            .profile-hero, .detail-row { grid-template-columns: 1fr; }
            .auth-page { grid-template-columns: 1fr; }
            .auth-panel { border-left: 0; border-top: 1px solid var(--line); }
        }

/* ---- Solo admin (mismos tokens) ---- */
.content { max-width: 1280px; }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
a.card { display: block; }
a.card:hover { border-color: var(--blue); }
a.card h3 { color: var(--blue); }
.card p { margin: 6px 0 0; }
.card-foot { margin-top: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.section-title { margin: 32px 0 14px; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.checks { display: grid; gap: 0; }
.checks label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checks label small { display: block; color: var(--text-mid); font-size: 13px; }
.hint { color: var(--text-mid); font-size: 13px; }
.empty { color: var(--text-mid); padding: 22px; background: var(--bg-white); border: 1px solid var(--line); border-radius: var(--radius); }
.alert ul { margin: 0; padding-left: 18px; }
input[type=checkbox] { accent-color: var(--blue); }
.auth-languages { display: flex; gap: 8px; flex-wrap: wrap; }
.auth-languages a { border: 1px solid var(--line-strong); background: #fff; color: var(--text-mid); border-radius: var(--skf-radius-sm); padding: 5px 9px; font-size: 13px; font-weight: 500; }
.auth-languages a.active { background: var(--blue); border-color: var(--blue); color: #fff; }
form.inline { display: inline; }
/* Informes de evento (mismos estilos que las pantallas de eventos del portal) */
.ev-pill { display: inline-block; min-width: 30px; text-align: center; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.ev-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.ev-filters label { display: grid; gap: 4px; font-size: 12px; font-weight: 500; color: var(--text-mid); }
.ev-filters select { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 10px; font: inherit; background: #fff; min-width: 160px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 10px 14px; color: var(--text-mid); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; }
.tabs a:hover { color: var(--text-dark); }
.tabs a.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 500; }
.codes { display: flex; gap: 6px; flex-wrap: wrap; }
.row-overdue td { background: var(--skf-bg-color-error-light); }
.data-table td small { color: var(--text-muted); }
/* Solicitudes extra: barra de proporción */
.bar-cell { display: flex; align-items: center; gap: 8px; min-width: 160px; }
.bar-track { flex: 1; height: 8px; background: var(--bg-tint); border-radius: var(--skf-radius-round); overflow: hidden; }
.bar-track span { display: block; height: 100%; background: var(--blue); }
.stat-unit { font-family: var(--font-ui); font-size: 16px; font-weight: 400; color: var(--text-mid); margin-left: 4px; }
/* Ficha de cliente: casillas agrupadas */
.pick-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; background: var(--bg-white); }
.pick-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--text-mid); }
.pick-head button { border: 0; background: none; color: var(--blue); font: inherit; font-size: 12px; cursor: pointer; padding: 0; }
.pick-list { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.pick-list label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: var(--skf-radius-sm); padding: 5px 10px; font-size: 13px; font-weight: 400; cursor: pointer; background: #fff; }
.pick-list label:has(input:checked) { border-color: var(--blue); background: var(--skf-bg-color-info-primary); color: var(--skf-text-color-info-primary); }
.pick-list label.missing { border-style: dashed; }
.field input[type=checkbox], .field input[type=radio] { width: auto; padding: 0; }
.pick-list label { white-space: nowrap; }
/* Interruptor sí/no (módulo activado para el cliente) */
.switch-form { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-mid); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 38px; height: 22px; border-radius: var(--skf-radius-round); background: var(--line-strong); transition: background .15s; flex: 0 0 auto; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--blue); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch input:checked ~ .switch-text { color: var(--blue); }
.clients-help { margin: -4px 0 14px; }
/* Lista de clientes de un módulo */
.add-client { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.add-client select { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 9px 11px; background: #fff; min-width: 220px; }
/* Elegir datos */
.pick-list label .count { color: var(--text-muted); font-size: 12px; }
.pick-list label .sug { font-size: 11px; color: var(--skf-text-color-success-primary); background: var(--skf-bg-color-success-primary); border-radius: var(--skf-radius-sm); padding: 0 5px; }
.pick-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.pick-tools input[type=search] { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 10px; min-width: 240px; }
.module-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.module-row:last-child { border-bottom: 0; }
.module-row small { display: block; color: var(--text-mid); }
/* Gráficos SVG (x-bar-chart): ejes y números #4C4C4C, paleta SKF nivel 1 */
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-num { font: 15px var(--font-ui); fill: #4C4C4C; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12px; color: var(--text-mid); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.chart-legend i.line { height: 3px; width: 14px; vertical-align: 2px; }
.chart-card h3 { margin-bottom: 10px; }
/* Herramientas de vista y versión para imprimir/PDF */
.view-tools { margin: -14px 0 18px; }
@media print {
  .sidebar, .nav-reopen, .nav-collapse-btn, .no-print, .tabs, .ev-filters, .alert-ok { display: none !important; }
  .shell { grid-template-columns: 1fr !important; }
  .content { padding: 0 !important; max-width: none; }
  body { background: #fff; }
  .card { break-inside: avoid; border-color: #ccc; }
  a { color: inherit !important; text-decoration: none; }
}
/* módulo ev: 5 cifras, filtros (búsqueda, estados), WO y línea de filtros al imprimir */
.ev-stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ev-stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ev-stats-5 { grid-template-columns: 1fr; } }
.ev-filters input[type=search] { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 10px; font: inherit; background: #fff; min-width: 240px; }
.ev-codes { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ev-codes legend { font-size: 12px; font-weight: 500; color: var(--text-mid); padding: 0; margin-bottom: 4px; width: 100%; }
.ev-filters .ev-codes label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.ev-wo { font-size: 12px; padding: 1px 6px; white-space: nowrap; }
a.ev-wo:hover { background: var(--skf-bg-color-base-hover); }
.ev-count { margin: -6px 0 12px; }
.ev-print-only { display: none; }
@media print {
  .ev-print-only { display: block !important; }
  .ev-count { display: none; }
}
/* módulo ev: ficha del evento con la estructura del PDF (salud del activo, histórico, fallos, acciones, evidencias) */
.ev-dot { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; flex: 0 0 auto; vertical-align: middle; border: 1px solid rgba(0, 0, 0, .08); }
.ev-dot-md { width: 22px; height: 22px; font-size: 12px; }
.ev-dot-lg { width: 44px; height: 44px; font-size: 22px; }
.ev-sheet { margin-bottom: 22px; }
.ev-sheet-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ev-sheet-head h2 { margin: 4px 0 0; }
.ev-sheet-status { display: flex; align-items: center; gap: 12px; text-align: left; }
.ev-sheet-status b { display: block; font-size: 20px; font-weight: 500; }
.ev-sheet-status span:not(.ev-dot) { color: var(--text-mid); font-size: 14px; }
.ev-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; margin: 16px 0 0; }
.ev-facts-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ev-facts dt { font-size: 13px; font-weight: 500; color: var(--text-dark); }
.ev-facts dd { margin: 3px 0 0; color: var(--text-mid); font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ev-closed { margin: 16px 0 0; padding: 10px 12px; background: var(--bg-tint); border-radius: var(--radius); font-size: 14px; }
.ev-h3 { font-size: 16px; margin: 22px 0 10px; }
.ev-history { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.ev-month { display: grid; justify-items: center; gap: 4px; padding: 6px 0; border-radius: var(--radius); text-align: center; }
.ev-month small { font-size: 11px; color: var(--text-muted); line-height: 1.2; }
.ev-month.carry .ev-dot { border-color: #CCCCCC; }
.ev-month.same { background: var(--skf-bg-color-info-primary); }
.ev-month.same .ev-dot { box-shadow: 0 0 0 2px #02115C; }
.ev-report { margin-bottom: 14px; padding: 0; }
.ev-report > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; flex-wrap: wrap; }
.ev-report > summary::-webkit-details-marker { display: none; }
.ev-report > summary::before { content: "▸"; color: var(--text-muted); margin-right: -4px; }
.ev-report[open] > summary::before { content: "▾"; }
.ev-report[open] > summary { border-bottom: 1px solid var(--line); }
.ev-report-title { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; }
.ev-report-title b { font-weight: 500; }
.ev-report-side { display: flex; align-items: center; gap: 10px; color: var(--text-mid); font-size: 14px; }
.ev-report > .ev-facts, .ev-report > .ev-summary, .ev-report > .ev-fault, .ev-report > .ev-block { margin-left: 22px; margin-right: 22px; }
.ev-report > :last-child { margin-bottom: 22px; }
.ev-k { display: block; font-size: 13px; font-weight: 500; color: var(--text-dark); margin-bottom: 4px; }
.ev-summary { margin-top: 16px; padding: 12px 14px; background: var(--bg-tint); border-radius: var(--radius); font-size: 14px; }
.ev-fault { border-top: 2px solid var(--line); margin-top: 18px; padding-top: 14px; }
.ev-fault-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ev-fault-head h3 { font-size: 18px; margin: 0; }
.ev-block { margin-top: 12px; font-size: 14px; color: var(--text-mid); }
.ev-block .ev-k { color: var(--text-dark); }
.ev-closing { border-top: 1px solid var(--line); padding-top: 12px; }
.ev-actions { font-size: 13px; margin-top: 2px; }
.ev-evidence { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; margin-top: 4px; }
.ev-evidence figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; background: #fff; }
.ev-evidence img { width: 100%; height: auto; display: block; border-radius: 2px; }
.ev-evidence figcaption { font-size: 12px; color: var(--text-mid); margin-top: 6px; }
.ev-help h3 { font-size: 16px; margin: 16px 0 4px; }
.ev-help h3:first-child { margin-top: 0; }
.ev-help p { font-size: 14px; color: var(--text-mid); margin: 0; }
.ev-help .module-row small { margin-top: 2px; }
@media (max-width: 900px) { .ev-facts, .ev-facts-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ev-history { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ev-facts, .ev-facts-4 { grid-template-columns: 1fr; } .ev-sheet-head { flex-direction: column; } }
@media print { .ev-report > summary::before { content: ""; } .ev-report { break-inside: auto; } .ev-evidence { grid-template-columns: repeat(2, 1fr); } }
/* web del cliente: ficha en admin (Generar web) y envoltorio del subdominio (altri.rscse.com) */
.alert-info { background: var(--skf-bg-color-info-primary); color: var(--skf-text-color-info-primary, var(--text-dark)); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; line-height: 1.8; }
.web-host { display: flex; align-items: center; gap: 6px; }
.web-host input { flex: 0 1 260px; }
.web-host span { color: var(--text-mid); }
.web-header { display: flex; align-items: center; gap: 24px; padding: 14px 36px; border-bottom: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.web-header .brand { margin-bottom: 0; }
.web-nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 auto; }
.web-nav a { padding: 8px 12px; border-radius: var(--radius); color: var(--text-dark); text-decoration: none; }
.web-nav a:hover { background: var(--skf-bg-color-base-hover); }
.web-nav a.active { background: var(--blue); color: #fff; font-weight: 500; }
.web-preview-note { padding: 6px 36px; font-size: 12px; color: var(--text-mid); background: var(--bg-tint); border-bottom: 1px solid var(--line); }
.web-content { margin: 0 auto; }
.web-footer { padding: 18px 36px 28px; font-size: 12px; color: var(--text-mid); max-width: 1280px; margin: 0 auto; }
.web-unavailable { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; padding: 24px; }
.web-unavailable .brand-mark { width: 56px; height: 56px; margin-bottom: 8px; }
@media (max-width: 640px) { .web-header, .web-preview-note, .web-footer { padding-left: 18px; padding-right: 18px; } }
@media print { .web-header, .web-preview-note, .web-footer { display: none !important; } }
/* ficha del cliente: tabla «Fábricas» */
.sites-table td { vertical-align: top; }
.sites-table .site-pick { display: flex; align-items: center; gap: 6px; padding: 2px 0; white-space: nowrap; cursor: pointer; }
.sites-table .site-pick input { width: auto; }
.sites-table select { min-width: 200px; }
/* módulo home: cifras del año y tarjetas por fábrica */
.home-year { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 8px; }
.home-year .stat { gap: 4px; }
.home-year .stat-value { font-variant-numeric: tabular-nums; }
.home-stat-name { font-size: 14px; font-weight: 500; color: var(--text-dark); margin-top: 4px; }
.home-sites { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.home-site { border-top: 4px solid var(--blue); padding: 18px 20px; display: flex; flex-direction: column; }
.home-site-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.home-site-head small { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.home-site-codes { display: flex; flex-wrap: wrap; gap: 4px; min-height: 22px; margin: 10px 0 4px; font-size: 13px; }
.home-site-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.home-site-table td { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text-mid); }
.home-site-table tr:last-child td { border-bottom: 0; }
.home-site-table td.num { text-align: right; color: var(--text-dark); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.home-site-foot { margin: auto 0 0 !important; padding-top: 10px; font-size: 12px; color: var(--text-muted); }
.home-detail-title { font-size: 13px; font-weight: 500; color: var(--text-mid); margin: 36px 0 10px; }
/* módulo vib: vibraciones offline (estados, tabla de colores área × mes, barras SVG, ficha de equipo) */
.vib-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.vib-head .vib-tabs { flex: 1 1 auto; margin-bottom: 0; }
.vib-head .vib-period { margin: 0 0 0 auto; }
.vib-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.vib-grid2 > .card { margin-bottom: 0; }
.vib-danger { color: var(--skf-text-color-error-primary); }
.vib-alert { color: var(--skf-text-color-warning-primary); }
.vib-lvl { display: inline-block; border-radius: 2px; padding: 1px 7px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.vib-lvl.l2 { background: var(--skf-bg-color-error-light); color: var(--skf-text-color-error-primary); }
.vib-lvl.l1 { background: var(--skf-bg-color-warning-primary); color: var(--skf-text-color-warning-primary); }
.vib-lvl.l0 { background: var(--skf-bg-color-success-primary); color: var(--skf-text-color-success-primary); }
.vib-lvl-big { font-size: 18px; padding: 3px 10px; }
.vib-stat-date { font-size: 24px; }
.vib-compact td, .vib-compact th { padding: 7px 9px; font-size: 13px; }
.vib-heat td.h, .vib-heat th.h { text-align: center; padding: 3px 2px !important; min-width: 44px; }
.vib-heat .c { display: inline-block; min-width: 40px; padding: 3px 0; border-radius: 3px; font-size: 11.5px; font-variant-numeric: tabular-nums; text-align: center; }
.vib-heat .b0 { background: var(--skf-bg-color-success-primary); color: var(--skf-text-color-success-primary); }
.vib-heat .b1 { background: #fbf3c4; color: #6b5e00; }
.vib-heat .b2 { background: #f8dc8a; color: #6b4a00; }
.vib-heat .b3 { background: #f4b183; color: #7a2e00; }
.vib-heat .b4 { background: #e8706a; color: #fff; }
.vib-heat .bn { color: var(--text-muted); }
.vib-src { font-size: 11px; color: var(--text-muted); border: 1px solid var(--line-strong); border-radius: 2px; padding: 0 4px; margin-left: 4px; white-space: nowrap; }
.vib-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-mid); margin-top: 8px; }
.vib-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; font-size: 14px; }
.vib-info .k { color: var(--text-muted); font-size: 12px; }
.vib-spark { display: block; }
.vib-bar-row { display: grid; grid-template-columns: minmax(110px, 34%) 1fr 74px; gap: 10px; align-items: center; padding: 3px 4px; border-radius: var(--radius); color: var(--text-dark); text-decoration: none; font-size: 13px; }
a.vib-bar-row:hover { background: var(--bg-tint); }
.vib-bar-label { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vib-bar-track { display: flex; height: 16px; background: var(--bg-tint); border-radius: 2px; overflow: hidden; }
.vib-bar-track i { display: block; height: 100%; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.vib-bar-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.vib-bar-num small { color: var(--text-muted); }
@media (max-width: 900px) { .vib-grid2 { grid-template-columns: 1fr; } }
@media print { .vib-heat .c, .vib-lvl { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* módulo dispersion (dispersión de activos) */
.disp-chart { position: relative; }
.disp-chart .disp-axis { font-size: 13px; }
.disp-chart .disp-q { font: 12px var(--font-ui); fill: var(--text-muted); paint-order: stroke; stroke: var(--bg-white); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.disp-points circle { fill-opacity: .72; stroke: var(--bg-white); stroke-width: .8; cursor: pointer; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.disp-points a:hover circle, .disp-points a:focus circle, .disp-points g:hover circle, .disp-points g:focus circle { fill-opacity: 1; stroke: var(--text-dark); stroke-width: 1.5; }
.disp-points g:focus, .disp-points a:focus { outline: none; }
.disp-tip { position: absolute; z-index: 5; max-width: 280px; background: var(--bg-white); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 4px 14px rgba(0, 0, 0, .12); padding: 8px 10px; font-size: 12.5px; line-height: 1.45; color: var(--text-mid); pointer-events: auto; }
.disp-tip b { display: block; color: var(--text-dark); font-weight: 500; font-size: 13.5px; }
.disp-tip a { display: inline-block; margin-top: 4px; color: var(--blue); font-weight: 500; }
.disp-hot { color: var(--blue); }
@media print { .disp-tip { display: none; } }

/* módulo mech (trabajos mecánicos): resultado, datos del trabajo y fotos */
.mech-result { display: inline-block; font-size: 12px; font-weight: 500; line-height: 1.4; padding: 1px 8px; border: 1px solid; border-radius: 999px; background: var(--bg-white); white-space: nowrap; vertical-align: middle; }
h1 .mech-result { font-size: 14px; }
.mech-ident { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 20px; margin: 0; }
.mech-ident dt { font-size: 12px; color: var(--text-mid); }
.mech-ident dd { margin: 2px 0 0; font-weight: 500; }
.mech-extra { margin-top: 12px; font-size: 13px; color: var(--text-mid); }
.mech-extra p { margin: 0 0 4px; }
.mech-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.mech-photos a { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-tint); aspect-ratio: 4 / 3; }
.mech-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media print { .mech-photos { grid-template-columns: repeat(3, 1fr); } .mech-photos a { break-inside: avoid; } }
/* módulo asset (ficha del activo: timeline de 12 meses y un bloque por módulo) */
.asset-components { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.asset-jump { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; font-size: 13px; }
.asset-jump a { color: var(--blue); }
.asset-block { margin-bottom: 18px; scroll-margin-top: 16px; }
.asset-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.asset-block-head a { color: var(--blue); font-size: 13px; }
.asset-block .stat { display: grid; gap: 2px; }
.asset-tl-lane { font-size: 13px; fill: #000; }
.asset-tl-month { font-size: 12px; }
.asset-tl-pt { cursor: pointer; outline: none; }
.asset-tl-pt:hover > *:first-child, .asset-tl-pt:focus-visible > *:first-child, .asset-tl-pt.on > *:first-child { stroke: #0000FE; stroke-width: 2.5; }
.asset-tl-detail { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); min-height: 54px; }
.asset-tl-text { font-size: 13px; }
.asset-tl-text b { font-weight: 500; }
.asset-tl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.asset-tl-links { display: flex; gap: 16px; margin-top: 4px; }
.asset-tl-links a { color: var(--blue); }
.asset-history { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 11px; color: var(--text-mid); }
.asset-history-tag { min-width: 150px; font-size: 12px; color: var(--text); font-weight: 500; }
.asset-history-m { display: inline-grid; justify-items: center; gap: 2px; min-width: 34px; }
.asset-history-m i { display: block; width: 24px; height: 12px; border-radius: 2px; }
.asset-scatter-label { font-size: 13px; fill: #0000FE; font-weight: 500; }
@media print { .asset-block { break-inside: avoid-page; } .asset-tl-detail { display: none; } }
