/* ============================================================
   DESH FUNDING — COMMON.CSS
   Design System & Component Library
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   1. CSS CUSTOM PROPERTIES — COLOR TOKENS
   ============================================================ */

:root {

    /* ── Primary Palette — Forest Green (Trust & Growth) ── */
    --green-50: #f0faf4;
    --green-100: #d6f3e2;
    --green-200: #a9e5c2;
    --green-300: #6fd0a0;
    --green-400: #3ab87e;
    --green-500: #1a9e63;
    /* Brand Primary */
    --green-600: #158050;
    --green-700: #0f6340;
    --green-800: #0a4830;
    --green-900: #062e1f;
    --green-950: #031a11;

    /* ── Secondary Palette — Amber Gold (Prosperity) ── */
    --gold-50: #fffbeb;
    --gold-100: #fef3c7;
    --gold-200: #fde68a;
    --gold-300: #fcd34d;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    /* Brand Accent */
    --gold-600: #d97706;
    --gold-700: #b45309;
    --gold-800: #92400e;
    --gold-900: #6b2d05;

    /* ── Tertiary — Deep Navy (Authority) ── */
    --navy-50: #f0f4ff;
    --navy-100: #dce6ff;
    --navy-200: #b3c8ff;
    --navy-300: #7aa3ff;
    --navy-400: #4178f5;
    --navy-500: #2055e5;
    --navy-600: #1640c8;
    --navy-700: #0f2f9e;
    --navy-800: #0b2277;
    --navy-900: #071550;
    --navy-950: #030b2e;

    /* ── Accent — Crimson Red (Alerts & CTA Contrast) ── */
    --red-50: #fff1f2;
    --red-100: #ffe4e6;
    --red-200: #fecdd3;
    --red-300: #fda4af;
    --red-400: #fb7185;
    --red-500: #f43f5e;
    --red-600: #e11d48;
    --red-700: #be123c;
    --red-800: #9f1239;
    --red-900: #881337;

    /* ── Accent — Violet (Premium / Lender Side) ── */
    --violet-50: #f5f3ff;
    --violet-100: #ede9fe;
    --violet-200: #ddd6fe;
    --violet-300: #c4b5fd;
    --violet-400: #a78bfa;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;
    --violet-700: #6d28d9;
    --violet-800: #5b21b6;
    --violet-900: #4c1d95;

    /* ── Accent — Teal (Data & Stats) ── */
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;

    /* ── Accent — Saffron Orange (Notifications & Warmth) ── */
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-200: #fed7aa;
    --orange-300: #fdba74;
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-700: #c2410c;
    --orange-800: #9a3412;
    --orange-900: #7c2d12;

    /* ── Accent — Sky Blue (Links & Info) ── */
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-200: #bae6fd;
    --sky-300: #7dd3fc;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --sky-800: #075985;
    --sky-900: #0c4a6e;

    /* ── Neutral Scale ── */
    --neutral-0: #ffffff;
    --neutral-50: #f9fafb;
    --neutral-100: #f3f4f6;
    --neutral-150: #eceef1;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;
    --neutral-950: #030712;

    /* ── Status Colors ── */
    --status-success: #1a9e63;
    --status-success-light: #d6f3e2;
    --status-warning: #f59e0b;
    --status-warning-light: #fef3c7;
    --status-danger: #f43f5e;
    --status-danger-light: #ffe4e6;
    --status-info: #0ea5e9;
    --status-info-light: #e0f2fe;
    --status-pending: #8b5cf6;
    --status-pending-light: #ede9fe;

    /* ── Semantic Aliases ── */
    --color-primary: var(--green-500);
    --color-primary-dark: var(--green-700);
    --color-primary-light: var(--green-100);
    --color-accent: var(--gold-500);
    --color-accent-dark: var(--gold-700);
    --color-accent-light: var(--gold-100);
    --color-lender: var(--violet-600);
    --color-lender-light: var(--violet-100);
    --color-borrower: var(--green-600);
    --color-borrower-light: var(--green-100);

    /* ── Typography ── */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-md: 1.125rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: 1.875rem;
    --text-3xl: 2.25rem;
    --text-4xl: 3rem;
    --text-5xl: 3.75rem;
    --text-6xl: 4.5rem;

    --weight-light: 300;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-black: 900;

    --leading-tight: 1.2;
    --leading-snug: 1.35;
    --leading-normal: 1.6;
    --leading-loose: 1.8;

    /* ── Spacing Scale ── */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* ── Border Radius ── */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-3xl: 32px;
    --radius-full: 9999px;

    /* ── Shadows ── */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 24px 64px rgba(0, 0, 0, 0.20);
    --shadow-green: 0 8px 32px rgba(26, 158, 99, 0.30);
    --shadow-gold: 0 8px 32px rgba(245, 158, 11, 0.30);
    --shadow-violet: 0 8px 32px rgba(139, 92, 246, 0.30);
    --shadow-red: 0 8px 32px rgba(244, 63, 94, 0.30);
    --shadow-inset: inset 0 2px 6px rgba(0, 0, 0, 0.08);

    /* ── Transitions ── */
    --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1.0);
    --ease-in: cubic-bezier(0.4, 0.0, 1.0, 1.0);
    --ease-inout: cubic-bezier(0.4, 0.0, 0.2, 1.0);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1.0);
    --dur-fast: 150ms;
    --dur-base: 250ms;
    --dur-slow: 400ms;

    /* ── Z-index Scale ── */
    --z-base: 1;
    --z-raised: 10;
    --z-overlay: 100;
    --z-modal: 1000;
    --z-toast: 9999;

    /* ── Layout ── */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1440px;
    --sidebar-width: 260px;
    --navbar-height: 72px;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-regular);
    line-height: var(--leading-normal);
    color: var(--neutral-800);
    background-color: var(--neutral-50);
}

