/* ============================================
   BioAsist — Componentes v2.0 (Premium)
   ============================================ */

/* ═══════════════════════════════════════════════
   BOTONES
   ═══════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .625rem 1.25rem;
    font-size: .875rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    line-height: 1.4;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn:hover::after {
    opacity: 1;
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #166db0 0%, #0e4f81 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(22, 109, 176, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1c7ec9 0%, #166db0 100%);
    box-shadow: 0 8px 25px rgba(22, 109, 176, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-600), var(--success-500));
    color: #fff;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-600), var(--danger-500));
    color: #fff;
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-600), var(--warning-500));
    color: var(--text-inverse);
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--primary-400);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.3), inset 0 0 8px rgba(37, 99, 235, 0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: .5rem .75rem;
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-sm {
    padding: .375rem .75rem;
    font-size: .8rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: .75rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon.lg {
    width: 46px;
    height: 46px;
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none !important;
}

/* ═══════════════════════════════════════════════
   TARJETAS
   ═══════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all var(--transition-base);
    position: relative;
}

.card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card-glow {
    box-shadow: var(--shadow-glow);
}

.card-stat {
    position: relative;
    overflow: hidden;
}

.card-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-stat::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    opacity: 0.04;
    pointer-events: none;
}

.card-stat.blue::before {
    background: linear-gradient(90deg, var(--primary-500), var(--accent-400));
}

.card-stat.blue::after {
    background: linear-gradient(180deg, var(--primary-500), transparent);
}

.card-stat.green::before {
    background: linear-gradient(90deg, var(--success-500), var(--success-400));
}

.card-stat.green::after {
    background: linear-gradient(180deg, var(--success-500), transparent);
}

.card-stat.yellow::before {
    background: linear-gradient(90deg, var(--warning-500), var(--warning-400));
}

.card-stat.yellow::after {
    background: linear-gradient(180deg, var(--warning-500), transparent);
}

.card-stat.red::before {
    background: linear-gradient(90deg, var(--danger-500), var(--danger-400));
}

.card-stat.red::after {
    background: linear-gradient(180deg, var(--danger-500), transparent);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: .78rem;
    color: var(--text-secondary);
    margin-top: .375rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 500;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.card-stat:hover .stat-icon {
    transform: scale(1.08);
}

.stat-icon.blue {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-400);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success-400);
}

.stat-icon.yellow {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning-400);
}

.stat-icon.red {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-400);
}

/* ═══════════════════════════════════════════════
   ELEMENTOS DE FORMULARIO
   ═══════════════════════════════════════════════ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: .375rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: .675rem .925rem;
    background: var(--bg-tertiary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: .9rem;
    transition: all var(--transition-fast);
    outline: none;
    font-weight: 500;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), var(--shadow-sm);
    background: var(--bg-secondary);
}

.form-input.form-control-sm,
.form-select.form-select-sm {
    padding: .375rem .625rem;
    font-size: .8rem;
    border-radius: var(--radius-sm);
}

.form-select optgroup {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-400);
    background: var(--bg-tertiary);
    padding: 6px 4px;
    letter-spacing: 0.5px;
}

.form-select option {
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 4px 8px;
}

/* Sobrescritura elegante del selector de fecha */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.5) sepia(1) saturate(5) hue-rotate(210deg) brightness(1.1);
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 0.7;
}

[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.3) sepia(1) saturate(3) hue-rotate(210deg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════
   TABLAS
   ═══════════════════════════════════════════════ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    backdrop-filter: blur(8px);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.table thead {
    background: var(--bg-tertiary);
}

.table th {
    padding: .875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: .73rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-secondary);
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: .8rem 1rem;
    border-top: 1px solid var(--border-light);
    vertical-align: middle;
}

