/* Client Work Allocation Dashboard - Design System & Custom Styles */

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

:root {
    /* Light Mode Palette */
    --bg-primary: #F6F8FC;
    --bg-secondary: #ffffff;
    --bg-hover: #f1f5f9;
    --border-color: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;

    --sidebar-width: 225px;
    --sidebar-collapsed-width: 74px;
    --header-height: 70px;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 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);
}

[data-theme="dark"] {
    /* Dark Mode Palette */
    --bg-primary: #0b0f19;
    --bg-secondary: #131c2e;
    --bg-hover: #1e293b;
    --border-color: #1e293b;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --primary-light: #1e1b4b;
    
    --success: #34d399;
    --success-light: #064e3b;
    --warning: #fbbf24;
    --warning-light: #78350f;
    --danger: #f87171;
    --danger-light: #7f1d1d;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    background-image: radial-gradient(at 0% 0%, rgba(246, 248, 252, 0.4) 0, transparent 50%), radial-gradient(at 50% 0%, rgba(99, 102, 241, 0.04) 0, transparent 50%);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
    background-image: radial-gradient(at 0% 0%, rgba(11, 15, 25, 0.4) 0, transparent 50%), radial-gradient(at 50% 0%, rgba(129, 140, 248, 0.02) 0, transparent 50%);
}

button, input, select, textarea {
    font-family: inherit;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
/* Sidebar (Futuristic 3D Glass Environment) */
.sidebar {
    width: var(--sidebar-width);
    background: #0b1120;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* Sidebar 3D Background Environment */
.sidebar-environment-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.sb-aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(65px);
    pointer-events: none;
    will-change: transform;
}

.sb-aurora.sb-aurora-top {
    top: -10%;
    left: -20%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.12) 50%, transparent 75%);
    animation: sbAuroraTopMove 20s ease-in-out infinite alternate;
}

.sb-aurora.sb-aurora-bottom {
    bottom: -10%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(99, 102, 241, 0.1) 50%, transparent 75%);
    animation: sbAuroraBottomMove 22s ease-in-out infinite alternate;
}

@keyframes sbAuroraTopMove {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(45px, 60px) scale(1.15); }
}

@keyframes sbAuroraBottomMove {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40px, -50px) scale(1.18); }
}

/* Floating Orbs */
.sb-orb-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.sb-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: sbOrbFloat linear infinite alternate;
}

.sb-orb.orb-purple {
    top: 18%;
    right: 15%;
    width: 32px;
    height: 32px;
    background: radial-gradient(circle at 35% 35%, rgba(168, 85, 247, 0.4), rgba(99, 102, 241, 0.15), transparent);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
    animation-duration: 14s;
}

.sb-orb.orb-cyan {
    top: 55%;
    left: 10%;
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.45), rgba(56, 189, 248, 0.12), transparent);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
    animation-duration: 18s;
}

.sb-orb.orb-blue {
    bottom: 22%;
    right: 20%;
    width: 28px;
    height: 28px;
    background: radial-gradient(circle at 35% 35%, rgba(99, 102, 241, 0.45), rgba(79, 70, 229, 0.12), transparent);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.3);
    animation-duration: 16s;
}

@keyframes sbOrbFloat {
    0% { transform: translateY(0) scale(0.92); opacity: 0.35; }
    100% { transform: translateY(-35px) scale(1.08); opacity: 0.7; }
}

/* Glass 3D Geometric Objects */
.sb-geo-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.sb-geo-object {
    position: absolute;
    pointer-events: none;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform-style: preserve-3d;
}

.sb-geo-object.geo-cube {
    top: 12%;
    right: 8%;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(99, 102, 241, 0.15) 100%);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3), inset 0 0 8px rgba(129, 140, 248, 0.25);
    animation: geoCubeFloat 12s ease-in-out infinite alternate;
}

.sb-geo-object.geo-ring {
    bottom: 28%;
    left: 8%;
    width: 28px;
    height: 14px;
    border-radius: 50%;
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
    animation: geoRingRotate 16s linear infinite;
}

.sb-geo-object.geo-diamond {
    top: 48%;
    right: 6%;
    width: 16px;
    height: 16px;
    transform: rotate(45deg);
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.3);
    animation: geoDiamondFloat 14s ease-in-out infinite alternate;
}

@keyframes geoCubeFloat {
    0% { transform: rotateX(20deg) rotateY(30deg) translateY(0); }
    100% { transform: rotateX(40deg) rotateY(60deg) translateY(-20px); }
}

@keyframes geoRingRotate {
    0% { transform: rotateX(60deg) rotateZ(0deg); }
    100% { transform: rotateX(60deg) rotateZ(360deg); }
}

@keyframes geoDiamondFloat {
    0% { transform: rotate(45deg) translateY(0) scale(0.9); }
    100% { transform: rotate(45deg) translateY(-18px) scale(1.1); }
}

/* Drifting Particles */
.sb-particles-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.sb-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(186, 230, 253, 0.85);
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.8);
    animation: sbParticleDrift linear infinite alternate;
}

.sb-particle.sp1 { width: 3px; height: 3px; top: 22%; left: 25%; animation-duration: 9s; }
.sb-particle.sp2 { width: 2px; height: 2px; top: 40%; left: 80%; animation-duration: 12s; }
.sb-particle.sp3 { width: 3px; height: 3px; top: 62%; left: 30%; animation-duration: 10s; }
.sb-particle.sp4 { width: 2px; height: 2px; top: 78%; left: 75%; animation-duration: 14s; }
.sb-particle.sp5 { width: 3px; height: 3px; top: 15%; left: 70%; animation-duration: 11s; }
.sb-particle.sp6 { width: 2px; height: 2px; top: 88%; left: 20%; animation-duration: 13s; }
.sb-particle.sp7 { width: 3px; height: 3px; top: 5%; left: 40%; animation-duration: 15s; }

@keyframes sbParticleDrift {
    0% { transform: translateY(0) translateX(0); opacity: 0.2; }
    50% { opacity: 0.85; }
    100% { transform: translateY(-25px) translateX(15px); opacity: 0.2; }
}

/* Sidebar Header & Logo Area */
.sidebar-header {
    height: 85px;
    min-height: 85px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 5;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 62px;
    flex: 1;
    min-width: 0;
    padding-right: 6px;
}

.sidebar-logo-img {
    width: 128px;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    display: block;
    transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

.sidebar.collapsed .sidebar-logo-img {
    width: 40px;
    height: 40px;
    max-height: 40px;
    object-fit: contain;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0 10px;
}

.collapse-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.collapse-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

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

/* Sidebar Menu & Modern SaaS Navigation Links */
.sidebar-menu-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 8px;
}

.sidebar-menu-wrapper::-webkit-scrollbar {
    width: 4px;
}
.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #64748b;
    margin: 14px 10px 6px 10px;
    text-transform: uppercase;
    white-space: nowrap;
    user-select: none;
}

.sidebar.collapsed .menu-section-label {
    display: none !important;
}

.menu-item {
    margin-bottom: 4px;
    position: relative;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    padding: 0 12px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.88rem;
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.menu-link .menu-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    stroke-width: 2;
    color: #94a3b8;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.menu-link:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.06);
}

.menu-link:hover .menu-icon {
    color: #cbd5e1;
}

.menu-link.active {
    background: rgba(99, 102, 241, 0.14);
    color: #ffffff;
    font-weight: 600;
}

.menu-link.active .menu-icon {
    color: #818cf8;
}

.menu-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #818cf8;
}

.sidebar.collapsed .menu-link {
    justify-content: center;
    padding: 0;
}

.sidebar.collapsed .menu-text {
    display: none;
}

.sidebar.collapsed .menu-link.active::before {
    left: 4px;
}

/* Collapsed Tooltip */
.sidebar.collapsed .menu-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: #f8fafc;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    pointer-events: none;
    animation: fadeInTooltip 0.15s ease forwards;
}

@keyframes fadeInTooltip {
    from { opacity: 0; transform: translateY(-50%) translateX(-4px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* User Profile card in Sidebar */
.user-profile-card {
    height: 60px;
    min-height: 60px;
    padding: 0 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 5;
}

.avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #ffffff;
}

.avatar.has-image {
    background: transparent !important;
    overflow: hidden;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.avatar-table-thumb {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 0.8rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    overflow: hidden;
    border: 1.5px solid var(--border-color);
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff;
}

img.avatar-table-thumb,
.avatar-table-thumb img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 50%;
    display: inline-block;
}

/* ── EMPLOYEE PORTAL WELCOME HEADER AVATAR & IDENTITY ──────────────────── */
.staff-welcome-hero {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.05);
}

.staff-hero-identity {
    z-index: 2;
    max-width: 75%;
    display: flex;
    align-items: center;
    gap: 22px;
}

.staff-hero-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.staff-hero-avatar {
    width: 110px !important;
    height: 110px !important;
    min-width: 110px !important;
    min-height: 110px !important;
    border-radius: 50% !important;
    font-size: 2.2rem !important;
    font-weight: 800;
    border: 3.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3), 0 2px 6px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff;
    overflow: hidden !important;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease;
    user-select: none;
}

.staff-hero-avatar-wrapper:hover .staff-hero-avatar {
    transform: scale(1.03);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.4), 0 4px 10px rgba(0, 0, 0, 0.1);
}

.staff-hero-avatar.has-image {
    background: transparent !important;
}

.staff-hero-avatar .avatar-img,
.staff-hero-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
}

.staff-hero-avatar-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: 2.5px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease;
    z-index: 3;
}

.staff-hero-avatar-wrapper:hover .staff-hero-avatar-badge {
    transform: scale(1.12);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.staff-hero-avatar-badge i,
.staff-hero-avatar-badge svg {
    width: 14px !important;
    height: 14px !important;
    stroke-width: 2.2 !important;
}

.staff-hero-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.staff-hero-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.staff-hero-portal-badge {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.70rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.15);
}

.staff-hero-role-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.staff-hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 30%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

.staff-hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 550;
    margin: 0;
    line-height: 1.35;
}

/* Dark Theme Adjustments */
[data-theme="dark"] .staff-hero-avatar {
    border-color: rgba(255, 255, 255, 0.35);
}

[data-theme="dark"] .staff-hero-avatar-badge {
    border-color: #1e293b;
}

/* Tablet Responsiveness */
@media (max-width: 992px) {
    .staff-welcome-hero {
        padding: 24px 20px;
    }
    .staff-hero-identity {
        max-width: 80%;
        gap: 18px;
    }
    .staff-hero-avatar {
        width: 90px !important;
        height: 90px !important;
        min-width: 90px !important;
        min-height: 90px !important;
        font-size: 1.85rem !important;
        border-width: 3px !important;
    }
    .staff-hero-avatar-badge {
        width: 26px;
        height: 26px;
        bottom: 2px;
        right: 2px;
    }
    .staff-hero-avatar-badge i,
    .staff-hero-avatar-badge svg {
        width: 12px !important;
        height: 12px !important;
    }
    .staff-hero-title {
        font-size: 1.65rem;
    }
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .staff-welcome-hero {
        padding: 20px 16px;
        margin-bottom: 20px;
    }
    .staff-hero-identity {
        max-width: 100%;
        gap: 15px;
    }
    .staff-hero-illustration {
        display: none !important;
    }
    .staff-hero-avatar {
        width: 74px !important;
        height: 74px !important;
        min-width: 74px !important;
        min-height: 74px !important;
        font-size: 1.5rem !important;
        border-width: 2.5px !important;
    }
    .staff-hero-avatar-badge {
        width: 24px;
        height: 24px;
        bottom: 1px;
        right: 1px;
        border-width: 2px;
    }
    .staff-hero-avatar-badge i,
    .staff-hero-avatar-badge svg {
        width: 11px !important;
        height: 11px !important;
    }
    .staff-hero-title {
        font-size: 1.4rem;
        margin-bottom: 4px;
    }
    .staff-hero-subtitle {
        font-size: 0.86rem;
    }
}

