/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --sidebar-width: 260px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Layout con Sidebar */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--black);
    color: var(--white);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: var(--gray-400);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9375rem;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border-left-color: var(--white);
}

.sidebar-menu .icon {
    margin-right: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.sidebar-menu .icon svg {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: var(--white);
    min-height: 100vh;
}

/* Topbar */
.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--black);
}

.topbar-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Container */
.container {
    padding: 2rem;
    width: 100%;
    max-width: 100%;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Auth Container */
.auth-container {
    display: flex;
    min-height: 100vh;
}

.auth-left {
    flex: 1;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.auth-left-content {
    max-width: 500px;
    color: var(--white);
}

.auth-left-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.auth-left-content p {
    font-size: 1.125rem;
    color: var(--gray-400);
    line-height: 1.6;
}

.auth-right {
    flex: 1;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.subtitle {
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--black);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: all 0.2s;
    background: var(--white);
    color: var(--black);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
}

.btn-primary {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.btn-primary:hover {
    background: var(--gray-900);
    border-color: var(--gray-900);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--white);
    color: var(--black);
    border-color: var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.btn-warning {
    background: var(--warning);
    color: var(--black);
    border-color: var(--warning);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 3rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-card.positive .stat-value {
    color: var(--success);
}

.stat-card.negative .stat-value {
    color: var(--danger);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--dark);
    color: white;
    font-weight: 600;
}

.table tbody tr:hover {
    background: var(--light);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-center {
    text-align: center;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Reports */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.report-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.report-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

/* Auth Links */
.auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    text-align: center;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
}

.demo-credentials {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 5px;
    font-size: 0.875rem;
}

/* Form Container */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
    }
}


/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--black);
}

.card-body {
    padding: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 140px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--black);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    border-color: var(--black);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-card:hover::before {
    transform: scaleY(1);
}

.stat-card h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.stat-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-value {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    word-break: break-all;
}

.stat-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--gray-100);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.stat-card:hover .stat-icon {
    background: var(--black);
    color: var(--white);
    transform: scale(1.05);
}

.stat-card.positive .stat-icon {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.stat-card.positive:hover .stat-icon {
    background: var(--success);
    color: var(--white);
}

.stat-card.negative .stat-icon {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.stat-card.negative:hover .stat-icon {
    background: var(--danger);
    color: var(--white);
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-info h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-600);
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
    margin: 0;
    line-height: 1;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.table th {
    background: var(--gray-100);
    color: var(--black);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background 0.2s;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--black);
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0;
    color: var(--black);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid;
    font-size: 0.9375rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: var(--success);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: var(--danger);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: var(--warning);
}

/* Auth Links */
.auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    text-align: center;
}

.auth-links a {
    color: var(--black);
    text-decoration: none;
    font-size: 0.875rem;
    transition: opacity 0.2s;
}

.auth-links a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.demo-credentials {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 6px;
    font-size: 0.8125rem;
    border: 1px solid var(--gray-200);
}

.demo-credentials p {
    margin: 0.25rem 0;
}

.demo-credentials strong {
    color: var(--black);
}

/* Form Container */
.form-container {
    background: var(--white);
    border: 1px solid var(--gray-200);
    padding: 2rem;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 auto;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

/* Responsive */
@media (max-width: 768px) {
    /* Ocultar sidebar en móvil */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Ajustar contenido principal */
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .container {
        padding: 1rem;
    }
    
    .topbar {
        padding: 0.75rem 1rem;
    }
    
    /* Formularios en columna */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Stats en columna */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* Headers */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    /* Botones */
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    /* Auth */
    .auth-container {
        flex-direction: column;
    }
    
    .auth-left {
        display: none;
    }
    
    .auth-right {
        padding: 2rem 1.5rem;
    }
    
    /* Tablas */
    .table {
        font-size: 0.8125rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Cards */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Dashboard grid */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Overlay para móvil */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Utilidades */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-muted {
    color: var(--gray-600);
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ========================================
   BIOMETRIC AUTHENTICATION STYLES
   ======================================== */

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-300);
}

.auth-divider span {
    padding: 0 1rem;
}

/* Biometric Button */
.btn-biometric {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-biometric:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-biometric:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.biometric-icon {
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.biometric-status {
    text-align: center;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    border-radius: 4px;
}

.biometric-status.available {
    color: var(--success);
    background: rgba(40, 167, 69, 0.1);
}

/* User Select Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    color: var(--black);
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-card:hover {
    border-color: var(--black);
    background: var(--gray-100);
    transform: translateX(4px);
}

.user-card .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.user-card .user-info {
    flex: 1;
}

.user-card .user-name {
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.25rem;
}

.user-card .user-username {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   SETTINGS MODULE STYLES
   ======================================== */

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Settings Tile */
.settings-tile {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--black);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.settings-tile:hover {
    border-color: var(--black);
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.tile-icon {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.tile-icon.security {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.tile-icon.profile {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: var(--white);
}

.tile-icon.notifications {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: var(--white);
}

.tile-icon.preferences {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: var(--white);
}

.settings-tile:hover .tile-icon {
    transform: scale(1.1) rotate(5deg);
}

.tile-content {
    flex: 1;
}

.tile-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.tile-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.tile-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gray-200);
    color: var(--gray-700);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.tile-badge.active {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.tile-arrow {
    color: var(--gray-400);
    transition: all 0.3s ease;
}

.settings-tile:hover .tile-arrow {
    color: var(--black);
    transform: translateX(4px);
}

/* Settings Section */
.settings-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.section-description {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--black);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Action Card */
.action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.action-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 12px;
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.action-content {
    flex: 1;
}

.action-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.action-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Credentials List */
.credentials-list h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.credential-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.credential-card:hover {
    border-color: var(--gray-400);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.credential-icon {
    font-size: 2rem;
}

.credential-info {
    flex: 1;
}

.credential-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.credential-meta {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}

.empty-state .material-icons {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    margin: 0.5rem 0;
}

.empty-state p.small {
    font-size: 0.875rem;
    color: var(--gray-400);
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.back-link:hover {
    color: var(--black);
    transform: translateX(-4px);
}

/* Confirm Modal */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.confirm-dialog {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.confirm-dialog p {
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
    color: var(--black);
}

.confirm-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Notification */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .action-card {
        flex-direction: column;
        text-align: center;
    }
}


/* Notificaciones Desktop */
.notification-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
    text-decoration: none;
    color: var(--gray-700);
}

.notification-btn:hover {
    background: var(--gray-100);
}

.notification-btn svg {
    stroke: var(--gray-700);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* User Management Styles */
.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 16px;
    text-align: center;
    letter-spacing: 0.025em;
}

.badge-primary {
    background: #000;
    color: #fff;
}

.badge-secondary {
    background: #6b7280;
    color: #fff;
}

.badge-success {
    background: #10b981;
    color: #fff;
}

.badge-danger {
    background: #ef4444;
    color: #fff;
}

.table td {
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #10b981;
}

input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-action {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
    font-weight: 500;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-sm.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-sm.btn-secondary:hover {
    background: #4b5563;
}

.btn-sm.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-sm.btn-danger:hover {
    background: #dc2626;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.tile-icon.users {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

.btn-gestor {
    background: #8b5cf6;
    color: white;
}

.btn-gestor:hover {
    background: #7c3aed;
}
