﻿:root {
    /* PH Flag Palette - Subtle */
    --bs-primary: #0056b3; /* PH Blue */
    --bs-primary-rgb: 0, 86, 179;
    --bs-secondary: #5a6268;
    --bs-success: #198754;
    --bs-danger: #d32f2f; /* PH Red */
    --bs-warning: #fbc02d; /* PH Yellow */
    --bs-info: #0dcaf0;
    
    /* Theme Colors */
    --theme-bg-dark: #f0f2f5;
    --theme-card-bg: rgba(255, 255, 255, 0.9);
    --theme-text-main: #212529;
    --theme-text-muted: #6c757d;
    --theme-border-color: rgba(0, 86, 179, 0.15);
    
    /* Tech/Game accents */
    --tech-glow-blue: 0 0 10px rgba(0, 86, 179, 0.3);
    --tech-glow-red: 0 0 10px rgba(211, 47, 47, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --glass-border: 1px solid rgba(0, 86, 179, 0.12); /* Subtle colored border */
}

html, body {
    background-color: var(--theme-bg-dark);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji' !important;
    color: var(--theme-text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em; /* Tight tracking for modern look */
    color: var(--theme-text-main);
}

h1, .h1 { font-size: 1.75rem; }
h2, .h2 { font-size: 1.5rem; }
h3, .h3 { font-size: 1.35rem; }
h4, .h4 { font-size: 1.15rem; }
h5, .h5 { font-size: 1rem; }
h6, .h6 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Small Text & Helpers */
.small, small { font-size: 0.875rem; }
.fs-7 { font-size: 0.85rem !important; }
.fs-8 { font-size: 0.75rem !important; }

/* Glassmorphism Card */
.glass-card {
    background: var(--theme-card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Global Card Override for consistency */
.card {
    border: var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    background-color: #ffffff;
}

/* Tech Borders & Elements */
.tech-border {
    border: 1px solid var(--theme-border-color);
    position: relative;
    overflow: hidden;
}

.tech-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--bs-primary);
    opacity: 0.7;
}

/* Button Overrides for "Game" feel */
.btn {
    border-radius: 8px; /* Slightly more rounded */
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

/* Subtle Primary Button - Tinted Style */
.btn-primary {
    background-color: rgba(0, 86, 179, 0.1);
    color: var(--bs-primary);
    border-color: rgba(0, 86, 179, 0.2);
    box-shadow: none;
}

.btn-primary:hover {
    background-color: var(--bs-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
    border-color: var(--bs-primary);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Update Outline Primary to match subtle theme */
.btn-outline-primary {
    border-color: rgba(0, 86, 179, 0.3);
    color: var(--bs-primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: rgba(0, 86, 179, 0.05);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.15);
}

/* Subtle Info/Scan Button */
.btn-info, .btn-outline-info {
    background-color: rgba(13, 202, 240, 0.1);
    color: #0aa2c0;
    border-color: rgba(13, 202, 240, 0.2);
    box-shadow: none;
}

.btn-info:hover, .btn-outline-info:hover {
    background-color: #0dcaf0;
    color: white;
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.3);
    /* For white text on light cyan, might need darker text or text-shadow. Bootstrap info is usually black text, but we want white on hover for game theme. */
    color: #000; 
}

/* Subtle Success Button */
.btn-success, .btn-outline-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--bs-success);
    border-color: rgba(25, 135, 84, 0.2);
}

.btn-success:hover, .btn-outline-success:hover {
    background-color: var(--bs-success);
    color: white;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

/* Subtle Danger Button */
.btn-danger, .btn-outline-danger {
    background-color: rgba(211, 47, 47, 0.1);
    color: var(--bs-danger);
    border-color: rgba(211, 47, 47, 0.2);
}

.btn-danger:hover, .btn-outline-danger:hover {
    background-color: var(--bs-danger);
    color: white;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

/* Subtle Secondary Button */
.btn-secondary, .btn-outline-secondary {
    background-color: rgba(108, 117, 125, 0.1);
    color: var(--bs-secondary);
    border-color: rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover, .btn-outline-secondary:hover {
    background-color: var(--bs-secondary);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Glass Buttons for Dark Gradients */
.btn-outline-light {
    border-color: rgba(255,255,255,0.4);
    color: white;
}
.btn-outline-light:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: white; /* Keep white text */
}

/* ==========================================================================
   PROFESSIONAL ANIMATIONS SYSTEM
   Subtle, performant animations for a polished UX.
   Uses GPU-accelerated properties (transform, opacity) only.
   Respects prefers-reduced-motion.
   ========================================================================== */

/* --- Keyframes --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Opacity-only fade — safe for containers with position:fixed children.
   transform on an ancestor breaks position:fixed (CSS spec). */
@keyframes fadeInSafe {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

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

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

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

@keyframes subtlePulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.7; }
}

@keyframes shimmerSlide {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

/* --- Utility Classes --- */
.animate-fade-in {
    animation: fadeInSafe 0.45s ease-out both;
}

.animate-fade-in-up {
    animation: fadeInUp 0.45s ease-out both;
}

.animate-fade-in-down {
    animation: fadeInDown 0.4s ease-out both;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.4s ease-out both;
}

.animate-fade-in-right {
    animation: fadeInRight 0.4s ease-out both;
}

.animate-scale-in {
    animation: scaleIn 0.35s ease-out both;
}

.animate-slide-in-up {
    animation: slideInUp 0.5s ease-out both;
}

/* Stagger delays — apply to children with .stagger-1, .stagger-2, etc. */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.30s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.40s; }

/* --- Auto Page-Enter Animation ---
   Automatically animates page content on load across ALL layouts.
   Covers: MainLayout, EmployeeLayout, AdminLayout, PlatformAdminLayout, AuthLayout */

/* Direct children of <main> — covers all layouts */
main > :first-child {
    animation: fadeInSafe 0.4s ease-out both;
}

/* Employee portal pages (*-page wrappers) */
.portal-page,
.calendar-page,
.history-page,
.leave-page,
.overtime-page,
.overtime-form-page,
.leave-form-page,
.holidays-page,
.sessions-page,
.report-page,
.rewards-page,
.dashboard-page,
.redemption-history-page,
.recognition-page,
.notification-settings-page {
    animation: fadeInSafe 0.4s ease-out both;
}

/* Work mode pages */
.wml-page,
.wm-request-page {
    animation: fadeInSafe 0.4s ease-out both;
}

/* Marketing & misc content containers */
article.content {
    animation: fadeInSafe 0.4s ease-out both;
}

/* --- Card & Panel Enter Animations --- */
.card,
.settings-card,
.pa-panel {
    animation: fadeInUp 0.4s ease-out both;
}

/* Stagger cards inside rows */
.row > [class*="col-"]:nth-child(1) > .card  { animation-delay: 0.03s; }
.row > [class*="col-"]:nth-child(2) > .card  { animation-delay: 0.06s; }
.row > [class*="col-"]:nth-child(3) > .card  { animation-delay: 0.09s; }
.row > [class*="col-"]:nth-child(4) > .card  { animation-delay: 0.12s; }
.row > [class*="col-"]:nth-child(5) > .card  { animation-delay: 0.15s; }
.row > [class*="col-"]:nth-child(6) > .card  { animation-delay: 0.18s; }
.row > [class*="col-"]:nth-child(7) > .card  { animation-delay: 0.21s; }
.row > [class*="col-"]:nth-child(8) > .card  { animation-delay: 0.24s; }

/* --- Table Rows Fade-In --- */
.table tbody tr {
    animation: fadeIn 0.3s ease-out both;
}
.table tbody tr:nth-child(1)  { animation-delay: 0.02s; }
.table tbody tr:nth-child(2)  { animation-delay: 0.04s; }
.table tbody tr:nth-child(3)  { animation-delay: 0.06s; }
.table tbody tr:nth-child(4)  { animation-delay: 0.08s; }
.table tbody tr:nth-child(5)  { animation-delay: 0.10s; }
.table tbody tr:nth-child(6)  { animation-delay: 0.12s; }
.table tbody tr:nth-child(7)  { animation-delay: 0.14s; }
.table tbody tr:nth-child(8)  { animation-delay: 0.16s; }
.table tbody tr:nth-child(9)  { animation-delay: 0.18s; }
.table tbody tr:nth-child(10) { animation-delay: 0.20s; }

/* --- Alert & Badge Enter --- */
.alert {
    animation: fadeInDown 0.35s ease-out both;
}

.badge {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* --- Modal Entrance --- */
.modal.show .modal-dialog {
    animation: scaleIn 0.25s ease-out both;
}

/* --- Spinner Utility --- */
.animate-spin {
    animation: spinSmooth 0.75s linear infinite;
}

/* --- Hover Micro-Interactions --- */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.btn {
    transition: all 0.2s ease;
}

/* Subtle lift on interactive list items */
.list-group-item-action {
    transition: transform 0.15s ease, background-color 0.15s ease;
}
.list-group-item-action:hover {
    transform: translateX(3px);
}

/* --- Loading Skeleton Shimmer (global reusable) --- */
.skeleton-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #fafafa 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmerSlide 1.5s ease-in-out infinite;
    border-radius: 6px;
}

/* --- Page Header Animations --- */
.pa-page-header,
.welcome-panel,
.pa-hero,
.page-header {
    animation: fadeInDown 0.45s ease-out both;
}

/* Mobile headers use sticky/fixed position — use safe animation */
[class*="-mobile-header"] {
    animation: fadeInSafe 0.4s ease-out both;
}

/* Fix: backdrop-filter on mobile headers creates a containing block that breaks
   position:fixed on descendants (e.g. notification panel). Use solid bg instead. */
@media (max-width: 767.98px) {
    [class*="-mobile-header"] {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(255, 255, 255, 0.98) !important;
    }
}

/* --- Breadcrumb Slide-in --- */
nav[aria-label="breadcrumb"] {
    animation: fadeInLeft 0.35s ease-out both;
}


/* Form Controls */
.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 0.6rem 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
    border-color: var(--bs-primary);
}

/* Badge Tweaks */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* --- Metronic-Inspired Enhancements --- */

/* Symbols (Icon Wrappers) */
.symbol {
    display: inline-block;
    flex-shrink: 0;
    position: relative;
    border-radius: 0.475rem;
}

.symbol.symbol-50px {
    width: 50px;
    height: 50px;
}

.symbol .symbol-label {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.475rem;
    width: 100%;
    height: 100%;
    background-color: #f5f8fa;
    color: #7e8299;
}

/* Symbol Colors (Subtle Backgrounds) */
.symbol-light-primary .symbol-label {
    background-color: rgba(0, 86, 179, 0.1);
    color: var(--bs-primary);
}

.symbol-light-success .symbol-label {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--bs-success);
}

.symbol-light-info .symbol-label {
    background-color: rgba(13, 202, 240, 0.1);
    color: #0aa2c0;
}

.symbol-light-warning .symbol-label {
    background-color: rgba(251, 192, 45, 0.1);
    color: #fbc02d;
}

/* Opacity Utilities */
.opacity-05 { opacity: 0.05 !important; }
.opacity-10 { opacity: 0.1 !important; }
.opacity-15 { opacity: 0.15 !important; }
.opacity-20 { opacity: 0.2 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }

/* Text Hover Utilities */
.hover-opacity-20:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Card Header Tweaks */
.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: transparent;
    padding: 1.25rem 1.5rem; /* Slightly reduced vertical padding */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-weight: 600;
    font-size: 1.15rem; /* aligned with h4 */
    margin: 0;
    color: var(--theme-text-main);
}

/* Stat Card specific */
.stat-card-value {
    font-size: 1.75rem; /* Reduced from 2rem for better balance */
    font-weight: 700;
    color: var(--theme-text-main);
    line-height: 1.2;
}

.stat-card-label {
    color: var(--theme-text-muted);
    font-weight: 600; /* Increased weight for legibility */
    font-size: 0.875rem; /* Standard small text size */
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.2s ease-in-out;
}
.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-shadow {
    transition: box-shadow 0.2s ease-in-out;
}
.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.transition-all {
    transition: all 0.3s ease;
}

/* Dropdown Menu Enhancements */
.dropdown-menu {
    border-radius: 10px;
}
.dropdown-item {
    font-weight: 500;
    color: var(--theme-text-muted);
    transition: all 0.2s;
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--theme-bg-dark);
    color: var(--bs-primary);
}
.dropdown-item.active, .dropdown-item:active {
    background-color: rgba(0, 86, 179, 0.1);
    color: var(--bs-primary);
}