/* Ultra-compact mobile */
@media (max-width: 420px) {
    .staff-hero-identity {
        gap: 12px;
    }
    .staff-hero-avatar {
        width: 62px !important;
        height: 62px !important;
        min-width: 62px !important;
        min-height: 62px !important;
        font-size: 1.3rem !important;
    }
    .staff-hero-avatar-badge {
        width: 22px;
        height: 22px;
    }
    .staff-hero-avatar-badge i,
    .staff-hero-avatar-badge svg {
        width: 10px !important;
        height: 10px !important;
    }
    .staff-hero-title {
        font-size: 1.25rem;
    }
}

.online-indicator {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #22c55e;
    border: 2px solid #0b1120;
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    font-size: 0.7rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .user-profile-card {
    justify-content: center;
    padding: 0;
}

.logout-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease !important;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}

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

/* Date Simulator Controls in Sidebar */
.sidebar-simulator {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(99, 102, 241, 0.03);
}

.sidebar.collapsed .sidebar-simulator {
    display: none;
}

.sim-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.sim-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.sim-btn-group {
    display: flex;
    gap: 5px;
}

.sim-btn {
    flex-grow: 1;
    padding: 6px 0;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.sim-btn:hover {
    background-color: var(--bg-hover);
    border-color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    min-width: 0;
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    box-sizing: border-box;
    overflow-x: hidden;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
    max-width: calc(100% - var(--sidebar-collapsed-width));
}

/* Header */
.sticky-header {
    height: var(--header-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Role Selector */
.role-selector-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.role-select:focus {
    border-color: var(--primary);
}

/* Theme Toggle */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background-color: var(--bg-hover);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* Notification Button & Drawer */
.notification-bell {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.notification-bell:hover {
    background-color: var(--bg-hover);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-secondary);
}

/* Metric Summary Cards (User Management & Dashboard) */
.user-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    width: 100%;
}

.metric-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.3);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon i, .metric-icon svg {
    width: 22px;
    height: 22px;
}

.metric-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.metric-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.notification-panel {
    position: absolute;
    top: 65px;
    right: 30px;
    width: 360px;
    max-height: 480px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    z-index: 120;
    overflow: hidden;
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-panel.open {
    display: flex;
}

.notif-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(99, 102, 241, 0.02);
}

.notif-header h4 {
    font-weight: 600;
    font-size: 0.95rem;
}

.notif-clear-btn {
    background: none;
    border: none;
    font-size: 0.8rem;
    color: var(--primary);
    cursor: pointer;
}

.notif-clear-btn:hover {
    text-decoration: underline;
}

.notif-list {
    overflow-y: auto;
    max-height: 380px;
    list-style: none;
}

.notif-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    transition: var(--transition);
}

.notif-item:hover {
    background-color: var(--bg-hover);
}

.notif-item.unread {
    background-color: rgba(99, 102, 241, 0.03);
    border-left: 3px solid var(--primary);
}

.notif-msg {
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.notif-date {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.notif-empty {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Page Section Wrapper */
.content-wrapper {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

/* Tab Management */
.tab-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-view.active {
    display: block;
}

/* Dashboard Cards Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

@media (min-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 1399px) and (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 1023px) and (min-width: 640px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 639px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.01), 0 2px 4px rgba(0, 0, 0, 0.005);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 165px;
}

[data-theme="dark"] .stat-card {
    background: rgba(19, 28, 46, 0.75);
    border-color: rgba(30, 41, 59, 0.7);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* Gradient top borders */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-accent, var(--primary)) 0%, var(--primary-hover) 100%);
    border-radius: 18px 18px 0 0;
}

/* Hover effects */
.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.03), var(--card-glow-shadow);
    border-color: var(--card-accent);
}

.stat-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-subtext {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-subtext.up { color: var(--success); }
.stat-subtext.down { color: var(--danger); }
.stat-subtext.neutral { color: var(--text-muted); }

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, var(--card-accent, var(--primary)) 0%, var(--primary-hover) 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon-wrapper {
    transform: rotate(12deg) scale(1.1);
}

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

/* Charts / Data visualization Section */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

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

.chart-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

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

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

/* Custom CSS/SVG Charts */
.workload-summary-bar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.staff-workload-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.staff-row-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.staff-row-name {
    font-weight: 600;
}

.staff-row-hours {
    color: var(--text-secondary);
}

.progress-track {
    height: 8px;
    background-color: var(--bg-hover);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* Workload thresholds color coding */
.fill-green { background-color: var(--success); }
.fill-yellow { background-color: var(--warning); }
.fill-red { background-color: var(--danger); }

/* Circular Gauge */
.circular-gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

.circular-gauge {
    position: relative;
    width: 150px;
    height: 150px;
}

.circular-gauge svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.gauge-bg {
    fill: none;
    stroke: var(--bg-hover);
    stroke-width: 12;
}

.gauge-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.gauge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.gauge-number {
    font-size: 1.8rem;
    font-weight: 700;
}

.gauge-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Filter controls and Search Bar styling */
.filter-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    align-items: flex-end;
}

.search-input-wrapper {
    position: relative;
}

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

.search-input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    background-color: var(--bg-secondary);
    outline: none;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.filter-select {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.filter-select:focus {
    border-color: var(--primary);
}

.filter-clear-btn {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

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

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

.btn-secondary:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

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

/* Action Area Header for Tabs (CRUD Operations) */
.section-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Responsive Table */
.table-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background-color: rgba(99, 102, 241, 0.02);
    padding: 15px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 16px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: var(--bg-hover);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.badge-primary { background-color: var(--primary-light); color: var(--primary); }
.badge-success { background-color: var(--success-light); color: var(--success); }
.badge-warning { background-color: var(--warning-light); color: var(--warning); }
.badge-danger { background-color: var(--danger-light); color: var(--danger); }

/* Workload Gauges in Tables */
.workload-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.workload-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.workload-dot.green { background-color: var(--success); }
.workload-dot.yellow { background-color: var(--warning); }
.workload-dot.red { background-color: var(--danger); }

/* Interactive Dropdowns / Actions in Table */
.table-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: var(--bg-hover);
}

.icon-btn.edit:hover {
    color: var(--primary);
}

.icon-btn.delete:hover {
    color: var(--danger);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

/* Popup Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none; /* Mouse clicks pass through when closed */
}

.modal-backdrop.open {
    display: flex;
    opacity: 1;
    pointer-events: auto; /* Intercept clicks when open */
}

.modal {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop.open .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(99, 102, 241, 0.02);
}

.modal-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form Styles inside Modals */
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    width: 100%;
    transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    background-color: var(--bg-secondary);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

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

/* Drag and Drop Allocation Module Board */
.allocation-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    min-height: 500px;
}

@media (max-width: 900px) {
    .allocation-container {
        grid-template-columns: 1fr;
    }
}

.allocation-staff-tray {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: fit-content;
    position: sticky;
    top: 90px;
}

.tray-title {
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.tray-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Drag Cards */
.drag-staff-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    cursor: grab;
    transition: var(--transition);
    user-select: none;
    position: relative;
}

.drag-staff-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.drag-staff-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
    background-color: var(--primary-light);
}

.drag-staff-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.drag-staff-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Allocation targets on Clients */
.allocation-clients-board {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.allocation-team-section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
}

.team-section-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.alloc-client-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    background-color: var(--bg-primary);
    transition: var(--transition);
}

.alloc-client-row:last-child {
    margin-bottom: 0;
}

.alloc-client-row.drag-over {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.alloc-client-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-basis: 30%;
}

.alloc-client-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.alloc-client-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.alloc-client-slots {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-basis: 60%;
    min-height: 44px;
    padding: 5px;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-secondary);
}

.alloc-staff-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background-color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

.alloc-staff-tag.temp {
    background-color: var(--warning-light);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.remove-tag-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 2px;
}

.remove-tag-btn:hover {
    opacity: 1;
    background-color: rgba(99, 102, 241, 0.1);
}

.remove-tag-btn svg {
    width: 12px;
    height: 12px;
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 300;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }

.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.success .toast-icon { background-color: var(--success-light); color: var(--success); }
.toast.warning .toast-icon { background-color: var(--warning-light); color: var(--warning); }
.toast.danger .toast-icon  { background-color: var(--danger-light);  color: var(--danger); }

.toast-icon svg {
    width: 16px;
    height: 16px;
}

.toast-body {
    flex-grow: 1;
}

.toast-msg {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.toast-close svg {
    width: 14px;
    height: 14px;
}

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

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

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}


/* Toggle Button Group Styles */
.toggle-btn-group {
    display: inline-flex;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3px;
    gap: 4px;
    width: fit-content;
    flex-wrap: wrap;
    transition: var(--transition);
}

.toggle-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.toggle-btn.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2), 0 2px 4px -2px rgba(99, 102, 241, 0.2);
}

/* Adjust filter-grid column widths to allow full width for toggle button groups */
.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.filter-grid .search-input-wrapper {
    flex-grow: 2;
    min-width: 250px;
}

.filter-grid .filter-group {
    flex-grow: 1;
    min-width: 150px;
}

.filter-grid .filter-group.toggle-group {
    min-width: unset;
    flex-grow: 0;
}


/* Premium Dashboard Redesign Elements */

/* Welcome Header */
.dashboard-welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}
[data-theme="dark"] .dashboard-welcome-header {
    border-bottom-color: rgba(30, 41, 59, 0.4);
}
.welcome-text h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.welcome-subtext {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.welcome-date-time {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

/* Mid split section layout */
.dashboard-mid-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

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

.mid-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Quick Actions Card */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 10px 0;
}
@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.action-btn {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.action-btn:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    background-color: var(--bg-hover);
    box-shadow: var(--shadow-sm);
}
.action-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.action-icon-wrapper.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.action-icon-wrapper.green { background: linear-gradient(135deg, #10b981, #047857); }
.action-icon-wrapper.purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.action-icon-wrapper.orange { background: linear-gradient(135deg, #f59e0b, #b45309); }

.action-btn span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Activity Timeline */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
    max-height: 250px;
    overflow-y: auto;
}
.timeline-item {
    display: flex;
    gap: 12px;
    position: relative;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: -20px;
    width: 2px;
    background-color: var(--border-color);
}
.timeline-item:last-child::before {
    display: none;
}
.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 3px solid var(--primary);
    z-index: 10;
    flex-shrink: 0;
}
.timeline-dot.success { border-color: var(--success); }
.timeline-dot.warning { border-color: var(--warning); }
.timeline-dot.danger { border-color: var(--danger); }

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.timeline-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}
.timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Distribution Analytics Tabs */
.distributions-tabs {
    display: flex;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 3px;
    border-radius: 8px;
    gap: 4px;
    margin-bottom: 20px;
    width: fit-content;
}
.dist-tab-btn {
    background: none;
    border: none;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}
.dist-tab-btn.active {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.dist-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}
.dist-tab-content.active {
    display: block;
}

/* Donut Chart Container */
.donut-chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 10px 0;
}
@media (max-width: 480px) {
    .donut-chart-container {
        flex-direction: column;
        gap: 15px;
    }
}
.donut-chart {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.5s ease;
}
.donut-hole {
    width: 100px;
    height: 100px;
    background-color: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.donut-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}
.donut-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}
.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.legend-dot.green { background-color: var(--success); }
.legend-dot.orange { background-color: var(--warning); }
.legend-dot.blue { background-color: var(--primary); }