img,
video,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
    color: var(--color-primary-dark);
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--neutral-900);
}

h1 {
    font-size: var(--text-5xl);
}

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

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

p {
    line-height: var(--leading-normal);
}

code,
pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

input,
textarea,
select,
button {
    font-family: var(--font-body);
    font-size: var(--text-base);
}


/* ============================================================
   3. LAYOUT UTILITIES
   ============================================================ */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-inline: auto;
    padding-inline: var(--space-6);
}

.container--sm {
    max-width: var(--container-sm);
}

.container--md {
    max-width: var(--container-md);
}

.container--lg {
    max-width: var(--container-lg);
}

.container--2xl {
    max-width: var(--container-2xl);
}

.section {
    padding-block: var(--space-24);
}

.section--sm {
    padding-block: var(--space-12);
}

.section--lg {
    padding-block: var(--space-32);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

.gap-12 {
    gap: var(--space-12);
}

.grid {
    display: grid;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

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


/* ============================================================
   4. BUTTONS — Full System
   ============================================================ */

/* — Base Button — */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.75rem 1.75rem;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    line-height: 1;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color var(--dur-base) var(--ease-out),
        border-color var(--dur-base) var(--ease-out),
        color var(--dur-base) var(--ease-out),
        box-shadow var(--dur-base) var(--ease-out),
        transform var(--dur-fast) var(--ease-spring);
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

.btn:active {
    transform: scale(0.97);
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Ripple effect */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    opacity: 0;
    transition: opacity var(--dur-fast) var(--ease-out);
    border-radius: inherit;
}

.btn:hover::after {
    opacity: 1;
}

/* ── Sizes ── */
.btn--xs {
    padding: 0.35rem 0.9rem;
    font-size: var(--text-xs);
    border-radius: var(--radius-md);
    gap: var(--space-1);
}

.btn--sm {
    padding: 0.55rem 1.25rem;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
}

.btn--lg {
    padding: 1rem 2.25rem;
    font-size: var(--text-md);
    border-radius: var(--radius-xl);
}

.btn--xl {
    padding: 1.25rem 3rem;
    font-size: var(--text-lg);
    border-radius: var(--radius-xl);
    letter-spacing: 0.02em;
}

.btn--icon {
    padding: 0.75rem;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
}

.btn--icon-sm {
    padding: 0.5rem;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
}

.btn--full {
    width: 100%;
}

/* ── Variants ── */

/* Primary — Green */
.btn--primary {
    background-color: var(--green-500);
    border-color: var(--green-500);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 158, 99, 0.25);
}

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

/* Primary Dark */
.btn--primary-dark {
    background-color: var(--green-800);
    border-color: var(--green-800);
    color: #fff;
}

.btn--primary-dark:hover {
    background-color: var(--green-900);
    border-color: var(--green-900);
    color: #fff;
    transform: translateY(-1px);
}

/* Accent — Gold */
.btn--accent {
    background-color: var(--gold-500);
    border-color: var(--gold-500);
    color: var(--neutral-900);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.btn--accent:hover {
    background-color: var(--gold-600);
    border-color: var(--gold-600);
    box-shadow: var(--shadow-gold);
    color: var(--neutral-900);
    transform: translateY(-1px);
}

/* Lender — Violet */
.btn--lender {
    background-color: var(--violet-600);
    border-color: var(--violet-600);
    color: #fff;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}

.btn--lender:hover {
    background-color: var(--violet-700);
    border-color: var(--violet-700);
    box-shadow: var(--shadow-violet);
    color: #fff;
    transform: translateY(-1px);
}

/* Navy */
.btn--navy {
    background-color: var(--navy-700);
    border-color: var(--navy-700);
    color: #fff;
}

.btn--navy:hover {
    background-color: var(--navy-900);
    border-color: var(--navy-900);
    color: #fff;
    transform: translateY(-1px);
}

/* Danger — Red */
.btn--danger {
    background-color: var(--red-500);
    border-color: var(--red-500);
    color: #fff;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.20);
}

.btn--danger:hover {
    background-color: var(--red-600);
    border-color: var(--red-600);
    box-shadow: var(--shadow-red);
    color: #fff;
    transform: translateY(-1px);
}

/* Teal */
.btn--teal {
    background-color: var(--teal-500);
    border-color: var(--teal-500);
    color: #fff;
}

.btn--teal:hover {
    background-color: var(--teal-600);
    border-color: var(--teal-600);
    color: #fff;
    transform: translateY(-1px);
}

/* Orange */
.btn--orange {
    background-color: var(--orange-500);
    border-color: var(--orange-500);
    color: #fff;
}

.btn--orange:hover {
    background-color: var(--orange-600);
    border-color: var(--orange-600);
    color: #fff;
    transform: translateY(-1px);
}

/* Sky */
.btn--sky {
    background-color: var(--sky-500);
    border-color: var(--sky-500);
    color: #fff;
}

.btn--sky:hover {
    background-color: var(--sky-600);
    border-color: var(--sky-600);
    color: #fff;
    transform: translateY(-1px);
}

/* White */
.btn--white {
    background-color: #fff;
    border-color: #fff;
    color: var(--green-700);
    box-shadow: var(--shadow-md);
}

.btn--white:hover {
    background-color: var(--neutral-100);
    color: var(--green-800);
    transform: translateY(-1px);
}

/* Light (Soft Background) */
.btn--light {
    background-color: var(--green-100);
    border-color: var(--green-100);
    color: var(--green-700);
}

.btn--light:hover {
    background-color: var(--green-200);
    border-color: var(--green-200);
    color: var(--green-800);
}

/* Ghost / Outline */
.btn--ghost {
    background-color: transparent;
    border-color: var(--neutral-300);
    color: var(--neutral-700);
}

.btn--ghost:hover {
    background-color: var(--neutral-100);
    border-color: var(--neutral-400);
    color: var(--neutral-900);
}

.btn--outline-primary {
    background-color: transparent;
    border-color: var(--green-500);
    color: var(--green-600);
}

.btn--outline-primary:hover {
    background-color: var(--green-500);
    border-color: var(--green-500);
    color: #fff;
    transform: translateY(-1px);
}

.btn--outline-accent {
    background-color: transparent;
    border-color: var(--gold-500);
    color: var(--gold-600);
}

.btn--outline-accent:hover {
    background-color: var(--gold-500);
    color: var(--neutral-900);
    transform: translateY(-1px);
}

.btn--outline-lender {
    background-color: transparent;
    border-color: var(--violet-500);
    color: var(--violet-600);
}

.btn--outline-lender:hover {
    background-color: var(--violet-600);
    color: #fff;
    transform: translateY(-1px);
}

.btn--outline-danger {
    background-color: transparent;
    border-color: var(--red-400);
    color: var(--red-500);
}

.btn--outline-danger:hover {
    background-color: var(--red-500);
    color: #fff;
    transform: translateY(-1px);
}

.btn--outline-white {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.btn--outline-white:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
}

/* Text / Link style */
.btn--text {
    background-color: transparent;
    border-color: transparent;
    color: var(--green-600);
    padding-inline: var(--space-2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn--text:hover {
    color: var(--green-800);
    background-color: transparent;
}

.btn--text::after {
    display: none;
}

/* Gradient Hero Buttons */
.btn--gradient-green {
    background: linear-gradient(135deg, var(--green-500) 0%, var(--teal-500) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 20px rgba(26, 158, 99, 0.35);
}

.btn--gradient-green:hover {
    background: linear-gradient(135deg, var(--green-600) 0%, var(--teal-600) 100%);
    box-shadow: 0 8px 32px rgba(26, 158, 99, 0.45);
    transform: translateY(-2px);
    color: #fff;
}

.btn--gradient-gold {
    background: linear-gradient(135deg, var(--gold-400) 0%, var(--orange-500) 100%);
    border-color: transparent;
    color: var(--neutral-900);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}

.btn--gradient-gold:hover {
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--orange-600) 100%);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.45);
    transform: translateY(-2px);
    color: var(--neutral-900);
}

.btn--gradient-violet {
    background: linear-gradient(135deg, var(--violet-500) 0%, var(--navy-600) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
}

.btn--gradient-violet:hover {
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.45);
    transform: translateY(-2px);
    color: #fff;
}

/* Loading State */
.btn--loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn--loading::before {
    content: '';
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
    flex-shrink: 0;
}

/* Pill / Rounded */
.btn--pill {
    border-radius: var(--radius-full) !important;
}

/* Square corners */
.btn--square {
    border-radius: var(--radius-sm) !important;
}


/* ============================================================
   5. BADGES & TAGS
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.03em;
    line-height: 1.4;
    white-space: nowrap;
}

.badge--green {
    background: var(--green-100);
    color: var(--green-700);
}

.badge--gold {
    background: var(--gold-100);
    color: var(--gold-700);
}

.badge--violet {
    background: var(--violet-100);
    color: var(--violet-700);
}

.badge--red {
    background: var(--red-100);
    color: var(--red-700);
}

.badge--teal {
    background: var(--teal-100);
    color: var(--teal-700);
}

.badge--orange {
    background: var(--orange-100);
    color: var(--orange-700);
}

.badge--sky {
    background: var(--sky-100);
    color: var(--sky-700);
}

.badge--navy {
    background: var(--navy-100);
    color: var(--navy-700);
}

.badge--neutral {
    background: var(--neutral-200);
    color: var(--neutral-700);
}

/* Status badges */
.badge--approved {
    background: var(--status-success-light);
    color: var(--status-success);
}

.badge--pending {
    background: var(--status-pending-light);
    color: var(--status-pending);
}

.badge--rejected {
    background: var(--status-danger-light);
    color: var(--status-danger);
}

.badge--warning {
    background: var(--status-warning-light);
    color: var(--status-warning);
}

.badge--info {
    background: var(--status-info-light);
    color: var(--status-info);
}

/* Solid badges */
.badge--solid-green {
    background: var(--green-500);
    color: #fff;
}

.badge--solid-gold {
    background: var(--gold-500);
    color: var(--neutral-900);
}

.badge--solid-violet {
    background: var(--violet-600);
    color: #fff;
}

.badge--solid-red {
    background: var(--red-500);
    color: #fff;
}

/* Dot indicator */
.badge--dot::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}


/* ============================================================
   6. CARDS
   ============================================================ */

.card {
    background: var(--neutral-0);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-150);
    overflow: hidden;
    transition:
        box-shadow var(--dur-base) var(--ease-out),
        transform var(--dur-base) var(--ease-out);
}

.card--hover:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
}

