:root {
    --primary: #0071E3; /* Apple SF Blue */
    --primary-hover: #0059B3;
    --background: #F5F5F7; /* Apple light gray bg */
    --surface: #FFFFFF;
    --text-main: #1D1D1F; /* Apple Charcoal */
    --text-muted: #86868B; /* Apple Muted Gray */
    --border: #D2D2D7; /* Apple Border Gray */
    --success: #34C759; /* macOS System Green */
    --danger: #FF3B30; /* macOS System Red */
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glass: 0 8px 32px 0 rgba(0, 113, 227, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

.sidebar {
    width: 250px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.sidebar-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.nav-link {
    padding: 12px 16px;
    border-radius: var(--radius);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    background: var(--primary);
    color: white;
    transform: translateX(4px);
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-glass);
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #F9FAFB;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: #fff;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Login Page Specific */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f6f8fd 0%, #f1f5f9 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: var(--text-main);
}

/* Utils */
.mb-4 { margin-bottom: 1rem; }
.text-danger { color: var(--danger); font-size: 0.875rem; margin-top: 5px; }
.text-success { color: var(--success); font-size: 0.875rem; margin-top: 5px; }

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr !important;
    }
}

/* Tree View */
.tree-ul {
    list-style-type: none;
    padding-left: 20px;
}
.tree-ul li {
    margin: 5px 0;
    position: relative;
}
.tree-ul li::before {
    content: "";
    position: absolute;
    top: 0; left: -15px;
    border-left: 1px solid var(--border);
    height: 100%;
}
.tree-node {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.tree-node:hover {
    background: #F3F4F6;
}
.tree-badge {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 10px;
}

/* Categorised Navigation */
.nav-category {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    color: #64748B !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-top: 15px !important;
    margin-bottom: 5px !important;
    padding-left: 10px !important;
}

/* ==========================================
   macOS UI Integration Styles
   ========================================== */

/* Page background adjustment */
body {
    background: linear-gradient(135deg, #E2E8F0 0%, #FBCFE8 30%, #C7D2FE 60%, #93C5FD 100%) !important;
    background-attachment: fixed !important;
    background-size: cover !important;
    min-height: 100vh;
}

/* App Container Layout */
.app-container {
    display: block !important; /* Remove sidebar Flex layout */
    min-height: 100vh;
    padding-top: 36px; /* Space for Top Menu Bar */
}

/* Adjust Main Content to cover full width and have left dock padding */
.main-content {
    width: 100% !important;
    max-width: 1280px;
    margin: 0 auto !important;
    padding: 30px 20px 40px 90px !important; /* Space for Left Dock (90px left padding) */
    transition: none !important;
}

/* Glass Card improvements */
.glass-card {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.05) !important;
}

/* macOS Top Menu Bar */
.mac-menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1F2937;
    z-index: 9999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.mac-menu-left, .mac-menu-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mac-menu-center {
    display: flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Menu Dropdowns */
.mac-menu-item {
    position: relative;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, color 0.15s;
}

.mac-menu-item:hover, .mac-menu-item.active {
    background: rgba(0, 0, 0, 0.06);
}

.mac-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    min-width: 220px;
    padding: 6px 0;
    z-index: 10000;
}

.mac-menu-item:hover .mac-dropdown {
    display: block;
}

.mac-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    color: #374151;
    text-decoration: none;
    font-size: 0.8rem;
    transition: background 0.15s, color 0.15s;
    border-radius: 0;
}

.mac-dropdown-item:hover {
    background: #0056D2;
    color: #FFF;
}

.mac-dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 5px 0;
}

.mac-dropdown-header {
    padding: 4px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* macOS Left Dock */
.mac-dock-container {
    position: fixed;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    z-index: 9999;
    pointer-events: none;
}

.mac-dock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    padding: 12px 8px;
    width: 58px;
    height: auto;
    pointer-events: auto;
    transition: background 0.3s;
}