.legend-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Distribution Progress Lists */
.dist-progress-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}
.dist-progress-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dist-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
}
.dist-progress-bar {
    height: 6px;
    background-color: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
}
.dist-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
    border-radius: 3px;
    transition: width 0.8s ease-out;
}


/* Interactive Allocation Board Switch & Section Styles */
.allocation-team-switch-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

@media (max-width: 600px) {
    .allocation-team-switch-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

.allocation-team-switch-container .switch-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.allocation-team-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: fadeIn 0.3s ease;
}


/* Redesigned Allocation Full Width Workspace Layout */
.allocation-dual-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 15px;
    width: 100%;
}

.allocation-tl-column {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    transition: var(--transition);
}

.tl-profile-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--primary);
    border-radius: 14px;
    padding: 20px 25px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    width: 100%;
}

#alloc-column-shifas .tl-profile-card {
    border-top-color: #8b5cf6;
}

.tl-profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.tl-avatar-wrapper {
    position: relative;
}

.tl-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
}

#alloc-column-shifas .tl-avatar {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.tl-meta-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tl-profile-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tl-profile-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.tl-profile-stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.tl-stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.tl-stat-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tl-stat-lbl {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.tl-assigned-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.section-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.section-sub-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.section-sub-header .badge {
    background-color: var(--border-color);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tl-staff-dropzone {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 80px;
    padding: 15px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    background-color: var(--bg-hover);
    transition: var(--transition);
    align-items: center;
    width: 100%;
}

.tl-staff-dropzone.drag-over {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.tl-clients-dropzone {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
    min-height: 120px;
    padding: 15px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    background-color: var(--bg-hover);
    transition: var(--transition);
    width: 100%;
}

@media (max-width: 768px) {
    .tl-clients-dropzone {
        grid-template-columns: 1fr;
    }
}

.tl-clients-dropzone.drag-over {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

/* Client draggable card on allocation board */
.drag-client-card {
    cursor: grab;
    transition: var(--transition);
    margin-bottom: 0 !important;
}

.drag-client-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.drag-client-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar .logo-text,
    .sidebar .menu-text,
    .sidebar .user-info,
    .sidebar .sidebar-simulator {
        display: none !important;
    }
    
    .sidebar .user-profile-card {
        padding: 15px 5px;
        justify-content: center;
    }

    .main-content {
        margin-left: var(--sidebar-collapsed-width) !important;
    }

    .sticky-header {
        padding: 0 15px;
    }

    .content-wrapper {
        padding: 15px;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   AUTHENTICATION & LOGIN PAGE STYLES (DEEP-SPACE GALAXY ENVIRONMENT)
   ========================================================================== */

.skybook-login-viewport {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    background-color: #050816;
    color: #f8fafc;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-y: auto;
    overflow-x: hidden;
}

/* FULL-SCREEN GALAXY BACKGROUND CONTAINER */
.galaxy-viewport-bg {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

/* LAYER 6: GALAXY NEBULA CLOUDS & CORE GLOW */
.galaxy-nebula-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.nebula-cloud {
    position: absolute;
    pointer-events: none;
    will-change: transform;
}

/* Diagonal main galaxy cloud: bottom-left -> center -> top-right */
.nebula-cloud.nebula-diagonal {ope
    
    top:-15%;
    left:-15%;
    width:130%;
    height:130%;
    background: radial-gradient(ellipse at 42% 58%, rgba(99, 102, 241, 0.22) 0%, rgba(139, 92, 246, 0.14) 35%, rgba(56, 189, 248, 0.08) 60%, transparent 80%);
    filter:blur(75px);
    transform:rotate(-15deg);
}

/* Core Galaxy Glow between columns */
.nebula-cloud.nebula-core-glow {
    top: 25%;
    left: 32%;
    width: 55vw;
    height: 55vh;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.24) 0%, rgba(139, 92, 246, 0.15) 45%, rgba(56, 189, 248, 0.07) 70%, transparent 85%);
    filter: blur(95px);
    animation: nebulaPulse 18s ease-in-out infinite alternate;
}

.nebula-cloud.nebula-top-right {
    top: -12%;
    right: -10%;
    width: 55vw;
    height: 55vh;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.16) 0%, rgba(99, 102, 241, 0.08) 50%, transparent 75%);
    filter: blur(85px);
}

.nebula-cloud.nebula-bottom-cyan {
    bottom: -15%;
    left: 8%;
    width: 60vw;
    height: 60vh;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(99, 102, 241, 0.09) 50%, transparent 75%);
    filter: blur(95px);
}

@keyframes nebulaPulse {
    0% { opacity: 0.75; transform: scale(0.95) rotate(0deg); }
    100% { opacity: 1; transform: scale(1.08) rotate(5deg); }
}

/* LAYER 5: DISTANT PLANET */
.galaxy-planet-container {
    position: absolute;
    top: 10%;
    right: 12%;
    width: 140px;
    height: 140px;
    pointer-events: none;
}

.distant-planet {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #1e293b 0%, #0f172a 60%, #050816 100%);
    box-shadow: 
        inset -15px -15px 35px rgba(5, 8, 22, 0.95),
        inset 8px 8px 20px rgba(129, 140, 248, 0.28),
        0 0 35px rgba(56, 189, 248, 0.22);
    filter: blur(1.5px);
    opacity: 0.85;
}

.planet-atmosphere-glow {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.28) 0%, rgba(139, 92, 246, 0.15) 50%, transparent 72%);
    filter: blur(8px);
}

/* LAYER 1: DISTANT STARS CANVAS */
.galaxy-starfield-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* LAYER 3: STAR DUST PARTICLES */
.star-dust-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.dust-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(186, 230, 253, 0.85);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
    animation: dustDrift linear infinite;
}

.dust-particle.dp1 { width: 3px; height: 3px; top: 15%; left: 12%; animation-duration: 35s; }
.dust-particle.dp2 { width: 2px; height: 2px; top: 75%; left: 22%; animation-duration: 45s; }
.dust-particle.dp3 { width: 4px; height: 4px; top: 35%; left: 45%; animation-duration: 28s; }
.dust-particle.dp4 { width: 2px; height: 2px; top: 60%; left: 68%; animation-duration: 40s; }
.dust-particle.dp5 { width: 3px; height: 3px; top: 25%; left: 82%; animation-duration: 32s; }
.dust-particle.dp6 { width: 2px; height: 2px; top: 85%; left: 88%; animation-duration: 50s; }
.dust-particle.dp7 { width: 3px; height: 3px; top: 50%; left: 15%; animation-duration: 38s; }
.dust-particle.dp8 { width: 2px; height: 2px; top: 10%; left: 60%; animation-duration: 42s; }
.dust-particle.dp9 { width: 3px; height: 3px; top: 90%; left: 35%; animation-duration: 36s; }
.dust-particle.dp10 { width: 4px; height: 4px; top: 40%; left: 92%; animation-duration: 30s; }

@keyframes dustDrift {
    0% { transform: translate(0, 0); opacity: 0.2; }
    50% { opacity: 0.85; }
    100% { transform: translate(45px, -60px); opacity: 0.2; }
}

/* LAYER 4: OCCASIONAL SHOOTING STAR */
.shooting-stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

.shooting-star {
    position: absolute;
    top: 15%;
    left: 60%;
    width: 130px;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(56, 189, 248, 0.85), transparent);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.85);
    transform: rotate(-35deg);
    opacity: 0;
    animation: shootingStarAnim 11s ease-in-out infinite;
}

@keyframes shootingStarAnim {
    0%, 88%, 100% {
        opacity: 0;
        transform: translate(0, 0) rotate(-35deg) scaleX(0.2);
    }
    90% {
        opacity: 1;
        transform: translate(-280px, 200px) rotate(-35deg) scaleX(1);
    }
    93% {
        opacity: 0;
        transform: translate(-420px, 300px) rotate(-35deg) scaleX(0.4);
    }
}

/* Left Branded Panel (Translucent for Galaxy Visibility) */
.skybook-login-left-panel {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px 80px;
    background: transparent;
    position: relative;
    z-index: 5;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.skybook-left-content {
    position: relative;
    z-index: 5;
    max-width: 540px;
    margin: auto 0;
}

.skybook-brand-badge {
    margin-bottom: 38px;
    display: flex;
    align-items: center;
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.logo-ambient-glow {
    position: absolute;
    top: 50%;
    left: 235px;
    transform: translate(-50%, -50%);
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.55) 0%, rgba(56, 189, 248, 0.32) 38%, rgba(168, 85, 247, 0.18) 65%, transparent 80%);
    filter: blur(48px);
    pointer-events: none;
    z-index: 1;
    animation: logoBreathingGlow 5s ease-in-out infinite alternate;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

@keyframes logoBreathingGlow {
    0% {
        opacity: 0.45;
        transform: translate(-50%, -50%) scale(0.92);
        filter: blur(44px);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.08);
        filter: blur(52px);
    }
    100% {
        opacity: 0.95;
        transform: translate(-50%, -50%) scale(1.18);
        filter: blur(56px);
    }
}

/* 4. Energy Aura Particles Around Logo */
.logo-energy-aura {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.aura-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(186, 230, 253, 0.9);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.8), 0 0 16px rgba(56, 189, 248, 0.6);
    animation: auraParticleOrbit linear infinite alternate;
}

.aura-particle.ap1 { width: 5px; height: 5px; top: 15%; left: 10%; animation-duration: 4.5s; }
.aura-particle.ap2 { width: 4px; height: 4px; top: 75%; left: 80%; animation-duration: 5.5s; animation-delay: -1s; }
.aura-particle.ap3 { width: 6px; height: 6px; top: 20%; left: 85%; animation-duration: 6.2s; animation-delay: -2s; }
.aura-particle.ap4 { width: 4px; height: 4px; top: 80%; left: 20%; animation-duration: 4.8s; animation-delay: -1.5s; }
.aura-particle.ap5 { width: 5px; height: 5px; top: 45%; left: -2%; animation-duration: 5.2s; animation-delay: -3s; }

@keyframes auraParticleOrbit {
    0% {
        transform: translate(0, 0) scale(0.8);
        opacity: 0.3;
    }
    50% {
        opacity: 0.95;
        transform: translate(12px, -15px) scale(1.25);
    }
    100% {
        transform: translate(-10px, 12px) scale(0.8);
        opacity: 0.3;
    }
}

