/* ========================================
   LECA Financial Design System - Modern Finance UI
   ======================================== */

:root {
    /* === Primary Brand Colors (Professional Blue - Trust & Stability) === */
    --brand-50: #E6F2F8;
    --brand-100: #CCE5F1;
    --brand-200: #99CBE3;
    --brand-300: #66B1D5;
    --brand-400: #3397C7;
    --brand-500: #005b9f;
    --brand-600: #004980;
    --brand-700: #003760;
    --brand-800: #002540;
    --brand-900: #001220;

    /* === Secondary Colors (Emerald Green - Success & Growth) === */
    --success-50: #ECFDF5;
    --success-100: #D1FAE5;
    --success-200: #A7F3D0;
    --success-300: #6EE7B7;
    --success-400: #34D399;
    --success-500: #10B981;
    --success-600: #059669;
    --success-700: #047857;
    --success-800: #065F46;
    --success-900: #064E3B;

    /* === Accent Colors (Soft Gold - Premium & Key Metrics) === */
    --accent-50: #FFFBEB;
    --accent-100: #FEF3C7;
    --accent-200: #FDE68A;
    --accent-300: #FCD34D;
    --accent-400: #FBBF24;
    --accent-500: #F59E0B;
    --accent-600: #D97706;
    --accent-700: #B45309;
    --accent-800: #92400E;
    --accent-900: #78350F;

    /* === Alert State Colors === */
    --warning-50: #FFF7ED;
    --warning-100: #FFEDDE;
    --warning-200: #FED7AA;
    --warning-300: #FDBA74;
    --warning-500: #F59E0B;
    --warning-600: #D97706;
    --warning-700: #C2410C;
    --warning-800: #AB3413;
    --warning-900: #9C2718;

    --error-50: #FEF2F2;
    --error-100: #FEE2E2;
    --error-200: #FBC2C4;
    --error-300: #F59E9E;
    --error-400: #F87171;
    --error-500: #EF4444;
    --error-600: #DC2626;
    --error-700: #B91C1C;
    --error-800: #991B1B;
    --error-900: #881A1A;
    
    --info-50: #EBF8FF;
    --info-100: #BEE3F8;
    --info-200: #90CDF4;
    --info-300: #63B3ED;
    --info-500: #4299E1;
    --info-600: #3182CE;
    --info-700: #2B6CB0;
    --info-800: #2C5282;
    --info-900: #2A4365;
    
    /* === Neutral Colors (Professional Grays) === */
    --neutral-50: #F8FAFC;
    --neutral-100: #F1F5F9;
    --neutral-200: #E2E8F0;
    --neutral-300: #CBD5E1;
    --neutral-400: #94A3B8;
    --neutral-500: #64748B;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1E293B;
    --neutral-900: #0F172A;

    /* === Text Colors === */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-disabled: #94A3B8;
    --text-inverse: #FFFFFF;
    --text-brand: var(--brand-700);
    --text-success: var(--success-700);
    --text-warning: var(--warning-700);
    --text-error: var(--error-700);

    /* === Background Colors (Gradient System) === */
    --bg-base: linear-gradient(135deg, #F0F2F5 0%, #FFFFFF 100%);
    --bg-base-solid: #F0F2F5;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #FFFFFF;
    --bg-hover: #F1F5F9;
    --bg-active: var(--brand-50);
    --bg-subtle: var(--brand-50);
    --bg-subtle-hover: var(--brand-100);
    --bg-subtle-active: var(--brand-200);
    --bg-highlight: var(--brand-100);
    --bg-highlight-hover: var(--brand-200);
    --bg-highlight-active: var(--brand-300);
    --bg-danger: var(--error-50);
    --bg-danger-hover: var(--error-100);
    --bg-danger-active: var(--error-200);
    --bg-success: var(--success-50);
    --bg-success-hover: var(--success-100);
    --bg-success-active: var(--success-200);
    --bg-warning: var(--warning-50);
    --bg-warning-hover: var(--warning-100);
    --bg-warning-active: var(--warning-200);
    --bg-info: var(--info-50);
    --bg-info-hover: var(--info-100);
    --bg-info-active: var(--info-200);
    
    --bg-secondary: #F1F5F9;
    --bg-secondary-hover: #E1E9F0;
    --bg-secondary-active: #D1DAE1;

    /* === Sidebar Colors (Dark Navy Professional) === */
    --sidebar-bg: #1B2A4A;
    --sidebar-bg-solid: #1B2A4A;
    --sidebar-header-bg: rgba(0, 0, 0, 0.15);
    --sidebar-border: rgba(255, 255, 255, 0.1);
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-active: #10B981;
    --sidebar-text: #E2E8F0;
    --sidebar-text-muted: #94A3B8;
    --sidebar-label: #94A3B8;

    /* === Border Colors === */
    --border-base: #e5e7eb;
    --border-default: #e5e7eb;
    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;
    --border-dark: #9CA3AF;

    /* Back-compat custom properties used in some components */
    --border-color: #e5e7eb;
    --border-hover: #9CA3AF;
    --border-active: #64748B;
    --warning-400: var(--warning-300);

    /* === Shadows (Financial Card Depth) === */
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.14), 0 4px 6px -2px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.16), 0 10px 10px -5px rgba(15, 23, 42, 0.08);
    --shadow-card-hover: 0 12px 24px -4px rgba(30, 94, 191, 0.15), 0 6px 12px -2px rgba(30, 94, 191, 0.08);

    /* === Spacing === */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* === Border Radius === */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 9999px;

    /* === Layout Dimensions === */
    --topbar-height: 64px;
    --sidebar-width-expanded: 260px;
    --sidebar-width-collapsed: 72px;

    /* === Transitions === */
    --transition-fast: 160ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 220ms ease;

    /* === Typography === */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-size-xs: 0.75rem;
    /* 12px */
    --font-size-sm: 0.875rem;
    /* 14px */
    --font-size-base: 1rem;
    /* 16px */
    --font-size-lg: 1.125rem;
    /* 18px */
    --font-size-xl: 1.25rem;
    /* 20px */
    --font-size-2xl: 1.5rem;
    /* 24px */

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* === Focus Ring === */
    --focus-ring: 0 0 0 3px var(--brand-200);
}

