:root {
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-subtle: rgba(226, 232, 240, 0.6);

    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-primary-light: #3b82f6;
    --color-primary-glow: rgba(37, 99, 235, 0.10);
    --color-secondary: #0d9488;
    --color-success: #10b981;
    --color-success-glow: rgba(16, 185, 129, 0.10);
    --color-warning: #f59e0b;
    --color-danger: #ef4444;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
    --font-numbers: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.03);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.05);
    --shadow-glow-blue: 0 0 24px rgba(37, 99, 235, 0.18);
    --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.18);

    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-surface: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: var(--font-main);
}

i[data-lucide] {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    flex-shrink: 0;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

::selection {
    background: rgba(37, 99, 235, 0.15);
    color: var(--color-primary-dark);
}

/* ═══════════════════════════════════════════════════
   LOGIN & REGISTRATION
   ═══════════════════════════════════════════════════ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    background: linear-gradient(160deg, #dbeafe 0%, #f0fdf9 40%, #eff6ff 70%, #e0f2fe 100%);
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse 600px 600px at 20% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 500px 500px at 80% 80%, rgba(13, 148, 136, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 400px 400px at 50% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 60%);
    animation: meshFloat 20s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes meshFloat {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-2%, 1%) rotate(1deg); }
    100% { transform: translate(1%, -1%) rotate(-0.5deg); }
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.login-blob {
    position: absolute;
    top: -120px;
    left: -120px;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 65%);
    border-radius: 50%;
    filter: blur(60px);
    animation: floatBlob 14s infinite alternate ease-in-out;
}

.login-blob-2 {
    position: absolute;
    bottom: -130px;
    right: -130px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.10) 0%, transparent 65%);
    border-radius: 50%;
    filter: blur(65px);
    animation: floatBlob2 16s infinite alternate ease-in-out;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(70px, 70px) scale(1.15); }
}

@keyframes floatBlob2 {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-80px, -60px) scale(0.9); }
}

.login-card {
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    padding: 48px 44px;
    width: 100%;
    max-width: 460px;
    box-shadow:
        var(--shadow-xl),
        0 0 0 1px rgba(255, 255, 255, 0.4) inset,
        0 1px 0 rgba(255, 255, 255, 0.5) inset;
    z-index: 2;
    animation: cardEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(32px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
    font-size: 20px;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.4px;
}

.login-logo img {
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
    flex-shrink: 0;
    transition: transform var(--transition-bounce);
}

.login-logo img:hover {
    transform: scale(1.05) rotate(-2deg);
}

.login-logo svg {
    stroke: var(--color-primary);
    -webkit-text-fill-color: initial;
    color: var(--color-primary);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
}

.login-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════════════ */

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group:focus-within .form-label {
    color: var(--color-primary);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.9px;
    transition: color var(--transition-fast);
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-container svg,
.input-container i[data-lucide] {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color var(--transition-fast), transform var(--transition-fast);
    pointer-events: none;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-main);
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) inset;
}

.form-input::placeholder {
    color: #b0bccc;
    font-weight: 400;
}

.form-input[type="file"] {
    padding: 11px 16px 11px 44px;
    cursor: pointer;
}

select.form-input {
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
}

.form-input:hover {
    border-color: #94a3b8;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10), 0 1px 3px rgba(37, 99, 235, 0.06);
    background: #ffffff;
}

.input-container:focus-within svg,
.input-container:focus-within i[data-lucide] {
    color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

/* ═══════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════ */

.login-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 14.5px;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.30), 0 1px 3px rgba(37, 99, 235, 0.15);
    letter-spacing: 0.3px;
    margin-top: 6px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

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

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35), 0 2px 6px rgba(37, 99, 235, 0.2);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* ═══════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════ */

.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, rgba(239, 68, 68, 0.03) 100%);
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-left: 4px solid var(--color-danger);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: var(--color-danger);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(16, 185, 129, 0.03) 100%);
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-left: 4px solid var(--color-success);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: #15803d;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-register-link {
    text-align: center;
    margin-top: 24px;
    font-size: 13.5px;
    color: var(--text-muted);
}

.login-register-link a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
    transition: color var(--transition-fast);
    position: relative;
}

.login-register-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
    transition: width var(--transition-fast);
}

.login-register-link a:hover::after {
    width: 100%;
}

.login-register-link a:hover {
    color: var(--color-primary-dark);
}

/* ═══════════════════════════════════════════════════
   APP LAYOUT
   ═══════════════════════════════════════════════════ */

