/* ==========================================================================
   EDESTE S.A. - PORTAL DOCUMENTAL DE CONTRATISTAS (DESIGN SYSTEM & STYLES)
   ========================================================================== */

/* --- TEMA LIGHT (PREDETERMINADO) --- */
:root {
    --bg-color: #f4f6f9;
    --surface-color: #ffffff;
    --surface-hover: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;

    /* Colores Marca EDESTE */
    --primary: #005691;
    --primary-hover: #004373;
    --primary-light: #e0f2fe;
    --accent: #009640;

    /* Estados Semáforo */
    --status-success: #10b981;
    --status-success-bg: #d1fae5;
    --status-warning: #f59e0b;
    --status-warning-bg: #fef3c7;
    --status-danger: #ef4444;
    --status-danger-bg: #fee2e2;
    --status-info: #3b82f6;
    --status-info-bg: #dbeafe;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

/* --- TEMA DARK --- */
body.dark-theme {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --surface-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;

    --primary: #38bdf8;
    --primary-hover: #0284c7;
    --primary-light: rgba(56, 189, 248, 0.15);

    --status-success-bg: rgba(16, 185, 129, 0.2);
    --status-warning-bg: rgba(245, 158, 11, 0.2);
    --status-danger-bg: rgba(239, 68, 68, 0.2);
    --status-info-bg: rgba(59, 130, 246, 0.2);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* Base resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   VISTA 1: LOGIN SPLIT SCREEN
   ========================================================================== */
#login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
}

.login-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background-color: #f7f9fb;
}

.login-left {
    width: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 20;
}

@media (min-width: 768px) {
    .login-left {
        flex: 0 0 55%;
        width: 55%;
    }
}

.login-header-logo {
    margin-bottom: 2rem;
}

.login-header-logo .brand-logo {
    height: 135px;
    width: auto;
    object-fit: contain;
}

.login-form-container {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .login-form-container {
        margin: 0 auto;
    }
}

.login-title {
    font-family: 'Manrope', sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #003a63;
    margin-bottom: 0.5rem;
}

.login-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #41474f;
    margin-bottom: 3rem;
}

.form-group-custom {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-label-custom {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: #191c1e;
}

.input-wrapper-custom {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-custom {
    position: absolute;
    left: 1rem;
    color: #727780;
    transition: color 0.2s ease;
    font-size: 20px;
}

.input-field-custom {
    width: 100%;
    height: 3.5rem;
    padding-left: 3rem;
    padding-right: 1rem;
    background-color: var(--surface-color, #f2f4f6);
    border: none;
    border-radius: 0.5rem;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: var(--text-primary, #191c1e);
    outline: none;
    transition: all 0.2s ease;
}

.input-wrapper-custom:focus-within .input-icon-custom {
    color: #003a63;
}

.input-field-custom:focus {
    background-color: var(--surface-color, #ffffff);
    box-shadow: 0 0 0 2px var(--primary, #003a63);
}

.input-help-custom {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: #c1c7d1;
    margin-top: 0.25rem;
}

.btn-primary-custom {
    width: 100%;
    height: 3.5rem;
    background-color: #003a63;
    color: #ffffff;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 18px;
    border: none;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 58, 99, 0.2);
}

.btn-primary-custom:hover {
    background-color: #005288;
}

.btn-primary-custom:active {
    transform: scale(0.98);
}

.login-footer-custom {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid #c1c7d1;
}

.footer-contact-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item-custom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #41474f;
}

.contact-item-custom span {
    font-size: 15px;
}

.contact-text-custom {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}

.footer-copyright {
    font-family: 'Manrope', sans-serif;
    font-size: 10.5px;
    font-weight: 400;
    line-height: 1.4;
    color: #727780;
    opacity: 0.6;
    margin-top: 1rem;
}

/* Lado Derecho */
.login-right {
    display: none;
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: #081B2C;
}

@media (min-width: 768px) {
    .login-right {
        display: block;
    }
}

.slanted-mask-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}

.slanted-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.industrial-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 27, 44, 0.2) 0%, rgba(8, 27, 44, 0.8) 100%);
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.1;
}