/* ========================================
   Base Styles
   ======================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
}

h1 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
}

h2 {
    font-size: var(--font-size-xl);
}

h3 {
    font-size: var(--font-size-lg);
}

p {
    margin: 0;
}

a {
    color: var(--brand-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--brand-700);
}

button {
    font-family: inherit;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--brand-600);
    outline-offset: 2px;
}

/* ========================================
   Layout Structure
   ======================================== */

.app-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-base);
}

.main-content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    transition: margin-left var(--transition-base);
}

.main-content-wrapper.sidebar-expanded {
    margin-left: var(--sidebar-width-expanded);
}

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

/* ========================================
   Topbar Styles
   ======================================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-height);
    padding: 0 var(--space-lg);
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

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

.topbar-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.topbar-brand-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    line-height: 1;
}

.topbar-brand-subtitle {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    line-height: 1;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

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

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

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

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

.topbar-icon-btn:active {
    transform: scale(0.95);
}

.topbar-icon-btn .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #EF4444;
    border: 2px solid var(--bg-surface);
}

.topbar-icon-btn .notification-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    color: white;
    background-color: #EF4444;
    border-radius: 10px;
    border: 2px solid var(--bg-surface);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-icon-btn .realtime-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--bg-surface);
    transition: background-color 0.3s ease;
}

.topbar-icon-btn .realtime-indicator.connected {
    background-color: #10B981;
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.5);
}

.topbar-icon-btn .realtime-indicator.disconnected {
    background-color: #9CA3AF;
}

/* Search Button with Shortcut Badge */
.topbar-icon-btn.search-btn {
    position: relative;
    overflow: visible;
}

kbd.search-shortcut-badge {
    position: absolute;
    bottom: 0;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 9px;
    font-weight: 600;
    font-family: var(--font-family);
    color: #64748b;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    box-shadow: 0 1px 0 #e2e8f0, inset 0 -1px 0 #e2e8f0;
    pointer-events: none;
    line-height: 1;
    z-index: 1;
}

.topbar-icon-btn.search-btn:hover kbd.search-shortcut-badge {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    color: #475569;
    border-color: #94a3b8;
}

@media (max-width: 768px) {
    kbd.search-shortcut-badge {
        display: none;
    }
}

.topbar-bank-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--brand-700);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.06) 0%, rgba(15, 23, 42, 0.03) 100%);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
}

.topbar-bank-badge .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--brand-600);
}

.topbar-session-time {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    background-color: var(--neutral-100);
    border-radius: var(--radius-md);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.topbar-user:hover {
    background-color: var(--bg-hover);
}

.topbar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}

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

.topbar-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topbar-user-name {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    line-height: 1.2;
}

.topbar-user-role {
    font-size: 11px;
    font-weight: var(--font-weight-normal);
    color: var(--text-muted);
    line-height: 1.2;
}

/* Bootstrap dropdown wrapper */
.topbar-right .dropdown {
    position: relative;
}

/* User button (Bootstrap dropdown toggle) */
.topbar-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    background: transparent;
    border: none;
    color: inherit;
}

.topbar-user:hover {
    background-color: var(--bg-hover);
}

/* Chevron animation when dropdown is shown */
.topbar-user[aria-expanded="true"] .topbar-user-chevron {
    transform: rotate(180deg);
}

.topbar-user-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
    margin-left: 4px;
}

/* Bootstrap dropdown menu override */
.topbar-user-dropdown.dropdown-menu {
    min-width: 220px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0;
    margin-top: 8px;
}

/* Remove Bootstrap's default arrow */
.topbar-user-dropdown.dropdown-menu::before,
.topbar-user-dropdown.dropdown-menu::after {
    display: none;
}

.topbar-user-dropdown-item.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: background-color var(--transition-fast);
    cursor: pointer;
    border: none;
    background: transparent;
}