.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* ═══════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════ */

.sidebar {
    width: 264px;
    background: var(--gradient-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    overflow: hidden;
    transition: all var(--transition-normal);
    z-index: 100;
    box-shadow: 2px 0 16px rgba(15, 23, 42, 0.03);
}

.sidebar-header {
    height: 92px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, transparent 100%);
}

.sidebar-header svg {
    stroke: var(--color-primary);
}

.sidebar-brand {
    color: var(--color-primary);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.sidebar-section-label {
    margin-top: 18px;
    margin-bottom: 6px;
    padding: 0 16px;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1.2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-section-label::before {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.sidebar-sede-list {
    padding: 0 10px 6px;
    list-style: none;
}

.sede-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 3px;
    text-decoration: none;
    background: transparent;
    transition: all var(--transition-fast);
    border: 1.5px solid transparent;
}

.sede-link:hover {
    background: rgba(15, 23, 42, 0.03);
    border-color: var(--border-color);
    transform: translateX(2px);
}

.sede-link.sede-active {
    background: var(--sede-bg);
    border-color: var(--sede-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sede-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--sede-color);
    flex-shrink: 0;
    transition: transform var(--transition-fast);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.04);
}

.sede-link:hover .sede-dot {
    transform: scale(1.3);
}

.sede-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.sede-link.sede-active .sede-name {
    font-weight: 700;
    color: var(--sede-color);
}

.sede-arrow {
    opacity: 0;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.sede-link:hover .sede-arrow,
.sede-link.sede-active .sede-arrow {
    opacity: 0.6;
}

.sede-link.sede-active .sede-arrow {
    transform: translateX(2px);
}

/* Employee avatars in sidebar */
.emp-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    transition: transform var(--transition-fast);
}

.menu-item.active .emp-avatar-sm {
    background: var(--color-primary-dark);
}

.sede-link:hover .emp-avatar-sm,
.menu-item:hover .emp-avatar-sm {
    transform: scale(1.08);
}

.emp-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    overflow: hidden;
}

.emp-name {
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emp-sede-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--badge-color);
    opacity: 0.8;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

.menu-item a:hover {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.04);
    transform: translateX(3px);
}

.menu-item a svg,
.menu-item a i[data-lucide] {
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.menu-item a:hover svg,
.menu-item a:hover i[data-lucide] {
    transform: scale(1.1);
}

.menu-item.active a {
    color: var(--color-primary);
    background: var(--color-primary-glow);
    font-weight: 600;
    border-left: 3px solid var(--color-primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding-left: 12px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

.menu-item.active a svg,
.menu-item.active a i[data-lucide] {
    color: var(--color-primary);
}

.sidebar-footer {
    padding: 18px 20px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.3), rgba(241, 245, 249, 0.7));
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.user-profile:hover {
    background: rgba(15, 23, 42, 0.04);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 14px;
    border: 2.5px solid white;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
    flex-shrink: 0;
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.05);
    border: 1.5px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--radius-sm);
    color: var(--color-danger);
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.2px;
}

.logout-btn:hover {
    background: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.30);
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════════ */

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100vh;
    background: var(--bg-primary);
}

.top-navbar {
    height: 92px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 50;
    will-change: transform;
}

.page-title h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.4px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.quick-sync-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.06);
    border: 1.5px solid rgba(16, 185, 129, 0.20);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    color: var(--color-success);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-sync-btn:hover {
    background: var(--color-success);
    color: white;
    border-color: var(--color-success);
    box-shadow: var(--shadow-glow-green);
    transform: translateY(-1px);
}

.quick-sync-btn.syncing svg,
.quick-sync-btn.syncing i[data-lucide] {
    animation: rotate 1s linear infinite;
}

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

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

.content-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    flex-grow: 1;
}

/* ═══════════════════════════════════════════════════
   METRIC / KPI CARDS
   ═══════════════════════════════════════════════════ */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}

.metric-card:nth-child(2)::before { background: var(--color-secondary); }
.metric-card:nth-child(3)::before { background: var(--color-success); }
.metric-card:nth-child(4)::before { background: var(--color-warning); }

/* KPI Single Card */
.metric-card-single {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.metric-card-single:hover {
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}

.kpi-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 20px;
    transition: transform var(--transition-fast);
}

.kpi-item:hover {
    transform: scale(1.02);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--transition-bounce);
}