.table tbody tr {
    transition: all var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

.table-actions {
    display: flex;
    gap: .25rem;
}

.table-compact td {
    padding: .4rem .6rem;
    font-size: .75rem;
}

.table-compact th {
    padding: .5rem .6rem;
    font-size: .7rem;
}

/* ═══════════════════════════════════════════════
   INSIGNIAS
   ═══════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .225rem .65rem;
    font-size: .7rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: .04em;
    border: 1px solid transparent;
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success-400);
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning-400);
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-400);
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-info {
    background: rgba(14, 165, 233, 0.12);
    color: var(--info-400);
    border-color: rgba(14, 165, 233, 0.2);
}

.badge-neutral {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.badge-primary {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-400);
    border-color: rgba(37, 99, 235, 0.2);
}

/* ═══════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn .2s ease;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn .3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(99, 102, 241, 0.05);
}

.modal-lg {
    max-width: 720px;
}

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

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

.modal-body {
    padding: 1.5rem;
}

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

/* ═══════════════════════════════════════════════
   NOTIFICACIONES TOAST
   ═══════════════════════════════════════════════ */
@keyframes toastBorderGlow {
    0% {
        border-color: rgba(99, 102, 241, 0.4);
        box-shadow: 0 0 15px rgba(99, 102, 241, 0.15), inset 0 0 15px rgba(99, 102, 241, 0.05);
    }

    33% {
        border-color: rgba(14, 165, 233, 0.4);
        box-shadow: 0 0 15px rgba(14, 165, 233, 0.15), inset 0 0 15px rgba(14, 165, 233, 0.05);
    }

    66% {
        border-color: rgba(168, 85, 247, 0.4);
        box-shadow: 0 0 15px rgba(168, 85, 247, 0.15), inset 0 0 15px rgba(168, 85, 247, 0.05);
    }

    100% {
        border-color: rgba(99, 102, 241, 0.4);
        box-shadow: 0 0 15px rgba(99, 102, 241, 0.15), inset 0 0 15px rgba(99, 102, 241, 0.05);
    }
}

@keyframes toastBorderSuccess {

    0%,
    100% {
        border-color: rgba(16, 185, 129, 0.5);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.15), inset 0 0 15px rgba(16, 185, 129, 0.05);
    }

    50% {
        border-color: rgba(16, 185, 129, 0.2);
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.08), inset 0 0 8px rgba(16, 185, 129, 0.02);
    }
}

@keyframes toastBorderError {

    0%,
    100% {
        border-color: rgba(239, 68, 68, 0.5);
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.15), inset 0 0 15px rgba(239, 68, 68, 0.05);
    }

    50% {
        border-color: rgba(239, 68, 68, 0.2);
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.08), inset 0 0 8px rgba(239, 68, 68, 0.02);
    }
}

@keyframes toastBorderWarning {

    0%,
    100% {
        border-color: rgba(245, 158, 11, 0.5);
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.15), inset 0 0 15px rgba(245, 158, 11, 0.05);
    }

    50% {
        border-color: rgba(245, 158, 11, 0.2);
        box-shadow: 0 0 8px rgba(245, 158, 11, 0.08), inset 0 0 8px rgba(245, 158, 11, 0.02);
    }
}

@keyframes toastBorderInfo {

    0%,
    100% {
        border-color: rgba(14, 165, 233, 0.5);
        box-shadow: 0 0 20px rgba(14, 165, 233, 0.15), inset 0 0 15px rgba(14, 165, 233, 0.05);
    }

    50% {
        border-color: rgba(14, 165, 233, 0.2);
        box-shadow: 0 0 8px rgba(14, 165, 233, 0.08), inset 0 0 8px rgba(14, 165, 233, 0.02);
    }
}

@keyframes toastPopIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes toastPopOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.toast-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    pointer-events: none;
    width: auto;
}

.toast {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: var(--bg-card);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    animation: toastPopIn .45s cubic-bezier(0.34, 1.56, 0.64, 1), toastBorderGlow 4s ease-in-out infinite;
    min-width: 300px;
    max-width: 420px;
    width: 100%;
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    pointer-events: auto;
}

