/**
 * ==============================================================================
 * TAILOTEK FINTECH DESIGN SYSTEM (v2.0)
 * Enterprise FinTech Design System & Component Library
 * Cohesive integration of:
 * 1. Premium FinTech UI & Typography (Inter + Tabular Numerals)
 * 2. 12-Token Tailored Palette
 * 3. Responsive Bento Grid Layout
 * 4. Selective Glassmorphism (Modals, Auth Cards, Floating Chips only)
 * 5. Accessible High-Contrast Financial Tables & Data Displays
 * 6. Microinteractions & Dark Theme Support
 * ==============================================================================
 */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS (CSS Custom Properties)
   -------------------------------------------------------------------------- */
:root {
    /* Required Core Palette */
    --color-primary: #0F172A;            /* Main navigation and primary text */
    --color-secondary: #1E293B;          /* Secondary surfaces */
    --color-accent: #059669;             /* Primary actions and positive states (Emerald) */
    --color-accent-hover: #047857;
    --color-accent-light: #D1FAE5;       /* Positive status backgrounds */
    --color-background: #F8FAFC;         /* Main application canvas background */
    --color-surface: #FFFFFF;            /* Cards and forms */
    --color-border: #E2E8F0;             /* Dividers and component borders */
    --color-text-primary: #0F172A;       /* Headings and important information */
    --color-text-secondary: #64748B;     /* Descriptions and supporting text */
    --color-warning: #D97706;            /* Pending and attention-required states */
    --color-warning-light: #FEF3C7;
    --color-danger: #DC2626;             /* Errors and failed operations */
    --color-danger-light: #FEE2E2;
    --color-info: #2563EB;               /* Informational messages */
    --color-info-light: #DBEAFE;

    /* Extended FinTech Accents */
    --color-primary-rgb: 15, 23, 42;
    --color-accent-rgb: 5, 150, 105;
    --color-accent-glow: rgba(5, 150, 105, 0.22);
    --color-primary-glow: rgba(15, 23, 42, 0.15);

    /* Sidebar Variables */
    --sidebar-bg: #0F172A;
    --sidebar-surface: #1E293B;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active-bg: linear-gradient(135deg, #059669 0%, #047857 100%);
    --sidebar-text: #94A3B8;
    --sidebar-text-active: #FFFFFF;
    --sidebar-border: rgba(255, 255, 255, 0.08);

    /* Elevation & Shadows */
    --shadow-subtle: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 10px 20px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    --shadow-glass: 0 8px 32px 0 rgba(15, 23, 42, 0.14);

    /* Radii */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-full: 9999px;

    /* Selective Glassmorphism Specifications */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(226, 232, 240, 0.85);
    --glass-blur: 16px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Overrides */
[data-bs-theme="dark"], [data-theme="dark"] {
    --color-primary: #F8FAFC;
    --color-secondary: #0F172A;
    --color-background: #0B1120;
    --color-surface: #111C33;
    --color-border: #1E293B;
    --color-text-primary: #F8FAFC;
    --color-text-secondary: #94A3B8;
    --color-accent-light: rgba(5, 150, 105, 0.22);
    --color-warning-light: rgba(217, 119, 6, 0.22);
    --color-danger-light: rgba(220, 38, 38, 0.22);
    --color-info-light: rgba(37, 99, 235, 0.22);

    --glass-bg: rgba(17, 28, 51, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.5);

    --sidebar-bg: #070B14;
    --sidebar-surface: #0E1626;
}

/* --------------------------------------------------------------------------
   2. TYPOGRAPHY & TABULAR NUMERALS
   -------------------------------------------------------------------------- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .fintech-heading {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--color-text-primary);
}

/* Tabular Numerals for Monetary Values & Financial Spreadsheets */
.tabular-nums,
.font-tabular,
.stat-value,
.currency-amount,
table.financial-table td,
.font-monospace {
    font-variant-numeric: tabular-nums lining-nums !important;
    font-feature-settings: "tnum" 1, "lnum" 1 !important;
}

/* --------------------------------------------------------------------------
   3. BENTO GRID SYSTEM
   -------------------------------------------------------------------------- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.bento-span-12 { grid-column: span 12; }
.bento-span-9  { grid-column: span 9; }
.bento-span-8  { grid-column: span 8; }
.bento-span-7  { grid-column: span 7; }
.bento-span-6  { grid-column: span 6; }
.bento-span-5  { grid-column: span 5; }
.bento-span-4  { grid-column: span 4; }
.bento-span-3  { grid-column: span 3; }

.bento-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    position: relative;
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    border-color: #CBD5E1;
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* Bento Hero Highlight Cell */
.bento-hero-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
}