.kpi-item:hover .kpi-icon {
    transform: scale(1.1) rotate(-3deg);
}

.kpi-icon-clientes,
.kpi-icon-dinero,
.kpi-icon-perfil,
.kpi-icon-actividades {
    background: linear-gradient(135deg, rgba(37,99,235,0.12) 0%, rgba(37,99,235,0.06) 100%);
    color: var(--color-primary);
}

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

.kpi-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.kpi-value {
    font-family: var(--font-numbers);
    font-size: 28px;
    font-weight: 400;
    color: var(--color-success);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.num {
    font-family: var(--font-numbers);
    font-variant-numeric: tabular-nums;
}

.kpi-sub {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--color-success);
    margin-top: 5px;
}

.kpi-divider {
    width: 1px;
    background: var(--border-color);
    align-self: stretch;
}

@media (max-width: 768px) {
    .metric-card-single { flex-direction: column; gap: 16px; }
    .kpi-divider { width: 100%; height: 1px; }
    .kpi-item { padding: 10px 0; }
}

.metric-info h3 {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.metric-value {
    font-family: var(--font-numbers);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.5px;
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    margin-top: 10px;
}

.trend-up { color: var(--color-success); }
.trend-down { color: var(--color-danger); }

.metric-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.04) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
    transition: transform var(--transition-bounce);
}

.metric-card:hover .metric-icon {
    transform: scale(1.1) rotate(-5deg);
}

.metric-card:nth-child(2) .metric-icon {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.12) 0%, rgba(13, 148, 136, 0.04) 100%);
    color: var(--color-secondary);
}

.metric-card:nth-child(3) .metric-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0.04) 100%);
    color: var(--color-success);
}

.metric-card:nth-child(4) .metric-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.04) 100%);
    color: var(--color-warning);
}

/* ═══════════════════════════════════════════════════
   CHARTS
   ═══════════════════════════════════════════════════ */

.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    content-visibility: auto;
    contain-intrinsic-size: 420px;
}

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

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

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

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.chart-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.chart-filters {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: var(--radius-pill);
    padding: 4px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.7);
}

.filter-btn.active {
    background: #ffffff;
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08);
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Chart Legend Pills */
#chart-legend-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 18px 12px;
    max-height: 130px;
    overflow-y: auto;
    border-top: 1px solid var(--border-subtle);
    margin-top: 10px;
    scroll-behavior: smooth;
}

#chart-legend-custom::-webkit-scrollbar {
    width: 4px;
}

#chart-legend-custom::-webkit-scrollbar-track {
    background: transparent;
}

#chart-legend-custom::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.25);
    border-radius: 4px;
}

.legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius-pill);
    padding: 4px 12px 4px 8px;
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    cursor: default;
    transition: all var(--transition-fast);
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.legend-pill:hover {
    background: rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════
   TABLES & REPORTS
   ═══════════════════════════════════════════════════ */

.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    box-shadow: var(--shadow-sm);
    content-visibility: auto;
    contain-intrinsic-size: 500px;
}

.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 14px;
}

.report-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.report-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.select-filter {
    background: #f8fafc;
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: var(--font-main);
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.select-filter:focus,
.select-filter:hover {
    border-color: var(--color-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.table-scroll-container {
    max-height: 460px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.table-scroll-container .custom-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid var(--border-color);
}

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

.custom-table th {
    padding: 14px 20px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    border-bottom: 2px solid var(--border-color);
    background: #f8fafc;
    white-space: nowrap;
}

.custom-table th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

.custom-table th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.custom-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    color: var(--text-primary);
    vertical-align: middle;
    transition: background var(--transition-fast);
}

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

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

.custom-table tbody tr:hover td {
    background: rgba(37, 99, 235, 0.02);
}

.custom-table tbody tr:nth-child(even) td {
    background: rgba(241, 245, 249, 0.4);
}

.custom-table tbody tr:nth-child(even):hover td {
    background: rgba(37, 99, 235, 0.03);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
    transition: transform var(--transition-fast);
}

.badge:hover {
    transform: scale(1.05);
}

.badge-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.10) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.20);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.10) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.20);
}

.badge-info {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.03) 100%);
    color: var(--color-primary);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

/* ═══════════════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════════════ */

.toast-notification {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--color-success);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1000;
    transform: translateX(140px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 300px;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    color: var(--color-success);
    flex-shrink: 0;
}