.topbar-user-dropdown-item.dropdown-item:hover,
.topbar-user-dropdown-item.dropdown-item:focus {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.topbar-user-dropdown-item.logout.dropdown-item {
    color: var(--error-600);
}

.topbar-user-dropdown-item.logout.dropdown-item:hover,
.topbar-user-dropdown-item.logout.dropdown-item:focus {
    background-color: var(--error-50);
    color: var(--error-600);
}

.topbar-user-dropdown-item .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.topbar-user-dropdown-divider.dropdown-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: var(--space-xs) 0;
    opacity: 1;
}

.topbar-cta-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-pill);
    background-color: #10B981;
    color: var(--text-inverse);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.topbar-cta-btn:hover {
    background-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.topbar-cta-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   Sidebar Styles (Financial Professional)
   ======================================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width-expanded);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-base);
    z-index: 200;
    overflow: hidden;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

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

.sidebar-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    height: var(--topbar-height);
    padding: 0 var(--space-lg);
    border-bottom: 1px solid var(--sidebar-border);
    background-color: var(--sidebar-header-bg);
    position: relative;
    overflow: visible;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-header {
    padding: 0 var(--space-md);
    justify-content: center;
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #10B981, #059669);
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

/* Show logo only when sidebar is collapsed */
.sidebar.collapsed .sidebar-logo {
    display: flex;
}

.sidebar-logo-text {
    color: white;
    font-size: 13px;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.5px;
}

.sidebar-brand-text {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: #FFFFFF;
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--transition-fast);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-brand-text {
    opacity: 0;
    width: 0;
}

/* Brand group for text + subtitle */
.sidebar-brand-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.sidebar.collapsed .sidebar-brand-group {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-brand-subtitle {
    font-size: var(--font-size-xs);
    color: var(--sidebar-text-muted);
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--transition-fast);
    line-height: 1.2;
}

.sidebar.collapsed .sidebar-brand-subtitle {
    opacity: 0;
    width: 0;
    overflow: hidden;
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-lg) var(--space-md);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

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

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

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

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Allow flyout menus to be visible when sidebar is collapsed */
.sidebar.collapsed .sidebar-nav {
    overflow: visible;
}

.sidebar-section {
    margin-bottom: var(--space-lg);
}

.sidebar-section-label {
    padding: 0 var(--space-md);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--sidebar-label);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--transition-fast);
}

.sidebar.collapsed .sidebar-section-label {
    opacity: 0;
    height: 0;
    margin: 0;
}

.sidebar-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.sidebar-nav-item {
    display: block;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar.collapsed .sidebar-nav-link {
    justify-content: center;
    padding: var(--space-sm);
    gap: 0;
}

.sidebar-nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #FFFFFF;
}

.sidebar-nav-link.active {
    background-color: var(--sidebar-active);
    color: var(--text-inverse);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.sidebar-nav-link.active .sidebar-nav-icon {
    color: var(--text-inverse);
}

.sidebar-nav-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    overflow: visible;
}

.sidebar-nav-icon i {
    font-size: 20px;
    line-height: 1;
}

.sidebar-nav-text {
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--transition-fast);
}

.sidebar.collapsed .sidebar-nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    display: none;
}

.sidebar-footer {
    margin-top: auto;
    padding: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.sidebar-footer-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-fast);
}

.sidebar-footer-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.sidebar-footer-link i {
    font-size: 18px;
    width: 28px;
    text-align: center;
}

.sidebar-footer-copyright {
    font-size: var(--font-size-xs);
    color: var(--sidebar-text-muted);
    padding: var(--space-xs) var(--space-sm);
    opacity: 0.7;
}

/* Collapsed sidebar footer */
.sidebar.collapsed .sidebar-footer-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    display: none;
}

.sidebar.collapsed .sidebar-footer-copyright {
    opacity: 0;
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.sidebar.collapsed .sidebar-footer-link {
    justify-content: center;
    padding: var(--space-sm);
}

.sidebar-toggle-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-xs) var(--space-sm);
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--sidebar-text);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-toggle-btn {
    justify-content: center;
    padding: var(--space-sm);
}

.sidebar-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.sidebar-toggle-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: transform var(--transition-base);
    flex-shrink: 0;
    margin-left: 5px;
}

.sidebar.collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}

/* ========================================
   Sidebar Collapsible Submenu
   ======================================== */

.sidebar-submenu {
    display: block;
    margin-bottom: var(--space-xs);
}

.sidebar-submenu-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--sidebar-text);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.sidebar-submenu-toggle:hover {
    background-color: var(--sidebar-hover);
    color: #FFFFFF;
}

.sidebar-submenu.expanded > .sidebar-submenu-toggle {
    background-color: var(--sidebar-hover);
    color: #FFFFFF;
}

.sidebar-submenu-chevron {
    margin-left: auto;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sidebar-text-muted);
    transition: transform var(--transition-fast), color var(--transition-fast);
    flex-shrink: 0;
}

.sidebar-submenu-chevron i {
    font-size: 14px;
}

.sidebar-submenu-toggle:hover .sidebar-submenu-chevron {
    color: #FFFFFF;
}

