/* =====================================================
   FichajeCloud - Sistema de Diseño Premium v2.0
   Interfaz profesional, moderna y fácil de usar
   ===================================================== */

/* Variables y tokens de diseño */
:root {
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    
    --success-50: #ecfdf5;
    --success-500: #10b981;
    --success-600: #059669;
    --success-700: #047857;
    
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    
    --danger-50: #fef2f2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    
    --info-50: #eff6ff;
    --info-500: #3b82f6;
    --info-600: #2563eb;
    
    --gray-25: #fcfcfd;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --gray-950: #030712;
    
    --sidebar-width: 280px;
    --header-height: 72px;
    
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-full: 9999px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--gray-50); color: var(--gray-900); line-height: 1.6; }
::selection { background: var(--primary-100); color: var(--primary-900); }
a { color: var(--primary-600); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary-700); }

/* Layout */
.main-wrapper { margin-left: var(--sidebar-width); min-height: 100vh; }
.main-content { padding: 2rem 2.5rem; max-width: 1400px; margin: 0 auto; }

/* ===================== SIDEBAR PREMIUM ===================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--gray-900) 0%, var(--gray-950) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
    opacity: 0.1;
    pointer-events: none;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 1.375rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

.sidebar-logo svg {
    width: 36px;
    height: 36px;
    color: var(--primary-400);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
}

.sidebar-nav { flex: 1; padding: 1.25rem 0; overflow-y: auto; }
.nav-section { padding: 0 0.875rem; margin-bottom: 1.75rem; }
.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    padding: 0 0.875rem;
    margin-bottom: 0.625rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 0.875rem;
    border-radius: var(--radius-lg);
    color: var(--gray-400);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.15s;
    margin-bottom: 0.25rem;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary-500);
    border-radius: 0 2px 2px 0;
    transition: height 0.15s;
}

.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: white; }
.nav-item.active { background: rgba(99, 102, 241, 0.15); color: white; }
.nav-item.active::before { height: 60%; }
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; transition: transform 0.15s; }
.nav-item:hover svg { transform: scale(1.1); }

.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.tenant-info { display: flex; align-items: center; gap: 0.875rem; }
.tenant-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9375rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tenant-details { flex: 1; min-width: 0; }
.tenant-name { font-weight: 600; font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant-plan { font-size: 0.75rem; color: var(--gray-400); }

/* ===================== HEADER ===================== */
.header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-title { font-size: 1.375rem; font-weight: 700; color: var(--gray-900); letter-spacing: -0.02em; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.5rem 0.75rem 0.5rem 0.5rem;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.user-menu:hover { background: var(--gray-50); border-color: var(--gray-200); }

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9375rem;
}

.user-info { text-align: left; }
.user-name { font-weight: 600; font-size: 0.9375rem; color: var(--gray-900); }
.user-role { font-size: 0.75rem; color: var(--gray-500); }

/* ===================== CARDS ===================== */
.card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    transition: all 0.2s;
}

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

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

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.card-title svg { width: 18px; height: 18px; color: var(--gray-500); }
.card-body { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-100); background: var(--gray-50); }

/* ===================== STATS ===================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    opacity: 0;
    transition: opacity 0.15s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card:hover::before { opacity: 1; }

.stat-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}

.stat-card:hover .stat-icon { transform: scale(1.1); }
.stat-icon svg { width: 26px; height: 26px; }
.stat-icon.primary { background: linear-gradient(135deg, var(--primary-50), var(--primary-100)); color: var(--primary-600); }
.stat-icon.success { background: linear-gradient(135deg, var(--success-50), #d1fae5); color: var(--success-600); }
.stat-icon.warning { background: linear-gradient(135deg, var(--warning-50), #fef3c7); color: var(--warning-600); }
.stat-icon.danger { background: linear-gradient(135deg, var(--danger-50), #fee2e2); color: var(--danger-600); }
.stat-icon.info { background: linear-gradient(135deg, var(--info-50), #dbeafe); color: var(--info-600); }

.stat-value { font-size: 2.25rem; font-weight: 700; line-height: 1; margin-bottom: 0.375rem; color: var(--gray-900); letter-spacing: -0.02em; }
.stat-label { font-size: 0.875rem; color: var(--gray-500); font-weight: 500; }

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.3s;
}

.btn:hover::before { left: 100%; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
    color: white;
}

.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-200); color: var(--gray-800); }

.btn-success {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-600) 0%, var(--success-700) 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-500) 0%, var(--danger-600) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger-600) 0%, #b91c1c 100%);
    transform: translateY(-1px);
    color: white;
}

.btn-outline { background: transparent; border: 1.5px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn-outline.active { background: var(--primary-50); border-color: var(--primary-500); color: var(--primary-700); }

.btn-warning {
    background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}
.btn-warning:hover {
    background: linear-gradient(135deg, var(--warning-600) 0%, #b45309 100%);
    transform: translateY(-1px);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-500) 0%, var(--info-600) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}
.btn-info:hover {
    background: linear-gradient(135deg, var(--info-600) 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    color: white;
}

.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; border-radius: var(--radius-xl); }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; border-radius: var(--radius); }
.btn-icon { padding: 0.625rem; border-radius: var(--radius-lg); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ===================== FILTER BAR ===================== */
.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group .form-control {
    min-width: 160px;
}