/* Metric Icon - Perfect Circle */
.metric-icon {
    width: 60px;
    height: 60px;
    min-width: 60px; /* Prevent squishing */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

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

/* Card Accents */
.card-accent-primary { border-left: 5px solid var(--bs-primary) !important; }
.card-accent-success { border-left: 5px solid var(--bs-success) !important; }
.card-accent-warning { border-left: 5px solid var(--bs-warning) !important; }
.card-accent-info { border-left: 5px solid var(--bs-info) !important; }
.card-accent-danger { border-left: 5px solid var(--bs-danger) !important; }
.card-accent-secondary { border-left: 5px solid var(--bs-secondary) !important; }
.card-accent-purple { border-left: 5px solid #7c4dff !important; }

/* ============ MOBILE TOP BAR ============ */
.mobile-top-bar {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 86, 179, 0.1);
    min-height: 52px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ============ MAIN HEADER ============ */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 86, 179, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
}

/* Header Brand */
.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.header-brand .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bs-primary) 0%, #004494 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 86, 179, 0.25);
    overflow: hidden;
}

.header-brand .brand-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.header-brand .brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-text-main);
    letter-spacing: -0.02em;
}

/* Header Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--theme-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-nav .nav-item i {
    font-size: 1rem;
}

.header-nav .nav-item:hover {
    color: var(--bs-primary);
    background: rgba(0, 86, 179, 0.08);
}

.header-nav .nav-item.active {
    color: var(--bs-primary);
    background: rgba(0, 86, 179, 0.1);
}

.header-nav .nav-item.admin {
    color: var(--bs-success);
}

.header-nav .nav-item.admin:hover {
    color: var(--bs-success);
    background: rgba(25, 135, 84, 0.1);
}

.header-nav .nav-item.admin.active {
    background: rgba(25, 135, 84, 0.15);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-header {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-header.outline {
    color: var(--theme-text-main);
    background: transparent;
}

.btn-header.outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-header.primary {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #004494 100%);
    color: white;
}

.btn-header.primary:hover {
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-button:hover {
    border-color: rgba(0, 86, 179, 0.2);
    background: rgba(0, 86, 179, 0.02);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bs-primary) 0%, #004494 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--theme-text-main);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-button .bi-chevron-down {
    font-size: 0.7rem;
    color: var(--theme-text-muted);
}

/* Header Responsive */
@media (max-width: 1199.98px) {
    .header-nav .nav-item span {
        display: none;
    }
    
    .header-nav .nav-item {
        padding: 10px;
    }
    
    .header-nav .nav-item i {
        font-size: 1.15rem;
    }
}