.logo-wrapper-shine {
    position: relative;
    display: inline-block;
    overflow: hidden;
    z-index: 2;
    border-radius: 12px;
}

.skybook-left-logo {
    width: 470px !important;
    max-width: 510px !important;
    height: auto !important;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 18px 36px rgba(99, 102, 241, 0.4));
    transform-style: preserve-3d;
    animation: 
        logoEntrance 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards,
        logoContinuousFloat 6s ease-in-out 0.95s infinite;
    will-change: transform, filter;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-light-sweep {
    position: absolute;
    top: 0;
    left: -140%;
    width: 65%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.42) 50%, transparent 100%);
    transform: skewX(-25deg);
    pointer-events: none;
    z-index: 3;
    animation: continuousLightSweep 7s ease-in-out infinite;
}

@keyframes continuousLightSweep {
    0%, 60%, 100% {
        left: -140%;
        opacity: 0;
    }
    68% {
        opacity: 0.9;
    }
    78% {
        left: 170%;
        opacity: 0.9;
    }
    82% {
        left: 170%;
        opacity: 0;
    }
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.85) rotateX(4deg) rotateY(-4deg);
        filter: blur(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg) rotateY(0deg);
        filter: blur(0);
    }
}

/* 1. Continuous 3D Floating, Micro-Scale, and Gentle 3D Rotation */
@keyframes logoContinuousFloat {
    0% {
        transform: translateY(-5px) translateX(-2px) scale(1) rotateX(-2deg) rotateY(-3deg);
    }
    25% {
        transform: translateY(0px) translateX(2px) scale(1.015) rotateX(1deg) rotateY(2deg);
    }
    50% {
        transform: translateY(6px) translateX(-1px) scale(1.025) rotateX(2deg) rotateY(3deg);
    }
    75% {
        transform: translateY(1px) translateX(-3px) scale(1.01) rotateX(-1deg) rotateY(-2deg);
    }
    100% {
        transform: translateY(-5px) translateX(-2px) scale(1) rotateX(-2deg) rotateY(-3deg);
    }
}

.skybook-hero-heading {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    color: #f8fafc;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.skybook-gradient-text {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skybook-hero-subtitle {
    font-size: 1.05rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 40px;
}

.skybook-hero-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.hero-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px 20px;
    backdrop-filter: blur(14px);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.hero-feature-item:hover {
    transform: translateY(-2px);
    border-color: rgba(129, 140, 248, 0.35);
    background: rgba(15, 23, 42, 0.65);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.18);
}

.hero-feature-item:hover .feature-icon-box {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.4);
}

.hero-feature-item .feature-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.hero-feature-item strong {
    display: block;
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.hero-feature-item p {
    color: #64748b;
    font-size: 0.82rem;
    margin: 0;
}

.skybook-left-footer {
    position: relative;
    z-index: 5;
    font-size: 0.8rem;
    color: #475569;
}

/* Right Form Panel */
.skybook-login-right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    background: transparent;
    position: relative;
    z-index: 5;
}

.skybook-mobile-logo-header {
    display: none;
    margin-bottom: 24px;
    text-align: center;
}

.skybook-mobile-logo-header .mobile-logo-img {
    width: 155px;
    max-width: 170px;
    height: auto;
    object-fit: contain;
}

/* Modern Dark Login Card Glass Sizing (Suspended over Galaxy) */
.login-card {
    background: rgba(11, 17, 32, 0.88);
    border: 1px solid rgba(129, 140, 248, 0.18);
    border-radius: 20px;
    padding: 44px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.75), 0 0 45px rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(24px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    border-color: rgba(129, 140, 248, 0.4);
    box-shadow: 0 35px 70px -12px rgba(0, 0, 0, 0.85), 0 0 55px rgba(99, 102, 241, 0.32);
}

.login-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 35px 70px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(99, 102, 241, 0.25);
}

.login-header {
    text-align: left;
    margin-bottom: 28px;
}

.login-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #94a3b8;
}

.login-form .form-group {
    margin-bottom: 22px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-wrapper .form-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background-color: rgba(15, 23, 42, 0.75);
    color: #f8fafc;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.input-wrapper .form-input::placeholder {
    color: #475569;
}

.input-wrapper .form-input:focus {
    outline: none;
    border-color: #6366f1;
    background-color: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #64748b;
    width: 18px;
    height: 18px;
    pointer-events: none;
    transition: color 0.25s ease;
}

.input-wrapper .form-input:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #818cf8;
}

.password-toggle,
.toggle-password-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.password-toggle:hover,
.toggle-password-btn:hover {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

.forgot-link,
.forgot-password-link {
    font-size: 0.82rem;
    color: #818cf8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-link:hover,
.forgot-password-link:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #94a3b8;
    user-select: none;
}

.checkbox-container input {
    accent-color: #6366f1;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Submit Button Shimmer */
#login-submit-btn,
.btn-block {
    width: 100%;
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #3b82f6 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#login-submit-btn:hover,
.btn-block:hover {
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.55);
    transform: translateY(-1px);
}

#login-submit-btn:active,
.btn-block:active {
    transform: translateY(0);
}

/* Error Card */
.login-error-card {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f87171;
    font-size: 0.85rem;
    font-weight: 500;
}

.login-card.shake {
    animation: shakeCard 0.4s ease;
}

@keyframes shakeCard {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.error-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Page Entrance Stagger */
.skybook-login-viewport .skybook-left-logo {
    animation: logoEntrance 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards, logoFloatSubtle 7s ease-in-out 0.9s infinite alternate;
}

.skybook-login-viewport .skybook-hero-heading {
    animation: staggerEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.skybook-login-viewport .skybook-hero-subtitle {
    animation: staggerEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.skybook-login-viewport .hero-feature-item:nth-child(1) {
    animation: staggerEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

.skybook-login-viewport .hero-feature-item:nth-child(2) {
    animation: staggerEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
}

.skybook-login-viewport .login-card {
    animation: staggerEntrance 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes staggerEntrance {
    0% {
        opacity: 0;
        transform: translateY(15px);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Responsive Rules */
@media (max-width: 1400px) {
    .skybook-left-logo {
        width: 390px !important;
        max-width: 420px !important;
    }
    .logo-ambient-glow {
        left: 195px;
        width: 390px;
        height: 390px;
    }
}

@media (max-width: 1200px) {
    .skybook-left-logo {
        width: 340px !important;
        max-width: 370px !important;
    }
    .logo-ambient-glow {
        left: 170px;
        width: 340px;
        height: 340px;
    }
    .galaxy-planet-container {
        display: none;
    }
}

@media (max-width: 900px) {
    .skybook-login-left-panel {
        display: none;
    }

    .skybook-mobile-logo-header {
        display: block;
    }

    .skybook-login-right-panel {
        padding: 30px 20px;
    }

    .login-card {
        padding: 32px 24px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    }

    .star-dust-container {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .galaxy-viewport-bg *,
    .nebula-cloud,
    .distant-planet,
    .dust-particle,
    .shooting-star,
    .logo-ambient-glow,
    .skybook-left-logo,
    .logo-light-sweep,
    .parallax-layer,
    #login-submit-btn,
    .skybook-login-viewport *,
    .sb-aurora,
    .sb-orb,
    .sb-geo-object,
    .sb-particle,
    .menu-icon-3d,
    .avatar-outer-ring,
    .sidebar-logo-glow,
    .sidebar-logo-img {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* Collapsible Client Accordion Styling */
.client-task-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border-radius: var(--border-radius);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    padding: 0 !important; /* Let children handle spacing */
}

.client-task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: var(--primary);
}

.client-card-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 16px 20px;
    background-color: var(--bg-secondary);
    user-select: none;
    transition: background-color 0.2s ease;
}

.client-card-header-bar:hover {
    background-color: var(--bg-hover);
}

.client-card-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-card-title {
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 700;
    margin: 0;
}

.client-card-tl {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.client-card-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.client-card-task-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background-color: var(--primary-light);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
}

.client-card-chevron {
    color: var(--text-muted);
    transition: transform 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-task-card.expanded .client-card-chevron {
    transform: rotate(180deg);
}

.client-card-body-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out;
}

.client-task-card.expanded .client-card-body-wrapper {
    grid-template-rows: 1fr;
}

.client-card-body-content {
    overflow: hidden;
}

.client-card-inner-padding {
    padding: 16px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-top: 1px solid var(--border-color);
}

/* 3D SaaS Dashboard Visual Enhancements */
.summary-card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
    backface-visibility: hidden;
}

/* Glassmorphism custom focus */
.glass-effect-3d {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Active navigation item subtle glow animation */
.menu-link.active {
    animation: activeNavGlow 3s infinite alternate;
}

@keyframes activeNavGlow {
    0% {
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    }
    100% {
        box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 5px 15px rgba(99, 102, 241, 0.08);
        border-color: rgba(99, 102, 241, 0.2);
    }
    100% {
        box-shadow: 0 12px 25px rgba(99, 102, 241, 0.18);
        border-color: rgba(99, 102, 241, 0.35);
    }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Search bar with button style overrides */
.search-with-button {
    display: flex;
    gap: 8px;
}

.search-with-button .search-input {
    flex: 1;
}

.search-with-button .btn svg {
    position: static;
    transform: none;
    color: inherit;
}

/* Search Suggestions dropdown container */
.search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
}

.search-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background-color: var(--bg-hover);
}

.search-suggestion-value {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-suggestion-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    background-color: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* =========================================================================
   SKYBOOK SaaS Modernized UI Overrides
   ========================================================================= */

/* Skeletons */
.skeleton-loading .hide-on-skeleton {
    display: none !important;
}

.skeleton-loading .show-on-skeleton {
    display: block !important;
}

.show-on-skeleton {
    display: none;
}

.skeleton-pulse {
    animation: skeleton-keyframe-pulse 1.5s infinite ease-in-out;
    background-color: var(--border-color);
}

@keyframes skeleton-keyframe-pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.skeleton-box {
    height: 90px;
    width: 100%;
    border-radius: 12px;
}

.skeleton-circle {
    height: 46px;
    width: 46px;
    border-radius: 50%;
}

.skeleton-text {
    height: 12px;
    width: 70%;
    border-radius: 4px;
    margin-top: 8px;
}

.skeleton-text-sm {
    height: 8px;
    width: 40%;
    border-radius: 4px;
    margin-top: 6px;
}

/* Online Status Badge */
.online-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    border: 1px solid #fff;
    box-shadow: 0 0 6px var(--success);
    display: inline-block;
}

/* Cards & SaaS Layout */
.saas-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.saas-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Active Live Pulse Card */
.active-pulse-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 40px -20px rgba(99, 102, 241, 0.1);
    position: relative;
}

.active-pulse-card .pulse-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--success);
    animation: live-indicator-pulse 2s infinite;
}

@keyframes live-indicator-pulse {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(0.9);
        opacity: 1;
    }
}

/* Progress bar animated loads */
.progress-bar-fill-animated {
    height: 100%;
    border-radius: inherit;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bell Notification Shaker */
.bell-notify-unread {
    animation: bell-shake-unread 1.5s infinite;
}

@keyframes bell-shake-unread {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(10deg); }
    30% { transform: rotate(-10deg); }
    45% { transform: rotate(5deg); }
    60% { transform: rotate(-5deg); }
    75% { transform: rotate(2deg); }
    90% { transform: rotate(-2deg); }
}

/* Clean hover scales on buttons */

/* Hover scales on buttons */
.btn {
    transition: all 0.2s ease-in-out !important;
}

.btn:active {
    transform: scale(0.96) !important;
}

/* Dark mode overrides variables support */
[data-theme="dark"] .saas-card {
    background: #111a2e;
    border-color: #1e293b;
}

[data-theme="dark"] .active-pulse-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(139, 92, 246, 0.06) 100%);
    border-color: rgba(59, 130, 246, 0.25);
}

/* Modern grid and gap helpers */
.saas-grid-gap-20 {
    display: grid;
    gap: 20px;
}

/* 2026 SaaS Analytics Dashboard Card Hover Elevation */
.stat-card, .chart-card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease-in-out !important;
}

.stat-card:hover, .chart-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.1) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* Compact Collapsible Task Cards for Staff Portal */
.staff-task-category-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.staff-task-category-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
}

