﻿/* ============================================================
   Layout.css — Estructura compartida por TODOS los tenants
   NO contiene colores ni variables de marca.
   Depende de las variables :root definidas en Site.css (tenant).
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Body base ─────────────────────────────────────────────── */
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Open Sans', sans-serif;
    font-size: .95rem;
    min-height: 100vh;
}

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: var(--navbar-h);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

/* Logo opcional cuando Styles/platformlogo.png existe (default o por tenant).
   Se muestra dentro de .navbar-brand (topbar, si algún tenant aún lo usa) o
   dentro de .sidebar-brand (nuevo bloque en la sidebar, rediseño 2026-07). */
.navbar-brand-logo {
    display: block;
    height: 36px;
    width: auto;
    max-height: 100%;
    object-fit: contain;
}

/* ── Sidebar-brand (rediseño 2026-07) ──────────────────────────
   Bloque de marca colocado arriba de la sidebar. Sustituye al
   antiguo navbar-brand horizontal. Los tenants (validia, fettaf…)
   sobreescriben padding / colores en su Site.css. */
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 20px 18px;
    text-decoration: none;
    color: inherit;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    /* El logo interno mantiene su altura (34px por defecto). */
}
.sidebar-brand .navbar-brand-logo {
    height: 34px;
    width: auto;
    max-height: none;
}
/* Ocultar la marca cuando la sidebar está colapsada — solo queda el icono. */
.sidebar-collapsed .sidebar-brand { padding-left: 12px; padding-right: 12px; }
.sidebar-collapsed .sidebar-brand .navbar-brand-logo { height: 26px; }

.navbar-user {
    color: var(--muted);
    font-size: .85rem;
}

.navbar a.logout {
    margin-left: 16px;
    color: var(--danger);
    font-size: .82rem;
    text-decoration: none;
}

    .navbar a.logout:hover {
        text-decoration: underline;
    }

.navbar-perfil {
    margin-left: 8px;
    color: var(--muted);
    font-size: .82rem;
    text-decoration: none;
    transition: color .2s;
}

    .navbar-perfil:hover {
        color: var(--accent);
    }

/* ── Botón colapsar sidebar ────────────────────────────────── */
.sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

    .sidebar-toggle:hover {
        background: var(--surface2);
        color: var(--text);
    }

/* ── Layout shell: sidebar + contenido ─────────────────────── */
.layout-shell {
    display: flex;
    min-height: calc(100vh - var(--navbar-h));
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    overflow: hidden;
    transition: width var(--sidebar-transition);
    display: flex;
    flex-direction: column;
    padding-top: 16px;
}

.sidebar-section {
    margin-bottom: 8px;
}

.sidebar-section-label {
    display: block;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 16px 6px;
    white-space: nowrap;
    overflow: hidden;
    opacity: 1;
    transition: opacity var(--sidebar-transition);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--muted);
    text-decoration: none;
    font-size: .875rem;
    transition: background .15s, color .15s;
    white-space: nowrap;
    overflow: hidden;
}

    .sidebar-link:hover {
        background: var(--surface2);
        color: var(--text);
    }

    .sidebar-link.active {
        background: var(--surface2);
        color: var(--accent);
    }

.sidebar-link-danger {
    color: var(--danger) !important;
}

    .sidebar-link-danger:hover {
        background: rgba(224,92,92,.1);
    }

.sidebar-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 24px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* SVG monocromático: hereda color de currentColor del texto del link */
.sidebar-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    display: block;
}

.sidebar-text {
    opacity: 1;
    transition: opacity var(--sidebar-transition);
}

/* Estado colapsado */
.sidebar-collapsed .sidebar {
    width: var(--sidebar-w-collapsed);
}

.sidebar-collapsed .sidebar-text,
.sidebar-collapsed .sidebar-section-label {
    opacity: 0;
    pointer-events: none;
}

/* ── Área de contenido principal ───────────────────────────── */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 36px 32px 60px;
    overflow-x: auto;
}

/* ── Cabecera de página ────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 12px;
    flex-wrap: wrap;
}

.page-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.9rem;
    color: var(--text);
    letter-spacing: -.5px;
}

/* ── Botones ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: .875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .2s, transform .1s;
}

    .btn:active {
        transform: scale(.97);
    }

    .btn:hover {
        opacity: .85;
    }

.btn-primary {
    background: var(--accent);
    color: var(--bg);
}

.btn-secondary {
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-danger {
    background: rgba(224,92,92,.15);
    color: var(--danger);
    border: 1px solid rgba(224,92,92,.35);
}

.btn-sm {
    padding: 5px 13px;
    font-size: .8rem;
}

/* Botón deshabilitado (visual): se sigue renderizando como <a> pero sin acción.
   El estado de bloqueo lo aplica el servidor (onclick='return false;'). */
.btn-disabled,
.btn[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
    text-decoration: none;
}

/* ── Buscador ──────────────────────────────────────────────── */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

    .search-bar input[type="text"],
    .search-bar select {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text);
        font-family: 'Open Sans', sans-serif;
        font-size: .9rem;
        padding: 9px 14px;
        outline: none;
        transition: border-color .2s;
        flex: 1;
        min-width: 180px;
    }

        .search-bar input:focus,
        .search-bar select:focus {
            border-color: var(--accent);
        }

/* ── Tabla ─────────────────────────────────────────────────── */
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead tr {
    background: var(--surface2);
}

th {
    text-align: left;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 13px 24px;
}

td {
    padding: 13px 24px;
    border-top: 1px solid var(--border);
}

tbody tr {
    transition: background .15s;
}

    tbody tr:hover {
        background: var(--surface2);
    }

/* El <asp:GridView> sin GridLines="None" emite border="1" rules="all" en el
   <table>: marco cuadrado oscuro + líneas verticales en TODAS las celdas,
   que además asoma por encima de las esquinas redondeadas del .table-wrap y
   parpadea al pasar el ratón (2026-10-01). Se anulan aquí para todos los
   grids y tenants; la línea fina entre filas la sigue poniendo td{border-top}.
   ⚠ Descendiente, NO hijo directo (>): el GridView envuelve el <table> en
   un <div> propio, así que `.table-wrap > table` no casa con nada. */
.table-wrap table { border: 0; }
.table-wrap table th,
.table-wrap table td {
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
}
/* La cabecera no tiene fila encima: su borde superior es el del rules="all"
   (oscuro) y se pinta pegado al borde redondeado del contenedor. */
.table-wrap table th { border-top: 0; }

/* ── Badge ─────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 500;
}

.badge-active {
    background: rgba(92,186,125,.15);
    color: var(--success);
}

.badge-inactive {
    background: rgba(107,114,128,.15);
    color: var(--muted);
}

/* ── Tarjeta de detalle ────────────────────────────────────── */
.detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 36px;
    max-width: 680px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 36px;
    margin-bottom: 32px;
}

.detail-field label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}

.detail-field .value {
    font-size: 1rem;
}

.detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Formulario ────────────────────────────────────────────── */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 36px;
    max-width: 820px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
    margin-bottom: 28px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .form-field.full {
        grid-column: 1 / -1;
    }

    .form-field label {
        font-size: .75rem;
        font-weight: 600;
        letter-spacing: .07em;
        text-transform: uppercase;
        color: var(--muted);
    }

    .form-field input[type="text"],
    .form-field input[type="email"],
    .form-field input[type="tel"],
    .form-field input[type="password"],
    .form-field input[type="date"],
    .form-field input[type="number"],
    .form-field input[type="search"],
    .form-field input[type="url"],
    .form-field select,
    .form-field textarea {
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text);
        font-family: 'Open Sans', sans-serif;
        font-size: .9rem;
        padding: 10px 14px;
        outline: none;
        transition: border-color .2s;
        resize: vertical;
    }

    /* Date input: armonizar el icono nativo del calendario con el color del texto */
    .form-field input[type="date"] {
        /* Ancho coherente con otros inputs; el contenido (dd/mm/aaaa) ocupa poco. */
        min-width: 180px;
    }

        .form-field input[type="date"]::-webkit-calendar-picker-indicator {
            cursor: pointer;
            opacity: .55;
            filter: invert(0.15);
            transition: opacity .15s;
        }

        .form-field input[type="date"]:hover::-webkit-calendar-picker-indicator,
        .form-field input[type="date"]:focus::-webkit-calendar-picker-indicator {
            opacity: 1;
        }

        .form-field input:focus,
        .form-field select:focus,
        .form-field textarea:focus {
            border-color: var(--accent);
        }

    .form-field .val-error {
        color: var(--danger);
        font-size: .8rem;
    }

.form-actions {
    display: flex;
    gap: 10px;
}

/* ── Ayuda contextual bajo un input ────────────────────────── */
.form-field .form-help {
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.35;
    margin-top: 2px;
}

/* ── Sección "Datos extra de la solicitud" (EditarPJ) ───────── */
.datos-extra-panel {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px 12px;
    background: var(--bg);
    margin-top: 4px;
}

.datos-extra-title {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 14px;
}

    /* Layout de una sola columna dentro del panel: los labels son largos
       y romperlos en 2 líneas descuadraría los inputs entre columnas. */
    .datos-extra-panel .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

/* ── Confirmar / eliminar ──────────────────────────────────── */
.confirm-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    max-width: 520px;
    margin: 0 auto;
}

.confirm-icon {
    font-size: 2.4rem;
    margin-bottom: 14px;
}