@media (min-width: 1200px) {
    .header-nav {
        gap: 6px;
    }
}

/* ============ HEADER USER MENU DROPDOWN ============ */
.user-menu .dropdown-menu,
.portal-user-menu .dropdown-menu {
    min-width: 220px;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    margin-top: 8px;
}

.user-menu .dropdown-item,
.portal-user-menu .dropdown-item,
.portal-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--theme-text-main, #212529);
    transition: all 0.2s;
}

.user-menu .dropdown-item:hover,
.portal-user-menu .dropdown-item:hover,
.portal-dropdown .dropdown-item:hover {
    background: rgba(0, 86, 179, 0.08);
    color: var(--bs-primary);
}

.user-menu .dropdown-item.text-danger:hover,
.portal-user-menu .dropdown-item.text-danger:hover,
.portal-dropdown .dropdown-item.text-danger:hover {
    background: rgba(211, 47, 47, 0.08);
    color: var(--bs-danger);
}

.user-menu .dropdown-divider,
.portal-user-menu .dropdown-divider,
.portal-dropdown .dropdown-divider {
    margin: 8px 0;
    border-color: rgba(0, 0, 0, 0.08);
}

/* ============ PORTAL/EMPLOYEE HEADER ============ */
.portal-header {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 86, 179, 0.1);
}