/* ===================== ALERTS ===================== */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-info {
    background: var(--info-50);
    color: var(--info-600);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-warning {
    background: var(--warning-50);
    color: var(--warning-600);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-success {
    background: var(--success-50);
    color: var(--success-600);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: var(--danger-50);
    color: var(--danger-600);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===================== FORMS ===================== */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.5rem; }

.form-input,
.form-select,
.form-control,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: white;
    color: var(--gray-900);
    transition: all 0.15s;
}

.form-input:hover, .form-select:hover, .form-control:hover, .form-textarea:hover { border-color: var(--gray-400); }
.form-input:focus, .form-select:focus, .form-control:focus, .form-textarea:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 4px var(--primary-50); }
.form-input.error { border-color: var(--danger-500); }
.form-input::placeholder { color: var(--gray-400); }
.form-error { font-size: 0.8125rem; color: var(--danger-600); margin-top: 0.375rem; }
.form-hint { font-size: 0.8125rem; color: var(--gray-500); margin-top: 0.375rem; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

/* ===================== TABLE ===================== */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 1rem 1.25rem; text-align: left; }
.table th {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.table tbody tr { border-bottom: 1px solid var(--gray-100); transition: background 0.15s; }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: var(--gray-50); }
.table td { font-size: 0.9375rem; color: var(--gray-700); }

/* ===================== BADGES ===================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge svg { width: 12px; height: 12px; }
.badge-success { background: var(--success-50); color: var(--success-700); border: 1px solid #a7f3d0; }
.badge-warning { background: var(--warning-50); color: #b45309; border: 1px solid #fde68a; }
.badge-danger { background: var(--danger-50); color: var(--danger-600); border: 1px solid #fecaca; }
.badge-info { background: var(--info-50); color: var(--info-600); border: 1px solid #bfdbfe; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }
.badge-primary { background: var(--primary-50); color: var(--primary-700); border: 1px solid var(--primary-200); }

/* ===================== ALERTS ===================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    border: 1px solid transparent;
}

.alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 0.0625rem; }
.alert-success { background: var(--success-50); color: var(--success-700); border-color: #a7f3d0; }
.alert-success svg { color: var(--success-600); }
.alert-warning { background: var(--warning-50); color: #92400e; border-color: #fde68a; }
.alert-warning svg { color: var(--warning-600); }
.alert-danger { background: var(--danger-50); color: #991b1b; border-color: #fecaca; }
.alert-danger svg { color: var(--danger-600); }
.alert-info { background: var(--info-50); color: #1e40af; border-color: #bfdbfe; }
.alert-info svg { color: var(--info-600); }

/* ===================== PUNCH SECTION ===================== */
.punch-section { text-align: center; padding: 2.5rem 2rem; }
.punch-status { margin-bottom: 2rem; }

.punch-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
}

.punch-status-badge.in { background: var(--success-50); color: var(--success-700); border: 2px solid #a7f3d0; }
.punch-status-badge.out { background: var(--gray-100); color: var(--gray-600); border: 2px solid var(--gray-200); }
.punch-status-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.punch-status-badge.in .dot { animation: pulse-dot 2s infinite; }

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.punch-button {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: none;
    font-size: 1.375rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    transition: all 0.2s;
    position: relative;
}

.punch-button::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    filter: blur(20px);
    z-index: -1;
    transition: all 0.2s;
}

.punch-button svg { width: 56px; height: 56px; }

.punch-button.entry {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4);
}

.punch-button.entry:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.5);
}

.punch-button.exit {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.4);
}

.punch-button.exit:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.5);
}

.punch-button:active { transform: scale(0.98); }

.punch-time {
    margin-top: 2rem;
    font-size: 3rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.punch-date { font-size: 1rem; color: var(--gray-500); font-weight: 500; text-transform: capitalize; }

/* ===================== AUTH PAGES ===================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-900) 0%, #0f172a 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-container { width: 100%; max-width: 440px; position: relative; z-index: 1; }

.auth-card {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    padding: 2.5rem;
}

.auth-header { text-align: center; margin-bottom: 2rem; }

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-logo svg {
    width: 44px;
    height: 44px;
    color: var(--primary-600);
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.25));
}

.auth-subtitle { color: var(--gray-500); font-size: 1rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.9375rem; color: var(--gray-500); }

/* ===================== LANDING ===================== */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-100);
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.landing-logo svg { width: 32px; height: 32px; color: var(--primary-600); }
.landing-nav-links { display: flex; align-items: center; gap: 2rem; }
.landing-nav-links a { color: var(--gray-600); font-weight: 500; }
.landing-nav-links a:hover { color: var(--primary-600); }