.mac-dock:hover {
    background: rgba(255, 255, 255, 0.35);
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    text-decoration: none;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.1, 0.9, 0.2, 1), margin 0.25s;
    transform-origin: center left;
}

.dock-icon {
    font-size: 1.7rem;
    line-height: 1;
    transition: font-size 0.25s;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.dock-item:hover {
    transform: scale(1.3) translateX(6px);
    margin: 4px 0;
}

/* Dynamic adjacent dock item scaling for smooth mac-like curve */
.mac-dock:hover .dock-item:hover + .dock-item,
.mac-dock .dock-item:has(+ .dock-item:hover) {
    transform: scale(1.12) translateX(3px);
}

/* Active indicator dot */
.dock-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.8);
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}

.dock-item.active .dock-dot {
    opacity: 1;
}

.dock-separator {
    width: 30px;
    height: 1px;
    background: rgba(0, 0, 0, 0.15);
    margin: 4px 0;
    align-self: center;
}

/* By default, hide the mobile menu toggle */
.mobile-menu-toggle {
    display: none !important;
}

/* Native Tablet/Mobile Responsive Media Query */
@media (max-width: 1024px) {
    /* Show mobile menu toggle, hide standard center items */
    .mobile-menu-toggle {
        display: block !important;
    }
    .mac-menu-center {
        display: none !important;
    }
    
    /* On mobile/tablet, adjust the brand text and status spacing */
    .brand-text {
        font-size: 0.85rem;
    }
    .mac-network-status {
        display: none !important; /* Hide network bar on small screens to save space */
    }
    
    /* Make the bottom dock floating and centered, just like on macOS */
    .mac-dock-container {
        position: fixed !important;
        width: auto !important;
        bottom: 12px !important;
        top: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        pointer-events: none !important;
        z-index: 9999;
    }
    
    .mac-dock {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        width: max-content !important;
        max-width: calc(100vw - 24px) !important;
        height: 52px !important;
        border-radius: 14px !important;
        padding: 5px 12px !important;
        gap: 8px !important;
        pointer-events: auto !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    }
    
    .dock-item {
        width: 32px !important;
        height: 32px !important;
        transform-origin: bottom center !important;
    }
    
    .dock-icon {
        font-size: 1.4rem !important;
    }
    
    .dock-item:hover {
        transform: none !important;
        margin: 0 !important;
    }
    
    .dock-dot {
        bottom: -6px !important;
        right: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    .dock-separator {
        width: 1px !important;
        height: 30px !important;
        margin: 0 4px !important;
        align-self: center !important;
    }
    
    .main-content {
        padding-left: 20px !important;
        padding-bottom: 80px !important;
    }
}

/* Mobile-specific reflows */
@media (max-width: 768px) {
    .glass-card {
        padding: 16px !important;
    }
    .grid-2 {
        grid-template-columns: 1fr !important;
    }
    
    /* Target page title header containers with inline flex-between styles to stack them on mobile */
    div[style*="display: flex"][style*="justify-content: space-between"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    /* Target the button container inside the flex header */
    div[style*="display: flex"][style*="justify-content: space-between"] > div:last-child {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
        margin-top: 4px !important;
    }
    
    /* Make print and excel export buttons smaller and responsive on mobile */
    button[onclick*="exportTableToExcel"],
    button[onclick*="window.print"] {
        font-size: 0.8rem !important;
        padding: 6px 12px !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        flex: 1 1 auto !important; /* Grow and shrink evenly to fit */
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 120px !important;
        height: 34px !important;
        border-radius: 6px !important;
    }
}
/* For extremely narrow viewports (e.g. mobile portrait < 480px) */
@media (max-width: 480px) {
    .mac-user-status {
        display: none !important; /* Hide full user profile info to fit the clock */
    }
    .mac-menu-bar {
        padding: 0 8px !important;
    }
}

/* Mobile-specific reflows for Dock on phone screens (<= 600px) */
@media (max-width: 600px) {
    .dock-separator {
        display: none !important;
    }
    .dock-hide-mobile {
        display: none !important;
    }
    .mac-dock {
        gap: 6px !important;
        padding: 5px 8px !important;
        border-radius: 12px !important;
        height: 48px !important;
    }
    .dock-item {
        width: 30px !important;
        height: 30px !important;
    }
    .dock-icon {
        font-size: 1.25rem !important;
    }
    .dock-dot {
        bottom: -4px !important;
        width: 3px !important;
        height: 3px !important;
    }
}

/* ==========================================
   Android-style Bottom Sheet Card Menu
   ========================================== */
.android-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 100000 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-end !important; /* Slide up from bottom */
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease !important;
}

.android-menu-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.android-menu-container {
    background: #F3F4F6 !important; /* Android light gray bg */
    width: 100% !important;
    max-width: 600px !important;
    height: 80vh !important; /* Take 80% height of screen */
    border-radius: 24px 24px 0 0 !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
    transform: translateY(100%) !important;
    transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1) !important;
}

