/* ============================================
   Insurance System - Custom Styles
   Modern Enterprise SaaS Design System
   ============================================ */

/* CSS Custom Properties - Design Tokens */
:root {
    /* Primary Colors */
    --topbar-bg: #ffffff;
    --topbar-border: #e5e7eb;
    --topbar-height: 64px;
    
    /* Text Colors */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    /* Interactive Colors */
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-50: #eef2ff;
    
    /* Status Colors */
    --success-500: #10b981;
    --success-50: rgba(16, 185, 129, 0.1);
    --warning-500: #f59e0b;
    --warning-50: rgba(245, 158, 11, 0.1);
    --danger-500: #ef4444;
    --danger-50: rgba(239, 68, 68, 0.1);
    
    /* Neutral Colors */
    --neutral-50: #f9fafb;
    --neutral-100: #f3f4f6;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;
    
    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 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);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-lg: 16px;

    /* Breadcrumbs (main content + header strip) */
    --breadcrumb-font-size: 17px;
    --breadcrumb-icon-size: 20px;
    --breadcrumb-separator-size: 16px;
    --breadcrumb-gap: 6px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Support - Topbar Scoped */
[data-topbar="dark"] .enterprise-topbar {
    --topbar-bg: #1f2937;
    --topbar-border: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
}

/* ============================================
   ENTERPRISE TOPBAR - Core Structure
   ============================================ */

.enterprise-topbar {
    border-bottom: 1px solid var(--topbar-border);
    font-family: var(--font-sans);
}

.topbar-container {
    display: flex;
    align-items: center;
    height: var(--topbar-height);
    padding: 0 var(--space-4);
    gap: var(--space-4);
}

/* ============================================
   LEFT ZONE - Brand & Menu
   ============================================ */

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: var(--text-primary);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.topbar-brand:hover {
    background: var(--neutral-100);
    color: var(--text-primary);
}

.brand-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    font-weight: 600;
    font-size: var(--font-size-lg);
    letter-spacing: -0.01em;
    display: none;
}

@media (min-width: 768px) {
    .brand-text {
        display: inline;
    }
}

.topbar-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.topbar-menu-toggle:hover {
    background: var(--neutral-100);
    color: var(--text-primary);
}

.topbar-menu-toggle i {
    font-size: 20px;
}

/* ============================================
   CENTER ZONE - Global Search
   ============================================ */

.topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 560px;
    margin: 0 auto;
    margin-left: -10px;
}

@media (max-width: 991.98px) {
    .topbar-center {
        display: none;
    }
}

.global-search {
    width: 100%;
}

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

.search-icon {
    position: absolute;
    left: var(--space-3);
    color: var(--text-muted);
    font-size: var(--font-size-lg);
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    height: 42px;
    padding: 0 var(--space-4);
    padding-left: 40px;
    padding-right: 70px;
    font-size: var(--font-size-base);
    font-family: var(--font-sans);
    color: #111827;
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    outline: none;
    transition: all var(--transition-base);
    box-shadow: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:hover {
    border-color: var(--neutral-300);
    background: var(--neutral-100);
}

.search-input:focus {
    color: #111827;
    background: #ffffff;
    border: 1px solid var(--neutral-300) !important;
    box-shadow: none !important;
    outline: none !important;
    background-image: none !important;
}

.search-shortcut {
    position: absolute;
    right: var(--space-3);
    display: flex;
    align-items: center;
    gap: 2px;
    pointer-events: none;
}

.search-shortcut span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-muted);
    background: var(--neutral-200);
    border-radius: 4px;
}

/* Mobile Search Bar */
.mobile-search-bar {
    padding: var(--space-2) var(--space-4);
    background: var(--neutral-50);
    border-bottom: 1px solid var(--topbar-border);
}

.mobile-search-bar .search-wrapper {
    max-width: 100%;
}

.mobile-search-bar .search-input {
    background: #ffffff;
}

/* Defensive: ensure topbar hidden sections stay hidden */
@media (min-width: 992px) {
    #page-topbar .mobile-search-bar {
        display: none !important;
    }
}

#page-topbar .verti-dash-content.collapse:not(.show) {
    display: none !important;
}

/* ============================================
   SEARCH RESULTS DROPDOWN
   ============================================ */

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 320px;
    max-width: 480px;
    max-height: 420px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    z-index: 9999;
}

.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-results-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 3px;
}

.search-category {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--neutral-100);
}

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

.search-category-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.search-category-title i {
    font-size: 14px;
    color: var(--primary-500);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    transition: background var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover {
    background: var(--neutral-50);
}

.search-result-item:active {
    background: var(--neutral-100);
}

.search-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--neutral-100);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.search-result-icon i {
    font-size: 16px;
    color: var(--neutral-600);
}

.search-result-icon.client-icon {
    background: var(--primary-50);
}

.search-result-icon.client-icon i {
    color: var(--primary-600);
}

.search-result-icon.quote-icon {
    background: var(--warning-50);
}