.card__header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--neutral-150);
}

.card__body {
    padding: var(--space-6);
}

.card__footer {
    padding: var(--space-4) var(--space-6);
    background: var(--neutral-50);
    border-top: 1px solid var(--neutral-150);
}

/* Card Colors */
.card--green {
    border-top: 4px solid var(--green-500);
}

.card--gold {
    border-top: 4px solid var(--gold-500);
}

.card--violet {
    border-top: 4px solid var(--violet-600);
}

.card--red {
    border-top: 4px solid var(--red-500);
}

.card--teal {
    border-top: 4px solid var(--teal-500);
}

.card--orange {
    border-top: 4px solid var(--orange-500);
}

.card--sky {
    border-top: 4px solid var(--sky-500);
}

/* Stat Card */
.stat-card {
    background: var(--neutral-0);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-150);
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

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

.stat-card__icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-card__icon--green {
    background: var(--green-100);
    color: var(--green-600);
}

.stat-card__icon--gold {
    background: var(--gold-100);
    color: var(--gold-600);
}

.stat-card__icon--violet {
    background: var(--violet-100);
    color: var(--violet-600);
}

.stat-card__icon--teal {
    background: var(--teal-100);
    color: var(--teal-600);
}

.stat-card__icon--red {
    background: var(--red-100);
    color: var(--red-600);
}