.portal-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
}

/* Portal Brand */
.portal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.portal-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bs-primary) 0%, #004494 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 86, 179, 0.25);
    overflow: hidden;
}

.portal-brand-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.portal-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-text-main);
    letter-spacing: -0.02em;
}

/* Portal Navigation */
.portal-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.portal-nav-item {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--theme-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.portal-nav-item i {
    font-size: 1rem;
}

.portal-nav-item span {
    font-size: 0.9rem;
}

.portal-nav-item:hover {
    color: var(--bs-primary);
    background: rgba(0, 86, 179, 0.08);
}

.portal-nav-item.active {
    color: var(--bs-primary);
    background: rgba(0, 86, 179, 0.1);
}

/* Portal Actions */
.portal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Portal User Menu */
.portal-user-menu {
    position: relative;
}

.portal-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.portal-user-btn:hover {
    border-color: rgba(0, 86, 179, 0.2);
    background: rgba(0, 86, 179, 0.02);
}

.portal-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bs-primary) 0%, #004494 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.portal-user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--theme-text-main);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-user-btn .bi-chevron-down {
    font-size: 0.7rem;
    color: var(--theme-text-muted);
}

/* Portal Dropdown */
.portal-dropdown {
    min-width: 220px;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    margin-top: 8px;
}