.toast-message h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.toast-message p {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.50);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 900px) {
    .app-wrapper {
        position: relative;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        top: 0;
        height: 100vh;
        z-index: 100;
        box-shadow: 0 0 60px rgba(15, 23, 42, 0.20);
        transition: left var(--transition-normal);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-header {
        height: 60px;
        padding: 0 18px;
        gap: 12px;
    }
    .sidebar-header img {
        height: 32px !important;
    }
    .sidebar-brand {
        font-size: 14px;
    }

    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-sm);
        background: none;
        border: none;
        color: var(--text-primary);
        cursor: pointer;
        transition: background var(--transition-fast);
    }

    .hamburger:hover {
        background: rgba(15, 23, 42, 0.05);
    }

    .top-navbar {
        padding: 0 18px;
        height: 60px;
    }

    .content-body {
        padding: 18px;
        gap: 18px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-shrink: 0;
    }
    .chart-filters::-webkit-scrollbar {
        display: none;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .metric-card {
        padding: 18px;
    }

    .metric-value {
        font-size: 26px;
    }

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

    .metric-card-single {
        padding: 18px;
    }
    .kpi-value {
        font-size: 22px;
    }
    .kpi-icon {
        width: 40px;
        height: 40px;
    }

    .chart-container {
        height: 240px;
    }

    .chart-card {
        padding: 18px;
    }

    .report-card {
        padding: 18px;
    }

    .custom-table th,
    .custom-table td {
        padding: 12px 14px;
        font-size: 12px;
    }

    .table-scroll-container {
        max-height: 360px;
    }

    .toast-notification {
        left: 18px;
        right: 18px;
        bottom: 18px;
        min-width: unset;
    }

    .page-title h1 {
        font-size: 17px;
    }

    .navbar-actions {
        gap: 10px;
    }

    .quick-sync-btn {
        padding: 7px 12px;
        font-size: 11px;
        gap: 5px;
    }

    .select-filter {
        padding: 6px 10px;
        font-size: 11px;
    }
}