.stat-card__icon--orange {
    background: var(--orange-100);
    color: var(--orange-600);
}

.stat-card__value {
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
    font-family: var(--font-display);
    color: var(--neutral-900);
    line-height: 1;
}

.stat-card__label {
    font-size: var(--text-sm);
    color: var(--neutral-500);
    margin-top: var(--space-1);
}

.stat-card__trend {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    margin-top: var(--space-2);
}

.stat-card__trend--up {
    color: var(--green-500);
}

.stat-card__trend--down {
    color: var(--red-500);
}


/* ============================================================
   7. FORM ELEMENTS
   ============================================================ */

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--neutral-700);
    letter-spacing: 0.01em;
}

.form-label--required::after {
    content: ' *';
    color: var(--red-500);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--neutral-300);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--neutral-800);
    background-color: var(--neutral-0);
    outline: none;
    transition:
        border-color var(--dur-fast) var(--ease-out),
        box-shadow var(--dur-fast) var(--ease-out),
        background var(--dur-fast) var(--ease-out);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--neutral-400);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(26, 158, 99, 0.15);
    background: var(--neutral-0);
}

.form-input--error {
    border-color: var(--red-400);
    background: var(--red-50);
}

.form-input--error:focus {
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15);
}

.form-input--success {
    border-color: var(--green-400);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--neutral-500);
}