.sidebar-submenu.expanded .sidebar-submenu-chevron {
    transform: rotate(180deg);
    color: #FFFFFF;
}

.sidebar-submenu-items {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base) ease-out;
}

.sidebar-submenu.expanded .sidebar-submenu-items {
    max-height: 600px;
    padding: var(--space-sm) 0;
    margin-left: var(--space-md);
    border-left: 2px solid rgba(255, 255, 255, 0.15);
    transition: max-height var(--transition-slow) ease-in;
}

.sidebar-submenu-items .sidebar-nav-item {
    margin-left: var(--space-sm);
    margin-bottom: 2px;
}

.sidebar-submenu-items .sidebar-nav-link {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-md);
}

.sidebar-submenu-items .sidebar-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-submenu-items .sidebar-nav-link.active {
    background-color: var(--sidebar-active);
    color: var(--text-inverse);
}

.sidebar-submenu-items .sidebar-nav-icon {
    width: 22px;
    height: 22px;
}

.sidebar-submenu-items .sidebar-nav-icon i {
    font-size: 16px;
}

/* Collapsed sidebar submenu styles - Flyout on hover */
.sidebar.collapsed .sidebar-submenu {
    position: relative;
}

.sidebar.collapsed .sidebar-submenu-toggle {
    justify-content: center;
    padding: var(--space-sm);
    gap: 0;
}

.sidebar.collapsed .sidebar-submenu-toggle .sidebar-nav-text,
.sidebar.collapsed .sidebar-submenu-toggle .sidebar-submenu-chevron {
    opacity: 0;
    width: 0;
    overflow: hidden;
    display: none;
}

/* Flyout menu for collapsed sidebar */
.sidebar.collapsed .sidebar-submenu-items {
    display: block;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    max-height: none;
    padding: var(--space-sm);
    margin: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all var(--transition-fast);
    z-index: 1000;
    border-left: none;
    margin-left: var(--space-sm);
}

.sidebar.collapsed .sidebar-submenu:hover .sidebar-submenu-items {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.sidebar.collapsed .sidebar-submenu-items .sidebar-nav-item {
    margin-left: 0;
    margin-bottom: 2px;
}

.sidebar.collapsed .sidebar-submenu-items .sidebar-nav-link {
    padding: var(--space-sm) var(--space-md);
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-md);
}

/* Show text inside flyout submenu items when collapsed */
.sidebar.collapsed .sidebar-submenu-items .sidebar-nav-text {
    opacity: 1;
    width: auto;
    overflow: visible;
    display: inline;
}

/* Flyout header label */
.sidebar.collapsed .sidebar-submenu-items::before {
    content: attr(data-label);
    display: block;
    padding: var(--space-xs) var(--space-md) var(--space-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: var(--space-sm);
}

/* ========================================
   Sidebar Overlay (Mobile)
   ======================================== */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    pointer-events: none;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ========================================
   Mobile Menu Button
   ======================================== */

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.mobile-menu-btn:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-hover);
}

.mobile-menu-btn i {
    font-size: 1.25rem;
}

/* ========================================
   Main Content Area
   ======================================== */

.main-content {
    flex: 1;
    padding: var(--space-xl);
}

.content-header {
    margin-bottom: var(--space-xl);
}

.content-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.content-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* ========================================
   Card Components (Financial Grade)
   ======================================== */

.card {
    /* Clean surface background */
    background: linear-gradient(135deg,
            rgba(240, 242, 245, 0.85) 0%,
            rgba(245, 247, 250, 0.9) 50%,
            rgba(255, 255, 255, 0.95) 100%);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.06),
        0 1px 3px rgba(15, 23, 42, 0.04);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Subtle shimmer effect overlay */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    /*   background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );*/
    transition: left 0.5s ease;
    pointer-events: none;
}

.card:hover::after {
    left: 100%;
}

/* Premium top accent bar */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    /* background: linear-gradient(
        90deg, 
        var(--brand-500) 0%,
        var(--brand-600) 50%,
        var(--accent-500) 100%
    );*/
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.card:hover {
    /*  background: linear-gradient(135deg, 
        rgba(227, 241, 251, 1) 0%,
        rgba(240, 247, 252, 1) 50%,
        rgba(255, 255, 255, 1) 100%);*/
    /* box-shadow: 
        0 12px 24px rgba(15, 23, 42, 0.12),
        0 6px 12px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);*/
    /*transform: translateY(-3px);*/
    border-color: rgba(15, 23, 42, 0.18);
}

.card:hover::before {
    opacity: 1;
}

.card-with-tabs {
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-lg);
    padding: 0;
    margin-top: 0;
    background: var(--bg-surface);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

/* Card Metric Display */
.card-metric {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.card-metric-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.card-metric-value {
    font-size: 2.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    line-height: 1;
    text-shadow:
        0 2px 4px rgba(15, 23, 42, 0.06),
        0 1px 2px rgba(255, 255, 255, 0.9);
    transition: all var(--transition-fast);
}

.card:hover .card-metric-value {
    color: var(--brand-800);
    text-shadow:
        0 3px 6px rgba(15, 23, 42, 0.1),
        0 1px 2px rgba(255, 255, 255, 1);
}

.card-metric-subtitle {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(245, 247, 250, 0.8) 100%);
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all var(--transition-base);
    position: relative;
    backdrop-filter: blur(5px);
}