.staff-task-category-header {
    padding: 14px 18px;
    background: var(--bg-secondary);
    border-bottom: 1px solid transparent;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s ease;
}

.staff-task-category-header:hover {
    background: rgba(99, 102, 241, 0.06);
}

.staff-task-category-header.expanded {
    border-bottom-color: var(--border-color);
}

.category-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-progress-badge {
    font-size: 0.76rem;
    font-weight: 750;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.category-progress-badge.all-done {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.category-chevron {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-chevron.expanded {
    transform: rotate(90deg);
    color: var(--primary);
}

.staff-task-category-body {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
}

.staff-task-category-body.open {
    display: flex;
}

/* Custom Task Pill Badge */
.badge-custom-pill {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.35);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
}

/* Allocated Time Badge */
.badge-allocated-time {
    font-size: 0.72rem;
    font-weight: 650;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary, #6366f1);
    border: 1px solid rgba(99, 102, 241, 0.22);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    line-height: 1.2;
    letter-spacing: 0.01em;
    vertical-align: middle;
    transition: all 0.15s ease;
}

.badge-allocated-time.not-set {
    background: rgba(100, 116, 139, 0.07);
    color: var(--text-muted, #64748b);
    border: 1px solid rgba(100, 116, 139, 0.2);
    font-weight: 550;
}

/* ==========================================================================
   MAIN DASHBOARD ENHANCED DARK-THEME ANIMATED GALAXY ENVIRONMENT
   ========================================================================== */

/* Galaxy background viewport container - Hidden in Light Mode */
.dashboard-galaxy-bg {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: #040711;
}

/* Display galaxy background ONLY in Dark Theme */
[data-theme="dark"] .dashboard-galaxy-bg {
    display: block;
}

/* Base Deep Space Gradient & Ambient Glow */
.d-galaxy-core {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 90% 70% at 20% 15%, rgba(59, 130, 246, 0.16) 0%, transparent 65%),
        radial-gradient(ellipse 85% 65% at 85% 75%, rgba(139, 92, 246, 0.15) 0%, transparent 65%),
        radial-gradient(circle 800px at 50% 45%, rgba(79, 70, 229, 0.12) 0%, transparent 75%);
    pointer-events: none;
}

.d-galaxy-ambient-glow {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle 450px at 5% 50%, rgba(56, 189, 248, 0.12), transparent 70%),
        radial-gradient(circle 550px at 95% 20%, rgba(217, 70, 239, 0.1), transparent 70%),
        radial-gradient(circle 600px at 50% 95%, rgba(99, 102, 241, 0.14), transparent 75%);
    pointer-events: none;
}

/* Organic Large Multi-Layered Nebula Clouds */
.d-galaxy-nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(85px);
    pointer-events: none;
    will-change: transform, opacity;
}

.d-nebula-electric-blue {
    width: 750px;
    height: 750px;
    top: -120px;
    left: 8%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.38) 0%, rgba(99, 102, 241, 0.22) 45%, rgba(15, 23, 42, 0) 75%);
    animation: dNebulaFloat1 34s ease-in-out infinite alternate;
}

.d-nebula-deep-violet {
    width: 850px;
    height: 850px;
    bottom: -160px;
    right: 3%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, rgba(109, 40, 217, 0.22) 50%, rgba(15, 23, 42, 0) 80%);
    animation: dNebulaFloat2 42s ease-in-out infinite alternate;
}

.d-nebula-cyan-glow {
    width: 600px;
    height: 600px;
    top: 35%;
    right: 22%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(14, 165, 233, 0.18) 50%, transparent 75%);
    animation: dNebulaFloat3 38s ease-in-out infinite alternate;
}

.d-nebula-magenta-core {
    width: 550px;
    height: 550px;
    top: 55%;
    left: 20%;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.28) 0%, rgba(168, 85, 247, 0.16) 55%, transparent 80%);
    animation: dNebulaFloat4 44s ease-in-out infinite alternate;
}

.d-nebula-indigo-drift {
    width: 900px;
    height: 900px;
    top: 10%;
    left: 40%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.32) 0%, rgba(30, 27, 75, 0.18) 55%, transparent 80%);
    animation: dNebulaFloat1 48s ease-in-out 4s infinite alternate;
}

@keyframes dNebulaFloat1 {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0.85; }
    50% { transform: translate(50px, 40px) rotate(4deg) scale(1.1); opacity: 1; }
    100% { transform: translate(-40px, 60px) rotate(-3deg) scale(0.94); opacity: 0.88; }
}

@keyframes dNebulaFloat2 {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0.8; }
    50% { transform: translate(-60px, -50px) rotate(-5deg) scale(1.12); opacity: 0.98; }
    100% { transform: translate(40px, -30px) rotate(3deg) scale(0.92); opacity: 0.82; }
}

@keyframes dNebulaFloat3 {
    0% { transform: translate(0, 0) scale(0.95); opacity: 0.75; }
    50% { transform: translate(-45px, 35px) scale(1.15); opacity: 0.95; }
    100% { transform: translate(35px, -40px) scale(0.98); opacity: 0.8; }
}

@keyframes dNebulaFloat4 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.7; }
    50% { transform: translate(40px, -40px) scale(1.1); opacity: 0.9; }
    100% { transform: translate(-30px, 30px) scale(0.93); opacity: 0.75; }
}

/* 3-Layer Dense Starfields (Layer 1: Distant 1px-2px, Layer 2: Mid 2px-3.5px) */
.d-galaxy-stars-distant {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(1px 1px at 20px 50px, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(1.5px 1.5px at 80px 180px, rgba(255, 255, 255, 0.75), transparent),
        radial-gradient(1.5px 1.5px at 170px 90px, rgba(165, 180, 252, 0.85), transparent),
        radial-gradient(1px 1px at 260px 240px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 340px 130px, rgba(56, 189, 248, 0.85), transparent),
        radial-gradient(1px 1px at 430px 320px, rgba(255, 255, 255, 0.75), transparent),
        radial-gradient(2px 2px at 520px 70px, rgba(192, 132, 252, 0.8), transparent),
        radial-gradient(1px 1px at 610px 220px, rgba(255, 255, 255, 0.75), transparent),
        radial-gradient(1.5px 1.5px at 700px 380px, rgba(56, 189, 248, 0.8), transparent),
        radial-gradient(1px 1px at 790px 110px, rgba(255, 255, 255, 0.7), transparent);
    background-size: 680px 480px;
    animation: dStarTwinkleSlow 8s ease-in-out infinite alternate;
}

.d-galaxy-stars-mid {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 60px 130px, rgba(255, 255, 255, 0.95), transparent),
        radial-gradient(3px 3px at 190px 300px, rgba(56, 189, 248, 0.9), transparent),
        radial-gradient(2.5px 2.5px at 310px 100px, rgba(192, 132, 252, 0.95), transparent),
        radial-gradient(2px 2px at 480px 200px, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(3px 3px at 590px 360px, rgba(129, 140, 248, 0.95), transparent),
        radial-gradient(2.5px 2.5px at 720px 150px, rgba(56, 189, 248, 0.9), transparent),
        radial-gradient(2px 2px at 830px 290px, rgba(255, 255, 255, 0.85), transparent);
    background-size: 780px 580px;
    animation: dStarTwinkleMid 5s ease-in-out infinite alternate;
}

@keyframes dStarTwinkleSlow {
    0% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.015); }
    100% { opacity: 0.7; transform: scale(0.985); }
}

@keyframes dStarTwinkleMid {
    0% { opacity: 0.7; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-4px); }
    100% { opacity: 0.75; transform: translateY(3px); }
}

/* Layer 3: Foreground Sparkling Glowing Stars & 4-Point Crosses */
.d-galaxy-sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.d-sparkle-star {
    position: absolute;
    border-radius: 50%;
    background: #ffffff;
    pointer-events: none;
    will-change: transform, opacity;
}

.d-sparkle-star::before,
.d-sparkle-star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
}

.d-sparkle-star::before {
    width: 14px;
    height: 1.5px;
}

.d-sparkle-star::after {
    width: 1.5px;
    height: 14px;
}

.d-sparkle-star.sp-1 {
    top: 15%;
    left: 12%;
    width: 4px;
    height: 4px;
    box-shadow: 0 0 10px #ffffff, 0 0 20px #38bdf8, 0 0 35px #38bdf8;
    animation: dSparklePulse 5s ease-in-out infinite alternate;
}

.d-sparkle-star.sp-2 {
    top: 68%;
    left: 82%;
    width: 4.5px;
    height: 4.5px;
    box-shadow: 0 0 12px #ffffff, 0 0 22px #c084fc, 0 0 40px #c084fc;
    animation: dSparklePulse 6.2s ease-in-out 1s infinite alternate;
}

.d-sparkle-star.sp-3 {
    top: 38%;
    left: 74%;
    width: 3.5px;
    height: 3.5px;
    box-shadow: 0 0 8px #ffffff, 0 0 16px #818cf8, 0 0 30px #818cf8;
    animation: dSparklePulse 4.8s ease-in-out 2s infinite alternate;
}

.d-sparkle-star.sp-4 {
    top: 82%;
    left: 22%;
    width: 4px;
    height: 4px;
    box-shadow: 0 0 10px #ffffff, 0 0 20px #38bdf8, 0 0 35px #38bdf8;
    animation: dSparklePulse 5.5s ease-in-out 0.5s infinite alternate;
}

.d-sparkle-star.sp-5 {
    top: 25%;
    left: 88%;
    width: 5px;
    height: 5px;
    box-shadow: 0 0 14px #ffffff, 0 0 26px #c084fc, 0 0 45px #c084fc;
    animation: dSparklePulse 7s ease-in-out 1.5s infinite alternate;
}

.d-sparkle-star.sp-6 {
    top: 78%;
    left: 55%;
    width: 3.5px;
    height: 3.5px;
    box-shadow: 0 0 8px #ffffff, 0 0 18px #38bdf8;
    animation: dSparklePulse 5.2s ease-in-out 2.5s infinite alternate;
}