/* Portal Responsive */
@media (max-width: 1199.98px) {
    .portal-nav-item span {
        display: none;
    }
    
    .portal-nav-item {
        padding: 10px;
    }
    
    .portal-nav-item i {
        font-size: 1.15rem;
    }
}

@media (min-width: 1200px) {
    .portal-nav {
        gap: 6px;
    }
}

/* Employee Layout Background */
.employee-layout {
    background: var(--theme-bg-dark);
}

/* ============ ADMIN SIDEBAR ============ */
.admin-sidebar {
    width: 260px;
    min-width: 260px;
    background: linear-gradient(180deg, #1a1f2e 0%, #0f1219 100%);
    color: #a0aec0;
    transition: all 0.3s ease;
}

/* Sidebar Header / Brand */
.admin-sidebar .sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-sidebar .brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.admin-sidebar .brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    overflow: hidden;
}

.admin-sidebar .brand-icon i {
    font-size: 1.25rem;
    color: white;
}

.admin-sidebar .brand-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.admin-sidebar .brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-sidebar .brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.admin-sidebar .brand-badge {
    font-size: 0.6rem;
    font-weight: 700;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
    width: fit-content;
}

/* Sidebar Content Area */
.admin-sidebar .sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0;
}

.admin-sidebar .sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar .sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

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

.admin-sidebar .sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Navigation Sections */
.admin-sidebar .nav-section {
    margin-bottom: 8px;
    padding: 0 12px;
}

.admin-sidebar .nav-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
}

.admin-sidebar .nav-section-header.collapsible {
    cursor: pointer;
    user-select: none;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.admin-sidebar .nav-section-header.collapsible:hover {
    background: rgba(255, 255, 255, 0.05);
}

.admin-sidebar .nav-section-header i {
    font-size: 0.75rem;
    opacity: 0.7;
}

.admin-sidebar .nav-section-header .section-chevron {
    margin-left: auto;
    font-size: 0.65rem;
    opacity: 0.5;
    transition: transform 0.2s ease;
}

/* Admin Nav Items */
.admin-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    position: relative;
    margin-bottom: 2px;
}

.admin-sidebar .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.admin-sidebar .nav-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: #60a5fa;
}

.admin-sidebar .nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: #3b82f6;
    border-radius: 0 3px 3px 0;
}

.admin-sidebar .nav-icon {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-sidebar .nav-icon i {
    font-size: 1rem;
    opacity: 0.85;
}

.admin-sidebar .nav-item.active .nav-icon i {
    opacity: 1;
}

.admin-sidebar .nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-sidebar .nav-badge {
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.admin-sidebar .nav-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.admin-sidebar .nav-indicator.live {
    background: #22c55e;
    animation: admin-pulse-live 2s infinite;
}

@keyframes admin-pulse-live {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

/* Sidebar Footer */
.admin-sidebar .sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-sidebar .exit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.admin-sidebar .exit-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.15);
}

.admin-sidebar .exit-btn i {
    font-size: 1rem;
}

/* Admin Sidebar Responsive */
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 1050;
    }

    .admin-sidebar.show {
        left: 0;
    }
}