[data-theme="dark"] .toast {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

.toast.success {
    background: rgba(16, 185, 129, 0.08);
    animation: toastPopIn .45s cubic-bezier(0.34, 1.56, 0.64, 1), toastBorderSuccess 2s ease-in-out infinite;
}

.toast.error {
    background: rgba(239, 68, 68, 0.08);
    animation: toastPopIn .45s cubic-bezier(0.34, 1.56, 0.64, 1), toastBorderError 2s ease-in-out infinite;
}

.toast.warning {
    background: rgba(245, 158, 11, 0.12);
    /* un poco más oscuro el fondo para amarillo */
    animation: toastPopIn .45s cubic-bezier(0.34, 1.56, 0.64, 1), toastBorderWarning 2s ease-in-out infinite;
}

.toast.info {
    background: rgba(14, 165, 233, 0.08);
    animation: toastPopIn .45s cubic-bezier(0.34, 1.56, 0.64, 1), toastBorderInfo 2s ease-in-out infinite;
}

.toast-message {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.5rem;
    padding: 0;
    line-height: 1;
    transition: color var(--transition-fast), transform var(--transition-fast);
    cursor: pointer;
}

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

.toast.removing {
    animation: toastPopOut .3s ease forwards;
}

/* ═══════════════════════════════════════════════
   BARRA LATERAL
   ═══════════════════════════════════════════════ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: var(--z-sticky);
    transition: all var(--transition-base);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-brand-text h4 {
    font-size: .95rem;
    background: linear-gradient(135deg, var(--primary-300), var(--accent-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.sidebar-brand-text p {
    font-size: .65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.sidebar-nav {
    flex: 1;
    padding: .75rem;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: .5rem;
}

.sidebar-section-title {
    font-size: .65rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: .5rem .75rem;
    margin-bottom: .25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .675rem .875rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: .875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
    margin-bottom: 2px;
}

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

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(37, 99, 235, 0.08));
    color: var(--primary-300);
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-400), var(--accent-400));
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
}

.sidebar-link svg,
.sidebar-link img.sidebar-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform var(--transition-fast), opacity var(--transition-fast), filter var(--transition-fast);
}

.sidebar-link img.sidebar-icon-img {
    opacity: 0.9;
}

.sidebar-link:hover svg,
.sidebar-link:hover img.sidebar-icon-img {
    transform: scale(1.12);
    opacity: 1;
}

.sidebar-link.active img.sidebar-icon-img {
    opacity: 1;
    filter: drop-shadow(0 2px 5px rgba(37, 99, 235, 0.22));
}

.sidebar-link .badge {
    margin-left: auto;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-light);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.sidebar-user:hover {
    background: var(--bg-hover);
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-500), var(--accent-400));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.sidebar-user-info p:first-child {
    font-size: .85rem;
    font-weight: 600;
}

.sidebar-user-info p:last-child {
    font-size: .7rem;
    color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════
   CONTENIDO PRINCIPAL
   ═══════════════════════════════════════════════ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin var(--transition-base);
    background: var(--main-bg);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
}

.main-header {
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

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

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

.page-content {
    padding: 1.5rem;
}

.page-title {
    margin-bottom: 1.5rem;
}

.page-title h1 {
    margin-bottom: .25rem;
}

.page-title p {
    color: var(--text-secondary);
    font-size: .9rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: var(--text-tertiary);
    margin-bottom: .5rem;
}

.breadcrumb span {
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════
   PAGINACIÓN
   ═══════════════════════════════════════════════ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    margin-top: 1rem;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: .85rem;
    transition: all var(--transition-fast);
}

.pagination button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary-400);
}

.pagination button.active {
    background: linear-gradient(135deg, #166db0 0%, #0e4f81 100%);
    color: #fff;
    border-color: #166db0;
    box-shadow: 0 2px 8px rgba(22, 109, 176, 0.35);
}

/* ═══════════════════════════════════════════════
   BARRA DE BÚSQUEDA / FILTRO
   ═══════════════════════════════════════════════ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.5rem;
    align-items: flex-end;
}

.filter-bar .form-group {
    margin-bottom: 0;
    min-width: 160px;
}

.search-input {
    position: relative;
}

.search-input input {
    padding-left: 2.5rem;
}

.search-input svg {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════
   PESTAÑAS
   ═══════════════════════════════════════════════ */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: .75rem 1.25rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
    position: relative;
}

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

.tab-btn.active {
    color: var(--primary-400);
    border-bottom-color: var(--primary-400);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════
   ESTADO VACÍO
   ═══════════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-tertiary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    opacity: .4;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: .5rem;
}

/* ═══════════════════════════════════════════════
   INTERRUPTOR
   ═══════════════════════════════════════════════ */