@keyframes dSparklePulse {
    0% { transform: scale(0.8); opacity: 0.6; }
    50% { transform: scale(1.25); opacity: 1; filter: brightness(1.4); }
    100% { transform: scale(0.85); opacity: 0.65; }
}

/* Floating Particles */
.d-galaxy-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.d-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.5;
    will-change: transform, opacity;
}

.d-particle.dp1 {
    width: 3.5px;
    height: 3.5px;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    top: 18%;
    left: 14%;
    animation: dParticleFloat1 24s ease-in-out infinite alternate;
}

.d-particle.dp2 {
    width: 3px;
    height: 3px;
    background: #818cf8;
    box-shadow: 0 0 8px #818cf8;
    top: 58%;
    left: 78%;
    animation: dParticleFloat2 28s ease-in-out infinite alternate;
}

.d-particle.dp3 {
    width: 3.5px;
    height: 3.5px;
    background: #c084fc;
    box-shadow: 0 0 10px #c084fc;
    top: 72%;
    left: 28%;
    animation: dParticleFloat1 30s ease-in-out 2s infinite alternate;
}

.d-particle.dp4 {
    width: 2.5px;
    height: 2.5px;
    background: #ffffff;
    box-shadow: 0 0 6px #ffffff;
    top: 32%;
    left: 68%;
    animation: dParticleFloat2 22s ease-in-out 4s infinite alternate;
}

.d-particle.dp5 {
    width: 4px;
    height: 4px;
    background: #38bdf8;
    box-shadow: 0 0 12px #38bdf8;
    top: 14%;
    left: 84%;
    animation: dParticleFloat1 26s ease-in-out 1s infinite alternate;
}

.d-particle.dp6 {
    width: 2.5px;
    height: 2.5px;
    background: #a5b4fc;
    box-shadow: 0 0 8px #a5b4fc;
    top: 82%;
    left: 62%;
    animation: dParticleFloat2 32s ease-in-out 3s infinite alternate;
}

.d-particle.dp7 {
    width: 3px;
    height: 3px;
    background: #f472b6;
    box-shadow: 0 0 10px #f472b6;
    top: 45%;
    left: 18%;
    animation: dParticleFloat1 27s ease-in-out 2s infinite alternate;
}

.d-particle.dp8 {
    width: 3.5px;
    height: 3.5px;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    top: 85%;
    left: 85%;
    animation: dParticleFloat2 29s ease-in-out 1s infinite alternate;
}

@keyframes dParticleFloat1 {
    0% { transform: translate(0, 0); opacity: 0.35; }
    50% { transform: translate(45px, -55px); opacity: 0.85; }
    100% { transform: translate(-30px, -95px); opacity: 0.3; }
}

@keyframes dParticleFloat2 {
    0% { transform: translate(0, 0); opacity: 0.3; }
    50% { transform: translate(-50px, 45px); opacity: 0.8; }
    100% { transform: translate(40px, 75px); opacity: 0.35; }
}

/* Staggered Occasional Shooting Stars Across Main Body */
.d-shooting-star {
    position: absolute;
    width: 140px;
    height: 2px;
    background: linear-gradient(90deg, #ffffff 0%, rgba(56, 189, 248, 0.9) 30%, rgba(192, 132, 252, 0.4) 70%, transparent 100%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 6px #38bdf8);
    will-change: transform, opacity;
}

.d-shooting-star.s1 {
    top: 10%;
    right: 20%;
    transform: rotate(-35deg) translateX(0);
    animation: mainShootingStar1 14s cubic-bezier(0.16, 1, 0.3, 1) 2s infinite;
}

.d-shooting-star.s2 {
    top: 45%;
    left: 15%;
    transform: rotate(-28deg) translateX(0);
    animation: mainShootingStar2 18s cubic-bezier(0.16, 1, 0.3, 1) 8s infinite;
}

.d-shooting-star.s3 {
    top: 65%;
    right: 12%;
    transform: rotate(-40deg) translateX(0);
    animation: mainShootingStar3 22s cubic-bezier(0.16, 1, 0.3, 1) 13s infinite;
}

@keyframes mainShootingStar1 {
    0%, 90% { opacity: 0; transform: rotate(-35deg) translateX(0) scaleX(0.2); }
    92% { opacity: 1; transform: rotate(-35deg) translateX(-220px) scaleX(1.1); }
    96%, 100% { opacity: 0; transform: rotate(-35deg) translateX(-420px) scaleX(0.4); }
}

@keyframes mainShootingStar2 {
    0%, 88% { opacity: 0; transform: rotate(-28deg) translateX(0) scaleX(0.2); }
    90% { opacity: 1; transform: rotate(-28deg) translateX(240px) scaleX(1.2); }
    95%, 100% { opacity: 0; transform: rotate(-28deg) translateX(460px) scaleX(0.4); }
}

@keyframes mainShootingStar3 {
    0%, 91% { opacity: 0; transform: rotate(-40deg) translateX(0) scaleX(0.2); }
    93% { opacity: 1; transform: rotate(-40deg) translateX(-200px) scaleX(1); }
    97%, 100% { opacity: 0; transform: rotate(-40deg) translateX(-400px) scaleX(0.4); }
}

/* Dark Theme Floating Panels & Opaque Cards (Strict Readability) */
[data-theme="dark"] .content-wrapper {
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .sticky-header {
    background-color: rgba(11, 17, 32, 0.88) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(129, 140, 248, 0.18) !important;
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .chart-card,
[data-theme="dark"] .saas-card,
[data-theme="dark"] .welcome-banner-card,
[data-theme="dark"] .client-task-card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .staff-task-category-card {
    background: rgba(13, 20, 36, 0.85) !important;
    color: #f8fafc !important;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(129, 140, 248, 0.18) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .stat-card h3,
[data-theme="dark"] .stat-card .stat-value,
[data-theme="dark"] .chart-card h3,
[data-theme="dark"] .chart-header h3,
[data-theme="dark"] .saas-card h3,
[data-theme="dark"] .saas-card h4 {
    color: #f8fafc !important;
}

[data-theme="dark"] .stat-card p,
[data-theme="dark"] .stat-card .stat-subtext,
[data-theme="dark"] .chart-card p,
[data-theme="dark"] .chart-header p {
    color: #94a3b8 !important;
}

[data-theme="dark"] .stat-card:hover,
[data-theme="dark"] .chart-card:hover,
[data-theme="dark"] .saas-card:hover,
[data-theme="dark"] .client-task-card:hover {
    border-color: rgba(129, 140, 248, 0.4) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(99, 102, 241, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .d-nebula-electric-blue,
    .d-nebula-deep-violet,
    .d-nebula-cyan-glow,
    .d-nebula-magenta-core,
    .d-nebula-indigo-drift,
    .d-galaxy-stars-distant,
    .d-galaxy-stars-mid,
    .d-sparkle-star,
    .d-particle,
    .d-shooting-star {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* ==========================================================================
   LIGHT MODE DASHBOARD ENHANCED ANIMATED AURORA SKY ENVIRONMENT
   ========================================================================== */

/* Light Mode Aurora background viewport container */
.dashboard-aurora-bg {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 45%, #f0f3ff 100%);
}

/* Hide Aurora background completely when Dark Theme is active */
[data-theme="dark"] .dashboard-aurora-bg {
    display: none !important;
}

/* Futuristic Dot & Line Grid Matrix Pattern */
.aurora-base-grid {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 1.5px 1.5px, rgba(99, 102, 241, 0.16) 1.5px, transparent 0),
        linear-gradient(to right, rgba(99, 102, 241, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
    background-size: 32px 32px, 32px 32px, 32px 32px;
    pointer-events: none;
}

/* Large Soft Vibrant Aurora Gradient Clouds */
.aurora-cloud {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

.aurora-cloud.cloud-1 {
    width: 800px;
    height: 800px;
    top: -120px;
    left: 2%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.48) 0%, rgba(99, 102, 241, 0.32) 45%, transparent 75%);
    filter: blur(75px);
    animation: auroraDrift1 30s ease-in-out infinite alternate;
}

.aurora-cloud.cloud-2 {
    width: 850px;
    height: 850px;
    top: -80px;
    right: 0%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.45) 0%, rgba(129, 140, 248, 0.30) 50%, transparent 80%);
    filter: blur(78px);
    animation: auroraDrift2 36s ease-in-out infinite alternate;
}

.aurora-cloud.cloud-3 {
    width: 700px;
    height: 700px;
    top: 38%;
    left: 22%;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.42) 0%, rgba(56, 189, 248, 0.28) 50%, transparent 75%);
    filter: blur(70px);
    animation: auroraDrift3 32s ease-in-out infinite alternate;
}

.aurora-cloud.cloud-4 {
    width: 900px;
    height: 900px;
    bottom: -160px;
    right: 10%;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.38) 0%, rgba(139, 92, 246, 0.32) 50%, transparent 80%);
    filter: blur(80px);
    animation: auroraDrift4 40s ease-in-out infinite alternate;
}

@keyframes auroraDrift1 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.9; }
    50% { transform: translate(50px, 40px) scale(1.1); opacity: 1; }
    100% { transform: translate(-40px, 55px) scale(0.92); opacity: 0.92; }
}

@keyframes auroraDrift2 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.88; }
    50% { transform: translate(-55px, 50px) scale(1.12); opacity: 1; }
    100% { transform: translate(40px, -35px) scale(0.90); opacity: 0.88; }
}

@keyframes auroraDrift3 {
    0% { transform: translate(0, 0) scale(0.95); opacity: 0.85; }
    50% { transform: translate(-45px, -40px) scale(1.15); opacity: 1; }
    100% { transform: translate(35px, 45px) scale(0.94); opacity: 0.88; }
}

@keyframes auroraDrift4 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.82; }
    50% { transform: translate(45px, -50px) scale(1.1); opacity: 0.98; }
    100% { transform: translate(-35px, 40px) scale(0.92); opacity: 0.85; }
}

/* Translucent Floating Glass Orbs with Crisp Border Glow */
.aurora-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

.aurora-orb.orb-1 {
    top: 18%;
    left: 12%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.85), rgba(199, 210, 254, 0.45));
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 14px 40px rgba(99, 102, 241, 0.16), 0 0 20px rgba(56, 189, 248, 0.25), inset 0 0 16px rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    animation: orbFloat1 28s ease-in-out infinite alternate;
}

.aurora-orb.orb-2 {
    top: 60%;
    right: 16%;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.8), rgba(233, 213, 255, 0.4));
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 45px rgba(168, 85, 247, 0.16), 0 0 25px rgba(192, 132, 252, 0.25), inset 0 0 18px rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    animation: orbFloat2 34s ease-in-out infinite alternate;
}

.aurora-orb.orb-3 {
    top: 72%;
    left: 26%;
    width: 85px;
    height: 85px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9), rgba(165, 243, 252, 0.45));
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.18), 0 0 18px rgba(45, 212, 191, 0.25), inset 0 0 14px rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    animation: orbFloat1 30s ease-in-out 3s infinite alternate;
}

@keyframes orbFloat1 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.8; }
    50% { transform: translate(35px, -45px) scale(1.08); opacity: 1; }
    100% { transform: translate(-30px, -75px) scale(0.94); opacity: 0.85; }
}