.hero {
    padding: 10rem 2rem 6rem;
    text-align: center;
    background: linear-gradient(180deg, white 0%, var(--gray-50) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 100%;
    background: radial-gradient(ellipse at center top, var(--primary-50) 0%, transparent 60%);
    pointer-events: none;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
    letter-spacing: -0.03em;
    position: relative;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary-600) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.375rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===================== DROPDOWNS ===================== */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-100);
    padding: 0.5rem;
    z-index: 100;
}

.dropdown-menu a, .dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: 0.9375rem;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--gray-50); }
.dropdown-menu svg { width: 18px; height: 18px; color: var(--gray-500); }

/* ===================== TOASTS ===================== */
.toast-container { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.75rem; }

.toast {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-100);
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    transition: all 0.3s;
    max-width: 400px;
}

.toast.show { transform: translateX(0); opacity: 1; }
.toast svg { width: 22px; height: 22px; flex-shrink: 0; }
.toast-success { border-left: 4px solid var(--success-500); }
.toast-success svg { color: var(--success-500); }
.toast-error { border-left: 4px solid var(--danger-500); }
.toast-error svg { color: var(--danger-500); }

/* ===================== UTILITIES ===================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-success { color: var(--success-600); }
.text-danger { color: var(--danger-600); }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.hidden { display: none; }
.w-full { width: 100%; }

/* ===================== RESPONSIVE ===================== */

/* Botón menú móvil */
.mobile-menu-btn {
    display: none;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-700);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* Overlay para sidebar 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: 99;
    opacity: 0;
    transition: opacity 0.3s;
}

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

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 280px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 101;
    }

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

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

    .mobile-menu-btn {
        display: flex;
    }

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

    .hero-title {
        font-size: 3rem;
    }

    /* Header ajustes tablet */
    .header {
        padding: 0 1.25rem;
    }

    .header-title {
        font-size: 1.125rem;
    }

    /* Ocultar info de usuario en tablet/móvil */
    .user-info {
        display: none;
    }

    .user-menu {
        padding: 0.375rem;
    }
}

@media (max-width: 768px) {
    /* Variables móviles */
    :root {
        --header-height: 60px;
    }

    /* Layout móvil */
    .main-content {
        padding: 1rem;
    }

    /* Header móvil */
    .header {
        padding: 0 1rem;
        height: var(--header-height);
    }

    .header-title {
        font-size: 1rem;
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.8125rem;
    }

    /* Stats móvil */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
    }

    .stat-icon svg {
        width: 22px;
        height: 22px;
    }

    /* Cards móvil */
    .card-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-footer {
        padding: 0.875rem 1rem;
    }

    /* Tablas móvil */
    .table-wrapper {
        margin: 0 -1rem;
        border-radius: 0;
    }

    .table th, .table td {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    /* Botones móvil */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    .btn svg {
        width: 16px;
        height: 16px;
    }

    /* Formularios móvil */
    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-input, .form-select, .form-control, .form-textarea {
        padding: 0.625rem 0.875rem;
        font-size: 1rem; /* 16px evita zoom en iOS */
    }

    .form-label {
        font-size: 0.8125rem;
    }

    /* Fichaje móvil */
    .punch-section {
        padding: 1.5rem 1rem;
    }

    .punch-button {
        width: 140px;
        height: 140px;
        font-size: 1rem;
    }

    .punch-button svg {
        width: 36px;
        height: 36px;
    }

    .punch-time {
        font-size: 2rem;
        margin-top: 1.5rem;
    }

    .punch-date {
        font-size: 0.875rem;
    }

    .punch-status-badge {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }

    /* Filtros móvil */
    .filter-bar {
        padding: 0.875rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group .form-control {
        width: 100%;
        min-width: unset;
    }

    .filter-group label {
        font-size: 0.6875rem;
    }

    /* Page header móvil */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* Auth pages móvil */
    .auth-page {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
        border-radius: var(--radius-xl);
    }

    .auth-logo {
        font-size: 1.375rem;
    }

    .auth-logo svg {
        width: 36px;
        height: 36px;
    }

    .auth-subtitle {
        font-size: 0.9375rem;
    }

    /* Alerts móvil */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    .alert svg {
        width: 18px;
        height: 18px;
    }

    /* Toasts móvil */
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        max-width: 100%;
    }

    /* Badges móvil */
    .badge {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.5rem;
    }

    /* Landing hero móvil */
    .hero {
        padding: 7rem 1rem 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 0 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .landing-nav-links {
        display: none;
    }

    /* Dropdown móvil */
    .dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        max-height: 70vh;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .punch-button {
        width: 120px;
        height: 120px;
        font-size: 0.875rem;
    }

    .punch-button svg {
        width: 32px;
        height: 32px;
    }

    .punch-time {
        font-size: 1.75rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .auth-card {
        padding: 1.25rem;
    }

    .table th, .table td {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* ===================== LOADING ===================== */
.loading { display: inline-block; width: 20px; height: 20px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