.form-error {
    font-size: var(--text-xs);
    color: var(--red-600);
    font-weight: var(--weight-medium);
}

/* Input with icon */
.input-group {
    position: relative;
}

.input-group__icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-400);
    pointer-events: none;
}

.input-group .form-input {
    padding-left: 2.75rem;
}

.input-group__suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-500);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--green-500);
    cursor: pointer;
    flex-shrink: 0;
}

.form-check__label {
    font-size: var(--text-sm);
    color: var(--neutral-700);
    cursor: pointer;
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--neutral-300);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    text-align: center;
    cursor: pointer;
    transition:
        border-color var(--dur-base) var(--ease-out),
        background var(--dur-base) var(--ease-out);
}

.file-upload:hover {
    border-color: var(--green-400);
    background: var(--green-50);
}

.file-upload--active {
    border-color: var(--green-500);
    background: var(--green-50);
}

.file-upload__icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-3);
}

.file-upload__text {
    font-size: var(--text-sm);
    color: var(--neutral-500);
}

.file-upload__text strong {
    color: var(--green-600);
    cursor: pointer;
}


/* ============================================================
   8. NAVIGATION
   ============================================================ */

.navbar {
    height: var(--navbar-height);
    background: var(--neutral-0);
    border-bottom: 1px solid var(--neutral-150);
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 0;
    z-index: var(--z-overlay);
    display: flex;
    align-items: center;
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container-xl);
    margin-inline: auto;
    padding-inline: var(--space-6);
}

.navbar__logo {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    color: var(--green-700);
    text-decoration: none;
}

.navbar__logo span {
    color: var(--gold-500);
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    list-style: none;
}

.navbar__link {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--neutral-600);
    text-decoration: none;
    padding: var(--space-2) var(--space-1);
    border-bottom: 2px solid transparent;
    transition:
        color var(--dur-fast) var(--ease-out),
        border-color var(--dur-fast) var(--ease-out);
}

.navbar__link:hover,
.navbar__link--active {
    color: var(--green-600);
    border-bottom-color: var(--green-500);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--neutral-900);
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: var(--z-raised);
    transition: transform var(--dur-slow) var(--ease-out);
}

.sidebar--lender {
    background: var(--navy-950);
}

.sidebar__logo {
    padding: var(--space-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    color: #fff;
}

.sidebar__logo span {
    color: var(--gold-400);
}

.sidebar__nav {
    padding: var(--space-4) var(--space-3);
    flex: 1;
}

.sidebar__section-label {
    font-size: 0.65rem;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    padding: var(--space-3) var(--space-3) var(--space-2);
    margin-top: var(--space-4);
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 0.65rem var(--space-3);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition:
        background-color var(--dur-fast) var(--ease-out),
        color var(--dur-fast) var(--ease-out);
    position: relative;
    margin-bottom: var(--space-1);
}

.sidebar__link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar__link--active {
    background: rgba(26, 158, 99, 0.25);
    color: var(--green-300);
}

.sidebar__link--active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 3px;
    background: var(--green-400);
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.sidebar__badge {
    margin-left: auto;
    background: var(--red-500);
    color: #fff;
    font-size: 0.65rem;
    font-weight: var(--weight-bold);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-full);
    line-height: 1.4;
}


/* ============================================================
   9. ALERTS & NOTIFICATIONS
   ============================================================ */

.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    font-size: var(--text-sm);
}