@keyframes orbFloat2 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.75; }
    50% { transform: translate(-40px, 35px) scale(1.1); opacity: 1; }
    100% { transform: translate(30px, 65px) scale(0.92); opacity: 0.8; }
}

/* Floating Brighter Light Particles */
.aurora-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.aurora-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.8;
    will-change: transform, opacity;
}

.aurora-particle.ap1 {
    width: 5px;
    height: 5px;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8, 0 0 18px #38bdf8;
    top: 25%;
    left: 20%;
    animation: auroraParticleFloat 22s ease-in-out infinite alternate;
}

.aurora-particle.ap2 {
    width: 4.5px;
    height: 4.5px;
    background: #818cf8;
    box-shadow: 0 0 10px #818cf8, 0 0 18px #818cf8;
    top: 55%;
    left: 75%;
    animation: auroraParticleFloat 26s ease-in-out 2s infinite alternate;
}

.aurora-particle.ap3 {
    width: 6px;
    height: 6px;
    background: #c084fc;
    box-shadow: 0 0 12px #c084fc, 0 0 22px #c084fc;
    top: 70%;
    left: 35%;
    animation: auroraParticleFloat 28s ease-in-out 1s infinite alternate;
}

.aurora-particle.ap4 {
    width: 4px;
    height: 4px;
    background: #2dd4bf;
    box-shadow: 0 0 8px #2dd4bf, 0 0 16px #2dd4bf;
    top: 35%;
    left: 65%;
    animation: auroraParticleFloat 24s ease-in-out 3s infinite alternate;
}

.aurora-particle.ap5 {
    width: 5.5px;
    height: 5.5px;
    background: #38bdf8;
    box-shadow: 0 0 12px #38bdf8, 0 0 20px #38bdf8;
    top: 15%;
    left: 80%;
    animation: auroraParticleFloat 25s ease-in-out 1.5s infinite alternate;
}

.aurora-particle.ap6 {
    width: 4.5px;
    height: 4.5px;
    background: #f472b6;
    box-shadow: 0 0 10px #f472b6, 0 0 18px #f472b6;
    top: 80%;
    left: 60%;
    animation: auroraParticleFloat 30s ease-in-out 4s infinite alternate;
}

@keyframes auroraParticleFloat {
    0% { transform: translate(0, 0); opacity: 0.5; }
    50% { transform: translate(40px, -50px); opacity: 0.95; }
    100% { transform: translate(-25px, -90px); opacity: 0.45; }
}

/* Noticeable Diagonal Daylight Sweep */
.aurora-light-sweep {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.6) 50%, transparent 65%);
    pointer-events: none;
    transform: rotate(-15deg);
    animation: auroraSweepPass 22s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes auroraSweepPass {
    0%, 85% { transform: translateX(-100%) rotate(-15deg); opacity: 0; }
    90% { opacity: 0.7; }
    96%, 100% { transform: translateX(100%) rotate(-15deg); opacity: 0; }
}

/* Light Theme Card Ambient Depth (Crisp White Floating Panels over Vibrant Aurora) */
html:not([data-theme="dark"]) .main-content {
    position: relative;
    z-index: 1;
}

html:not([data-theme="dark"]) .content-wrapper {
    position: relative;
    z-index: 1;
}