.login-right-content {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    padding: 3rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: left;
}

.login-right-title {
    font-family: 'Manrope', sans-serif;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.login-right-desc {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 36rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.floating-brand-accent {
    position: absolute;
    top: 3rem;
    right: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

.brand-accent-line {
    width: 3rem;
    height: 2px;
    background-color: #b5f65b;
}

.brand-accent-text {
    color: #ffffff;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.2em;
}



/* ==========================================================================
   HEADER Y CONTENEDOR PRINCIPAL
   ========================================================================== */
.app-header {
    height: 70px;
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 60px;
}

.header-left .divider {
    color: var(--border-color);
}

.portal-title {
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text-primary);
}

.header-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: left;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
}

.nav-link:hover {
    background-color: var(--surface-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

#user-company-name {
    max-width: 250px;
    /* Ajustá este valor a lo que te parezca mejor */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
}

.btn-icon:hover {
    background-color: var(--surface-hover);
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--status-danger);
    color: var(--status-danger);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-logout:hover {
    background-color: var(--status-danger);
    color: #ffffff;
}

.app-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Title Bar */
.page-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-title-bar h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.page-title-bar .subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   KPIS Y CARDS
   ========================================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 3rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-card.card-critical {
    border-left: 5px solid var(--status-danger);
}

.kpi-card.card-review {
    border-left: 5px solid var(--status-info);
}

.kpi-card.card-valid {
    border-left: 5px solid var(--status-success);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-critical .kpi-icon {
    background-color: var(--status-danger-bg);
    color: var(--status-danger);
}

.card-review .kpi-icon {
    background-color: var(--status-info-bg);
    color: var(--status-info);
}

.card-valid .kpi-icon {
    background-color: var(--status-success-bg);
    color: var(--status-success);
}

.kpi-data {
    display: flex;
    flex-direction: column;
}

.kpi-number {
    font-size: 1.75rem;
    font-weight: 700;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Progress Ring */
.progress-card {
    grid-column: span 1;
}

.kpi-body {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.progress-ring-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring-bg {
    stroke: var(--border-color);
    fill: transparent;
}

.progress-ring-fill {
    stroke: var(--primary);
    fill: transparent;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 0.6s ease;
}

.progress-ring-fill.ring-valid {
    stroke: var(--status-success) !important;
}

.progress-ring-fill.ring-review {
    stroke: #94a3b8 !important;
}

.percentage-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Manrope', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

/* ==========================================================================
   TABLAS Y BADGES
   ========================================================================== */
.table-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-header-bar {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th {
    background-color: var(--bg-color);
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background-color: var(--surface-hover);
}


/* --- AJUSTES DE COLUMNAS: TABLAS DE REQUERIMIENTOS (#table-documentos, #table-documentos-criticos, #table-documentos-otros) --- */
#table-documentos th:nth-child(1),
#table-documentos td:nth-child(1),
#table-documentos-criticos th:nth-child(1),
#table-documentos-criticos td:nth-child(1),
#table-documentos-otros th:nth-child(1),
#table-documentos-otros td:nth-child(1) {
    /* Estado */
    width: auto;
    min-width: 190px;
    max-width: 240px;
    /* O un valor fijo, ej: 120px */
}

#table-documentos th:nth-child(2),
#table-documentos td:nth-child(2),
#table-documentos-criticos th:nth-child(2),
#table-documentos-criticos td:nth-child(2),
#table-documentos-otros th:nth-child(2),
#table-documentos-otros td:nth-child(2) {
    /* Documento Requerido */
    width: auto;
    min-width: 320px;
    max-width: 380px;
    /* O un valor fijo, ej: 250px */
}

#table-documentos th:nth-child(3),
#table-documentos td:nth-child(3),
#table-documentos-criticos th:nth-child(3),
#table-documentos-criticos td:nth-child(3),
#table-documentos-otros th:nth-child(3),
#table-documentos-otros td:nth-child(3) {
    /* Período */
    white-space: nowrap !important;
    width: 90px;
}

#table-documentos th:nth-child(4),
#table-documentos td:nth-child(4),
#table-documentos-criticos th:nth-child(4),
#table-documentos-criticos td:nth-child(4),
#table-documentos-otros th:nth-child(4),
#table-documentos-otros td:nth-child(4) {
    /* Fecha de Vencimiento */
    white-space: nowrap !important;
    width: 120px;
}

#table-documentos th:nth-child(5),
#table-documentos td:nth-child(5),
#table-documentos-criticos th:nth-child(5),
#table-documentos-criticos td:nth-child(5),
#table-documentos-otros th:nth-child(5),
#table-documentos-otros td:nth-child(5) {
    /* Plazo de validez / (vencido) */
    white-space: nowrap !important;
    width: 170px;
}

#table-documentos th:nth-child(6),
#table-documentos td:nth-child(6),
#table-documentos-criticos th:nth-child(6),
#table-documentos-criticos td:nth-child(6),
#table-documentos-otros th:nth-child(6),
#table-documentos-otros td:nth-child(6) {
    /* Observación EDESTE */
    width: auto;
    max-width: 380px;
    word-break: break-word;
}