.alert__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1;
}

.alert__title {
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-1);
}

.alert__body {
    color: inherit;
    opacity: 0.85;
}

.alert--success {
    background: var(--green-50);
    border-color: var(--green-200);
    color: var(--green-800);
}

.alert--warning {
    background: var(--gold-50);
    border-color: var(--gold-200);
    color: var(--gold-800);
}

.alert--danger {
    background: var(--red-50);
    border-color: var(--red-200);
    color: var(--red-800);
}

.alert--info {
    background: var(--sky-50);
    border-color: var(--sky-200);
    color: var(--sky-800);
}

.alert--neutral {
    background: var(--neutral-100);
    border-color: var(--neutral-200);
    color: var(--neutral-700);
}

/* Toast */
.toast {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast__item {
    min-width: 300px;
    max-width: 420px;
    background: var(--neutral-900);
    color: #fff;
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    pointer-events: all;
    animation: slideInRight 0.35s var(--ease-spring) forwards;
    border-left: 4px solid var(--green-500);
}

.toast__item--warning {
    border-left-color: var(--gold-500);
}

.toast__item--error {
    border-left-color: var(--red-500);
}

.toast__item--info {
    border-left-color: var(--sky-500);
}

/* Notification dot */
.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red-500);
    display: inline-block;
    flex-shrink: 0;
}

.notif-dot--green {
    background: var(--green-500);
}

.notif-dot--gold {
    background: var(--gold-500);
}

.notif-dot--violet {
    background: var(--violet-500);
}


/* ============================================================
   10. PROGRESS & STATUS INDICATORS
   ============================================================ */

.progress {
    width: 100%;
    height: 8px;
    background: var(--neutral-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress__bar {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--green-400), var(--green-600));
    transition: width var(--dur-slow) var(--ease-out);
}

.progress--gold .progress__bar {
    background: linear-gradient(90deg, var(--gold-400), var(--orange-500));
}

.progress--violet .progress__bar {
    background: linear-gradient(90deg, var(--violet-400), var(--navy-500));
}

.progress--teal .progress__bar {
    background: linear-gradient(90deg, var(--teal-400), var(--sky-500));
}

.progress--red .progress__bar {
    background: linear-gradient(90deg, var(--red-400), var(--red-600));
}

.progress--sm {
    height: 4px;
}

.progress--lg {
    height: 12px;
}

.progress--xl {
    height: 16px;
}

/* Step Indicator */
.steps {
    display: flex;
    align-items: center;
    gap: 0;
}

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

.step:last-child {
    flex: 0;
}

.step__circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--neutral-300);
    background: var(--neutral-0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--neutral-400);
    flex-shrink: 0;
    transition: all var(--dur-base) var(--ease-out);
}

.step__circle--active {
    border-color: var(--green-500);
    background: var(--green-500);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(26, 158, 99, 0.20);
}

.step__circle--done {
    border-color: var(--green-500);
    background: var(--green-500);
    color: #fff;
}

.step__line {
    flex: 1;
    height: 2px;
    background: var(--neutral-200);
    transition: background var(--dur-base) var(--ease-out);
}

.step__line--done {
    background: var(--green-500);
}


/* ============================================================
   11. TABLE
   ============================================================ */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-xl);
    border: 1px solid var(--neutral-150);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--neutral-0);
    font-size: var(--text-sm);
}

.table thead {
    background: var(--neutral-50);
    border-bottom: 1px solid var(--neutral-200);
}

.table th {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    font-weight: var(--weight-semibold);
    color: var(--neutral-600);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.table td {
    padding: var(--space-4) var(--space-5);
    color: var(--neutral-700);
    border-bottom: 1px solid var(--neutral-100);
    vertical-align: middle;
}

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

.table tbody tr {
    transition: background-color var(--dur-fast) var(--ease-out);
}

.table tbody tr:hover {
    background: var(--neutral-50);
}

.table--striped tbody tr:nth-child(even) {
    background: var(--neutral-50);
}


/* ============================================================
   12. AVATAR & USER DISPLAY
   ============================================================ */

.avatar {
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--weight-bold);
    flex-shrink: 0;
    font-family: var(--font-display);
    background: var(--green-200);
    color: var(--green-800);
}

.avatar--xs {
    width: 24px;
    height: 24px;
    font-size: 0.6rem;
}

.avatar--sm {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
}