.confirm-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.confirm-desc {
    color: var(--muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

/* ── Campo fecha de validación en Aprobar.aspx ────────────────── */
.confirm-field {
    margin: 0 0 22px 0;
    text-align: left;
}
.confirm-field-label {
    display: block;
    color: var(--text);
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: 6px;
}
.confirm-field-input {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: .9rem;
    color: var(--text);
    background: var(--surface);
    width: 100%;
    max-width: 260px;
}
.confirm-field-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.confirm-field-hint {
    display: block;
    color: var(--muted);
    font-size: .75rem;
    margin-top: 6px;
}

/* ── Resumen identificativo de la solicitud en Aprobar.aspx ─────
   Solo usa tokens que ya declaran los 4 Site.css, así que la regla vive
   aquí y no hay que replicarla por tenant (ver memoria
   tenant-css-sustituye-no-suma). */
.confirm-resumen {
    text-align: left;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 0 0 22px 0;
}
.confirm-kv {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 18px;
    margin: 0;
}
.confirm-kv dt {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    align-self: baseline;
}
.confirm-kv dd {
    margin: 0;
    color: var(--text);
    font-size: .92rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}
@media (max-width: 560px) {
    .confirm-kv { grid-template-columns: 1fr; gap: 2px 0; }
    .confirm-kv dd { margin-bottom: 10px; }
}

/* ── Alertas ───────────────────────────────────────────────── */
.alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: .875rem;
}

.alert-error {
    background: rgba(224,92,92,.12);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-success {
    background: rgba(92,186,125,.12);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-info {
    background: rgba(80,130,200,.12);
    border: 1px solid var(--accent);
    color: var(--accent);
}

/* ── Perfil de usuario ─────────────────────────────────────── */
.perfil-section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: var(--muted);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.input-readonly {
    opacity: .55;
    cursor: not-allowed;
}

.password-strength-wrap {
    background: var(--border);
    border-radius: 4px;
    height: 5px;
    margin-top: 16px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width .3s, background .3s;
}

.password-strength-label {
    font-size: .78rem;
    margin-top: 5px;
    min-height: 1em;
}

/* Mi perfil — diseño 2026-10-05 (resumen lateral + bloques compactos).
   Solo tokens comunes a todos los temas (--surface, --border, --accent,
   --accent-soft, --muted, --danger, --radius, --text). */
.perfil-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
}
.perfil-resumen {
    flex: 1 1 260px;
    max-width: 300px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
}
.perfil-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.perfil-nombre {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text);
    text-align: center;
    word-break: break-word;
}
.perfil-email {
    font-size: .85rem;
    color: var(--muted);
    text-align: center;
    word-break: break-all;
}
.perfil-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}
.perfil-chip {
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
}
.perfil-chip-org {
    background: var(--surface2);
    color: var(--muted);
    border: 1px solid var(--border);
}
.perfil-kv {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    margin-top: 6px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
}
.perfil-kv-label {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.perfil-kv-valor {
    color: var(--text);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    word-break: break-all;
}
.btn.perfil-logout {
    width: 100%;
    justify-content: center;
    margin-top: 6px;
    background: var(--surface);
    border: 1px solid var(--danger);
    color: var(--danger);
    font-weight: 700;
}
.btn.perfil-logout:hover {
    background: var(--danger);
    color: #ffffff;
}
.perfil-reset-menu {
    margin: 0;
    padding: 4px 6px;
    border: 0;
    background: none;
    font: inherit;
    font-size: .78rem;
    color: var(--muted);
    text-decoration: underline;
    cursor: pointer;
}
.perfil-reset-menu:hover { color: var(--accent); }
.perfil-bloques {
    flex: 999 1 560px;
    min-width: 0;
    max-width: 820px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.perfil-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.perfil-card-titulo {
    margin: 0;
    font-size: 15px;
}
.perfil-grid {
    display: grid;
    gap: 14px 18px;
}
.perfil-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.perfil-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.perfil-acciones {
    display: flex;
    justify-content: flex-end;
}
.perfil-aviso { margin: 0; }
.perfil-pwd-pie {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.perfil-fuerza {
    flex: 1 1 160px;
    min-width: 120px;
}
.perfil-fuerza .password-strength-wrap { margin-top: 0; }
.perfil-fuerza .password-strength-label { margin: 4px 0 0; }
.perfil-hint {
    margin: 0;
    font-size: .8rem;
    color: var(--muted);
}
.perfil-firma {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}
.perfil-firma-texto {
    flex: 1 1 260px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.perfil-firma-marco {
    width: 200px;
    height: 60px;
    border: 1px dashed var(--border);
    border-radius: 6px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: .8rem;
    overflow: hidden;
}
.perfil-firma-botones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.perfil-firma-msg {
    flex-basis: 100%;
    margin: 0;
    font-size: .85rem;
}
@media (max-width: 900px) {
    .perfil-resumen { max-width: none; }
    .perfil-grid-2,
    .perfil-grid-3 { grid-template-columns: minmax(0, 1fr); }
}

/* ── Login ─────────────────────────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px 44px 44px;
    width: 100%;
    max-width: 420px;
    animation: fadeUp .45s ease both;
}

.login-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.7rem;
    color: var(--accent);
    letter-spacing: -.5px;
    margin-bottom: 6px;
}

.login-subtitle {
    color: var(--muted);
    font-size: .875rem;
    margin-bottom: 36px;
}

.login-field {
    margin-bottom: 20px;
}

.login-card label {
    display: block;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Open Sans', sans-serif;
    font-size: .95rem;
    padding: 11px 14px;
    transition: border-color .2s;
    outline: none;
}

.login-card input:focus {
    border-color: var(--accent);
}

.btn-login {
    width: 100%;
    background: var(--accent);
    color: var(--bg);
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: .95rem;
    border: none;
    border-radius: 8px;
    padding: 13px;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity .2s, transform .1s;
}

    .btn-login:hover {
        opacity: .88;
    }

    .btn-login:active {
        transform: scale(.98);
    }

.login-forgot {
    margin-top: 18px;
    text-align: center;
    font-size: .85rem;
}

    .login-forgot a {
        color: var(--accent);
        text-decoration: none;
    }

        .login-forgot a:hover {
            text-decoration: underline;
        }

/* ── Animaciones ───────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    animation: fadeUp .35s ease both;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* ── Sidebar móvil: panel deslizante sobre el contenido ── */
    .sidebar {
        position: fixed;
        top: var(--navbar-h);
        left: 0;
        height: calc(100vh - var(--navbar-h));
        width: var(--sidebar-w) !important;
        z-index: 300;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 4px 0 16px rgba(0,0,0,.2);
    }

        .sidebar.mobile-open {
            transform: translateX(0);
        }

    .sidebar-text,
    .sidebar-section-label {
        opacity: 1 !important;
        display: block !important;
    }

    /* Overlay oscuro al abrir el menú */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        top: var(--navbar-h);
        background: rgba(0,0,0,.4);
        z-index: 299;
    }

        .sidebar-overlay.active {
            display: block;
        }

    /* Botón hamburguesa — visible solo en móvil */
    .btn-hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: none;
        border: none;
        color: var(--text);
        font-size: 1.3rem;
        cursor: pointer;
        border-radius: 6px;
        transition: background .15s;
        margin-right: 8px;
    }

        .btn-hamburger:hover {
            background: var(--surface2);
        }

    /* El toggle del sidebar de escritorio se oculta en móvil */
    .sidebar-toggle {
        display: none;
    }

    .main-content {
        padding: 24px 16px 48px;
        margin-left: 0 !important;
    }

    .app-shell {
        grid-template-columns: 1fr !important;
    }

    .navbar {
        padding: 0 16px;
    }

    .form-grid, .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* El botón hamburguesa se oculta en escritorio */
.btn-hamburger {
    display: none;
}

/* ── Miga de pan (breadcrumb) ──────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    font-size: .82rem;
}

.breadcrumb-item {
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
}

a.breadcrumb-item:hover {
    color: var(--accent);
}

.breadcrumb-sep {
    color: var(--border);
    font-size: .9rem;
}

.breadcrumb-active {
    color: var(--text);
    font-weight: 500;
}

/* ── Detalle: shell con panel de previsualización ──────────── */
.detalle-shell {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.detalle-datos {
    flex: 1;
    min-width: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   File-drop, validación cliente y bloque "fichero guardado"
   Antes vivían inline en Editar.aspx / EditarPJ.aspx — extraídos aquí
   tras el refactor a UserControls para evitar duplicación.
   ═══════════════════════════════════════════════════════════════════════ */
.file-drop {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 6px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: var(--surface);
    display: flex;
    align-items: center;
    gap: 12px;
}
.file-drop:hover,
.file-drop.drag-over {
    border-color: var(--primary, #1a56db);
    background: color-mix(in srgb, var(--primary, #1a56db) 5%, transparent);
}
.file-drop input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.file-drop-icon { font-size: 1.4rem; flex-shrink: 0; }
.file-drop-text { font-size: .875rem; color: var(--text-muted, #666); }
.file-drop-name { font-weight: 600; color: var(--primary, #1a56db); font-size: .875rem; }

/* ── Grupo teléfono con prefijo internacional ────────────────────────── */
/* El selector de prefijo (dropdown) y el input del número se pintan como
   un único control agrupado; el prefijo ocupa lo justo para que el número
   quepa cómodamente. */
.phone-input-group {
    display: grid;
    grid-template-columns: minmax(180px, 220px) 1fr;
    gap: 8px;
}
.phone-input-group .phone-prefix { width: 100%; }
.phone-input-group .phone-body   { width: 100%; }

/* Hint bajo el dropzone: aviso "Máx. 10 MB" o tamaño real tras selección */
.file-drop-hint {
    display: block;
    margin-top: 4px;
    font-size: .78rem;
    color: var(--text-muted, #666);
}
.file-drop-hint-error {
    color: var(--danger, #c0392b);
    font-weight: 600;
}

/* ── Timeline de auditoría en Editar/EditarPJ ─────────────────────────── */
.audit-timeline { margin-top: 20px; }
.audit-timeline-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--text, #222);
}
.audit-empty {
    padding: 12px;
    color: var(--text-muted, #666);
    font-size: .875rem;
    background: var(--surface-alt, #f6f7f9);
    border-radius: 6px;
}
.audit-timeline-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.audit-timeline-table th {
    text-align: left;
    padding: 8px 10px;
    background: var(--surface-alt, #f6f7f9);
    color: var(--text-muted, #666);
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--border, #e5e7eb);
}
.audit-timeline-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border, #eef0f2);
    color: var(--text, #222);
    vertical-align: top;
}
.audit-timeline-table tr:last-child td { border-bottom: none; }
.audit-cell-date { white-space: nowrap; color: var(--text-muted, #666); font-variant-numeric: tabular-nums; }

/* Reparto de anchos de la tabla de auditoria (Editar / EditarPJ / ClienteEditar
   / UfixEditarComunidad — las 4 tienen las mismas 4 columnas).
   Las tres primeras se acotan para que "Accion", que es texto libre y la mas
   larga (nombres de fichero, descripciones de entidad), se quede con el resto
   del ancho en lugar de con las sobras.
   OJO: esta tabla NO debe ir envuelta en .table-wrap — esa clase fuerza
   `td:last-child { width:56px; text-align:right }` para la columna kebab y
   aplasta la columna Accion. */
.audit-timeline-table th { white-space: nowrap; }
.audit-timeline-table th:nth-child(1),
.audit-timeline-table td:nth-child(1) { width: 140px; }
.audit-timeline-table th:nth-child(2),
.audit-timeline-table td:nth-child(2) { width: 150px; }
.audit-timeline-table th:nth-child(3),
.audit-timeline-table td:nth-child(3) { width: 200px; }
.audit-timeline-table th:nth-child(4),
.audit-timeline-table td:nth-child(4) {
    width: auto;
    text-align: left;
    /* break-word y NO `anywhere`: `anywhere` reduce el min-content a un
       caracter y el reparto automatico volveria a estrangular la columna. */
    word-break: break-word;
}

/* ── Documentos adicionales (doc_extra_N) en Editar.aspx / EditarPJ.aspx ── */
.docs-extras-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.docs-extras-header > label {
    font-weight: 600;
    margin: 0;
}
.docs-extras-counter {
    font-size: .8rem;
    color: var(--text-muted, #666);
    background: var(--surface, #f3f4f6);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Fila del UC FileDropField en modo extra (ShowTypeSelector=true).
   El UC se reusa para persistidos (render server-side) y nuevos (template clonado),
   produciendo el mismo HTML — los selectores aquí cubren ambos casos. */
.doc-row { margin-top: 8px; }
.doc-row-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.doc-row-header .doc-type-label {
    font-size: .8rem;
    color: var(--text-muted, #666);
    font-weight: 600;
}
.doc-row-header .doc-extra-type {
    flex: 0 0 220px;
    min-width: 160px;
}
.doc-row-header .doc-extra-type[disabled] {
    background: var(--surface, #f3f4f6);
    color: var(--text-muted, #666);
    cursor: not-allowed;
}
.doc-row-header .doc-remove {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border, #d1d5db);
    background: transparent;
    color: var(--text-muted, #666);
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}
.doc-row-header .doc-remove:hover {
    background: color-mix(in srgb, #c0392b 10%, transparent);
    border-color: #c0392b;
    color: #c0392b;
}
.doc-extra-deleted { display: none !important; }

/* ── Modal árbol jerárquico de organizaciones (GestionOrganizaciones.aspx) ── */
.orgs-tree-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
}
.orgs-tree-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}
.orgs-tree-modal-card {
    position: relative;
    background: var(--surface, #fff);
    width: 90vw;
    max-width: 1100px;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.orgs-tree-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}
.orgs-tree-modal-head h2 { margin: 0; font-size: 1.1rem; }

.orgs-tree-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}
.orgs-tree-toolbar input[type=text] {
    flex: 1 1 auto;
    padding: 6px 10px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 5px;
}
.orgs-tree-count { color: var(--text-muted, #666); font-size: .85rem; margin-left: auto; }

.orgs-tree-body { padding: 14px 18px; overflow: auto; }
.orgs-tree-empty { color: var(--text-muted, #666); }

/* Nodo del árbol */
.org-node { margin: 4px 0; }
.org-node > summary {
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.org-node > summary::-webkit-details-marker { display: none; }
.org-node > summary::before {
    content: '▸';
    display: inline-block;
    width: 12px;
    color: var(--text-muted, #666);
    transition: transform .15s;
}
.org-node[open] > summary::before { transform: rotate(90deg); }
.org-node > summary:hover { background: color-mix(in srgb, var(--primary, #1a56db) 6%, transparent); }

.org-node-name { font-weight: 600; color: var(--text, #111); text-decoration: none; }
.org-node-name:hover { color: var(--primary, #1a56db); text-decoration: underline; }
.org-node-host { color: var(--text-muted, #666); font-size: .82rem; font-family: monospace; }
.org-node-credits { color: var(--text-muted, #666); font-size: .8rem; }

.org-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 9px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.org-badge-active   { background: #dcfce7; color: #15803d; }
.org-badge-inactive { background: #fee2e2; color: #b91c1c; }

.org-inactive > summary .org-node-name { color: var(--text-muted, #888); text-decoration: line-through; }

.org-node-children {
    border-left: 1px dashed var(--border, #e5e7eb);
    margin-left: 8px;
    padding-left: 14px;
    margin-top: 2px;
}

.org-node-hidden { display: none !important; }

/* Roots ajenas (no editables desde esta sesión). */
.org-locked > summary .org-node-name { color: var(--text-muted, #888); cursor: not-allowed; }
.org-locked > summary { background: color-mix(in srgb, #fcd34d 8%, transparent); }

.btn-disabled {
    opacity: .45;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Errores de validación JS por campo */
.js-val-error {
    display: none;
    color: #c0392b;
    font-size: .8rem;
    margin-top: 4px;
}
.field-invalid .js-val-error { display: block; }
.field-invalid input,
.field-invalid textarea,
.field-invalid select {
    border-color: #c0392b !important;
}
.field-invalid .file-drop {
    border-color: #c0392b !important;
}

/* Resumen de errores cliente — arriba del formulario */
#divResumenErrores {
    display: none;
    background: #fdf0ef;
    border-left: 4px solid #c0392b;
    color: #7b1a13;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: .9rem;
}

/* Bloque "fichero guardado" — acciones inline (Ver / Descargar / Previsualizar) */
.doc-actions-inline {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; margin-top: 8px;
    padding: 8px 12px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 6px; font-size: 0.875rem;
}
.doc-actions-inline .doc-icon { font-size: 1.1rem; }

/* Placeholder readonly cuando no hay documento adjunto */
.doc-actions-inline.doc-empty {
    color: var(--text-muted, #888);
    font-style: italic;
}
.doc-empty-text { font-size: 0.875rem; }

/* Shell de la página Editar / EditarPJ */
.editar-shell { display: flex; gap: 24px; align-items: flex-start; }
.editar-form  { flex: 1; min-width: 0; }

/* Panel de previsualización — oculto por defecto */
.detalle-preview,
.editar-preview {
    width: 0;
    overflow: hidden;
    transition: width .3s ease, flex .3s ease;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    align-self: flex-start;
}

/* Cuando se abre el previsualizador */
.detalle-shell.preview-open .detalle-preview,
.editar-shell.preview-open  .editar-preview {
    flex: 1;
    min-width: 320px;
    width: 0; /* anulado por flex:1 */
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.preview-title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
}

.preview-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background .15s;
}

    .preview-close:hover {
        background: var(--surface2);
        color: var(--text);
    }

.preview-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.preview-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: .85rem;
    padding: 24px;
    text-align: center;
}

.preview-frame {
    flex: 1;
    width: 100%;
    border: none;
    min-height: 0;
    height: 100%;
}

/* Imagen en el previsualizador */
.preview-img-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: auto;
    background: var(--surface2);
    padding: 8px;
}

/* Estado ajustado (inicial): encaja en el panel */
.preview-img-wrap img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Estado expandido: tamaño real, el panel tiene scroll si es necesario */
.preview-img-wrap img.expanded {
    max-width: none;
    width: auto;
    height: auto;
}

/* Barra de herramientas imagen */
.preview-img-toolbar {
    display: flex;
    gap: 6px;
    padding: 6px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--surface);
}

#previewFrame {
    flex: 1;
    width: 100%;
    border: none;
    min-height: 500px;
}

/* ── Lista de documentos ───────────────────────────────────── */
.doc-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.doc-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.doc-label {
    flex: 1;
    font-size: .9rem;
    color: var(--text);
    min-width: 120px;
}

.doc-actions {
    display: flex;
    gap: 8px;
}

/* ── Responsive detalle + editar ───────────────────────────── */
@media (max-width: 900px) {
    .detalle-shell,
    .editar-shell {
        flex-direction: column;
    }

    .detalle-shell.preview-open .detalle-preview,
    .editar-shell.preview-open  .editar-preview {
        width: 100%;
        flex: none;
        position: static;
        max-height: 60vh;
    }
}

/* ── Dashboard ─────────────────────────────────────────────── */
.dash-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Open Sans', sans-serif;
    font-size: .875rem;
    padding: 8px 12px;
    outline: none;
    transition: border-color .2s;
}

    .dash-select:focus {
        border-color: var(--accent);
    }

.dash-periodo {
    color: var(--muted);
    font-size: .875rem;
    margin-bottom: 24px;
}

/* KPI cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-top: 4px solid var(--border);
    transition: transform .15s, box-shadow .15s;
}

    .kpi-card:hover {
        transform: translateY(-2px);
    }

.kpi-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.kpi-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kpi-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.kpi-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

/* Colores por estado (banda superior — el Site.css del tema puede sobreescribir) */
.kpi-total {
    border-top-color: var(--accent);
}

.kpi-solicitud {
    border-top-color: #e0c93a;
}

.kpi-pendienteca {
    border-top-color: #f6a435;
}

.kpi-aprobado {
    border-top-color: #63b3ed;
}

.kpi-emitido {
    border-top-color: var(--success);
}

.kpi-rechazado {
    border-top-color: var(--danger);
}

.kpi-revocado {
    border-top-color: var(--muted);
}

.kpi-total .kpi-value {
    color: var(--accent);
}

.kpi-solicitud .kpi-value {
    color: #e0c93a;
}

.kpi-pendienteca .kpi-value {
    color: #f6a435;
}

.kpi-aprobado .kpi-value {
    color: #63b3ed;
}

.kpi-emitido .kpi-value {
    color: var(--success);
}

.kpi-rechazado .kpi-value {
    color: var(--danger);
}

.kpi-revocado .kpi-value {
    color: var(--muted);
}

/* ── KPI cards y números del bloque "Notificaciones gestionadas" ──────
   OJO: estas reglas viven AQUÍ y no en Site.css a propósito.
   Site.css se sirve POR TENANT (Styles/{tenant}/Site.css sustituye al
   default, no lo complementa — ver BasePage.InyectarCss), así que una regla
   escrita solo en el Site.css por defecto NO llega a validia/fettaf/ivsign.
   Layout.css es único para todos los tenants: aquí van las REGLAS, y en
   cada Site.css solo los TOKENS --nt-* (alias de sus propios --st-*), que
   es lo que cada tenant puede querer re-tintar.
   Ver _docs/Dashboard_Modulos_Design.md */
.kpi-recibidas   { border-top-color: var(--nt-volumen); }
.kpi-recibidas   .kpi-value { color: var(--nt-volumen); }
.kpi-recibidas   .kpi-badge { background: var(--nt-tint-volumen); color: var(--nt-volumen); }

.kpi-clientes    { border-top-color: var(--text); }
.kpi-clientes    .kpi-value { color: var(--text); }
.kpi-clientes    .kpi-badge { background: rgba(22,57,58,.10); color: var(--text); }

.kpi-organismos  { border-top-color: var(--text); }
.kpi-organismos  .kpi-value { color: var(--text); }
.kpi-organismos  .kpi-badge { background: rgba(22,57,58,.10); color: var(--text); }

.kpi-avisadas    { border-top-color: var(--nt-avisada); }
.kpi-avisadas    .kpi-value { color: var(--nt-avisada); }
.kpi-avisadas    .kpi-badge { background: var(--nt-tint-avisada); color: var(--nt-avisada); }

.kpi-fallidas    { border-top-color: var(--nt-fallida); }
.kpi-fallidas    .kpi-value { color: var(--nt-fallida); }
.kpi-fallidas    .kpi-badge { background: var(--nt-tint-fallida); color: var(--nt-fallida); }

.kpi-pendientes  { border-top-color: var(--nt-pendiente); }
.kpi-pendientes  .kpi-value { color: var(--nt-pendiente-ink); }
.kpi-pendientes  .kpi-badge { background: var(--nt-tint-pendiente); color: var(--nt-pendiente-ink); }

.kpi-sinaviso    { border-top-color: var(--nt-sinaviso); }
.kpi-sinaviso    .kpi-value { color: var(--nt-sinaviso); }
.kpi-sinaviso    .kpi-badge { background: var(--nt-tint-sinaviso); color: var(--nt-sinaviso); }

/* ── KPI cards y números del bloque "Firmas centralizadas" (2026-09-22) ──
   Mismo criterio que el bloque de notificaciones: las REGLAS aquí (común a
   todos los tenants) y solo tokens que ya declaran todos los Site.css
   (--st-*), así que no hace falta tocar ningún tenant. */
.kpi-firmas-total  { border-top-color: var(--st-solicitud); }
.kpi-firmas-total  .kpi-value { color: var(--st-solicitud); }
.kpi-firmas-total  .kpi-badge { background: var(--st-tint-solicitud); color: var(--st-solicitud); }

.kpi-firmas-pdf    { border-top-color: var(--st-emitido); }
.kpi-firmas-pdf    .kpi-value { color: var(--st-emitido); }
.kpi-firmas-pdf    .kpi-badge { background: var(--st-tint-emitido); color: var(--st-emitido); }

.kpi-firmas-driver { border-top-color: var(--st-aprobado); }
.kpi-firmas-driver .kpi-value { color: var(--st-aprobado); }
.kpi-firmas-driver .kpi-badge { background: var(--st-tint-aprobado); color: var(--st-aprobado); }

.dash-num-firmas-pdf    { color: var(--st-emitido); }
.dash-num-firmas-driver { color: var(--st-aprobado); }

.dash-num-avisadas   { color: var(--nt-avisada); }
.dash-num-fallidas   { color: var(--nt-fallida); }
.dash-num-pendientes { color: var(--nt-pendiente-ink); }
.dash-num-sinaviso   { color: var(--nt-sinaviso); }

/* Títulos de sección */
.dash-section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: var(--muted);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* Números coloreados en la tabla */
.dash-num {
    font-weight: 600;
}

.dash-num-solicitud {
    color: #e0c93a;
}

.dash-num-pendienteca {
    color: #f6a435;
}

.dash-num-aprobado {
    color: #63b3ed;
}

.dash-num-emitido {
    color: var(--success);
}

.dash-num-rechazado {
    color: var(--danger);
}

.dash-num-revocado {
    color: var(--muted);
}

/* Barra de tasa de éxito */
.dash-bar-wrap {
    position: relative;
    background: var(--surface2);
    border-radius: 4px;
    height: 18px;
    min-width: 80px;
    overflow: hidden;
}

.dash-bar-fill {
    height: 100%;
    background: var(--success);
    opacity: .75;
    border-radius: 4px;
    transition: width .4s ease;
}

.dash-bar-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text);
}

/* Gráfico */
.dash-chart-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 36px;
}

/* ── Notificaciones DEHú ───────────────────────────────────── */
.notif-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.notif-tab {
    background: none;
    border: none;
    padding: 10px 20px;
    font-family: 'Open Sans', sans-serif;
    font-size: .9rem;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .notif-tab:hover {
        color: var(--text);
    }

    .notif-tab.active {
        color: var(--accent);
        border-bottom-color: var(--accent);
        font-weight: 500;
    }

.notif-badge {
    background: var(--accent);
    color: var(--bg);
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.notif-badge-muted {
    background: var(--surface2);
    color: var(--muted);
}

/* Paginación */
.notif-paginacion {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    justify-content: flex-end;
}

.notif-paginfo {
    font-size: .85rem;
    color: var(--muted);
}

/* Tarjeta resultado de acceso */
.notif-acceso-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-top: 24px;
    max-width: 680px;
}

/* ── Grid Notificaciones · columna Descargas ─────────────────
   Los botones apilados verticalmente con nowrap para que el texto
   no se rompa cuando la columna es estrecha. Añadido 2026-07-21. */
.notif-descargas-cell {
    white-space: nowrap;
    vertical-align: middle;
    min-width: 160px;
}

.notif-descargas {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 4px 0;
}

.notif-descargas .btn {
    white-space: nowrap;
    text-align: center;
    min-width: 130px;
}

/* Badges de tipo */
.badge-notif {
    background: rgba(232,201,122,.15);
    color: #e8c97a;
}

.badge-comun {
    background: rgba(92,186,125,.15);
    color: var(--success);
}

/* ── Página de error ───────────────────────────────────────── */
.error-page-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
    max-width: 560px;
    margin: 0 auto;
}

.error-page-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    line-height: 1;
}

.error-page-code {
    font-family: 'Montserrat', sans-serif;
    font-size: 5rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}

.error-page-titulo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    color: var(--text);
    margin-bottom: 16px;
}

.error-page-desc {
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.error-page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 32px;
}

.error-page-ref {
    font-size: .78rem;
    color: var(--muted);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 16px;
}

/* ── Dropdown de perfiles de certificado ───────────────────── */
.profiles-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    min-width: 220px;
    z-index: 200;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: fadeUp .15s ease both;
}

    .profiles-dropdown.open {
        display: flex;
    }

.profiles-dropdown-item {
    display: block;
    padding: 11px 18px;
    color: var(--text);
    text-decoration: none;
    font-size: .9rem;
    transition: background .12s;
    border-bottom: 1px solid var(--border);
}

    .profiles-dropdown-item:last-child {
        border-bottom: none;
    }

    .profiles-dropdown-item:hover {
        background: var(--surface2);
        color: var(--accent);
    }

/* ── Formulario una columna ────────────────────────────────── */
.form-grid-1col {
    grid-template-columns: 1fr !important;
    max-width: 560px;
}

/* ── CKC — badges de estado de certificado ─────────────────── */
.badge-muted {
    background: var(--surface2);
    color: var(--muted);
}

.badge-danger {
    background: rgba(201,92,92,.15);
    color: var(--danger);
}

.badge-warn {
    background: rgba(224,201,58,.15);
    color: #e0c93a;
}

.text-mono {
    font-family: monospace;
    font-size: .78rem;
}

.text-sm {
    font-size: .8rem;
}

/* ════════════════════════════════════════════════════════════════
   Etiquetas (labels) — componente para Editar.aspx / Detalle.aspx
   ════════════════════════════════════════════════════════════════ */
.labels-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    margin: 0 0 16px 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    position: relative;
}
.labels-row-title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted, #666);
    margin-right: 4px;
}
.labels-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}
.labels-empty {
    font-size: .8rem;
    color: var(--text-muted, #888);
    font-style: italic;
}
.labels-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px 3px 10px;
    border-radius: 12px;
    font-size: .8rem;
    line-height: 1.2;
    font-weight: 500;
    user-select: none;
}
.labels-chip-x {
    background: rgba(0,0,0,.18);
    color: inherit;
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: .7rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.labels-chip-x:hover { background: rgba(0,0,0,.32); }
.labels-add-btn {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text, #333);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: .8rem;
    cursor: pointer;
    white-space: nowrap;
}
.labels-add-btn:hover {
    border-color: var(--primary, #1a73e8);
    color: var(--primary, #1a73e8);
}

/* ── Picker desplegable ── */
.labels-picker {
    position: absolute;
    top: calc(100% + 4px);
    left: 14px;
    min-width: 260px;
    max-width: 340px;
    background: var(--surface, #fff);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    z-index: 30;
    padding: 8px;
}
.labels-search {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: .85rem;
    margin-bottom: 6px;
    box-sizing: border-box;
}
.labels-options {
    max-height: 220px;
    overflow-y: auto;
    margin: 0 -4px;
}
.labels-options-empty {
    padding: 12px 8px;
    font-size: .8rem;
    color: var(--text-muted, #888);
    text-align: center;
}
.labels-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: .85rem;
}
.labels-opt:hover { background: color-mix(in srgb, var(--primary, #1a73e8) 8%, transparent); }
.labels-opt input[type=checkbox] { margin: 0; flex-shrink: 0; cursor: pointer; }
.labels-opt-dot {
    width: 12px; height: 12px; border-radius: 50%;
    flex-shrink: 0;
}
.labels-opt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.labels-opt-sys {
    font-size: .65rem;
    background: var(--surface2, #eee);
    color: var(--text-muted, #777);
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ── Crear nueva etiqueta ── */
.labels-new-row {
    border-top: 1px solid var(--border);
    margin-top: 6px;
    padding-top: 6px;
}
.labels-new-btn {
    display: block;
    text-align: left;
    padding: 6px 8px;
    color: var(--primary, #1a73e8);
    font-size: .85rem;
    text-decoration: none;
    border-radius: 4px;
}
.labels-new-btn:hover { background: color-mix(in srgb, var(--primary, #1a73e8) 8%, transparent); text-decoration: none; }

.labels-new-form {
    flex-basis: 100%;
    margin-top: 8px;
    padding: 12px;
    background: var(--surface2, #f8f8f8);
    border: 1px solid var(--border);
    border-radius: 6px;
}
.labels-new-form-title {
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.labels-new-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.labels-new-input {
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: .85rem;
    width: 100%;
    box-sizing: border-box;
}
.labels-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.labels-palette-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: transform .1s, border-color .1s;
}
.labels-palette-swatch:hover { transform: scale(1.15); }
.labels-palette-swatch.selected {
    border-color: var(--text, #333);
    box-shadow: 0 0 0 2px var(--surface, #fff) inset;
}
.labels-new-error {
    margin-top: 8px;
    padding: 6px 10px;
    background: #fdf0ef;
    border-left: 3px solid #c0392b;
    color: #7b1a13;
    font-size: .8rem;
    border-radius: 3px;
}
.labels-new-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* ────────────────────────────────────────────────────────────────
   Etiquetas — variantes del Commit 6 (grid + readonly + filtro)
   ──────────────────────────────────────────────────────────────── */

/* Chip readonly (Detalle.aspx): sin botón ✕, padding simétrico */
.labels-chip-readonly {
    padding: 3px 10px;
}

/* Row readonly: ligeramente menos prominente */
.labels-row-readonly {
    background: var(--surface);
}
/* En modo readonly, ocultamos los controles de edición del UC EtiquetasPanel
   (botón "+ Añadir", ✕ de cada chip y el picker entero). El JS sigue cargado
   pero los controles desaparecen del DOM visible. */
.labels-row-readonly .labels-add-btn,
.labels-row-readonly .labels-chip-x,
.labels-row-readonly .labels-picker {
    display: none !important;
}

/* Chip en el grid: más compacto */
.labels-chip-grid {
    display: inline-flex;
    align-items: flex-start;    /* arriba cuando el texto hace wrap a varias líneas */
    padding: 2px 8px;
    border-radius: 10px;
    font-size: .72rem;
    line-height: 1.2;
    font-weight: 500;
    margin-right: 4px;
    margin-bottom: 3px;
    /* Ancho máximo ABSOLUTO (no porcentaje) — evita que las etiquetas
       largas ensanchen la columna del grid con `table-layout: auto`.
       El texto se rompe dentro del chip en varias líneas si hace falta. */
    max-width: 180px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Filtro del grid — botón + dropdown reutilizando .labels-picker */
.grid-labels-filter {
    position: relative;
    display: inline-block;
}
.grid-labels-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text, #333);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: .85rem;
    white-space: nowrap;
}
.grid-labels-btn:hover {
    border-color: var(--primary, #1a73e8);
}
.grid-labels-btn-active {
    background: color-mix(in srgb, var(--primary, #1a73e8) 12%, transparent);
    border-color: var(--primary, #1a73e8);
    color: var(--primary, #1a73e8);
    font-weight: 600;
}
.grid-labels-picker {
    top: calc(100% + 6px);
    left: 0;
    min-width: 280px;
}
.grid-labels-actions {
    border-top: 1px solid var(--border);
    margin-top: 6px;
    padding-top: 6px;
    text-align: right;
}
.grid-labels-actions a {
    font-size: .78rem;
    color: var(--text-muted, #777);
    text-decoration: none;
}
.grid-labels-actions a:hover {
    color: var(--primary, #1a73e8);
    text-decoration: underline;
}

/* ============================================================================
   Comentarios en solicitudes (Editar.aspx + Detalle.aspx)
   ----------------------------------------------------------------------------
   Sección al pie del form-card con listado cronológico y composer.
   Cada comentario muestra: avatar con iniciales, nombre, org, hora relativa,
   chip de visibilidad si es privado, y cuerpo en pre-wrap.
   ============================================================================ */

.comments-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 20px;
    margin-top: 20px;
}
.comments-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.comments-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
}
.comments-count {
    font-size: .8rem;
    color: var(--text-muted, #777);
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 999px;
}
.comments-empty {
    text-align: center;
    color: var(--text-muted, #777);
    font-size: .9rem;
    padding: 16px 0;
}

/* ── Lista de comentarios ─────────────────────────────────────────────────── */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    border-left: 3px solid var(--border);
}
.comment-item--private {
    background: color-mix(in srgb, #f9ab00 6%, var(--surface2));
    border-left-color: #f9ab00;
}
.comment-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: .85rem;
    color: #fff;
    background: var(--primary, #1a73e8);
    text-transform: uppercase;
    user-select: none;
}
.comment-body-wrap {
    flex: 1;
    min-width: 0;
}
.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    margin-bottom: 4px;
}
.comment-author {
    font-weight: 600;
    color: var(--text);
}
.comment-org {
    color: var(--text-muted, #777);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: .75rem;
}
.comment-date {
    color: var(--text-muted, #777);
    font-size: .78rem;
}
.comment-visibility-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    font-weight: 600;
    color: #7a5300;
    background: color-mix(in srgb, #f9ab00 20%, transparent);
    border: 1px solid color-mix(in srgb, #f9ab00 50%, transparent);
    padding: 1px 8px;
    border-radius: 999px;
}
.comment-body {
    color: var(--text);
    font-size: .9rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ── Composer ─────────────────────────────────────────────────────────────── */
.comments-composer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}
.comments-composer textarea {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
    font-size: .9rem;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
}
.comments-composer textarea:focus {
    outline: none;
    border-color: var(--primary, #1a73e8);
}
.comments-composer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.comments-visibility-toggle {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: .85rem;
    color: var(--text);
}
.comments-visibility-toggle label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.comments-visibility-toggle input[type=radio] {
    margin: 0;
}
.comments-composer-counter {
    font-size: .78rem;
    color: var(--text-muted, #777);
}
.comments-composer-counter.over-limit {
    color: #c0392b;
    font-weight: 600;
}
.comments-composer-error {
    color: #c0392b;
    font-size: .82rem;
    margin-top: 6px;
    display: none;
}
.comments-composer-error.visible { display: block; }

/* ── Marca "· editado" ──────────────────────────────────────────────────── */
.comment-edited {
    color: var(--text-muted, #777);
    font-size: .72rem;
    font-style: italic;
    cursor: help;
}

/* ── Soft delete ───────────────────────────────────────────────────────── */
.comment-item--deleted {
    opacity: .72;
    border-left-color: var(--border);
}
.comment-body--deleted {
    color: var(--text-muted, #777);
    font-style: italic;
}

/* ── Kebab menu (⋮) — usando <details>/<summary> nativo ───────────────── */
.comment-actions {
    flex-shrink: 0;
    position: relative;
    margin-left: auto;
}
.comment-kebab {
    position: relative;
}
.comment-kebab > summary {
    list-style: none;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-muted, #777);
    background: transparent;
    border: 1px solid transparent;
    user-select: none;
    transition: background .12s, border-color .12s;
}
.comment-kebab > summary::-webkit-details-marker { display: none; }
.comment-kebab > summary::marker { content: ""; }
.comment-kebab > summary:hover {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}
.comment-kebab[open] > summary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}
.comment-kebab-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 10;
    min-width: 150px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    padding: 4px 0;
    display: flex;
    flex-direction: column;
}
.comment-kebab-item {
    display: block;
    padding: 6px 12px;
    font-size: .85rem;
    color: var(--text);
    text-decoration: none;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
}
.comment-kebab-item:hover {
    background: var(--surface2);
    color: var(--text);
    text-decoration: none;
}
.comment-kebab-item--danger { color: #c0392b; }
.comment-kebab-item--danger:hover {
    background: color-mix(in srgb, #c0392b 8%, transparent);
    color: #c0392b;
}

/* ── Modo edición inline ──────────────────────────────────────────────── */
.comment-edit-pane {
    margin-top: 4px;
}
.comment-edit-textarea {
    width: 100%;
    min-height: 70px;
    resize: vertical;
    font-family: inherit;
    font-size: .9rem;
    padding: 8px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
}
.comment-edit-textarea:focus {
    outline: none;
    border-color: var(--primary, #1a73e8);
}
.comment-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Whatsnew — modal "¿Qué hay de nuevo?" (2026-07-10)
   Contenido en ~/Content/whatsnew.json. Se pinta una vez por navegador por
   versionId (cookie whatsnew_dismissed, 365d). Cambiar el versionId del JSON
   fuerza a que todos los usuarios lo vuelvan a ver. Ver Util/WhatsNewHelper.cs
   y Site.Master.cs.
   ═══════════════════════════════════════════════════════════════════════════ */
.whatsnew-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 27, 46, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;                 /* justo debajo del graLoadingOverlay (9999) */
    padding: 16px;
    animation: whatsnewFadeIn .18s ease;
}
@keyframes whatsnewFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.whatsnew-card {
    background: #fff;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: whatsnewCardIn .22s ease;
}
@keyframes whatsnewCardIn {
    from { transform: translateY(12px) scale(.98); opacity: 0; }
    to   { transform: translateY(0)    scale(1);   opacity: 1; }
}
.whatsnew-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, .06);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: background .15s;
    font-family: inherit;
}
.whatsnew-close:hover { background: rgba(0, 0, 0, .12); }
.whatsnew-head {
    padding: 24px 28px 8px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
/* .whatsnew-icon: contenedor 44x44 con fondo + background-image del icono.
   El icono se pinta como background-image (data URL inline en el default,
   fichero SVG en los tenants). Site.Master.cs deja el <div> vacío para
   que cada tenant decida su icono sólo desde CSS (patrón consistente con
   platformlogo.png y el resto del sistema de tenants — sin ramas de
   tenant en C#). El default es el escudo Validia histórico. */
.whatsnew-icon {
    background:
        #FFA800
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2 4 6v6c0 5 3.5 9 8 10 4.5-1 8-5 8-10V6l-8-4z'/><path d='m9 12 2 2 4-4'/></svg>")
        center / 24px 24px no-repeat;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
/* Retrocompat: si algún markup histórico sigue metiendo un <svg> hijo
   (versiones previas de BuildWhatsNewHtml lo hacían), no romper el tamaño. */
.whatsnew-icon svg { width: 24px; height: 24px; }
.whatsnew-head-text { flex: 1; min-width: 0; }
.whatsnew-eyebrow {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: .14em;
    color: #6b7280;
    text-transform: uppercase;
    margin: 0 0 4px;
    font-weight: 500;
}
.whatsnew-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}
.whatsnew-date {
    padding: 0 28px 14px;
    font-family: 'Courier New', monospace;
    font-size: 12.5px;
    color: #6b7280;
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
}
.whatsnew-body {
    padding: 20px 28px;
    overflow: auto;
    flex: 1;
}
.whatsnew-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.whatsnew-list li {
    padding-left: 24px;
    position: relative;
    margin-bottom: 14px;
    line-height: 1.55;
    font-size: 14.5px;
    color: #1f2937;
}
.whatsnew-list li:last-child { margin-bottom: 0; }
.whatsnew-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    width: 8px;
    height: 8px;
    background: #FFA800;
    border-radius: 50%;
}
.whatsnew-list strong { color: #0f172a; font-weight: 700; }
.whatsnew-foot {
    padding: 16px 28px 22px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
}
.whatsnew-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    background: #FFA800;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background .15s, transform .05s;
    font-family: inherit;
}
.whatsnew-btn:hover  { background: #e69700; }
.whatsnew-btn:active { transform: translateY(1px); }
.whatsnew-signature {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #9ca3af;
    letter-spacing: .06em;
    margin: 0;
}
@media (max-width: 560px) {
    .whatsnew-head { padding: 20px 20px 6px; gap: 12px; }
    .whatsnew-date { padding: 0 20px 12px; }
    .whatsnew-body { padding: 16px 20px; }
    .whatsnew-foot { padding: 14px 20px 18px; }
    .whatsnew-title { font-size: 18px; }
    .whatsnew-icon { width: 40px; height: 40px; }
}


/* ════════════════════════════════════════════════════════════
   Aprobación in-situ y en tanda (Default.aspx)
   ────────────────────────────────────────────────────────────
   Vive en Layout.css, no en Site.css, porque es estructura: Layout.css
   lo carga BasePage para todos los tenants y Site.css sólo aporta la
   marca. Todo el color sale de tokens, así que fettaf/ivsign lo heredan
   re-tintado sin tocar nada.
   ──────────────────────────────────────────────────────────── */

/* ---- Checkboxes de selección en el grid ---- */
.chk-aprobar,
.chk-aprobar-all {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent);
    vertical-align: middle;
    margin: 0;
}
.chk-aprobar:disabled,
.chk-aprobar-all:disabled { cursor: default; opacity: .4; }

/* Fila ya aprobada en esta misma pantalla: se atenúa en lugar de
   desaparecer, para que el operador vea qué acaba de procesar sin pagar
   una recarga del listado. */
tr.row-aprobada { opacity: .5; }
tr.row-aprobada:hover { opacity: .72; }

/* ---- Barra de acción del lote ---- */
.bulk-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 12px;
    padding: 10px 14px;
    background: var(--st-tint-pendienteca);
    border: 1px solid var(--st-pendienteca);
    border-radius: var(--r-ctrl, 8px);
}
.bulk-bar[hidden] { display: none; }
.bulk-bar-count {
    font-size: .86rem;
    color: var(--st-pendienteca-ink, var(--text));
    margin-right: auto;
}
.bulk-bar-count strong {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: .95rem;
}

/* ---- Modal de aprobación ---- */
/* Doble clase a propósito: Site.css se carga DESPUÉS de Layout.css y
   declara .modal-box { max-width: 540px }. Con .modal-box.modal-box-wide
   ganamos por especificidad sin tocar el modal genérico. */
.modal-box.modal-box-wide { max-width: 680px; }

/* Tabla compacta de las solicitudes del lote (N > 1) */
.apr-lista-wrap {
    max-height: 230px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 16px;
}
.apr-lista {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}
.apr-lista th {
    position: sticky;
    top: 0;
    background: var(--surface2, #FAFBFB);
    text-align: left;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}
.apr-lista td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.apr-lista tr:last-child td { border-bottom: none; }

/* ---- Progreso de la tanda ---- */
.aprobar-progress {
    height: 6px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    margin: 0 0 14px;
}
.aprobar-progress-bar {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width .2s ease;
}

/* ---- Resultado por solicitud ---- */
.apr-result-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 240px;
    overflow: auto;
}
.apr-res {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 10px;
    margin-bottom: 4px;
    border-radius: 4px;
    font-size: .84rem;
    line-height: 1.4;
}
.apr-res-ok {
    background: var(--st-tint-aprobado);
    color: var(--st-aprobado);
}
.apr-res-ko {
    background: var(--st-tint-rechazado);
    color: #7B2419;
}
.apr-res-icon { flex: 0 0 auto; font-weight: 700; }
.apr-res-cod {
    flex: 0 0 auto;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: .78rem;
    font-weight: 600;
}
.apr-res-msg { flex: 1 1 auto; }

@media (max-width: 640px) {
    .bulk-bar { gap: 8px; }
    .bulk-bar-count { flex: 1 0 100%; margin-right: 0; }
}

/* ── Sidebar: secciones plegables (2026-10-05) ─────────────────
   La cabecera de cada sección es un <button class="sidebar-section-label
   sidebar-section-toggle">: hereda color, fuente y padding del
   .sidebar-section-label de cada tema y aquí solo se le quita el aspecto
   de botón. El JS de Site.Master pone .sec-plegada en la sección.
   Va al final del fichero para ganar al display:block !important del
   bloque móvil. Sin tokens nuevos: el chevrón usa currentColor. */
.sidebar-section-toggle {
    display: flex !important;
    align-items: center;
    width: 100%;
    margin: 0;
    border: 0;
    background: none;
    text-align: left;
    font-family: inherit;
    line-height: inherit;
    cursor: pointer;
}
.sidebar-section-toggle:focus { outline: none; }
.sidebar-section-toggle:focus-visible { outline: 1px dotted currentColor; outline-offset: -2px; }
.sidebar-section-name {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-section-chevron {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    opacity: .55;
    transition: transform .15s ease, opacity .15s ease;
}
.sidebar-section-toggle:hover .sidebar-section-chevron { opacity: 1; }
.sec-plegada > .sidebar-nav { display: none; }
.sec-plegada .sidebar-section-chevron { transform: rotate(-90deg); }

/* Sidebar en modo iconos: no hay cabeceras visibles, así que el plegado
   se ignora (si no, los iconos de una sección plegada serían inalcanzables). */
.sidebar-collapsed .sec-plegada > .sidebar-nav { display: block; }
.sidebar-collapsed .sidebar-section-chevron { display: none; }

/* ── Sidebar: orden de secciones con cuadrito de arrastre (2026-10-05) ──
   El JS de Site.Master envuelve el botón del título en .sidebar-section-cab
   y le antepone un .sidebar-section-grip, visible al pasar el ratón o con
   foco de teclado. Sin tokens nuevos: todo en currentColor. */
.sidebar-section-cab { position: relative; }
.sidebar-section-grip {
    position: absolute;
    left: 3px;
    bottom: 4px;
    width: 14px;
    height: 20px;
    padding: 2px 3px;
    margin: 0;
    border: 0;
    border-radius: 4px;
    background: none;
    color: inherit;
    opacity: 0;
    cursor: grab;
    transition: opacity .15s ease;
}
.sidebar-section-grip svg { display: block; width: 8px; height: 16px; fill: currentColor; }
.sidebar-section-plegable:hover .sidebar-section-grip,
.sidebar-section-grip:focus-visible { opacity: .9; }
.sidebar-section-grip:hover { opacity: 1; }
.sidebar-section-grip:focus { outline: none; }
.sidebar-section-grip:focus-visible { outline: 1px dotted currentColor; }
.orden-arrastrando { opacity: .45; }
.orden-antes  { box-shadow: inset 0 2px 0 var(--orden-color, currentColor); }
.orden-despues { box-shadow: inset 0 -2px 0 var(--orden-color, currentColor); }
.sidebar-collapsed .sidebar-section-grip { display: none; }