/* --- AJUSTES DE COLUMNAS: TABLA HISTORIAL (#table-historial) --- */
#table-historial th:nth-child(2),
#table-historial td:nth-child(2) {
    /* Documento */
    width: auto;
    min-width: 280px;
    max-width: 380px;
    /* O un valor fijo, ej: 250px */
}

#table-historial th:nth-child(3),
#table-historial td:nth-child(3) {
    /* Período */
    white-space: nowrap !important;
    width: 90px;
}

#table-historial th:nth-child(4),
#table-historial td:nth-child(4) {
    /* Fecha de Carga */
    white-space: nowrap !important;
    width: 120px;
}

#table-historial th:nth-child(5),
#table-historial td:nth-child(5) {
    /* Fecha de Vencimiento */
    white-space: nowrap !important;
    width: 120px;
}

#table-historial th:nth-child(6),
#table-historial td:nth-child(6) {
    /* Observación EDESTE */
    width: auto;
    min-width: 280px;
    max-width: 380px;
    word-break: break-word;
}



/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: var(--status-success-bg);
    color: var(--status-success);
}

.badge-warning {
    background-color: var(--status-warning-bg);
    color: var(--status-warning);
}

.badge-danger {
    background-color: var(--status-danger-bg);
    color: var(--status-danger);
}

.badge-info {
    background-color: var(--status-info-bg);
    color: var(--status-info);
}