/* Subtle glow effect */
.card-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-lg);
    /*background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.15),
        rgba(245, 158, 11, 0.15));*/
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: -1;
    filter: blur(8px);
}

.card:hover .card-icon {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(240, 242, 245, 0.9) 100%);
    border-color: rgba(15, 23, 42, 0.18);
    box-shadow:
        0 6px 16px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: scale(1.08) rotate(3deg);
}

.card:hover .card-icon::before {
    opacity: 1;
}

/* ========================================
   Status Badge
   ======================================== */

.badge {
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.05em;
    line-height: 1;
}

.badge-active {
    background-color: var(--brand-600);
    color: var(--text-inverse);
}

.badge-pending {
    background-color: #F59E0B;
    color: var(--text-inverse);
}

.badge-inactive {
    background-color: var(--neutral-400);
    color: var(--text-inverse);
}

/* ========================================
   Tooltip
   ======================================== */

.tooltip {
    position: absolute;
    z-index: 1000;
    padding: var(--space-xs) var(--space-sm);
    background-color: var(--neutral-900);
    color: var(--text-inverse);
    font-size: var(--font-size-xs);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.tooltip.visible {
    opacity: 1;
}

/* ========================================
   Tabs Navigation (Direct styles for TabMenu component)
   ======================================== */
.tabs-container {
    display: flex;
    gap: 6px;
    padding: 6px;
    background-color: #F9FAFB;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #E5E7EB;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tab-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #6B7280;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.tab-button:hover {
    background-color: rgba(15, 23, 42, 0.06);
    color: var(--brand-500);
}

.tab-button.active {
    background-color: white;
    color: var(--brand-500);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.tab-button i {
    font-size: 1rem;
}

/* Tab Badges */
.tab-badge {
    background-color: #6B7280;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    width: 20px;
    height: 20px;
    padding: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    text-align: center;
    line-height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* For larger numbers, make it pill-shaped */
.tab-badge.tab-badge-large,
.tab-badge[data-count-large="true"] {
    border-radius: 10px;
    width: auto;
    min-width: 20px;
    padding: 0 6px;
}

.tab-badge-accent {
    background-color: #0369A1;
}

.tab-badge-warning {
    background-color: #D97706;
}

.tab-badge-danger {
    background-color: #DC2626;
}

.tab-badge-success {
    background-color: #059669;
}

.tab-badge-purple {
    background-color: #7C3AED;
}


/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .tabs-container {
        gap: 4px;
        padding: 4px;
    }

    .tab-button {
        padding: 8px 12px;
        font-size: 0.8125rem;
        gap: 6px;
    }

    .tab-button i {
        font-size: 0.9375rem;
    }

    .tab-badge {
        min-width: 18px;
        height: 18px;
        font-size: 0.625rem;
        line-height: 18px;
    }
}

@media (max-width: 480px) {
    .tab-button span:not(.tab-badge) {
        display: none;
    }

    .tab-button {
        padding: 10px 12px;
    }
}


.tab-content {
    padding: 16px 20px;
}

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

.tab-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.tab-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0;
}

.export-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.export-button:hover {
    color: var(--text-primary);
}

/* ========================================
   Applications Table (Financial Data Grid)
   ======================================== */

.applications-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
}

.applications-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-surface);
}

.applications-table thead tr {
    background: linear-gradient(180deg, var(--neutral-50), var(--neutral-100));
    border-bottom: 2px solid var(--neutral-200);
}

.applications-table th {
    text-align: left;
    padding: 8px 16px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.applications-table td {
    padding: 8px 16px;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    border-bottom: 1px solid var(--neutral-100);
    vertical-align: middle;
}

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

.applications-table tbody tr {
    transition: all var(--transition-fast);
}

.applications-table tbody tr:hover {
    background-color: var(--brand-50);
    box-shadow: inset 3px 0 0 var(--brand-500);
}

.loan-number {
    color: var(--brand-600);
    font-weight: var(--font-weight-semibold);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* ========================================
   Button System (Enhanced Transitions)
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    font-family: var(--font-family);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

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

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-sm {
    padding: 4px 10px;
    font-size: var(--font-size-xs);
}

/* Primary Success Button (Continue/View actions) */
.btn-outline-success {
    background: white;
    border-color: var(--success-200);
    color: var(--success-700);
}

.btn-outline-success:hover {
    background: var(--success-50);
    border-color: var(--success-400);
    color: var(--success-800);
}

.border-success-subtle {
    border-color: var(--success-200) !important;
}

/* Danger Button (Action required items) */
.btn-danger {
    background: var(--error-600);
    border-color: var(--error-600);
    color: white;
}

.btn-danger:hover {
    background: var(--error-700);
    border-color: var(--error-700);
}

.btn-outline-danger {
    background: white;
    border-color: var(--error-500);
    color: var(--error-700);
}

.btn-outline-danger:hover {
    background: var(--error-50);
    border-color: var(--error-600);
    color: var(--error-700);
}

/* Warning Button (Medium priority items) */
.btn-warning {
    background: var(--warning-500);
    border-color: var(--warning-500);
    color: white;
}

.btn-warning:hover {
    background: var(--warning-700);
    border-color: var(--warning-700);
}

.btn-outline-warning {
    background: white;
    border-color: #FCD34D;
    color: var(--warning-700);
}

.btn-outline-warning:hover {
    background: var(--warning-50);
    border-color: var(--warning-400, var(--warning-300));
    color: var(--warning-700);
}

.border-warning-subtle {
    border-color: #FCD34D !important;
}

/* Secondary Button (Download/Export actions) */
.btn-outline-secondary {
    background: white;
    border-color: var(--neutral-300);
    color: var(--text-secondary);
}

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

.border-secondary-subtle {
    border-color: var(--neutral-300) !important;
}

/* Shadow utilities for buttons */
.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--brand-200);
    background: var(--bg-surface);
    color: var(--brand-600);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.action-link:hover {
    background: var(--brand-50);
    border-color: var(--brand-400);
    color: var(--brand-700);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.action-count {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--error-500), var(--error-600));
    color: white;
    font-size: 11px;
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-xs);
}