.toggle {
    position: relative;
    width: 46px;
    height: 26px;
    cursor: pointer;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle input:checked+.toggle-slider {
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    border-color: var(--primary-400);
}

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

/* ═══════════════════════════════════════════════
   BARRA LATERAL MÓVIL
   ═══════════════════════════════════════════════ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: calc(var(--z-sticky) - 1);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: .25rem;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

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

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }
}

/* ═══════════════════════════════════════════════
   BARRAS DE GRÁFICO
   ═══════════════════════════════════════════════ */
.chart-bar-container {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    height: 160px;
    padding-top: 1rem;
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
}

.chart-bar {
    width: 100%;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height .6s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 4px;
    position: relative;
}

.chart-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.chart-bar.blue {
    background: linear-gradient(to top, var(--primary-600), var(--primary-400));
}

.chart-bar.green {
    background: linear-gradient(to top, var(--success-600), var(--success-400));
}

.chart-bar.yellow {
    background: linear-gradient(to top, var(--warning-600), var(--warning-400));
}

.chart-bar.red {
    background: linear-gradient(to top, var(--danger-600), var(--danger-400));
}

.chart-label {
    font-size: .65rem;
    color: var(--text-tertiary);
    text-align: center;
}

.chart-value {
    font-size: .7rem;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════
   AVATAR
   ═══════════════════════════════════════════════ */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: .75rem;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.avatar:hover {
    transform: scale(1.08);
}

.avatar.sm {
    width: 28px;
    height: 28px;
    font-size: .65rem;
}

.avatar.lg {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.avatar-blue {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-400);
}

.avatar-green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-400);
}

.avatar-purple {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.avatar-orange {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

/* ═══════════════════════════════════════════════
   INDICADOR DE PUNTOS
   ═══════════════════════════════════════════════ */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-success {
    background: var(--success-500);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.dot-warning {
    background: var(--warning-500);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.dot-danger {
    background: var(--danger-500);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.dot-neutral {
    background: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════
   BARRA DE HERRAMIENTAS
   ═══════════════════════════════════════════════ */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ═══════════════════════════════════════════════
   CONTROLES DE ENCABEZADO
   ═══════════════════════════════════════════════ */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-controls .divider {
    width: 1px;
    height: 16px;
    background: var(--border-light);
    margin: 0 0.25rem;
}

/* ═══════════════════════════════════════════════
   IMPORTACIÓN DE EXCEL ESPECÍFICA
   ═══════════════════════════════════════════════ */
.import-instructions {
    line-height: 1.6;
}

.list-check {
    list-style: none;
    padding: 0;
}

.list-check li {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
    font-size: .9rem;
}

.list-check li::before {
    content: '✓';
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--success-500), var(--success-400));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.import-summary li {
    font-size: .95rem;
    border-bottom: 1px solid var(--border-light);
}

.import-summary li:last-child {
    border-bottom: none;
}

/* ═══════════════════════════════════════════════
   SELECTOR PREMIUM DE EMPLEADOS POR AGENCIA
   ═══════════════════════════════════════════════ */
.emp-dropdown-trigger {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 0.65rem 0.95rem;
    font-size: 0.88rem;
    color: var(--text-primary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    min-height: 42px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.emp-dropdown-trigger:hover {
    border-color: #3b82f6;
    background: var(--bg-tertiary);
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.12);
}

.emp-dropdown-trigger.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.2);
}

.emp-dropdown-container.is-open {
    z-index: 99999 !important;
    position: relative !important;
}

.card.has-open-dropdown,
.dashboard-grid.has-open-dropdown,
.card:has(.emp-dropdown-container.is-open),
.dashboard-grid:has(.emp-dropdown-container.is-open) {
    z-index: 9999 !important;
    position: relative !important;
}

/* Menú desplegable estilo tarjeta redondeada (similar a toast de notificación) */
.emp-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    min-width: 330px;
    max-width: 460px;
    background: var(--bg-primary);
    border: 1.5px solid #3b82f6;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 99999;
    overflow: hidden;
    animation: fadeInDown 0.18s ease-out;
}

[data-theme="light"] .emp-dropdown-menu {
    background: #ffffff;
    border: 1.5px solid #93c5fd;
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.14), 0 2px 10px rgba(148, 163, 184, 0.15);
}

.emp-dropdown-search-box {
    padding: 11px 14px;
    background: var(--bg-secondary);
    border-bottom: 1.5px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.emp-dropdown-search-box input {
    width: 100%;
    border: 1.5px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 11px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

.emp-dropdown-search-box input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2.5px rgba(59, 130, 246, 0.18);
}

.emp-dropdown-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}

.emp-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    margin-bottom: 3px;
    font-size: 0.86rem;
    color: var(--text-primary);
}

.emp-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(2px);
}

.emp-dropdown-item.selected {
    background: rgba(37, 99, 235, 0.16);
    font-weight: 700;
    color: #3b82f6;
}

.emp-agency-section {
    margin-top: 10px;
    margin-bottom: 4px;
}

/* Distintivos por Agencia con temática de color personalizada */
.emp-agency-header-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 5px;
    background: var(--ag-bg);
    border: 1px solid var(--ag-border);
    border-left: 4px solid var(--ag-border);
    color: var(--ag-color);
}