.search-result-icon.quote-icon i {
    color: var(--warning-600);
}

.search-result-icon.vehicle-icon {
    background: var(--neutral-100);
}

.search-result-icon.vehicle-icon i {
    color: var(--neutral-700);
}

.search-result-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.search-result-title {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.search-result-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 500;
    flex-shrink: 0;
}

.search-result-badge.active {
    background: var(--success-50);
    color: var(--success-700);
}

.search-result-badge.pending {
    background: var(--warning-50);
    color: var(--warning-700);
}

.search-no-results {
    padding: var(--space-6) var(--space-4);
    text-align: center;
    color: var(--text-muted);
}

.search-no-results i {
    font-size: 32px;
    color: var(--neutral-300);
    margin-bottom: var(--space-2);
    display: block;
}

.search-no-results p {
    font-size: var(--font-size-sm);
    margin: 0;
}

.search-loading {
    padding: var(--space-4);
    text-align: center;
    color: var(--text-muted);
}

.search-loading i {
    font-size: 20px;
    animation: spin 1s linear infinite;
}

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

.search-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--neutral-50);
    border-top: 1px solid var(--neutral-100);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--primary-600);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-view-all:hover {
    background: var(--neutral-100);
}

/* ============================================
   RIGHT ZONE - Actions & Utilities
   ============================================ */

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.topbar-divider {
    width: 1px;
    height: 24px;
    background: var(--neutral-200);
    margin: 0 var(--space-2);
}

/* ============================================
   QUICK ACTIONS - Button Group
   ============================================ */

.quick-actions-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    height: 34px;
    padding: 0 var(--space-3);
    font-size: var(--font-size-sm);
    font-weight: 500;
    font-family: var(--font-sans);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
}

.action-btn i {
    font-size: var(--font-size-base);
}

/* Primary Action - Single standout button */
.action-btn--primary {
    background: var(--primary-500);
    color: #ffffff;
    border-color: var(--primary-500);
}

.action-btn--primary:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Secondary Actions - Ghost/muted style */
.action-btn--secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--neutral-200);
}

.action-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.action-btn .action-label {
    display: none;
}

@media (min-width: 1200px) {
    .action-btn .action-label {
        display: inline;
    }
}

/* ============================================
   SYSTEM STATUS - Subtle Indicator
   ============================================ */

.system-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    background: var(--neutral-50);
    cursor: default;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.status-indicator--healthy {
    background: var(--success-500);
    box-shadow: 0 0 0 2px var(--success-50);
}

.status-indicator--degraded {
    background: var(--warning-500);
    box-shadow: 0 0 0 2px var(--warning-50);
}

.status-indicator--critical {
    background: var(--danger-500);
    box-shadow: 0 0 0 2px var(--danger-50);
}

.status-indicator--unknown {
    background: var(--neutral-400);
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.2);
}