/* ========================================
   Action Items List (Priority Notifications)
   ======================================== */

.action-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.action-item {
    padding: 24px;
    border-radius: var(--radius-lg);
    background-color: var(--bg-surface);
    border: 1px solid var(--neutral-200);
    border-left: 4px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.action-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.action-item.high-priority {
    border-left-color: var(--error-500);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.03) 0%, var(--bg-surface) 100%);
}

.action-item.medium-priority {
    border-left-color: var(--warning-500);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.03) 0%, var(--bg-surface) 100%);
}

.action-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 16px;
}

.action-item-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}


.action-item-description {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    line-height: var(--line-height-normal);
}

.action-item-date {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin: 0;
}

/* Bootstrap Icon Spacing Utilities */
.me-1 {
    margin-right: 0.25rem !important;
}

.ms-1 {
    margin-left: 0.25rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.ms-2 {
    margin-left: 0.5rem !important;
}

/* ========================================
   Policies Table (Financial Data Grid)
   ======================================== */

.policies-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
}

.policies-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-surface);
}

.policies-table thead tr {
    background: linear-gradient(180deg, var(--neutral-50), var(--neutral-100));
    border-bottom: 2px solid var(--neutral-200);
}

.policies-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.policies-table td {
    padding: 8px 12px;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    border-bottom: 1px solid var(--neutral-100);
    vertical-align: middle;
}

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

.policies-table tbody tr {
    transition: all var(--transition-fast);
}

.policies-table tbody tr:hover {
    background-color: var(--brand-50);
    box-shadow: inset 3px 0 0 var(--brand-500);
}

.policy-number {
    color: var(--brand-600);
    font-weight: var(--font-weight-semibold);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
}

/* ========================================
   Icons (SVG placeholders)
   ======================================== */

.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
}

.icon-sm {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}

.icon-md {
    width: 24px;
    height: 24px;
}

/* ========================================
   Responsive
   ======================================== */

/* Medium screens - auto-collapse sidebar */
@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .sidebar {
        width: var(--sidebar-width-collapsed);
    }
    
    .sidebar .sidebar-brand-text,
    .sidebar .sidebar-section-label,
    .sidebar .sidebar-nav-text {
        opacity: 0;
        width: 0;
        overflow: hidden;
    }
    
    .sidebar .sidebar-toggle-btn {
        justify-content: center;
    }
    
    .sidebar .sidebar-nav-link {
        justify-content: center;
        padding: var(--space-sm);
    }
    
    .sidebar .sidebar-header {
        padding: 0 var(--space-md);
        justify-content: center;
    }
    
    .main-content-wrapper.sidebar-expanded,
    .main-content-wrapper.sidebar-collapsed {
        margin-left: var(--sidebar-width-collapsed);
    }
}

/* Small screens - off-canvas sidebar */
@media (max-width: 768px) {
    .topbar {
        padding: 0 var(--space-md);
    }

    .topbar-breadcrumb {
        display: none;
    }

    .topbar-session-time {
        display: none;
    }
    
    .topbar-bank-badge {
        display: none;
    }
    
    .topbar-user-info {
        display: none;
    }

    .main-content {
        padding: var(--space-lg);
    }

    /* Off-canvas sidebar */
    .sidebar {
        width: var(--sidebar-width-expanded);
        transform: translateX(-100%);
        z-index: 201;
    }
    
    /* Restore expanded styles when sidebar is visible on mobile */
    .sidebar .sidebar-brand-text,
    .sidebar .sidebar-section-label,
    .sidebar .sidebar-nav-text {
        opacity: 1;
        width: auto;
        overflow: visible;
    }
    
    .sidebar .sidebar-nav-link {
        justify-content: flex-start;
        padding: var(--space-sm) var(--space-md);
    }
    
    .sidebar .sidebar-header {
        padding: 0 var(--space-lg);
        justify-content: flex-start;
    }
    
    /* Show sidebar when mobile menu is open */
    .sidebar.mobile-open {
        transform: translateX(0);
    }

    /* Full width content on mobile */
    .main-content-wrapper.sidebar-expanded,
    .main-content-wrapper.sidebar-collapsed {
        margin-left: 0;
    }
    
    /* Hide desktop toggle, mobile uses hamburger */
    .sidebar-toggle-btn {
        display: none;
    }
}