@media (max-width: 600px) {
    .filter-row {
        gap: 8px !important;
    }

    .sidebar {
        width: 260px;
        left: -260px;
    }

    .sidebar-header {
        height: 52px;
        padding: 0 14px;
        gap: 8px;
    }
    .sidebar-header img {
        height: 28px !important;
    }
    .sidebar-brand {
        font-size: 13px;
    }

    .content-body {
        padding: 14px;
        gap: 14px;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .metric-card {
        padding: 14px 16px;
    }

    .metric-value {
        font-size: 22px;
    }

    .metric-info h3 {
        font-size: 10px;
    }

    .metric-icon {
        width: 38px;
        height: 38px;
    }

    .metric-trend {
        font-size: 10px;
    }

    .metric-card-single {
        padding: 14px 16px;
    }
    .kpi-value {
        font-size: 19px;
    }
    .kpi-icon {
        width: 36px;
        height: 36px;
    }
    .kpi-label {
        font-size: 10px;
    }
    .kpi-sub {
        font-size: 10px;
    }

    .chart-container {
        height: 200px;
    }

    .chart-card {
        padding: 14px;
    }

    .chart-header h2 {
        font-size: 14px;
    }

    .report-card {
        padding: 14px;
    }

    .report-header h2 {
        font-size: 14px;
    }

    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .report-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .custom-table th,
    .custom-table td {
        padding: 10px 10px;
        font-size: 11px;
    }

    .top-navbar {
        padding: 0 14px;
        height: 52px;
    }

    .page-title h1 {
        font-size: 15px;
    }

    .hamburger {
        width: 36px;
        height: 36px;
    }

    .table-scroll-container {
        max-height: 300px;
    }

    .select-filter {
        padding: 5px 8px;
        font-size: 10px;
        height: 28px;
    }

    .filter-btn {
        padding: 4px 10px;
        font-size: 11px;
    }

    .badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .navbar-actions {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .filter-row {
        gap: 6px !important;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .metric-card {
        padding: 12px 14px;
    }

    .metric-value {
        font-size: 22px;
    }

    .metric-icon {
        width: 34px;
        height: 34px;
    }

    .content-body {
        padding: 12px;
        gap: 12px;
    }

    .custom-table th,
    .custom-table td {
        padding: 8px 8px;
        font-size: 10px;
    }

    .chart-container {
        height: 180px;
    }

    .top-navbar {
        padding: 0 12px;
        height: 48px;
    }

    .sidebar-header {
        height: 48px;
        padding: 0 12px;
        gap: 6px;
    }
    .sidebar-header img {
        height: 24px !important;
    }
    .sidebar-brand {
        font-size: 12px;
    }

    .page-title h1 {
        font-size: 14px;
    }

    .filter-btn {
        padding: 3px 8px;
        font-size: 10px;
    }

    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .metric-card-single {
        padding: 12px 14px;
    }
    .kpi-value {
        font-size: 17px;
    }
    .kpi-icon {
        width: 32px;
        height: 32px;
    }
    .kpi-icon i {
        width: 16px;
        height: 16px;
    }
    .kpi-label {
        font-size: 9px;
    }
    .kpi-sub {
        font-size: 9px;
    }

    .sidebar {
        width: 240px;
        left: -240px;
    }
}

@media (max-width: 360px) {
    .content-body {
        padding: 10px;
        gap: 10px;
    }

    .metric-value {
        font-size: 18px;
    }

    .metric-card {
        padding: 10px 12px;
    }

    .custom-table th,
    .custom-table td {
        padding: 6px 6px;
        font-size: 9px;
    }

    .top-navbar {
        padding: 0 10px;
        height: 44px;
    }

    .sidebar-header {
        height: 44px;
        padding: 0 10px;
        gap: 5px;
    }
    .sidebar-header img {
        height: 20px !important;
    }
    .sidebar-brand {
        font-size: 11px;
    }

    .page-title h1 {
        font-size: 13px;
    }

    .metric-card-single {
        padding: 10px 12px;
    }
    .kpi-value {
        font-size: 15px;
    }
    .kpi-icon {
        width: 28px;
        height: 28px;
    }
    .kpi-icon i {
        width: 14px;
        height: 14px;
    }
    .kpi-label {
        font-size: 8px;
    }
    .kpi-sub {
        font-size: 8px;
    }

    .sidebar {
        width: 220px;
        left: -220px;
    }
}

/* ═══════════════════════════════════════════════════
   SHARED RESPONSIVE – Tablas y Formularios
   ═══════════════════════════════════════════════════ */

@media (max-width: 600px) {
    /* Asegurar scroll horizontal visible en todas las tablas */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    .table-responsive::-webkit-scrollbar {
        height: 4px;
    }
    .table-responsive::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.3);
        border-radius: 4px;
    }

    /* Navbar: ocultar info de usuario en móvil */
    .header-user-info { display: none; }
    .header-user {
        padding: 4px 6px !important;
        border-left: none !important;
    }

    /* Navbar: título responsive */
    .page-title h1 {
        font-size: 15px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Formularios: campos full width */
    .form-group {
        margin-bottom: 14px;
    }

    /* Report cards: padding uniforme */
    .report-card {
        padding: 16px;
    }

    /* Alertas más compactas */
    .alert-error,
    .alert-success {
        padding: 10px 14px;
        font-size: 12px;
        gap: 8px;
    }
    .alert-error i,
    .alert-success i {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    /* Login cards */
    .login-card {
        padding: 32px 24px;
        border-radius: var(--radius-lg);
    }
    .login-logo {
        font-size: 18px;
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    /* Badges más compactos */
    .badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    /* Report headers apilados */
    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Filter buttons compactos */
    .filter-btn {
        padding: 4px 10px;
        font-size: 11px;
    }

    /* Select filters compactos */
    .select-filter {
        padding: 5px 8px;
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    /* Login card ultra compacto */
    .login-card {
        padding: 24px 18px;
    }
    .login-logo {
        font-size: 16px;
        gap: 10px;
    }
    .login-header h2 {
        font-size: 18px;
    }

    /* Form inputs */
    .form-input {
        padding: 10px 12px 10px 38px;
        font-size: 13px;
    }

    /* Tablas ultra compactas */
    .custom-table th,
    .custom-table td {
        padding: 6px 6px;
        font-size: 9px;
    }
}

/* ═══════════════════════════════════════════════════
   LOADING STATES
   ═══════════════════════════════════════════════════ */

.global-page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.70);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

.global-page-loader.active {
    opacity: 1;
    pointer-events: auto;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.12);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.chart-container-relative {
    position: relative;
}

.card-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9;
    transition: opacity 0.4s ease-out;
    border-radius: var(--radius-md);
}

.card-loader-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner-small {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(37, 99, 235, 0.12);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════
   UTILITY & ANIMATION CLASSES
   ═══════════════════════════════════════════════════ */

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hover-lift {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