.android-menu-overlay.active .android-menu-container {
    transform: translateY(0) !important;
}

.android-menu-header {
    padding: 16px 24px !important;
    background: #FFFFFF !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-radius: 24px 24px 0 0 !important;
}

.android-menu-close {
    background: #F3F4F6 !important;
    border: none !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    font-size: 1rem !important;
    font-weight: bold !important;
    color: #4B5563 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s !important;
}

.android-menu-close:hover {
    background: #E5E7EB !important;
}

.android-menu-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 20px 24px 40px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    text-align: left !important;
}

.android-card-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.android-group-title {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #86868B !important;
    padding-left: 4px !important;
}

.android-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
}

@media (max-width: 480px) {
    .android-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .android-menu-container {
        height: 85vh !important; /* Slightly taller on small screens */
    }
}

.android-menu-card {
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    border-radius: 18px !important;
    padding: 18px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    text-align: center !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s !important;
}

.android-menu-card:active {
    background: #F9FAFB !important;
    transform: scale(0.95) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.android-card-icon {
    font-size: 1.8rem !important;
    display: inline-block !important;
    transition: transform 0.2s !important;
}

.android-menu-card:active .android-card-icon {
    transform: scale(0.9) !important;
}

.android-card-label {
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    color: #1D1D1F !important;
    line-height: 1.3 !important;
}

/* ==========================================
   Smooth Page Load Transitions
   ========================================== */
.page-transition {
    animation: fadeInPage 0.3s cubic-bezier(0.1, 0.9, 0.2, 1) forwards !important;
}

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

/* ==========================================
   macOS Notification Center Toasts
   ========================================== */
.mac-toast-container {
    position: fixed !important;
    top: 50px !important;
    right: 20px !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    max-width: 350px !important;
    width: calc(100% - 40px) !important;
    pointer-events: none !important;
}

.mac-toast {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    border-radius: 14px !important;
    padding: 14px 16px !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    pointer-events: auto !important;
    animation: macToastSlideIn 0.3s cubic-bezier(0.1, 0.9, 0.2, 1) forwards !important;
    position: relative !important;
}

@keyframes macToastSlideIn {
    from {
        opacity: 0 !important;
        transform: translateX(50px) scale(0.9) !important;
    }
    to {
        opacity: 1 !important;
        transform: translateX(0) scale(1) !important;
    }
}

@keyframes macToastFadeOut {
    from {
        opacity: 1 !important;
        transform: scale(1) !important;
    }
    to {
        opacity: 0 !important;
        transform: scale(0.9) !important;
    }
}

.mac-toast-icon {
    font-size: 1.25rem !important;
    line-height: 1 !important;
}

.mac-toast-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.mac-toast-message {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #1D1D1F !important;
    line-height: 1.4 !important;
}

.mac-toast-close {
    background: transparent !important;
    border: none !important;
    color: #86868B !important;
    font-size: 0.85rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 2px !important;
    margin-left: 4px !important;
    transition: color 0.15s !important;
}

.mac-toast-close:hover {
    color: #1D1D1F !important;
}

.mac-toast.error {
    border-left: 4px solid var(--danger) !important;
}

.mac-toast.success {
    border-left: 4px solid var(--success) !important;
}

.mac-toast.warning {
    border-left: 4px solid #F59E0B !important;
}

/* ==========================================
   macOS System Auto Dark Mode
   ========================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #1C1C1E !important;
        --surface: #2C2C2E !important;
        --text-main: #F2F2F7 !important;
        --text-muted: #AEAEB2 !important;
        --border: #3A3A3C !important;
        --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.35) !important;
    }
    
    body {
        background: linear-gradient(135deg, #180F24 0%, #0F172A 100%) !important;
        background-attachment: fixed !important;
    }
    
    .mac-menu-bar {
        background: rgba(28, 28, 30, 0.7) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        color: #F2F2F7 !important;
    }
    
    .mac-menu-item:hover, .mac-menu-item.active {
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    .mac-dropdown {
        background: rgba(44, 44, 46, 0.85) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }
    
    .mac-dropdown-item {
        color: #E5E7EB !important;
    }
    
    .mac-dropdown-item:hover {
        background: #0071E3 !important;
        color: #FFF !important;
    }
    
    .mac-dropdown-divider {
        background: rgba(255, 255, 255, 0.08) !important;
    }
    
    .glass-card {
        background: rgba(44, 44, 46, 0.75) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25) !important;
    }
    
    .form-control {
        background: #1C1C1E !important;
        border-color: #3A3A3C !important;
        color: #F2F2F7 !important;
    }
    
    .form-control:focus {
        background: #2C2C2E !important;
        border-color: var(--primary) !important;
    }
    
    /* Table styling for dark mode */
    table thead tr {
        background: #1C1C1E !important;
        border-bottom-color: #3A3A3C !important;
    }
    
    table thead tr th {
        color: #E5E7EB !important;
    }
    
    table tbody tr {
        border-bottom-color: #2C2C2E !important;
    }
    
    table tbody tr td {
        color: #F2F2F7 !important;
        border-right-color: #2C2C2E !important;
    }
    
    table tfoot tr {
        background: #1C1C1E !important;
        border-top-color: #F2F2F7 !important;
        border-bottom-color: #F2F2F7 !important;
    }
    
    /* Tree node dark mode */
    .tree-node {
        background: #2C2C2E !important;
        border-color: #3A3A3C !important;
        color: #F2F2F7 !important;
    }
    
    .tree-node:hover {
        background: #3A3A3C !important;
    }
    
    /* macOS Dock dark mode */
    .mac-dock {
        background: rgba(44, 44, 46, 0.25) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    
    .mac-dock:hover {
        background: rgba(44, 44, 46, 0.35) !important;
    }
    
    .dock-dot {
        background: rgba(255, 255, 255, 0.8) !important;
    }
    
    .dock-separator {
        background: rgba(255, 255, 255, 0.12) !important;
    }
    
    /* Android slide-up menu sheet dark mode */
    .android-menu-container {
        background: #1C1C1E !important;
    }
    
    .android-menu-header {
        background: #2C2C2E !important;
        border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    }
    
    .android-menu-header div div {
        color: #F2F2F7 !important;
    }
    
    .android-menu-close {
        background: #3A3A3C !important;
        color: #E5E7EB !important;
    }
    
    .android-menu-card {
        background: #2C2C2E !important;
        border-color: rgba(255, 255, 255, 0.04) !important;
    }
    
    .android-menu-card:active {
        background: #3A3A3C !important;
    }
    
    .android-card-label {
        color: #E5E7EB !important;
    }
    
    .mac-toast {
        background: rgba(44, 44, 46, 0.8) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }
    
    .mac-toast-message {
        color: #F2F2F7 !important;
    }
    
    .mac-toast-close:hover {
        color: #F2F2F7 !important;
    }
}