/* ========================================
   Utility Classes
   ======================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-primary {
    color: var(--text-primary);
}

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

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

.fw-medium {
    font-weight: var(--font-weight-medium);
}

.fw-semibold {
    font-weight: var(--font-weight-semibold);
}

.fw-bold {
    font-weight: var(--font-weight-bold);
}

.fs-xs {
    font-size: var(--font-size-xs);
}

.fs-sm{
    font-size: var(--font-size-sm);
}

.fs-base{
    font-size: var(--font-size-base);
}

.fs-lg{
    font-size: var(--font-size-lg);
}

.fs-xl{
    font-size: var(--font-size-xl);
}

.fs-2xl{
    font-size: var(--font-size-2xl);
}

/* ========================================
   Enhanced Button Transitions
   ======================================== */
.btn {
    transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-family);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    transition-duration: 100ms;
}

.btn:focus-visible {
    outline: 2px solid var(--brand-600);
    outline-offset: 2px;
}

/* Enhanced transitions for outline buttons */
.btn-outline-success:hover {
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.2);
}

.btn-outline-danger:hover {
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.btn-outline-warning:hover {
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.btn-outline-secondary:hover {
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.15);
}

/* Enhanced transitions for solid buttons */
.btn-danger:hover,
.btn-warning:hover,
.btn-success:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Small button adjustments */
.btn-sm {
    font-size: var(--font-size-sm);
}

/* ========================================
   Underwriter Workbench Stat Cards
   ======================================== */

.workbench-stat-card {
    /* Clean surface background */
    background: linear-gradient(135deg,
            rgba(240, 242, 245, 0.85) 0%,
            rgba(245, 247, 250, 0.9) 50%,
            rgba(255, 255, 255, 0.95) 100%);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(15, 23, 42, 0.06),
        0 1px 3px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(10px);
}

.workbench-stat-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 24px rgba(15, 23, 42, 0.12),
        0 6px 12px rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.18);
}

.workbench-stat-card .stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.workbench-stat-card .stat-card-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    margin: 0;
}

.workbench-stat-card .stat-card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(240, 242, 245, 0.8) 0%, rgba(245, 247, 250, 0.9) 100%);
    color: var(--brand-500);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.workbench-stat-card .stat-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.workbench-stat-card .stat-card-count {
    font-size: 36px;
    font-weight: 700;
    color: #1F2937;
    line-height: 1;
}

.workbench-stat-card .stat-card-description {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
}

/* ========================================
   Blazor EditForm Validation Styles
   ======================================== */

/* Validation Summary (Error list at top of form) */
.validation-summary {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.validation-summary ul {
    color: #DC2626;
    font-size: 13px;
    font-weight: 400;
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.validation-summary ul li {
    margin-bottom: 4px;
}

.validation-summary ul li::marker {
    color: #DC2626;
}

/* Field-level Validation Messages */
.validation-message {
    color: #d03737;
    font-size: 12px;
    font-weight: 400;
    margin-top: 4px;
    display: block;
    line-height: 1.4;
}


/* Blazor Input Components Base Styles */
.form-control {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: white;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 14px;
    color: #1F2937;
    transition: all 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

/* Validation States for Inputs */
/*.form-control.invalid,
.invalid .form-control,
input.invalid,
textarea.invalid,
select.invalid {
    border-color: #F87171 !important;
}*/

.form-control.invalid:focus,
.invalid .form-control:focus,
input.invalid:focus,
textarea.invalid:focus,
select.invalid:focus {
    border-color: #F87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1) !important;
}

/*
.form-control.valid,
.valid .form-control,
input.valid,
textarea.valid,
select.valid {
    border-color: #6EE7B7 !important;
}
*/

.form-control.valid:focus,
.valid .form-control:focus,
input.valid:focus,
textarea.valid:focus,
select.valid:focus {
    border-color: var(--brand-400) !important;
    box-shadow: 0 0 0 3px rgba(var(--brand-400), 0.1) !important;
}

/* Ensure metadata form inputs have proper width */
.metadata-form .form-control,
.metadata-form input,
.metadata-form textarea,
.metadata-form select {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Textarea specific */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}


/* ========================================
   Subtle Button Styles
   ======================================== */

.btn-subtle-teal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    background-color: #0d9488;
    color: white;
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-subtle-teal:hover {
    background-color: #0f766e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-subtle-gray {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md);
    background-color: white;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-subtle-gray:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

/* =====================================================
   Notification Center Styles
   ===================================================== */

.notification-center {
    position: relative;
    display: inline-flex;
}

/* Trigger Button - Subtle style matching other topbar icons */
.nc-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
    color: #64748b;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nc-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #334155 !important;
}

.nc-trigger:focus {
    outline: none !important;
    box-shadow: none !important;
}

.nc-trigger:active {
    transform: scale(0.95);
}

.nc-trigger svg {
    width: 20px;
    height: 20px;
}

.nc-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #EF4444;
    border: 2px solid white;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 520px;
    background: white;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10), 0 4px 10px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: notification-dropdown-enter 0.16s ease-out;
}

@keyframes notification-dropdown-enter {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    background: linear-gradient(135deg, #2d4a6f 0%, #3d5d82 100%);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-header-content h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: white;
}

.notification-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

.mark-all-read-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mark-all-read-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.mark-all-read-btn svg {
    width: 16px;
    height: 16px;
    color: white;
}

.notification-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.notification-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.notification-tab:hover {
    color: #2d4a6f;
    background: rgba(45, 74, 111, 0.05);
}

.notification-tab.active {
    color: #2d4a6f;
    background: white;
}

.notification-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2d4a6f;
}

.tab-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    background: #2d4a6f;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-tab.active .tab-badge {
    background: #ef4444;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.notification-item:hover {
    background-color: #f8fafc;
}