.bento-hero-card .stat-label {
    color: #94A3B8;
}

.bento-hero-card .stat-value {
    color: #FFFFFF;
}

@media (max-width: 991.98px) {
    .bento-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1rem;
    }
    .bento-span-12, .bento-span-9, .bento-span-8, .bento-span-7 { grid-column: span 6; }
    .bento-span-6, .bento-span-5 { grid-column: span 6; }
    .bento-span-4, .bento-span-3 { grid-column: span 3; }
}

@media (max-width: 575.98px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .bento-span-12, .bento-span-9, .bento-span-8, .bento-span-7, 
    .bento-span-6, .bento-span-5, .bento-span-4, .bento-span-3 {
        grid-column: span 1;
    }
}

/* --------------------------------------------------------------------------
   4. SELECTIVE GLASSMORPHISM
   (Reserved strictly for floating panels, auth cards, modals, and navbars.
    NEVER used behind dense financial tables).
   -------------------------------------------------------------------------- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass);
}

@supports not ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
    .glass-panel {
        background: var(--color-surface);
    }
}

.glass-modal .modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-modal);
}

.glass-pill {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   5. REFINED FINTECH CARDS & METRIC STATS
   -------------------------------------------------------------------------- */
.card-custom, .fintech-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.stat-card {
    padding: 1.35rem 1.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    border-radius: var(--radius-lg);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-secondary);
    margin-bottom: 0.35rem;
    display: block;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--color-text-primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Palette-aligned icon styles */