.status-label {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ============================================
   UTILITY GROUP - Notifications & Settings
   ============================================ */

.utility-group {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.changelog-topbar-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.changelog-topbar-btn:hover,
.changelog-topbar-btn.active,
.changelog-topbar-btn.has-unread {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.changelog-topbar-btn i {
    font-size: 18px;
}

.changelog-topbar-badge {
    min-width: 29px;
    padding: 3px 6px;
    border-radius: var(--radius-full);
    background: var(--danger-500);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.changelog-topbar-badge[hidden] {
    display: none;
}

@media (max-width: 1199.98px) {
    .changelog-topbar-btn {
        width: 36px;
        padding: 0;
        justify-content: center;
    }

    .changelog-topbar-label {
        display: none;
    }

    .changelog-topbar-badge {
        position: absolute;
        top: 2px;
        right: 1px;
        min-width: 8px;
        width: 8px;
        height: 8px;
        padding: 0;
        overflow: hidden;
        color: transparent;
    }
}

.utility-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.utility-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.utility-btn i {
    font-size: 20px;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    color: #ffffff;
    background: var(--danger-500);
    border-radius: var(--radius-full);
}

/* Sidebar menu pending-count badges */
#sidebar-menu .menu-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

#sidebar-menu .sidebar-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--danger-500);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

#sidebar-menu .sub-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

#sidebar-menu .sub-menu .sidebar-menu-badge {
    margin-left: 0.5rem;
}

/* Year / Month / Day date dropdowns (client form, KYC uploads, etc.) */
.bcic-date-dropdown {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.bcic-date-dropdown > [class*="col-"] {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.bcic-date-dropdown > [class*="col-"]:first-child {
    padding-left: 0;
}

.bcic-date-dropdown > [class*="col-"]:last-child {
    padding-right: 0;
}

.bcic-date-dropdown .client-date-part,
.bcic-date-dropdown select,
.bcic-date-dropdown .bcic-date-select,
.client-date-dropdown .form-control-modern {
    width: 100%;
    margin-bottom: 0;
    min-height: 42px;
    padding: 0.55rem 0.65rem;
    font-size: 0.9375rem;
    color: var(--text-primary, #1e293b);
    background-color: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Bootstrap form-select already draws one chevron — hide native arrow to avoid doubles */
.bcic-date-dropdown .form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.bcic-date-dropdown .form-control-modern {
    appearance: auto;
    -webkit-appearance: menulist;
}

.bcic-date-dropdown .client-date-part:focus,
.bcic-date-dropdown select:focus,
.bcic-date-dropdown .bcic-date-select:focus,
.client-date-dropdown .form-control-modern:focus {
    border-color: var(--color-accent, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    outline: none;
}

.bcic-date-select.bcic-date-select-sm,
.bcic-date-dropdown.bcic-date-dropdown-sm .client-date-part,
.bcic-date-dropdown.bcic-date-dropdown-sm select {
    min-height: 34px;
    padding: 0.35rem 0.5rem;
    font-size: 0.8125rem;
    border-radius: 6px;
}

.bcic-date-dropdown.bcic-date-dropdown-sm {
    gap: 0.35rem;
}

.bcic-date-dropdown.bcic-date-dropdown-sm .bcic-date-part-year {
    flex-basis: 92px;
    max-width: 104px;
}

.bcic-date-dropdown.bcic-date-dropdown-sm .bcic-date-part-day {
    flex-basis: 72px;
    max-width: 84px;
}

/* Document upload — issue / expiry date block */
.upload-form .doc-date-fields {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
}

.upload-form .doc-date-fields.is-visible {
    display: grid;
}

.upload-form .doc-date-field .ent-text-label {
    display: block;
    margin-bottom: 0.4rem;
}

@media (max-width: 767.98px) {
    .upload-form .doc-date-fields {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */

.notification-dropdown {
    width: 360px;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.notification-dropdown .dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--neutral-50);
    border-bottom: 1px solid var(--neutral-200);
}

.dropdown-header-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-header-action {
    font-size: var(--font-size-sm);
    color: var(--primary-500);
    text-decoration: none;
}

.dropdown-header-action:hover {
    color: var(--primary-600);
    text-decoration: underline;
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    text-decoration: none;
    border-bottom: 1px solid var(--neutral-100);
    transition: background var(--transition-fast);
}

.notification-item:hover {
    background: var(--neutral-50);
}

.notification-item.unread {
    background: var(--primary-50);
}

.notification-item.unread:hover {
    background: #e0e7ff;
}

.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.notification-icon i {
    font-size: var(--font-size-lg);
}

.notification-icon.info {
    background: var(--primary-50);
    color: var(--primary-500);
}

.notification-icon.success {
    background: var(--success-50);
    color: var(--success-500);
}

.notification-icon.warning {
    background: var(--warning-50);
    color: var(--warning-500);
}

.notification-icon.danger {
    background: var(--danger-50);
    color: var(--danger-500);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    line-height: 1.4;
}

.notification-time {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}

.dropdown-footer {
    padding: var(--space-3) var(--space-4);
    text-align: center;
    background: var(--neutral-50);
    border-top: 1px solid var(--neutral-200);
}

.dropdown-footer a {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--primary-500);
    text-decoration: none;
}

.dropdown-footer a:hover {
    color: var(--primary-600);
    text-decoration: underline;
}

/* ============================================
   USER PROFILE DROPDOWN
   ============================================ */

.user-dropdown {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1);
    padding-right: var(--space-2);
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.user-profile-btn:hover {
    background: var(--neutral-100);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.user-name {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.user-role {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.user-chevron {
    color: var(--text-muted);
    font-size: var(--font-size-lg);
    margin-left: var(--space-1);
}

/* User Menu */
.user-menu {
    width: 240px;
    padding: 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--neutral-50);
}

.user-menu-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.user-menu-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-menu-name {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
}

.user-menu-email {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.user-menu-divider {
    height: 1px;
    background: var(--neutral-200);
    margin: 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.user-menu-item:hover {
    background: var(--neutral-50);
    color: var(--text-primary);
}

.user-menu-item i {
    font-size: var(--font-size-lg);
    width: 20px;
    text-align: center;
}

.user-menu-item.logout {
    color: var(--danger-500);
}

.user-menu-item.logout:hover {
    background: var(--danger-50);
    color: var(--danger-500);
}

/* ============================================
   SEARCH RESULTS DROPDOWN
   ============================================ */

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    max-height: 450px;
    overflow-y: auto;
    z-index: 1050;
    box-shadow: var(--shadow-lg);
    animation: searchSlideDown 0.2s ease;
}

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

.search-category {
    border-bottom: 1px solid var(--neutral-100);
}

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

.search-category-title {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--neutral-50);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    transition: background var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover,
.search-result-item.active {
    background: var(--neutral-50);
}

.search-result-item .result-title {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-primary);
}

.search-result-item .result-meta {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.search-no-results,
.search-error {
    padding: var(--space-6) var(--space-4);
    text-align: center;
    color: var(--text-muted);
}

/* Scrollbar Styling */
.search-results-dropdown::-webkit-scrollbar,
.notification-list::-webkit-scrollbar {
    width: 6px;
}

.search-results-dropdown::-webkit-scrollbar-track,
.notification-list::-webkit-scrollbar-track {
    background: var(--neutral-50);
}

.search-results-dropdown::-webkit-scrollbar-thumb,
.notification-list::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: var(--radius-full);
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover,
.notification-list::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* ============================================
   QUICK ACTIONS MOBILE MENU
   ============================================ */

.quick-actions-menu {
    min-width: 200px;
    padding: var(--space-2) 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-lg);
}

.quick-actions-menu .dropdown-header {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.quick-action-item:hover {
    background: var(--neutral-50);
    color: var(--text-primary);
}

.quick-action-item i {
    font-size: var(--font-size-lg);
    width: 20px;
    text-align: center;
}

/* ============================================
   LEGACY COMPATIBILITY STYLES
   ============================================ */

/* Override Vuesy template #page-topbar (ID selector beats class, so we use ID+class) */
#page-topbar.enterprise-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    margin-left: 255px;
    margin-right: 0;
    background: var(--topbar-bg);
    box-shadow: none;
}

/* Keep topbar aligned with collapsed sidebar width */
body[data-sidebar-size="sm"] #page-topbar.enterprise-topbar {
    margin-left: 70px;
}

/* Mobile/tablet: sidebar overlays, so topbar should be full width */
@media (max-width: 992px) {
    #page-topbar.enterprise-topbar {
        margin-left: 0;
    }
}

/* Desktop: keep sidebar visible (mobile hide logic should not leak) */
@media (min-width: 993px) {
    .vertical-menu {
        display: block !important;
    }
}

#page-topbar.enterprise-topbar .navbar-header {
    display: none; /* Hide old navbar structure */
}

/* Sidebar expand/collapse chevrons (font-free) */
#sidebar-menu .has-arrow:after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    position: absolute;
    right: 15px;
    top: 12px;
    transform: rotate(45deg);
    transition: transform var(--transition-fast);
}

#sidebar-menu .mm-active > .has-arrow:after {
    transform: rotate(-135deg);
}

#sidebar-menu .has-arrow + ul .has-arrow:after {
    right: 25px;
    top: 10px;
}

/* ============================================
   DASHBOARD TOGGLE & PAGE TITLE
   ============================================ */

.verti-dash-content {
    background: var(--bs-header-bg);
    border-bottom: 1px solid var(--topbar-border);
}

body[data-topbar="dark"] .verti-dash-content {
    background: var(--bs-sidebar-dark-bg) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-title-box {
    padding: var(--space-3) 0;
}

.page-title-box .sub-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.page-title-box .breadcrumb {
    margin: 0;
    font-size: var(--breadcrumb-font-size);
    --bs-breadcrumb-item-padding-x: 0.65rem;
}

.page-title-box .breadcrumb-item {
    color: var(--text-muted);
    font-weight: 500;
}

.page-title-box .breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

.page-title-box .breadcrumb-item a:hover {
    color: var(--primary-500);
}

.page-title-box .breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* Main content breadcrumbs (below header) */
.modern-breadcrumb {
    background: transparent;
    padding: 12px 0 20px 0;
    margin-bottom: 20px;
}

.modern-breadcrumb-list {
    list-style: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    gap: 0;
}

.modern-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    font-size: var(--breadcrumb-font-size);
    line-height: 1.35;
    color: #64748B;
}

.modern-breadcrumb-item + .modern-breadcrumb-item::before {
    content: "/";
    display: inline-block;
    padding: 0 12px;
    color: #CBD5E1;
    font-size: var(--breadcrumb-separator-size);
    font-weight: 500;
    pointer-events: none;
}

.modern-breadcrumb-item a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    text-decoration: none;
    transition: color 0.15s ease;
    font-weight: 500;
}

.modern-breadcrumb-item a:hover {
    color: #2563EB;
}

.modern-breadcrumb-item.active {
    color: #0F172A;
    font-weight: 600;
}

.modern-breadcrumb-item.active .modern-breadcrumb-icon {
    color: #6366F1;
}

.modern-breadcrumb-label {
    white-space: nowrap;
}

.modern-breadcrumb-icon {
    font-size: var(--breadcrumb-icon-size);
    line-height: 1;
    color: #94A3B8;
    flex-shrink: 0;
}

.modern-breadcrumb-item a .modern-breadcrumb-icon {
    transition: color 0.15s ease;
}

.modern-breadcrumb-item a:hover .modern-breadcrumb-icon {
    color: #2563EB;
}

/* Dark header strip (collapsed dashboard bar) */
.verti-dash-content .page-title-box .breadcrumb {
    font-size: var(--breadcrumb-font-size);
}

.verti-dash-content .page-title-box .breadcrumb .breadcrumb-item.page-head a,
.verti-dash-content .page-title-box .breadcrumb .breadcrumb-item.page-head {
    font-weight: 500;
}

.verti-dash-content .page-title-box .breadcrumb .breadcrumb-item.page-head.active {
    font-weight: 600;
}

.dash-troggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 18px;
    margin: 0 auto;
    color: var(--text-muted);
    background: var(--neutral-100);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    transition: all var(--transition-fast);
    border: 1px solid var(--topbar-border);
    border-top: none;
}

body[data-topbar="dark"] .dash-troggle-icon {
    background: var(--bs-sidebar-dark-bg);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.dash-troggle-icon:hover {
    background: var(--neutral-200);
    color: var(--text-primary);
}

body[data-topbar="dark"] .dash-troggle-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.dash-troggle-icon i {
    font-size: var(--font-size-base);
    transition: transform var(--transition-base);
}

.dash-troggle-icon.collapsed i {
    transform: rotate(180deg);
}

/* ============================================
   ADDITIONAL SYSTEM STYLES
   ============================================ */

/* Login Page Styles */
body.authentication-bg {
    background-color: var(--neutral-100);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-pages .card {
    min-width: 400px;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-md);
}

.account-pages .container {
    max-width: 500px;
}

/* Chart Containers */
.chart-container {
    min-height: 300px;
    position: relative;
}

.mini-chart {
    height: 50px;
}

.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--text-muted);
}

/* Stat Card Enhancements */
.stat-card .trend-up { 
    color: var(--success-500);
    font-size: var(--font-size-sm);
}

.stat-card .trend-down { 
    color: var(--danger-500);
    font-size: var(--font-size-sm);
}

.stat-card .trend-icon {
    margin-left: var(--space-1);
}

/* Fix icon alignment in stat cards */
.avatar-sm {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure icons are visible */
.bx {
    font-family: 'boxicons' !important;
    display: inline-block;
    vertical-align: middle;
}

/* Fixed Footer */
.footer {
    position: fixed !important;
    z-index: 1000 !important;
}

/* Ensure page content has enough padding */
.page-content {
    padding-bottom: 80px !important;
}

/* Badge Enhancements */
.badge.bg-success-subtle {
    background-color: var(--success-50) !important;
    color: var(--success-500) !important;
}

.badge.bg-warning-subtle {
    background-color: var(--warning-50) !important;
    color: var(--warning-500) !important;
}

.badge.bg-danger-subtle {
    background-color: var(--danger-50) !important;
    color: var(--danger-500) !important;
}

.badge.bg-info-subtle {
    background-color: var(--primary-50) !important;
    color: var(--primary-500) !important;
}

.badge.bg-secondary-subtle {
    background-color: rgba(107, 114, 128, 0.1) !important;
    color: var(--neutral-500) !important;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1199.98px) {
    .topbar-container {
        gap: var(--space-3);
    }
    
    .topbar-right {
        gap: var(--space-2);
    }
    
    .topbar-divider {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .topbar-container {
        padding: 0 var(--space-3);
    }
    
    .quick-actions-group {
        display: none;
    }
}

@media (max-width: 767.98px) {
    :root {
        --topbar-height: 56px;
    }
    
    .topbar-left {
        gap: var(--space-2);
    }
    
    .brand-logo {
        height: 28px;
    }
    
    .topbar-menu-toggle {
        width: 32px;
        height: 32px;
    }
    
    .utility-btn {
        width: 32px;
        height: 32px;
    }
    
    .utility-btn i {
        font-size: 18px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .notification-dropdown {
        width: 300px;
    }
}

/* ============================================
   ENTERPRISE UI OVERRIDES (CLIENT PROFILE)
   Refined for Fortune 500 Aesthetic
   ============================================ */

/* CSS Variables - Refined Palette */
:root {
    --ent-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ent-primary: #0F172A; /* Slate 900 */
    --ent-secondary: #64748B; /* Slate 500 */
    --ent-tertiary: #94A3B8; /* Slate 400 */
    --ent-accent: #2563EB; /* Blue 600 */
    --ent-accent-hover: #1D4ED8; /* Blue 700 */
    --ent-success: #10B981; /* Emerald 500 */
    --ent-warning: #F59E0B; /* Amber 500 */
    --ent-danger: #EF4444; /* Red 500 */
    --ent-bg-main: #F8FAFC; /* Slate 50 */
    --ent-bg-card: #FFFFFF;
    --ent-border: #E2E8F0; /* Slate 200 - Very subtle */
    --ent-border-hover: #CBD5E1; /* Slate 300 */
    
    /* Sophisticated Shadows */
    --ent-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --ent-shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --ent-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    
    --ent-radius: 12px;
}

/* Base Utility Classes */
.ent-card {
    background: var(--ent-bg-card);
    border: 1px solid var(--ent-border);
    border-radius: var(--ent-radius);
    box-shadow: var(--ent-shadow-card);
    margin-bottom: 24px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Subtle hover effect for cards */
.ent-card:hover {
    border-color: var(--ent-border-hover);
    box-shadow: var(--ent-shadow-hover);
}

.ent-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--ent-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FFFFFF;
}

.ent-card-title {
    font-family: var(--ent-font-family);
    font-weight: 600;
    font-size: 16px;
    color: var(--ent-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.ent-card-body {
    padding: 24px;
}

/* Typography */
.ent-text-label {
    font-family: var(--ent-font-family);
    font-size: 12px;
    font-weight: 500;
    color: var(--ent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.ent-text-value {
    font-family: var(--ent-font-family);
    font-size: 15px;
    font-weight: 500;
    color: var(--ent-primary);
    line-height: 1.5;
}

.ent-text-mono {
    font-family: 'IBM Plex Mono', 'SF Mono', monospace;
    letter-spacing: -0.02em;
    color: var(--ent-primary);
}

/* Badges - Pill Style */
.ent-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
}

.ent-badge-success { background: #DCFCE7; color: #166534; border: 1px solid transparent; }
.ent-badge-warning { background: #FEF3C7; color: #92400E; border: 1px solid transparent; }
.ent-badge-danger { background: #FEE2E2; color: #991B1B; border: 1px solid transparent; }
.ent-badge-neutral { background: #F1F5F9; color: #475569; border: 1px solid transparent; }

/* Buttons */
.ent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    gap: 8px;
    letter-spacing: -0.01em;
}

.ent-btn-primary {
    background: var(--ent-accent);
    color: white;
    border: 1px solid var(--ent-accent);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

.ent-btn-primary:hover {
    background: var(--ent-accent-hover);
    border-color: var(--ent-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.ent-btn-outline {
    background: white;
    color: var(--ent-secondary);
    border: 1px solid var(--ent-border);
}

.ent-btn-outline:hover {
    background: var(--ent-bg-main);
    color: var(--ent-primary);
    border-color: var(--ent-border-hover);
    transform: translateY(-1px);
}

/* Layout Grid */
.ent-grid-layout {
    display: grid;
    grid-template-columns: 340px 1fr; /* Slightly wider sidebar */
    gap: 32px; /* More breathing room */
    align-items: start;
}

@media (max-width: 1200px) {
    .ent-grid-layout {
        grid-template-columns: 300px 1fr;
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .ent-grid-layout {
        grid-template-columns: 1fr;
    }
}

/* Stats Cards - Modernized */
.ent-stat-card {
    background: white;
    border: 1px solid var(--ent-border);
    border-radius: var(--ent-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.2s ease;
    box-shadow: var(--ent-shadow-card);
    position: relative;
}

.ent-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ent-shadow-hover);
    border-color: var(--ent-border-hover);
}

.ent-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--ent-bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ent-secondary);
    font-size: 20px;
    margin-bottom: 16px;
}

.ent-stat-label {
    font-size: 13px;
    color: var(--ent-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.ent-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--ent-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Tables */
.ent-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.ent-table th {
    background: #F8FAFC;
    padding: 14px 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--ent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--ent-border);
}

.ent-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ent-border);
    font-size: 14px;
    color: var(--ent-primary);
}

.ent-table tr:hover td {
    background-color: #F8FAFC;
}

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

/* Tabs - Modern Bottom Rail */
.ent-tabs {
    display: flex;
    gap: 32px;
    border-bottom: 1px solid var(--ent-border);
    margin-bottom: 32px;
    position: relative;
}

.ent-tab {
    padding: 16px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--ent-secondary);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    margin-bottom: -1px; /* Align with border */
}

.ent-tab:hover {
    color: var(--ent-primary);
}

.ent-tab.active {
    color: var(--ent-accent);
    border-bottom-color: var(--ent-accent);
    font-weight: 600;
}

/* Utility: Avatar Circle */
.ent-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #F1F5F9;
    color: var(--ent-accent);
    font-size: 32px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 0 4px white, 0 0 0 5px var(--ent-border);
}

/* ============================================
   DROPDOWN MENU FIXES
   ============================================ */

/* Ensure dropdown menu has visible text */
.dropdown-menu {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.dropdown-menu .dropdown-item {
    color: #1f2937 !important;
    font-weight: 500;
    padding: 10px 16px;
    font-size: 14px;
    transition: background-color 0.15s ease;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
}

.dropdown-menu .dropdown-item i {
    color: #6b7280;
    margin-right: 10px;
    font-size: 16px;
}

.dropdown-menu .dropdown-item:hover i {
    color: #4f46e5;
}

/* User dropdown header */
.dropdown-menu .dropdown-header {
    color: #1f2937 !important;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.dropdown-menu .dropdown-header .text-muted,
.dropdown-menu .dropdown-header small {
    color: #6b7280 !important;
}

/* Sign out item */
.dropdown-menu .dropdown-item.text-danger {
    color: #dc2626 !important;
}

.dropdown-menu .dropdown-item.text-danger:hover {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
}

/* Dropdown divider */
.dropdown-menu .dropdown-divider {
    border-color: #e5e7eb;
    margin: 8px 0;
}

/* ============================================
   SIDEBAR MENU FIXES
   ============================================ */

/* Hide ALL scrollbars in sidebar */
.sidebar-menu-scroll,
.sidebar-menu-scroll .simplebar-content-wrapper,
.sidebar-menu-scroll .simplebar-track {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}

.sidebar-menu-scroll::-webkit-scrollbar,
.sidebar-menu-scroll .simplebar-content-wrapper::-webkit-scrollbar,
.sidebar-menu-scroll *::-webkit-scrollbar {
    display: none !important; /* Chrome/Safari/Opera */
    width: 0 !important;
    height: 0 !important;
}

/* Hide simplebar scrollbar track completely */
.sidebar-menu-scroll .simplebar-track {
    display: none !important;
}

/* Fix logo spacing - reduce the massive gap */
.vertical-menu .navbar-brand-box {
    padding: 12px 1.5rem !important;
    height: auto !important;
    min-height: 60px;
}

.vertical-menu .sidebar-menu-scroll {
    margin-top: 0 !important;
    height: auto !important;
    padding-top: 10px;
}

/* Ensure logo line-height doesn't add extra space */
.vertical-menu .logo {
    line-height: 1.2 !important;
}

/* ============================================
   SETTINGS DROPDOWN
   Quick settings access in topbar
   ============================================ */

.settings-dropdown {
    width: 360px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--neutral-200, #e5e7eb);
    box-shadow: var(--shadow-lg, 0 10px 25px rgba(0, 0, 0, 0.15));
    overflow: hidden;
}

.settings-dropdown .dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--neutral-50, #f9fafb);
    border-bottom: 1px solid var(--neutral-200, #e5e7eb);
}

.settings-list {
    max-height: 360px;
    overflow-y: auto;
}

.settings-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid var(--neutral-100, #f3f4f6);
    transition: background 0.15s ease;
    cursor: pointer;
}

.settings-item:hover {
    background: var(--neutral-50, #f9fafb);
    text-decoration: none;
}

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

.settings-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--neutral-100, #f3f4f6);
    color: var(--neutral-600, #4b5563);
    flex-shrink: 0;
}

.settings-icon i {
    font-size: 18px;
}

.settings-icon.primary {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.settings-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.settings-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.settings-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.settings-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.settings-icon.secondary {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.settings-content {
    flex: 1;
    min-width: 0;
}

.settings-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    line-height: 1.3;
}

.settings-desc {
    display: block;
    font-size: 12px;
    color: var(--text-muted, #6b7280);
    line-height: 1.3;
    margin-top: 2px;
}

.settings-arrow {
    color: var(--neutral-400, #9ca3af);
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.settings-item:hover .settings-arrow {
    opacity: 1;
    transform: translateX(2px);
}

.settings-item:hover .settings-icon {
    transform: scale(1.05);
    transition: transform 0.15s ease;
}

.settings-dropdown .dropdown-footer {
    padding: 10px 16px;
    background: var(--neutral-50, #f9fafb);
    border-top: 1px solid var(--neutral-200, #e5e7eb);
    text-align: center;
}

.settings-dropdown .dropdown-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-500, #6366f1);
    text-decoration: none;
}

.settings-dropdown .dropdown-footer a:hover {
    color: var(--primary-600, #4f46e5);
    text-decoration: underline;
}

/* ============================================
   ADMINISTRATION MENU
   Keeps configuration out of the work sidebar
   ============================================ */

.administration-topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.administration-topbar-btn:hover,
.administration-topbar-btn:focus,
.administration-topbar-btn[aria-expanded="true"],
.administration-topbar-btn.active {
    border-color: rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.administration-topbar-btn > i:first-child {
    font-size: 18px;
}

.administration-topbar-chevron {
    font-size: 15px;
    transition: transform 0.15s ease;
}

.administration-topbar-btn[aria-expanded="true"] .administration-topbar-chevron {
    transform: rotate(180deg);
}

.administration-dropdown {
    width: min(620px, calc(100vw - 24px));
    margin-top: 10px !important;
    overflow: hidden;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px;
    background: #ffffff !important;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.administration-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.administration-menu-header > div {
    display: grid;
    gap: 2px;
}

.administration-menu-kicker {
    color: #b7791f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.administration-menu-header strong {
    color: #111827;
    font-size: 17px;
    line-height: 1.2;
}

.administration-menu-header small {
    color: #6b7280;
    font-size: 12px;
}

.administration-menu-count {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 12px;
    font-weight: 800;
}

.administration-menu-body {
    max-height: min(620px, calc(100vh - 100px));
    padding: 8px 12px 12px;
    overflow-y: auto;
}

.administration-menu-group {
    padding: 11px 0 4px;
}

.administration-menu-group + .administration-menu-group {
    border-top: 1px solid #f1f5f9;
}

.administration-menu-group h6 {
    margin: 0 8px 7px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.administration-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

.administration-menu-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #111827;
    text-decoration: none;
    transition: background 0.14s ease, border-color 0.14s ease;
}

.administration-menu-item:hover,
.administration-menu-item:focus {
    border-color: #e0e7ff;
    background: #f8faff;
    color: #111827;
    text-decoration: none;
}

.administration-menu-item.active {
    border-color: #c7d2fe;
    background: #eef2ff;
}

.administration-menu-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #475569;
}

.administration-menu-item:hover .administration-menu-icon,
.administration-menu-item.active .administration-menu-icon {
    background: #ddd6fe;
    color: #5b21b6;
}

.administration-menu-icon i {
    font-size: 18px;
}

.administration-menu-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.administration-menu-copy strong {
    color: #1f2937;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.administration-menu-copy small {
    display: -webkit-box;
    overflow: hidden;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.administration-menu-arrow {
    color: #cbd5e1;
    font-size: 16px;
}

.administration-menu-item:hover .administration-menu-arrow,
.administration-menu-item.active .administration-menu-arrow {
    color: #7c3aed;
}

/* Responsive adjustments */
@media (max-width: 1199.98px) {
    .administration-topbar-btn {
        width: 36px;
        padding: 0;
    }

    .administration-topbar-label,
    .administration-topbar-chevron {
        display: none;
    }
}

@media (max-width: 576px) {
    .settings-dropdown {
        width: 300px;
    }
    
    .settings-item {
        padding: 10px 14px;
        gap: 10px;
    }
    
    .settings-icon {
        width: 32px;
        height: 32px;
    }
    
    .settings-icon i {
        font-size: 16px;
    }

    .administration-dropdown {
        width: min(340px, calc(100vw - 16px));
    }

    .administration-menu-header {
        padding: 14px 15px;
    }

    .administration-menu-body {
        padding: 7px 8px 10px;
    }

    .administration-menu-grid {
        grid-template-columns: 1fr;
    }

    .administration-menu-item {
        min-height: 56px;
        padding: 7px 8px;
    }
}

/* ============================================
   DROPDOWN TEXT VISIBILITY FIXES
   Force proper text colors on dropdowns
   ============================================ */

/* Notification Dropdown Text */
.notification-dropdown,
.notification-dropdown .dropdown-header,
.notification-dropdown .notification-list,
.notification-dropdown .dropdown-footer {
    background-color: #ffffff !important;
}

.notification-dropdown .dropdown-header-title {
    color: #111827 !important;
    font-weight: 600 !important;
}

.notification-dropdown .dropdown-header-action {
    color: #6366f1 !important;
}

.notification-dropdown .notification-item .notification-text {
    color: #111827 !important;
    font-weight: 400 !important;
}

.notification-dropdown .notification-item .notification-time {
    color: #6b7280 !important;
}

.notification-dropdown .dropdown-footer a {
    color: #6366f1 !important;
}

/* User Profile Dropdown Text */
.user-menu,
.user-menu .user-menu-header {
    background-color: #ffffff !important;
}

.user-menu .user-menu-header {
    background-color: #f9fafb !important;
}

.user-menu .user-menu-name {
    color: #111827 !important;
    font-weight: 600 !important;
}

.user-menu .user-menu-email {
    color: #6b7280 !important;
}

.user-menu .user-menu-item {
    color: #374151 !important;
    background-color: #ffffff !important;
}

.user-menu .user-menu-item span {
    color: #374151 !important;
}

.user-menu .user-menu-item i {
    color: #6b7280 !important;
}

.user-menu .user-menu-item:hover {
    background-color: #f3f4f6 !important;
}

.user-menu .user-menu-item:hover span,
.user-menu .user-menu-item:hover i {
    color: #111827 !important;
}

.user-menu .user-menu-item.logout,
.user-menu .user-menu-item.logout span,
.user-menu .user-menu-item.logout i {
    color: #ef4444 !important;
}

.user-menu .user-menu-item.logout:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Settings Dropdown Text */
.settings-dropdown,
.settings-dropdown .dropdown-header,
.settings-dropdown .settings-list {
    background-color: #ffffff !important;
}

.settings-dropdown .dropdown-header-title {
    color: #111827 !important;
    font-weight: 600 !important;
}

.settings-dropdown .settings-item .settings-title {
    color: #111827 !important;
}

.settings-dropdown .settings-item .settings-desc {
    color: #6b7280 !important;
}

.settings-dropdown .settings-arrow {
    color: #9ca3af !important;
}

.settings-dropdown .settings-item:hover .settings-title {
    color: #111827 !important;
}

/* Ensure Bootstrap dropdown-menu has white background */
.dropdown-menu.notification-dropdown,
.dropdown-menu.user-menu,
.dropdown-menu.settings-dropdown {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}