.emp-agency-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--ag-bg);
    border: 1px solid var(--ag-border);
    color: var(--ag-color);
    white-space: nowrap;
}

/* Colores específicos y elegantes por cada agencia */
.agency-theme-salcedo {
    --ag-bg: rgba(59, 130, 246, 0.12);
    --ag-border: #3b82f6;
    --ag-color: #1d4ed8;
    --ag-badge-bg: rgba(59, 130, 246, 0.2);
}
.agency-theme-ambato {
    --ag-bg: rgba(16, 185, 129, 0.12);
    --ag-border: #10b981;
    --ag-color: #047857;
    --ag-badge-bg: rgba(16, 185, 129, 0.2);
}
.agency-theme-pillaro {
    --ag-bg: rgba(139, 92, 246, 0.12);
    --ag-border: #8b5cf6;
    --ag-color: #6d28d9;
    --ag-badge-bg: rgba(139, 92, 246, 0.2);
}
.agency-theme-riobamba {
    --ag-bg: rgba(245, 158, 11, 0.14);
    --ag-border: #f59e0b;
    --ag-color: #b45309;
    --ag-badge-bg: rgba(245, 158, 11, 0.22);
}
.agency-theme-ibarra {
    --ag-bg: rgba(6, 182, 212, 0.12);
    --ag-border: #06b6d4;
    --ag-color: #0e7490;
    --ag-badge-bg: rgba(6, 182, 212, 0.2);
}
.agency-theme-santodomingo {
    --ag-bg: rgba(236, 72, 153, 0.12);
    --ag-border: #ec4899;
    --ag-color: #be185d;
    --ag-badge-bg: rgba(236, 72, 153, 0.2);
}
.agency-theme-default {
    --ag-bg: rgba(100, 116, 139, 0.12);
    --ag-border: #94a3b8;
    --ag-color: #475569;
    --ag-badge-bg: rgba(100, 116, 139, 0.2);
}

/* Modo oscuro: textos más legibles */
[data-theme="dark"] .agency-theme-salcedo { --ag-color: #93c5fd; }
[data-theme="dark"] .agency-theme-ambato { --ag-color: #6ee7b7; }
[data-theme="dark"] .agency-theme-pillaro { --ag-color: #c4b5fd; }
[data-theme="dark"] .agency-theme-riobamba { --ag-color: #fcd34d; }
[data-theme="dark"] .agency-theme-ibarra { --ag-color: #67e8f9; }
[data-theme="dark"] .agency-theme-santodomingo { --ag-color: #f472b6; }
[data-theme="dark"] .agency-theme-default { --ag-color: #cbd5e1; }

/* ═══════════════════════════════════════════════
   BADGE DE ESTADO DE SINCRONIZACIÓN MULTI-AGENCIA
   ═══════════════════════════════════════════════ */
.sync-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-right: 6px;
}
.sync-status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}
.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Estado: Matriz Principal */
.sync-matriz {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.sync-matriz .sync-dot {
    background: #2563eb;
    box-shadow: 0 0 6px #3b82f6;
}

/* Estado: Sucursal Sincronizada OK */
.sync-ok {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.sync-ok .sync-dot {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

/* Estado: Sucursal con Pendientes */
.sync-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.sync-pending .sync-dot {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}

/* Estado: Error de conexión con Matriz */
.sync-error {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.sync-error .sync-dot {
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
}

/* Temas oscuros para badge */
[data-theme="dark"] .sync-matriz {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.4);
}
[data-theme="dark"] .sync-ok {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.4);
}
[data-theme="dark"] .sync-pending {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.4);
}
[data-theme="dark"] .sync-error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
}

/* ═══════════════════════════════════════════════
   BIO-SWITCH (Interruptor Toggle Estilo iOS / Moderno)
   ═══════════════════════════════════════════════ */
.bio-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}

.bio-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    margin: 0;
}

.bio-switch-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 9999px;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.bio-switch-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
}

.bio-switch input:checked + .bio-switch-slider {
    background: linear-gradient(135deg, #0284c7 0%, #0284c7 35%, #0ea5e9 70%, #38bdf8 100%);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.38);
}

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

.bio-switch:hover .bio-switch-slider::before {
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .bio-switch-slider {
    background: #334155;
}


/* ══════════════════════════════════════════════════════════════
   NOTIFICACIONES TOAST PRO — ALTA VISIBILIDAD (UI/UX PRO MAX)
   ══════════════════════════════════════════════════════════════ */
.toast {
    padding: 1rem 1.35rem !important;
    border-radius: 16px !important;
    min-width: 340px !important;
    max-width: 480px !important;
    gap: 0.9rem !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%) !important;
    border: 2px solid #cbd5e1 !important;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.38), 0 4px 16px rgba(0, 0, 0, 0.14) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.toast-icon-badge {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.success {
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.98) 0%, rgba(209, 250, 229, 0.96) 100%) !important;
    border: 2px solid #10b981 !important;
    box-shadow: 0 20px 45px -10px rgba(16, 185, 129, 0.32), 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

.toast.success .toast-icon-badge {
    background: rgba(16, 185, 129, 0.18);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.toast.success .toast-message {
    color: #064e3b !important;
}

.toast.error {
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.98) 0%, rgba(254, 226, 226, 0.96) 100%) !important;
    border: 2px solid #ef4444 !important;
    box-shadow: 0 20px 45px -10px rgba(239, 68, 68, 0.32), 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

.toast.error .toast-icon-badge {
    background: rgba(239, 68, 68, 0.16);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.32);
}

.toast.error .toast-message {
    color: #7f1d1d !important;
}

.toast.warning {
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.98) 0%, rgba(254, 243, 199, 0.96) 100%) !important;
    border: 2px solid #f59e0b !important;
    box-shadow: 0 20px 45px -10px rgba(245, 158, 11, 0.32), 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

