@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --brand-navy-950: #050811;
    --brand-navy-900: #0a0f1d;
    --brand-navy-800: #111827;
    --brand-navy-700: #1e293b;
    --brand-primary: #4f46e5;
    --brand-primary-light: #6366f1;
    --brand-primary-dark: #3730a3;
    --brand-emerald: #10b981;
    --brand-amber: #f59e0b;
    --brand-rose: #f43f5e;
    --brand-sky: #0ea5e9;
    --brand-surface: #ffffff;
    --brand-surface-subtle: #f8fafc;
    --brand-border: #e2e8f0;
    --brand-text-main: #0f172a;
    --brand-text-muted: #64748b;
    --sidebar-width: 270px;
    --sidebar-collapsed-width: 80px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: var(--brand-text-main);
    background-color: #f8fafc;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

code, kbd, samp, pre {
    font-family: 'JetBrains Mono', monospace !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Glassmorphism Topbar */
.nbjms-topbar {
    height: 64px !important;
    min-height: 64px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
    color: var(--brand-text-main) !important;
    transition: all 0.2s ease-in-out;
    z-index: 1200 !important;
}

.mud-theme-dark .nbjms-topbar {
    background: rgba(15, 23, 42, 0.95) !important;
    border-bottom: 1px solid rgba(51, 65, 85, 0.9) !important;
    color: #f8fafc !important;
}

/* Ensure main content canvas has ample top padding so page headers, refresh buttons, etc. are never hidden */
.app-main-content,
.mud-main-content.app-main-content {
    padding-top: calc(var(--mud-appbar-height, 64px) + 24px) !important;
}

/* Ensure popover menus, dropdowns, and date pickers appear cleanly above all content with solid surface */
.mud-popover-provider {
    position: relative;
    z-index: 3000 !important;
}

.mud-popover.mud-popover-open {
    z-index: 3000 !important;
    background: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
}

.mud-theme-dark .mud-popover.mud-popover-open {
    background: #1e293b !important;
    border-color: #334155 !important;
}

.mud-picker-content {
    min-width: 310px !important;
}

/* Professional Collapsible Sidebar */
.pro-sidebar {
    background: linear-gradient(180deg, #0b0f19 0%, #080b13 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #94a3b8 !important;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-x: hidden !important;
    display: flex;
    flex-direction: column;
}

.pro-sidebar-brand {
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.brand-symbol {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
    flex-shrink: 0;
}

.brand-text-group {
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.brand-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.brand-sub {
    font-size: 0.68rem;
    font-weight: 600;
    color: #06b6d4;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Sidebar Nav Items */
.sidebar-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 16px 20px 6px 20px;
    white-space: nowrap;
}

.pro-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    margin: 3px 12px;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.pro-nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.pro-nav-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.2) 0%, rgba(79, 70, 229, 0.05) 100%);
    border: 1px solid rgba(79, 70, 229, 0.3);
    font-weight: 600;
}

.pro-nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 6px;
    bottom: 6px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: #6366f1;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
}

.pro-nav-icon {
    font-size: 1.25rem !important;
    flex-shrink: 0;
}

/* Sidebar Footer / Toggle */
.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

.collapse-trigger-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* Pulse animation for pending badges */
@keyframes pulse-ring {
    0% { transform: scale(0.9); opacity: 0.9; }
    50% { transform: scale(1.15); opacity: 0.4; }
    100% { transform: scale(0.9); opacity: 0.9; }
}

.pulse-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--brand-amber);
    box-shadow: 0 0 6px var(--brand-amber);
    animation: pulse-ring 2s infinite ease-in-out;
}

/* FinTech Metric Cards */
.fintech-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fintech-card:hover {
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* Stepper & Wizard styling */
.wizard-step-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

/* Custom File Upload Zone */
.upload-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 24px 16px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.2s ease;
    cursor: pointer;
}

.upload-dropzone:hover {
    border-color: #4f46e5;
    background: #f5f3ff;
}

.photo-preview-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.signature-preview-box {
    width: 100%;
    max-width: 240px;
    height: 80px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px;
}

/* SweetAlert2 Modal & Backdrop - Must sit on top of all MudBlazor overlays, popovers, and dialogs */
.swal2-container {
    z-index: 99999 !important;
}