/* Enhancing Light Theme cards float depth without transparency */
html:not([data-theme="dark"]) .stat-card,
html:not([data-theme="dark"]) .chart-card,
html:not([data-theme="dark"]) .saas-card,
html:not([data-theme="dark"]) .welcome-banner-card,
html:not([data-theme="dark"]) .client-task-card,
html:not([data-theme="dark"]) .modal-content,
html:not([data-theme="dark"]) .staff-task-category-card {
    background-color: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 12px 36px -4px rgba(99, 102, 241, 0.12), 0 4px 14px rgba(0, 0, 0, 0.04), inset 0 1px 0 #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

html:not([data-theme="dark"]) .stat-card h3,
html:not([data-theme="dark"]) .stat-card .stat-value,
html:not([data-theme="dark"]) .chart-card h3,
html:not([data-theme="dark"]) .chart-header h3,
html:not([data-theme="dark"]) .saas-card h3,
html:not([data-theme="dark"]) .saas-card h4 {
    color: #0f172a !important;
}

html:not([data-theme="dark"]) .stat-card p,
html:not([data-theme="dark"]) .stat-card .stat-subtext,
html:not([data-theme="dark"]) .chart-card p,
html:not([data-theme="dark"]) .chart-header p {
    color: #475569 !important;
}

html:not([data-theme="dark"]) .stat-card:hover,
html:not([data-theme="dark"]) .chart-card:hover,
html:not([data-theme="dark"]) .saas-card:hover,
html:not([data-theme="dark"]) .client-task-card:hover {
    box-shadow: 0 18px 40px -4px rgba(99, 102, 241, 0.20), 0 6px 18px rgba(0, 0, 0, 0.06), inset 0 1px 0 #ffffff !important;
    border-color: rgba(129, 140, 248, 0.5) !important;
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .d-nebula-electric-blue,
    .d-nebula-deep-violet,
    .d-nebula-cyan-glow,
    .d-nebula-magenta-core,
    .d-nebula-indigo-drift,
    .d-galaxy-stars-distant,
    .d-galaxy-stars-mid,
    .d-sparkle-star,
    .d-particle,
    .d-shooting-star,
    .aurora-cloud,
    .aurora-orb,
    .aurora-particle,
    .aurora-light-sweep {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* Quick Tag Pill Selector Buttons */
.btn-tag {
    background: var(--bg-tertiary, #f1f5f9);
    color: var(--text-secondary, #475569);
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.btn-tag:hover {
    background: var(--primary-light, #e0f2fe);
    color: var(--primary, #0284c7);
    border-color: var(--primary, #0284c7);
    transform: translateY(-1px);
}

/* ==========================================================================
   SKYBOOK GLOBAL - LEAVE MANAGEMENT & WORKFORCE CALENDAR STYLING
   ========================================================================== */

.leave-tab-btn.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.leave-calendar-container {
    width: 100% !important;
    margin-top: 10px !important;
    box-sizing: border-box !important;
}

/* ==========================================
   MONTH CALENDAR VIEW
   ========================================== */
.leave-calendar-container.leave-calendar-month {
    display: block !important;
    width: 100% !important;
}

.leave-month-view {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.leave-month-weekdays {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.leave-month-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ==========================================
   WEEK CALENDAR VIEW
   ========================================== */
.leave-calendar-container.leave-calendar-week {
    display: block !important;
    width: 100% !important;
}

.leave-week-view {
    display: block !important;
    width: 100% !important;
}

.leave-calendar-week .week-calendar-wrapper {
    width: 100% !important;
    overflow-x: auto !important;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    box-sizing: border-box;
}

.leave-calendar-week .week-calendar-table {
    width: 100% !important;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.leave-calendar-week .week-calendar-table th {
    background: var(--bg-tertiary);
    padding: 10px 8px;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.leave-calendar-week .week-calendar-table th:last-child {
    border-right: none;
}

.leave-calendar-week .week-calendar-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    vertical-align: middle;
}

.leave-calendar-week .week-calendar-table td:last-child {
    border-right: none;
}

.leave-calendar-week .week-section-header {
    background: var(--bg-tertiary);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    padding: 8px 12px;
}

.leave-calendar-header-cell {
    background: var(--bg-tertiary, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    padding: 9px 4px;
    text-align: center;
    font-weight: 750;
    font-size: 0.74rem;
    color: var(--text-muted, #64748b);
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    user-select: none;
    box-sizing: border-box;
}

.leave-calendar-header-cell.weekend-header {
    color: var(--text-secondary, #475569);
    background: rgba(0, 0, 0, 0.04);
}

.leave-calendar-day-cell {
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    height: 112px;
    min-height: 112px;
    max-height: 112px;
    padding: 7px 8px 6px 8px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
    position: relative;
    overflow: hidden;
    gap: 4px;
}

.leave-calendar-day-cell:hover {
    border-color: var(--primary, #6366f1);
    background-color: var(--bg-primary, #f8fafc);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
    transform: translateY(-1px);
    z-index: 2;
}

.leave-calendar-day-cell.selected-date,
.leave-calendar-day-cell.selected {
    border: 2px solid var(--primary, #6366f1) !important;
    background-color: rgba(99, 102, 241, 0.06) !important;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25) !important;
    z-index: 3;
}

.leave-calendar-day-cell.today {
    border: 1.5px solid var(--primary, #6366f1);
    background: rgba(99, 102, 241, 0.03);
}

.leave-calendar-day-cell.weekend {
    background: rgba(0, 0, 0, 0.02);
}

.leave-calendar-day-cell.other-month {
    opacity: 0.22;
    background: rgba(0, 0, 0, 0.015);
    cursor: default;
    pointer-events: none;
    border: 1px dashed var(--border-color, #e2e8f0);
}

.leave-calendar-day-cell .day-number {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 2px;
    line-height: 1;
    user-select: none;
}

.day-num-text {
    font-size: 0.88rem;
    font-weight: 750;
    color: var(--text-primary, #0f172a);
}

.day-num-text.muted {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
}

.day-number-badge {
    background: var(--primary, #6366f1);
    color: #ffffff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.today-tag {
    font-size: 0.6rem;
    font-weight: 850;
    color: var(--primary, #6366f1);
    background: rgba(99, 102, 241, 0.12);
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    line-height: 1;
}

.cal-cell-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    flex: 1;
}

.cal-staff-row,
.cal-staff-chip,
.cal-staff-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.035);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    line-height: 1.2;
    height: 22px;
    transition: background 0.12s ease;
}

.cal-staff-row:hover,
.cal-staff-chip:hover,
.cal-staff-pill:hover {
    background: rgba(0, 0, 0, 0.06);
}

.cal-status-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.cal-staff-name {
    font-size: 0.72rem;
    font-weight: 650;
    color: var(--text-primary, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.cal-more-pill,
.cal-more-chip {
    font-size: 0.68rem;
    font-weight: 750;
    color: var(--primary, #6366f1);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.22);
    padding: 2px 8px;
    border-radius: 6px;
    width: fit-content;
    white-space: nowrap;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cal-more-pill:hover,
.cal-more-chip:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--primary-hover, #4f46e5);
    transform: translateY(-1px);
}

.cal-holiday-pill,
.cal-holiday-chip {
    font-size: 0.68rem;
    font-weight: 750;
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    height: 22px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.leave-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.leave-badge-annual { background: rgba(99, 102, 241, 0.15); color: #818cf8; border-left: 3px solid #818cf8; }
.leave-badge-casual { background: rgba(16, 185, 129, 0.15); color: #34d399; border-left: 3px solid #34d399; }
.leave-badge-sick { background: rgba(239, 68, 68, 0.15); color: #f87171; border-left: 3px solid #f87171; }
.leave-badge-wfh { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border-left: 3px solid #38bdf8; }
.leave-badge-unpaid { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border-left: 3px solid #94a3b8; }
.leave-badge-staff-off { background: rgba(168, 85, 247, 0.15); color: #c084fc; border-left: 3px solid #c084fc; }
.leave-badge-client-off { background: rgba(100, 116, 139, 0.15); color: #94a3b8; border-left: 3px solid #94a3b8; }
.leave-badge-holiday { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border-left: 3px solid #fbbf24; font-weight: 700; }

@media (max-width: 900px) {
    .expanded-calendar-body-wrapper {
        flex-direction: column !important;
    }
    .cal-details-col {
        min-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .leave-month-grid, .leave-month-weekdays {
        gap: 4px !important;
    }
    .leave-calendar-day-cell {
        min-height: 88px;
        height: 92px;
        max-height: 96px;
        padding: 4px 5px;
    }
    .leave-calendar-header-cell {
        padding: 6px 2px;
        font-size: 0.68rem;
    }
    .cal-staff-row, .cal-staff-chip, .cal-staff-pill {
        height: 20px;
        padding: 1px 4px;
    }
    .cal-staff-name {
        font-size: 0.66rem;
    }
    .cal-more-pill, .cal-more-chip {
        font-size: 0.64rem;
        padding: 1px 6px;
    }
    .leave-badge {
        font-size: 0.65rem;
        padding: 2px 4px;
    }
}

/* Header Profile Dropdown Panel */
.profile-dropdown-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 250px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 130;
    padding: 14px;
    display: none;
    flex-direction: column;
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.profile-dropdown-panel.open {
    display: flex !important;
}
.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.profile-panel-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}
.profile-panel-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.profile-panel-name {
    font-weight: 750;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-panel-role {
    font-size: 0.72rem;
    font-weight: 650;
    color: var(--primary);
    margin-top: 1px;
}
.profile-panel-email {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 12px 0 8px 0;
}
.profile-dropdown-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.profile-action-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}
.profile-action-item:hover {
    background-color: var(--bg-hover);
    color: var(--primary);
}
.profile-action-item.danger {
    color: var(--danger);
}
.profile-action-item.danger:hover {
    background-color: rgba(239, 68, 68, 0.08);
}

/* Custom Scrollbar and Heights for Today's Daily Tasks list in Staff Portal */
.custom-scrollable-tasks {
    height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}
.custom-scrollable-tasks::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollable-tasks::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollable-tasks::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
.custom-scrollable-tasks::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

@media (max-width: 1024px) {
    .custom-scrollable-tasks {
        height: 340px;
    }
}
@media (max-width: 768px) {
    .custom-scrollable-tasks {
        height: 260px;
    }
}

/* Futuristic 3D Earth Background & Left-aligned Login styles */
.skybook-login-viewport {
    background-color: #020205 !important;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Glassmorphism Card Left-aligned Wrapper */
.login-card-wrapper {
    margin-left: 80px;
    z-index: 10;
    width: 430px;
    padding: 20px;
    box-sizing: border-box;
}

.login-card {
    background: rgba(10, 10, 18, 0.45) !important;
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
    border-radius: 26px !important;
    padding: 44px 40px !important;
    width: 100%;
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.85),
        0 0 50px rgba(139, 92, 246, 0.12),
        inset 0 0 20px rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(40px) !important;
    -webkit-backdrop-filter: blur(40px) !important;
    animation: cardFloat 6s ease-in-out infinite alternate !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.login-card:hover {
    border-color: rgba(139, 92, 246, 0.35) !important;
    box-shadow: 
        0 35px 80px rgba(0, 0, 0, 0.9),
        0 0 60px rgba(139, 92, 246, 0.22),
        inset 0 0 20px rgba(255, 255, 255, 0.04) !important;
}

@keyframes cardFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

/* Rounded inputs and focus glows */
.input-wrapper .form-input {
    border-radius: 50px !important;
    background-color: rgba(15, 15, 25, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-left: 46px !important;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.input-wrapper .form-input:focus {
    border-color: #7c3aed !important;
    background-color: rgba(15, 15, 25, 0.8) !important;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.35) !important;
}

/* Premium Animated login button */
#login-submit-btn {
    border-radius: 50px !important;
    background: linear-gradient(135deg, #6366f1, #7c3aed) !important;
    border: none !important;
    font-weight: 750 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.02em !important;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35) !important;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

#login-submit-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5) !important;
}

/* Giant 3D Rising Earth (centered bottom) */
.earth-container {
    position: absolute;
    bottom: -50vw; /* Center of circle at the bottom edge */
    left: 0;
    width: 100vw;
    height: 100vw;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

.earth-atmosphere {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 15%, rgba(124, 58, 237, 0.25) 0%, rgba(59, 130, 246, 0.08) 50%, transparent 70%);
    filter: blur(20px);
}

.earth-glow-outer {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 
        0 0 50px rgba(139, 92, 246, 0.5),
        0 0 100px rgba(59, 130, 246, 0.25),
        inset 0 0 50px rgba(6, 182, 212, 0.25);
}

.earth-sphere {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    mask-image: radial-gradient(circle, black 65%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle, black 65%, transparent 100%);
}

.earth-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 500'><defs><pattern id='grid' width='40' height='40' patternUnits='userSpaceOnUse'><path d='M 40 0 L 0 0 0 40' fill='none' stroke='%233b82f6' stroke-width='0.4' opacity='0.18'/></pattern></defs><rect width='1000' height='500' fill='url(%23grid)'/></svg>");
    background-size: 50% 100%;
    background-repeat: repeat-x;
    animation: rotateGlobe 90s linear infinite;
    opacity: 0.35;
    mix-blend-mode: screen;
}

.earth-continents {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.continents-svg {
    width: 200%;
    height: 100%;
    animation: rotateGlobe 90s linear infinite;
    mix-blend-mode: screen;
    opacity: 0.75;
}

.earth-shading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 15%, transparent 35%, rgba(2, 2, 5, 0.45) 60%, rgba(2, 2, 5, 0.98) 85%);
    pointer-events: none;
}

/* Orbits */
.earth-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 50%;
    pointer-events: none;
}

.orbit-1 {
    width: 104%;
    height: 104%;
    animation: rotateOrbit 45s linear infinite;
}

.orbit-2 {
    width: 110%;
    height: 110%;
    border-color: rgba(56, 189, 248, 0.12);
    animation: rotateOrbitBack 65s linear infinite;
}

.orbit-3 {
    width: 116%;
    height: 116%;
    border-color: rgba(167, 139, 250, 0.1);
    animation: rotateOrbit 85s linear infinite;
}

.orbit-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #67e8f9;
    box-shadow: 0 0 10px #22d3ee, 0 0 20px #22d3ee;
}

.orbit-particle.p1 { top: 50%; left: 0; }
.orbit-particle.p2 { top: 0; left: 50%; }
.orbit-particle.p3 { bottom: 50%; right: 0; }

/* Cinematic Lens Flare */
.lens-flare {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 250px;
    background: radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.28) 0%, rgba(59, 130, 246, 0.12) 40%, transparent 75%);
    pointer-events: none;
    z-index: 3;
    filter: blur(25px);
}

/* Route pulse dot animation */
.route-pulse {
    stroke-dasharray: 20 150;
    stroke-dashoffset: 170;
    animation: travelRoute 6s linear infinite;
    opacity: 0.9;
}

@keyframes travelRoute {
    0% { stroke-dashoffset: 170; }
    100% { stroke-dashoffset: -170; }
}

/* City labels positioned absolute inside upper hemisphere of earth-sphere */
.earth-city-label {
    position: absolute;
    font-size: 0.72rem;
    font-weight: 700;
    color: #e2e8f0;
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.8), 0 0 15px rgba(99, 102, 241, 0.5);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(15, 15, 25, 0.65);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(139, 92, 246, 0.15);
    pointer-events: none;
    z-index: 5;
}

.earth-city-label.active {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1);
}

/* Animations */
@keyframes rotateGlobe {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

@keyframes rotateOrbit {
    from { transform: translate(-50%, -50%) rotateX(72deg) rotateZ(0deg); }
    to { transform: translate(-50%, -50%) rotateX(72deg) rotateZ(360deg); }
}

@keyframes rotateOrbitBack {
    from { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(360deg); }
    to { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(0deg); }
}

/* Twinkle stars layer */
.stars-twinkle-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(1px 1px at 25px 35px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 150px 220px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 300px 100px, rgba(167, 139, 250, 0.9), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 450px 400px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 600px 120px, rgba(186, 230, 253, 0.8), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 750px 300px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 800px 800px;
    opacity: 0.65;
    animation: starsTwinkle 6s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 1;
}

@keyframes starsTwinkle {
    0% { opacity: 0.35; }
    100% { opacity: 0.8; }
}

/* Responsive Rules for Left-Aligned Layout */
@media (max-width: 900px) {
    .skybook-login-viewport {
        justify-content: center;
        align-items: flex-start;
        padding-top: 40px;
        overflow-y: auto;
    }
    
    .login-card-wrapper {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 430px;
        margin: 0 auto;
    }
    
    .earth-container {
        width: 150vw;
        height: 150vw;
        bottom: -75vw;
        left: calc(50% - 75vw);
    }
}

/* ==========================================================================
   COMPACT CALENDAR SYSTEM & EXPANDED DETAIL VIEW MODAL
   ========================================================================== */
.compact-calendars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}
@media (max-width: 1200px) {
    .compact-calendars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .compact-calendars-grid {
        grid-template-columns: 1fr;
    }
}

.compact-calendar-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.compact-calendar-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.compact-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}
.compact-calendar-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
}

.compact-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}
.compact-weekday-cell {
    font-size: 0.65rem;
    font-weight: 750;
    color: var(--text-muted);
}

.compact-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.compact-day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    position: relative;
    background: var(--bg-primary);
    border: 1px solid transparent;
    transition: background 0.15s;
    min-height: 32px;
}
.compact-day-cell.other-month {
    opacity: 0.25;
}
.compact-day-cell.today {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}
.compact-day-cell.weekend {
    background: var(--bg-tertiary);
}
.compact-day-cell:hover {
    background: var(--bg-tertiary);
}

.compact-dots {
    display: flex;
    justify-content: center;
    gap: 2px;
    position: absolute;
    bottom: 2px;
    width: 100%;
}
.compact-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
}
.compact-dot.annual { background-color: #818cf8; }
.compact-dot.casual { background-color: #34d399; }
.compact-dot.sick { background-color: #f87171; }
.compact-dot.wfh { background-color: #38bdf8; }
.compact-dot.staff-off { background-color: #a855f7; }
.compact-dot.client-off { background-color: #64748b; }
.compact-dot.holiday { background-color: #fbbf24; }

/* Expanded Modal Layout */
.expanded-calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: auto !important;
}
.expanded-calendar-modal.open {
    opacity: 1;
}
.expanded-calendar-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    pointer-events: auto !important;
}
.expanded-calendar-modal.open .expanded-calendar-card {
    transform: scale(1);
}

/* ==========================================================================
   HR DEPARTMENT (PHASE 2A) STYLES
   ========================================================================== */
.modal-backdrop.open {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.hr-subnav {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.hr-subnav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.hr-subnav-btn:hover {
    color: var(--text-primary);
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.06);
}

.hr-subnav-btn.active {
    color: #ffffff !important;
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.hr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.hr-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.hr-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.hr-stat-content {
    display: flex;
    flex-direction: column;
}

.hr-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.hr-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 4px;
}

.hr-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.hr-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 750;
    font-size: 0.80rem;
}