.stat-icon.emerald { background: var(--color-accent-light); color: var(--color-accent); border: 1px solid rgba(5, 150, 105, 0.2); }
.stat-icon.slate   { background: #E2E8F0; color: var(--color-primary); border: 1px solid rgba(15, 23, 42, 0.15); }
.stat-icon.amber   { background: var(--color-warning-light); color: var(--color-warning); border: 1px solid rgba(217, 119, 6, 0.25); }
.stat-icon.rose    { background: var(--color-danger-light); color: var(--color-danger); border: 1px solid rgba(220, 38, 38, 0.2); }
.stat-icon.blue    { background: var(--color-info-light); color: var(--color-info); border: 1px solid rgba(37, 99, 235, 0.2); }

/* --------------------------------------------------------------------------
   6. ENTERPRISE FINANCIAL TABLES
   (High legibility, tabular figures, crisp borders, solid surfaces)
   -------------------------------------------------------------------------- */
.table-fintech {
    width: 100%;
    margin-bottom: 0;
    background: var(--color-surface);
    border-collapse: separate;
    border-spacing: 0;
}

.table-fintech thead th {
    background: var(--color-background);
    color: var(--color-text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-fintech tbody td {
    padding: 0.95rem 1.15rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.88rem;
    color: var(--color-text-primary);
    background: var(--color-surface);
    transition: background-color var(--transition-fast);
}

.table-fintech tbody tr:hover td {
    background-color: rgba(248, 250, 252, 0.85);
}

.table-fintech td.text-end,
.table-fintech th.text-end {
    text-align: right;
}

/* Total row emphasis */
.table-fintech tfoot td {
    background: var(--color-background);
    font-weight: 700;
    font-size: 0.92rem;
    border-top: 2px solid var(--color-border);
    padding: 1rem 1.15rem;
}

/* --------------------------------------------------------------------------
   7. STATUS BADGES & CHIPS (Accessible & Semantic)
   -------------------------------------------------------------------------- */
.badge-fintech {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.badge-fintech-success {
    background-color: var(--color-accent-light);
    color: #065F46;
    border: 1px solid rgba(5, 150, 105, 0.3);
}

.badge-fintech-warning {
    background-color: var(--color-warning-light);
    color: #92400E;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.badge-fintech-danger {
    background-color: var(--color-danger-light);
    color: #991B1B;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.badge-fintech-info {
    background-color: var(--color-info-light);
    color: #1E40AF;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.badge-fintech-neutral {
    background-color: #F1F5F9;
    color: #475569;
    border: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   8. BUTTONS & MICROINTERACTIONS
   -------------------------------------------------------------------------- */
.btn-fintech-primary {
    background-color: var(--color-accent);
    color: #FFFFFF !important;
    border: 1px solid rgba(5, 150, 105, 0.9);
    padding: 0.62rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px var(--color-accent-glow);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-fintech-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--color-accent-glow);
}

.btn-fintech-secondary {
    background-color: var(--color-surface);
    color: var(--color-text-primary) !important;
    border: 1px solid var(--color-border);
    padding: 0.62rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-subtle);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-fintech-secondary:hover {
    background-color: var(--color-background);
    border-color: #CBD5E1;
    color: var(--color-primary) !important;
    transform: translateY(-1px);
}

.btn-fintech-dark {
    background-color: var(--color-primary);
    color: #FFFFFF !important;
    border: 1px solid var(--color-secondary);
    padding: 0.62rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-fintech-dark:hover {
    background-color: var(--color-secondary);
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   9. ACCESSIBLE FORM INPUTS
   -------------------------------------------------------------------------- */
.form-fintech-control,
.form-control,
.form-select {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.95rem;
    font-size: 0.9rem;
    color: var(--color-text-primary);
    background-color: var(--color-surface);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-fintech-control:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.35rem;
}

/* --------------------------------------------------------------------------
   10. AMBIENT GLOW & AUTH ACCENTS
   -------------------------------------------------------------------------- */
.ambient-glow-fintech {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

.glow-emerald {
    background: radial-gradient(circle, #059669 0%, transparent 70%);
}

.glow-slate {
    background: radial-gradient(circle, #1E293B 0%, transparent 70%);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   11. STITCH DESIGN SYSTEM (APEX MICROFINANCE OS EXTENSION)
   -------------------------------------------------------------------------- */
:root {
    --stitch-canvas: #F8FAFC;
    --stitch-primary: #0A1128;
    --stitch-secondary: #006C49;
    --stitch-emerald: #10B981;
    --stitch-emerald-subtle: #ECFDF5;
    --stitch-amber: #F59E0B;
    --stitch-amber-subtle: #FEF3C7;
    --stitch-crimson: #EF4444;
    --stitch-crimson-subtle: #FEE2E2;
    --stitch-border: #E2E8F0;
    --stitch-surface: #FFFFFF;
    --stitch-surface-low: #F1F5F9;
    --stitch-text-dark: #0B1C30;
    --stitch-text-muted: #64748B;
}

/* Material Symbols Integration */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

/* Typography tokens from Stitch */
.font-headline-xl { font-family: 'Inter', sans-serif !important; font-size: 28px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.25; }
.font-headline-lg { font-family: 'Inter', sans-serif !important; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.font-headline-md { font-family: 'Inter', sans-serif !important; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.35; }
.font-headline-sm { font-family: 'Inter', sans-serif !important; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; }
.font-body-lg { font-family: 'Inter', sans-serif !important; font-size: 15px; font-weight: 400; line-height: 1.5; }
.font-body-md { font-family: 'Inter', sans-serif !important; font-size: 13px; font-weight: 400; line-height: 1.45; }
.font-body-sm { font-family: 'Inter', sans-serif !important; font-size: 12px; font-weight: 400; line-height: 1.4; }
.font-label-lg { font-family: 'JetBrains Mono', monospace !important; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.font-label-md { font-family: 'JetBrains Mono', monospace !important; font-size: 12px; font-weight: 500; letter-spacing: 0em; font-variant-numeric: tabular-nums; }
.font-label-sm { font-family: 'JetBrains Mono', monospace !important; font-size: 10.5px; font-weight: 500; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }

/* Quick Switcher Sheet Navigation Strip */
.stitch-sheet-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.65rem 0.5rem;
    background: #F1F5F9;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    margin-bottom: 1.25rem;
    scrollbar-width: none;
}
.stitch-sheet-nav::-webkit-scrollbar { display: none; }

.stitch-sheet-pill {
    white-space: nowrap;
    padding: 0.42rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: #475569;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 2px rgba(10, 17, 40, 0.04);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.stitch-sheet-pill:hover {
    color: #0A1128;
    background: #F8FAFC;
    border-color: #CBD5E1;
    transform: translateY(-1px);
}
.stitch-sheet-pill.active {
    background: #0A1128;
    color: #FFFFFF !important;
    border-color: #0A1128;
    box-shadow: 0 2px 6px rgba(10, 17, 40, 0.18);
}
.stitch-sheet-pill .sheet-step {
    font-size: 0.68rem;
    font-family: 'JetBrains Mono', monospace;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
}
.stitch-sheet-pill:not(.active) .sheet-step {
    background: #F1F5F9;
    color: #64748B;
}

/* Solvency & Liquidity Alert Banner */
.stitch-liquidity-banner {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border: 1px solid #A7F3D0;
    border-radius: 14px;
    padding: 1.15rem 1.35rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(10, 17, 40, 0.04);
}
.stitch-liquidity-banner .rating-badge {
    background: #FFFFFF;
    color: #065F46;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    border: 1px solid #A7F3D0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.stitch-liquidity-banner .solvency-track {
    width: 100%;
    height: 8px;
    background: rgba(5, 150, 105, 0.15);
    border-radius: 9999px;
    overflow: hidden;
    margin: 0.6rem 0 0.35rem 0;
}
.stitch-liquidity-banner .solvency-fill {
    height: 100%;
    background: #059669;
    border-radius: 9999px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stitch Institutional KPI Cards */
.stitch-kpi-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 1px 3px rgba(10, 17, 40, 0.03);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.stitch-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -2px rgba(10, 17, 40, 0.07);
    border-color: #CBD5E1;
}
.stitch-kpi-card .kpi-sub-badge {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}

/* Strict Capital Segregation Breakdown */
.stitch-vault-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    margin-bottom: 0.65rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.stitch-vault-row:hover {
    background: #FFFFFF;
    border-color: #CBD5E1;
}

/* Linear Segmented Aging Distribution Bar */
.stitch-aging-progress {
    width: 100%;
    height: 12px;
    border-radius: 9999px;
    background: #E2E8F0;
    display: flex;
    overflow: hidden;
    margin: 0.6rem 0;
}
.stitch-aging-seg-current { background: #10B981; }
.stitch-aging-seg-watch   { background: #F59E0B; }
.stitch-aging-seg-par30   { background: #EF4444; }

/* Cashflow Visualizer Card */
.stitch-cashflow-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(10, 17, 40, 0.03);
}

/* Quick Action Button Variants */
.btn-stitch-primary {
    background: #0A1128;
    color: #FFFFFF;
    border: 1px solid #0A1128;
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    font-size: 0.84rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(10, 17, 40, 0.12);
    transition: all 0.15s ease;
}
.btn-stitch-primary:hover {
    background: #1E293B;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(10, 17, 40, 0.16);
}
.btn-stitch-secondary {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    font-size: 0.84rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    transition: all 0.15s ease;
}
.btn-stitch-secondary:hover {
    background: #D1FAE5;
    color: #047857;
    transform: translateY(-1px);
}