/* Unread notifications - prominent styling */
.notification-item.unread {
    background-color: #f0f7ff;
    position: relative;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #3b82f6;
}

.notification-item.unread::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
}

/* Read notifications - muted styling */
.notification-item:not(.unread) {
    opacity: 0.7;
}

.notification-item:not(.unread):hover {
    opacity: 1;
}

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

.notification-icon.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.notification-icon.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.notification-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.notification-icon.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

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

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.notification-message {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    flex-shrink: 0;
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.notification-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.notification-empty p {
    margin: 0;
    font-size: 14px;
}

/* Skeleton loading states */
.notification-item.skeleton {
    pointer-events: none;
}

.skeleton-badge,
.skeleton-content,
.skeleton-title,
.skeleton-message,
.skeleton-time {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.skeleton-content {
    flex: 1;
}

.skeleton-title {
    height: 14px;
    width: 70%;
    margin-bottom: 8px;
}

.skeleton-message {
    height: 12px;
    width: 90%;
}

.skeleton-time {
    width: 40px;
    height: 12px;
}

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

/* Mobile responsive */
@media (max-width: 480px) {
    .notification-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 20px 20px 0 0;
    }
}

/* Notification Overlay */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 999;
}

/* Notification Footer */
.notification-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
}

/* ========================================
   Global Search Modal Enhancements
   ======================================== */

/* Fix for kbd elements in Global Search - Override Bootstrap defaults */
.global-search-overlay kbd,
.global-search-content kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    font-family: var(--font-family);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: #475569 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px;
    box-shadow: 0 2px 0 #e2e8f0, inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    text-shadow: 0 1px 0 #fff;
}

/* Keyboard hints in footer */
.global-search-footer .keyboard-hints {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    font-size: 12px;
    color: #64748b;
}

.global-search-footer .keyboard-hints span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.global-search-footer .keyboard-hints kbd {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 10px;
}

/* Empty state shortcut hint */
.global-search-content .shortcut-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
    font-size: 13px;
    color: #64748b;
}

.global-search-content .shortcut-hint kbd {
    margin: 0 2px;
}

/* Search Preferences Panel Enhancement */
.global-search-content .preferences-panel {
    padding: 20px;
    background: #fafbfc;
    border-bottom: 1px solid #e5e7eb;
}

.global-search-content .preferences-header {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.global-search-content .preferences-header::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--brand-500, #3b82f6);
    border-radius: 2px;
}

.global-search-content .preferences-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
    border-radius: 10px;
    padding: 8px;
    border: 1px solid #e5e7eb;
}

.global-search-content .preference-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.global-search-content .preference-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.global-search-content .preference-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

.global-search-content .preference-label i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 8px;
    color: #64748b;
    font-size: 14px;
}

/* Enhanced Toggle Switch */
.global-search-content .preference-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    appearance: none;
    -webkit-appearance: none;
    background: #cbd5e1;
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.global-search-content .preference-toggle::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #ffffff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.global-search-content .preference-toggle:checked {
    background: var(--brand-500, #3b82f6);
}

.global-search-content .preference-toggle:checked::before {
    transform: translateX(22px);
}

.global-search-content .preference-toggle:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Preferences Actions */
.global-search-content .preferences-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.global-search-content .preferences-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
}

/* Empty State Enhancement */
.global-search-content .empty-state {
    padding: 60px 24px;
}

.global-search-content .empty-state i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.global-search-content .empty-state p {
    font-size: 14px;
    color: #64748b;
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.6;
}

/* No Results Enhancement */
.global-search-content .no-results {
    padding: 60px 24px;
}

.global-search-content .no-results i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.global-search-content .no-results p {
    font-size: 14px;
    color: #64748b;
}

.global-search-content .no-results .hint {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 8px;
}

/* Global Search Footer Enhancement */
.global-search-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
}