.toast.warning .toast-icon-badge {
    background: rgba(245, 158, 11, 0.18);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.toast.warning .toast-message {
    color: #78350f !important;
}

.toast.info {
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.98) 0%, rgba(224, 242, 254, 0.96) 100%) !important;
    border: 2px solid #0ea5e9 !important;
    box-shadow: 0 20px 45px -10px rgba(14, 165, 233, 0.32), 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

.toast.info .toast-icon-badge {
    background: rgba(14, 165, 233, 0.16);
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.32);
}

.toast.info .toast-message {
    color: #0c4a6e !important;
}

.toast-message {
    font-size: 0.94rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    letter-spacing: -0.01em;
}

.toast-close {
    color: #64748b !important;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem !important;
}

.toast-close:hover {
    background: rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
    transform: none !important;
}

/* ═══════════════════════════════════════════════
   MODAL DE INACTIVIDAD (PALETA AZUL CORPORATIVO)
   ═══════════════════════════════════════════════ */
.inactivity-card {
    max-width: 420px;
    width: 92%;
    background: var(--bg-secondary, #111827);
    border: 1px solid rgba(22, 109, 176, 0.35);
    border-top: 4px solid #166db0;
    border-radius: 20px;
    padding: 1.75rem 1.6rem 1.5rem;
    text-align: center;
    box-shadow: 0 24px 48px -12px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(22, 109, 176, 0.12);
    animation: scaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] .inactivity-card {
    background: #ffffff;
    border-color: rgba(22, 109, 176, 0.22);
    border-top: 4px solid #166db0;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(22, 109, 176, 0.08);
}

.inactivity-icon-ring {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.9rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 109, 176, 0.14);
    border: 1px solid rgba(22, 109, 176, 0.28);
    color: #38bdf8;
}

[data-theme="light"] .inactivity-icon-ring {
    background: rgba(22, 109, 176, 0.1);
    border-color: rgba(22, 109, 176, 0.2);
    color: #166db0;
}

.inactivity-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    background: rgba(22, 109, 176, 0.14);
    color: #60a5fa;
    margin-bottom: 0.6rem;
}

[data-theme="light"] .inactivity-badge {
    background: rgba(22, 109, 176, 0.1);
    color: #166db0;
}

.inactivity-title {
    margin: 0 0 0.45rem 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.inactivity-desc {
    margin: 0 0 1.15rem 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.inactivity-timer-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 0.7rem 1.5rem;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    background: rgba(22, 109, 176, 0.1);
    border: 1px solid rgba(22, 109, 176, 0.25);
}

[data-theme="light"] .inactivity-timer-box {
    background: #f0f6fc;
    border-color: rgba(22, 109, 176, 0.22);
}

.inactivity-timer-value {
    font-size: 2.1rem;
    font-weight: 800;
    color: #38bdf8;
    font-family: 'Inter', monospace;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

[data-theme="light"] .inactivity-timer-value {
    color: #166db0;
}

.inactivity-timer-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-top: 2px;
}