.avatar--md {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.avatar--lg {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
}

.avatar--xl {
    width: 80px;
    height: 80px;
    font-size: 1.5rem;
}

.avatar--2xl {
    width: 112px;
    height: 112px;
    font-size: 2rem;
}

.avatar--gold {
    background: var(--gold-200);
    color: var(--gold-800);
}

.avatar--violet {
    background: var(--violet-200);
    color: var(--violet-800);
}

.avatar--teal {
    background: var(--teal-200);
    color: var(--teal-800);
}

.avatar--navy {
    background: var(--navy-200);
    color: var(--navy-800);
}

.avatar-stack {
    display: flex;
}

.avatar-stack .avatar {
    border: 2px solid var(--neutral-0);
    margin-left: -8px;
}

.avatar-stack .avatar:first-child {
    margin-left: 0;
}

/* Online indicator */
.avatar-wrap {
    position: relative;
    display: inline-block;
}

.avatar-wrap .online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green-500);
    border: 2px solid var(--neutral-0);
}


/* ============================================================
   13. DIVIDERS & SEPARATORS
   ============================================================ */

.divider {
    border: none;
    border-top: 1px solid var(--neutral-200);
    margin-block: var(--space-6);
}

.divider--text {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    color: var(--neutral-400);
    font-size: var(--text-sm);
    margin-block: var(--space-6);
}

.divider--text::before,
.divider--text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--neutral-200);
}


/* ============================================================
   14. MODAL / OVERLAY
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.6);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.modal {
    background: var(--neutral-0);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.25s var(--ease-spring) forwards;
}

.modal--lg {
    max-width: 720px;
}

.modal--xl {
    max-width: 960px;
}

.modal__header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--neutral-150);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal__body {
    padding: var(--space-6);
}

.modal__footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--neutral-150);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}


/* ============================================================
   15. CHIPS / TAGS
   ============================================================ */

.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.3rem 0.8rem;
    background: var(--neutral-100);
    color: var(--neutral-700);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    cursor: default;
    transition: all var(--dur-fast) var(--ease-out);
}

.chip--removable {
    cursor: pointer;
}

.chip--removable:hover {
    background: var(--neutral-200);
}

.chip--green {
    background: var(--green-50);
    color: var(--green-700);
    border-color: var(--green-200);
}

.chip--gold {
    background: var(--gold-50);
    color: var(--gold-700);
    border-color: var(--gold-200);
}

.chip--violet {
    background: var(--violet-50);
    color: var(--violet-700);
    border-color: var(--violet-200);
}

.chip--teal {
    background: var(--teal-50);
    color: var(--teal-700);
    border-color: var(--teal-200);
}

.chip__remove {
    font-size: 1rem;
    line-height: 1;
    opacity: 0.5;
    transition: opacity var(--dur-fast);
}

.chip__remove:hover {
    opacity: 1;
}


/* ============================================================
   16. TOOLTIP
   ============================================================ */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--neutral-900);
    color: #fff;
    font-size: var(--text-xs);
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-md);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--dur-fast) var(--ease-out);
    z-index: var(--z-toast);
}

[data-tooltip]:hover::before {
    opacity: 1;
}


/* ============================================================
   17. SKELETON LOADERS
   ============================================================ */