/* Filter bar */
.filter-bar {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-filter {
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}

.btn-filter.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ==========================================================================
   MODALES
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-window {
    background-color: var(--surface-color);
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.expiry-preview-box {
    background-color: var(--primary-light);
    border: 1px solid var(--primary);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
}

.alert-box {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-top: 1rem;
}

.alert-danger {
    background-color: var(--status-danger-bg);
    color: var(--status-danger);
}

.alert-warning {
    background-color: var(--status-warning-bg);
    color: var(--status-warning);
}

.alert-success {
    background-color: var(--status-success-bg);
    color: var(--status-success);
}

.input-disabled {
    background-color: var(--bg-color) !important;
    cursor: not-allowed;
}

/* ==========================================================================
   ESTILOS DE BOTONES Y FILTROS PROFESIONALES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    text-decoration: none;
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(0, 86, 145, 0.2);
}

.btn-secondary {
    background-color: var(--surface-color);
    border-color: var(--border-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--surface-hover);
    border-color: var(--text-secondary);
}

.btn-success {
    background-color: var(--status-success);
    color: #ffffff !important;
    border-color: var(--status-success);
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Botón Subir Personalizado (Tabla) */
.btn-subir {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid transparent;
    font-weight: 600;
}

.btn-subir:hover {
    background-color: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 86, 145, 0.25);
    transform: translateY(-1px);
}

.btn-subir:active {
    transform: translateY(0);
}

/* Formularios Inline */
.form-group-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-control-inline {
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-inline:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.border-bottom {
    border-bottom: 1px solid var(--border-color);
}

.pb-4 {
    padding-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* ==========================================================================
   ESTILOS DE FORMULARIOS Y MODALES ESPACIOSOS
   ========================================================================== */
.modal-window {
    max-width: 560px !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-body {
    padding: 1.75rem !important;
    display: flex;
    flex-direction: column;
    gap: 1.25rem !important;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem !important;
    margin-bottom: 0 !important;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.form-group input[type="text"],
.form-group input[type="month"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--surface-color);
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="month"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    width: 100%;
    min-height: 90px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--surface-color);
    color: var(--text-primary);
    outline: none;
    resize: vertical;
    transition: all 0.2s ease;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.form-group input[type="file"]:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.expiry-preview-box {
    margin-bottom: 0 !important;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
}

/* ==========================================================================
   NOTIFICACIONES TOAST (POP-UP SUPERIOR DERECHO)
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    max-width: 440px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background-color: var(--surface-color);
    color: var(--text-primary);
    box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary);
    animation: toastSlideIn 0.35s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.toast-item.toast-leaving {
    animation: toastSlideOut 0.3s ease forwards;
}

.toast-success {
    border-left-color: var(--status-success) !important;
}

.toast-success .toast-icon {
    color: var(--status-success);
}

.toast-error {
    border-left-color: var(--status-danger) !important;
}

.toast-error .toast-icon {
    color: var(--status-danger);
}

.toast-warning {
    border-left-color: var(--status-warning) !important;
}

.toast-warning .toast-icon {
    color: var(--status-warning);
}

.toast-info {
    border-left-color: var(--status-info) !important;
}

.toast-info .toast-icon {
    color: var(--status-info);
}

.toast-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.toast-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.toast-message {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

/* ==========================================================================
   TOAST NOTIFICATIONS RECUADRO FIX
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 320px;
    max-width: 440px;
    background-color: var(--surface-color, #ffffff) !important;
    color: var(--text-primary, #0f172a) !important;
    border: 1px solid var(--border-color, #cbd5e1);
    border-left: 6px solid var(--primary, #005691);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-success {
    border-left-color: #10b981 !important;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-left-color: #ef4444 !important;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b !important;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary, #0f172a);
}

.toast-message {
    font-size: 0.825rem;
    color: var(--text-secondary, #475569);
    line-height: 1.35;
}

/* ==========================================================================
   INPUTS & SELECTS CLEAN STYLING (SIN INDENTACIÓN EXTRA)
   ========================================================================== */
.input-field-custom,
select.input-field-custom,
input.input-field-custom {
    width: 100%;
    height: 2.3rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text-primary, #0f172a);
    background-color: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 6px;
    outline: none;
    box-sizing: border-box;
    text-indent: 0 !important;
    margin: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field-custom:focus {
    border-color: var(--primary, #005691);
    box-shadow: 0 0 0 3px rgba(0, 86, 145, 0.12);
}

.input-wrapper-custom {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.input-wrapper-custom .input-icon-custom {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted, #94a3b8);
    font-size: 1.2rem;
    pointer-events: none;
}

.input-wrapper-custom input.has-icon {
    padding-left: 2.35rem;
}

/* ==========================================================================
   TABLA DE PENDIENTES VÁLIDA Y ATRACTIVA
   ========================================================================== */
.table-container {
    width: 100%;
    background: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    margin-top: 1rem;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.table-custom th {
    background-color: var(--bg-color, #f8fafc);
    color: var(--text-secondary, #475569);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.725rem;
    letter-spacing: 0.05em;
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid var(--border-color, #e2e8f0);
}

.table-custom td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    vertical-align: middle;
    color: var(--text-primary, #0f172a);
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

.table-custom tbody tr:hover {
    background-color: var(--surface-hover, #f1f5f9);
}

/* ==========================================================================
   VALDATOR LAYOUT & SIDEBAR STYLES
   ========================================================================== */
.validador-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar-validador {
    width: 240px;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 200;
}

.sidebar-brand {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    height: 38px;
    width: auto;
}

.sidebar-title {
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--primary);
    text-transform: uppercase;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0.75rem;
    gap: 0.35rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item:hover {
    background-color: var(--surface-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 750;
}

.nav-badge {
    margin-left: auto;
    background: var(--status-danger, #ef4444);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.header-validador {
    height: 70px;
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

.kpi-chip {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 8px);
    padding: 0.35rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-color, #f8fafc);
}

/* MURO DE ACTIVIDAD (ACTIVITY FEED) */
.activity-feed-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1rem;
}

.activity-card {
    background: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-left: 5px solid var(--primary, #005691);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.15s ease;
}

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

.activity-card-info {
    border-left-color: #0284c7;
}

.activity-card-success {
    border-left-color: #10b981;
}

.activity-card-danger {
    border-left-color: #ef4444;
}

.activity-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.activity-card-info .activity-icon-box {
    background: #e0f2fe;
    color: #0284c7;
}

.activity-card-success .activity-icon-box {
    background: #d1fae5;
    color: #10b981;
}

.activity-card-danger .activity-icon-box {
    background: #fee2e2;
    color: #ef4444;
}

.activity-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.activity-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary, #0f172a);
}

.activity-desc {
    font-size: 0.825rem;
    color: var(--text-secondary, #475569);
}

.activity-time {
    font-size: 0.725rem;
    color: var(--text-muted, #94a3b8);
    align-self: flex-start;
    margin-top: 0.2rem;
}

/* PROGRESS BAR & COLOR PROGRESSION */
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-fill-low {
    background-color: #ef4444 !important;
}

.progress-fill-medium {
    background-color: #f59e0b !important;
}

.progress-fill-high {
    background-color: #10b981 !important;
}

.progress-bar-fill.blocked-f931 {
    background-image: linear-gradient(45deg,
            rgba(255, 255, 255, 0.25) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.25) 50%,
            rgba(255, 255, 255, 0.25) 75%,
            transparent 75%,
            transparent) !important;
    background-size: 1rem 1rem !important;
    animation: progress-bar-stripes 1.2s linear infinite !important;
}

@keyframes progress-bar-stripes {
    0% {
        background-position-x: 0;
    }

    100% {
        background-position-x: 1rem;
    }
}

.rotate-header {
    height: 70px;
    vertical-align: bottom !important;
    padding-bottom: 0.75rem !important;
}

.rotate-header-text {
    display: inline-block;
    transform: rotate(-30deg);
    transform-origin: center;
    white-space: nowrap;
    width: 20px;
    text-align: center;
}

/* COMPACT TABLE STYLES */
.table-compact th {
    padding: 0.55rem 0.85rem !important;
    font-size: 0.7rem !important;
}

.table-compact td {
    padding: 0.5rem 0.85rem !important;
    font-size: 0.8rem !important;
}

/* SHAREPOINT STATE BADGES */
.badge-activo {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0;
}

.badge-suspendido {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a;
}

.badge-baja {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5;
}

/* IOS STYLE TOGGLE SWITCH */
.switch-custom {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    user-select: none;
}

.switch-custom input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #cbd5e1;
    border-radius: 999px;
    transition: background-color 0.25s ease;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-custom input:checked+.switch-slider {
    background-color: #10b981;
}

.switch-custom input:checked+.switch-slider:before {
    transform: translateX(20px);
}

.switch-label {
    font-size: 0.75rem;
    font-weight: 700;
}

/* MODAL OVERLAY & CONTENT */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.modal-content-custom {
    background: var(--surface-color, #ffffff);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color, #e2e8f0);
    overflow: hidden;
}

@keyframes alertSoftBlink {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.45;
        transform: scale(0.97);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.blink-alert {
    animation: alertSoftBlink 1.6s infinite ease-in-out;
    display: inline-flex;
    align-items: center;
}

/* ================================================================= */
/* REDISEÑO DE INICIO / DASHBOARD VALIDADOR                         */
/* ================================================================= */
.dashboard-grid-layout {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .dashboard-grid-layout {
        grid-template-columns: 1fr;
    }
}

.dashboard-left-panel {
    display: flex;
    flex-direction: column;
}

.dashboard-urgency-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .dashboard-urgency-cards {
        grid-template-columns: 1fr;
    }
}

.metric-card-urgencia {
    background: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.metric-card-urgencia:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
}

.metric-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.card-criticos .metric-card-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.card-vencimientos .metric-card-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.card-rechazos .metric-card-icon {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.card-pendientes .metric-card-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.card-demora .metric-card-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.card-inhabilitados .metric-card-icon {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

.metric-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.metric-card-title {
    font-size: 0.725rem;
    font-weight: 700;
    color: var(--text-secondary, #475569);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    line-height: 1.1;
}

.metric-card-desc {
    font-size: 0.7rem;
    color: var(--text-muted, #94a3b8);
    margin: 0;
}

.alert-table-card {
    background: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.alert-table-header {
    padding: 0.65rem 1rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-table-header h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.alert-table-header.color-vencimientos {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.alert-table-header.color-rechazos {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.alert-table-body {
    padding: 0.25rem 0.5rem;
}

.alert-table-compact {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.alert-table-compact th {
    font-weight: 700;
    color: var(--text-secondary, #475569);
    text-align: left;
    padding: 0.4rem 0.5rem;
    border-bottom: 2px solid var(--border-color, #e2e8f0);
}

.alert-table-compact td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
    color: var(--text-primary, #0f172a);
    vertical-align: middle;
}

.alert-table-compact tbody tr:hover {
    background-color: var(--bg-hover, #f8fafc);
}

/* SIDEBAR DE ACTIVIDAD RECIENTE COMPACTA */
.activity-sidebar-card {
    background: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.sidebar-header {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-hover, #f8fafc);
}

.sidebar-header h3 {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sidebar-subtitle {
    font-size: 0.65rem;
    color: var(--text-muted, #94a3b8);
}

.sidebar-body {
    padding: 0.4rem;
    overflow-y: visible;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.activity-block-compact {
    background: var(--surface-color, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-left: 4px solid var(--primary, #005691);
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.7rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
    transition: transform 0.1s ease;
}

.activity-block-compact:hover {
    transform: translateX(2px);
}

.activity-block-info {
    border-left-color: #0284c7;
}

.activity-block-success {
    border-left-color: #10b981;
}

.activity-block-danger {
    border-left-color: #ef4444;
}

.activity-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.activity-block-badge {
    font-weight: 800;
    font-size: 0.575rem;
    text-transform: uppercase;
    padding: 0.05rem 0.2rem;
    border-radius: 3px;
    white-space: nowrap;
}

.badge-info-light {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

.badge-success-light {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-danger-light {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.activity-block-time {
    font-size: 0.625rem;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
}

.activity-block-empresa {
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-block-docinfo {
    color: var(--text-secondary, #475569);
    font-size: 0.675rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Botón selector de tema flotante en la esquina inferior izquierda */
.theme-toggle-floating {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    z-index: 9999;
    transition: background-color 0.25s, transform 0.2s, color 0.25s, border-color 0.25s;
}

.theme-toggle-floating:hover {
    background-color: var(--surface-hover);
    transform: scale(1.05);
}

/* ==========================================================================
   SISTEMA DE NOTIFICACIONES
   ========================================================================== */
.notification-container {
    position: relative;
    display: inline-block;
}

.btn-notification-bell {
    position: relative;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-notification-bell:hover {
    background-color: var(--surface-hover);
    color: var(--primary);
    border-color: var(--text-secondary);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--status-danger, #ef4444);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 1.5px solid var(--surface-color);
}

.notification-badge.hidden {
    display: none;
}

/* Menú Desplegable */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    width: 320px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 8px);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-dropdown.hidden {
    display: none;
}

.notification-dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-color);
}

.notification-dropdown-header h4 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-text-only {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.btn-text-only:hover {
    text-decoration: underline;
}

.notification-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-primary);
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

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

.notification-item.unread {
    background-color: var(--primary-light, rgba(56, 189, 248, 0.08));
}

.notification-item i {
    font-size: 1.1rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.notification-item-text {
    flex: 1;
}

.notification-item-text strong {
    font-weight: 700;
}

.notification-item-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.notification-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* ==========================================================================
   VISTA RESPONSIVE NÓMINAS & ROL OPERACIONES (MOBILE CARDS)
   ========================================================================== */

.nominas-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.nominas-header-title h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.nominas-header-title p {
    font-size: 0.825rem;
    color: var(--text-secondary);
    margin: 0.2rem 0 0 0;
}

.nominas-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.nominas-search-box {
    width: 280px;
}

/* Barra de Filtros Táctiles Móviles */
.nominas-mobile-filters {
    display: none;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-chip:hover {
    background: var(--surface-hover, #f1f5f9);
}

.filter-chip.active {
    background: var(--primary, #005691);
    color: #ffffff;
    border-color: var(--primary, #005691);
    box-shadow: 0 2px 8px rgba(0, 86, 145, 0.25);
}

.filter-chip .chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.08);
    padding: 0.1rem 0.45rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
}

.filter-chip.active .chip-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.filter-chip-success.active {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

.filter-chip-danger.active {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

/* Tarjetas Móviles de Trabajadores */
.nominas-cards-container {
    display: none;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.75rem;
}

.worker-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border-left: 5px solid #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.worker-card.card-habilitado {
    border-left-color: #16a34a;
}

.worker-card.card-inhabilitado {
    border-left-color: #dc2626;
}

.worker-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.65rem;
}

.worker-card-identity {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.worker-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
}

.worker-cuil {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.775rem;
    color: var(--text-secondary);
}

.worker-cuil i {
    font-size: 1rem;
    color: var(--primary);
}

.worker-cuil code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-weight: 700;
    font-family: monospace;
    color: var(--text-primary);
}

body.dark-theme .worker-cuil code {
    background: rgba(255, 255, 255, 0.08);
}

.worker-status-badge {
    flex-shrink: 0;
}

.worker-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.worker-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.825rem;
    gap: 0.5rem;
}

.worker-info-row .info-label {
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.worker-info-row .info-label i {
    font-size: 1rem;
    color: var(--primary);
}

.worker-info-row .info-value {
    color: var(--text-primary);
    text-align: right;
    word-break: break-word;
}

.worker-motivo-alert {
    margin-top: 0.4rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #b91c1c;
    font-size: 0.785rem;
}

body.dark-theme .worker-motivo-alert {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.worker-motivo-alert i {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.worker-motivo-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.worker-motivo-text strong {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.worker-motivo-text p {
    margin: 0;
    line-height: 1.3;
}

.worker-cards-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--surface-color);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

/* Adaptaciones para Dispositivos Móviles (<= 768px) */
@media (max-width: 768px) {
    /* Header corporativo móvil */
    .header-validador {
        padding: 0 1rem;
        height: 60px;
    }

    .role-operaciones .header-nav {
        display: none !important;
    }

    .header-left .portal-title {
        font-size: 0.95rem;
    }

    .header-right .user-badge {
        display: none;
    }

    .btn-logout {
        padding: 0.35rem 0.65rem;
        font-size: 0.75rem;
    }

    /* Contenedor principal móvil */
    .container-vista-lista {
        padding: 0 0.85rem;
        margin: 1rem auto;
    }

    .nominas-header-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .nominas-header-title h2 {
        font-size: 1.15rem;
    }

    .nominas-header-title p {
        font-size: 0.775rem;
    }

    .nominas-header-actions {
        width: 100%;
    }

    .nominas-search-box {
        width: 100%;
    }

    .nominas-search-box .input-field-custom {
        height: 44px;
        font-size: 0.875rem;
    }

    /* Alternar entre vista desktop y móvil */
    .nominas-mobile-filters {
        display: flex;
    }

    .nominas-desktop-view {
        display: none !important;
    }

    .nominas-cards-container {
        display: flex;
    }
}