/* ═══════════════════════════════════════════════════
   WorkMA Design System — Shared across all pages
   ═══════════════════════════════════════════════════ */

/* ─── Apple Glassmorphism ─── */
.glass-nav {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.dark .glass-nav {
    background: rgba(17, 24, 39, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.dark .glass-panel {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: saturate(150%) blur(16px);
    -webkit-backdrop-filter: saturate(150%) blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.dark .glass-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.1);
}
.glass-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.08);
}
.dark .glass-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 0, 0, 0.15);
}

.glass-sidebar {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: saturate(200%) blur(24px);
    -webkit-backdrop-filter: saturate(200%) blur(24px);
    border-right: 1px solid rgba(0, 0, 0, 0.04);
}
.dark .glass-sidebar {
    background: rgba(15, 23, 42, 0.6);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-badge {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.dark .glass-badge {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-input {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}
.dark .glass-input {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-input:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(5, 150, 105, 0.4);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}
.dark .glass-input:focus {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.glass-gradient {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(16, 185, 129, 0.04));
    border: 1px solid rgba(5, 150, 105, 0.1);
}
.dark .glass-gradient {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.06));
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* ─── Micro-Interactions ─── */
.hover-lift {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.dark .hover-lift:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

.press-effect {
    transition: transform 0.1s;
}
.press-effect:active {
    transform: scale(0.97);
}

/* ─── Scrollbar ─── */
.sidebar-scrollbar::-webkit-scrollbar { width: 4px; }
.sidebar-scrollbar::-webkit-scrollbar-track { background: transparent; }
.sidebar-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.dark .sidebar-scrollbar::-webkit-scrollbar-thumb { background: #475569; }
.sidebar-scrollbar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ─── Utilities ─── */
[x-cloak] { display: none !important; }
html { scroll-behavior: smooth; }

::selection {
    background-color: #a7f3d0;
    color: #064e3b;
}
.dark ::selection {
    background-color: #059669;
    color: #ffffff;
}

:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ─── Animated Mesh Background (for auth pages) ─── */
.mesh-gradient {
    background: linear-gradient(-45deg, #ecfdf5, #d1fae5, #f0fdf4, #dcfce7);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}
.dark .mesh-gradient {
    background: linear-gradient(-45deg, #022c22, #064e3b, #0a1628, #0f172a);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