.skeleton {
    background: linear-gradient(90deg,
            var(--neutral-200) 25%,
            var(--neutral-100) 50%,
            var(--neutral-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton--text {
    height: 1em;
    width: 100%;
}

.skeleton--title {
    height: 2em;
    width: 60%;
}

.skeleton--circle {
    border-radius: 50%;
}

.skeleton--btn {
    height: 42px;
    width: 120px;
    border-radius: var(--radius-lg);
}

.skeleton--card {
    height: 180px;
    border-radius: var(--radius-xl);
}


/* ============================================================
   18. TEXT UTILITIES
   ============================================================ */

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

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

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

.text-md {
    font-size: var(--text-md);
}

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

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

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

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

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

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

.font-light {
    font-weight: var(--weight-light);
}

.font-regular {
    font-weight: var(--weight-regular);
}

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

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

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

.font-black {
    font-weight: var(--weight-black);
}

.font-display {
    font-family: var(--font-display);
}

.font-mono {
    font-family: var(--font-mono);
}

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

.text-accent {
    color: var(--gold-600);
}

.text-lender {
    color: var(--violet-600);
}

.text-danger {
    color: var(--red-600);
}

.text-teal {
    color: var(--teal-600);
}

.text-orange {
    color: var(--orange-600);
}

.text-sky {
    color: var(--sky-600);
}

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

.text-subtle {
    color: var(--neutral-400);
}

.text-dark {
    color: var(--neutral-900);
}

.text-white {
    color: #fff;
}

.text-gradient-green {
    background: linear-gradient(135deg, var(--green-500), var(--teal-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-gold {
    background: linear-gradient(135deg, var(--gold-400), var(--orange-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-violet {
    background: linear-gradient(135deg, var(--violet-500), var(--navy-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.leading-tight {
    line-height: var(--leading-tight);
}

.leading-normal {
    line-height: var(--leading-normal);
}

.leading-loose {
    line-height: var(--leading-loose);
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uppercase {
    text-transform: uppercase;
}

.capitalize {
    text-transform: capitalize;
}


/* ============================================================
   19. BACKGROUND UTILITIES
   ============================================================ */

.bg-primary {
    background-color: var(--green-500);
}

.bg-primary-light {
    background-color: var(--green-50);
}

.bg-accent {
    background-color: var(--gold-500);
}

.bg-accent-light {
    background-color: var(--gold-50);
}

.bg-lender {
    background-color: var(--violet-600);
}

.bg-lender-light {
    background-color: var(--violet-50);
}

.bg-white {
    background-color: var(--neutral-0);
}

.bg-subtle {
    background-color: var(--neutral-50);
}

.bg-muted {
    background-color: var(--neutral-100);
}

.bg-dark {
    background-color: var(--neutral-900);
}

.bg-navy {
    background-color: var(--navy-950);
}

.bg-gradient-hero {
    background: linear-gradient(135deg, var(--green-900) 0%, var(--navy-950) 50%, var(--green-800) 100%);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--green-500) 0%, var(--teal-600) 100%);
}

.bg-gradient-lender {
    background: linear-gradient(135deg, var(--violet-700) 0%, var(--navy-900) 100%);
}

.bg-gradient-warm {
    background: linear-gradient(135deg, var(--gold-400) 0%, var(--orange-500) 100%);
}

.bg-pattern {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(26, 158, 99, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.06) 0%, transparent 40%);
}


/* ============================================================
   20. SPACING UTILITIES
   ============================================================ */

.m-0 {
    margin: 0;
}

.mt-2 {
    margin-top: var(--space-2);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mb-12 {
    margin-bottom: var(--space-12);
}

.p-0 {
    padding: 0;
}

.p-4 {
    padding: var(--space-4);
}

.p-6 {
    padding: var(--space-6);
}

.p-8 {
    padding: var(--space-8);
}

.px-4 {
    padding-inline: var(--space-4);
}

.px-6 {
    padding-inline: var(--space-6);
}

.py-2 {
    padding-block: var(--space-2);
}

.py-4 {
    padding-block: var(--space-4);
}

.py-6 {
    padding-block: var(--space-6);
}


/* ============================================================
   21. KEYFRAME ANIMATIONS
   ============================================================ */

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

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

    100% {
        background-position: 200% 0;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.4s var(--ease-out) forwards;
}

.animate-slideUp {
    animation: slideInUp 0.5s var(--ease-spring) forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.3s var(--ease-spring) forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}


/* ============================================================
   22. DARK SURFACE OVERRIDES (for dashboard panels etc.)
   ============================================================ */

.surface-dark {
    background: var(--neutral-900);
    color: #fff;
}

.surface-dark .card {
    background: var(--neutral-800);
    border-color: rgba(255, 255, 255, 0.08);
}

.surface-dark .form-input,
.surface-dark .form-select,
.surface-dark .form-textarea {
    background: var(--neutral-800);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.surface-dark .form-input:focus {
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px rgba(26, 158, 99, 0.20);
}

.surface-dark .divider {
    border-color: rgba(255, 255, 255, 0.10);
}


/* ============================================================
   23. RESPONSIVE BREAKPOINTS
   ============================================================ */

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }

    h1 {
        font-size: var(--text-4xl);
    }

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

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding-inline: var(--space-4);
    }

    .section {
        padding-block: var(--space-16);
    }

    h1 {
        font-size: var(--text-3xl);
    }

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

    h3 {
        font-size: var(--text-xl);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar--open {
        transform: translateX(0);
    }

    .toast {
        left: var(--space-4);
        right: var(--space-4);
        bottom: var(--space-4);
    }

    .toast__item {
        min-width: unset;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: var(--text-2xl);
    }

    .btn--xl {
        padding: 1rem 2rem;
        font-size: var(--text-base);
    }

    .modal {
        border-radius: var(--radius-xl);
    }
}

/* ============================================================
   END OF COMMON.CSS — DESH FUNDING
   ============================================================ */