/* ============================================================
   NelthaBudget Design System — v2.0
   Remplace Bootstrap. CSS auto-suffisant.
   Violet glassmorphism · Outfit + Inter
   ============================================================ */


/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
    color-scheme: light;

    /* Brand */
    --nb-primary:        #6d28d9;
    --nb-primary-hover:  #5b21b6;
    --nb-primary-light:  #7c3aed;
    --nb-primary-subtle: rgba(109, 40, 217, 0.08);
    --nb-primary-tint:   rgba(109, 40, 217, 0.12);

    /* Semantic colors */
    --nb-success:        #047857;
    --nb-success-bg:     rgba(16, 185, 129, 0.10);
    --nb-success-border: rgba(16, 185, 129, 0.25);
    --nb-danger:         #dc2626;
    --nb-danger-bg:      rgba(239, 68, 68, 0.10);
    --nb-danger-border:  rgba(239, 68, 68, 0.20);
    --nb-warning:        #b45309;
    --nb-warning-bg:     rgba(245, 158, 11, 0.10);
    --nb-warning-border: rgba(245, 158, 11, 0.25);
    --nb-info:           #0369a1;
    --nb-info-bg:        rgba(14, 165, 233, 0.10);
    --nb-info-border:    rgba(14, 165, 233, 0.25);

    /* Surfaces */
    --nb-surface:        rgba(255, 255, 255, 0.72);
    --nb-surface-hover:  rgba(255, 255, 255, 0.88);
    --nb-border:         rgba(255, 255, 255, 0.65);
    --nb-border-tint:    rgba(109, 40, 217, 0.10);
    --nb-bg:             #f5f3ff;

    /* Shadows */
    --nb-shadow-xs:  0 2px 8px -2px rgba(109, 40, 217, 0.06);
    --nb-shadow-sm:  0 4px 16px -4px rgba(109, 40, 217, 0.08);
    --nb-shadow-md:  0 12px 32px -12px rgba(109, 40, 217, 0.12);
    --nb-shadow-lg:  0 24px 48px -16px rgba(109, 40, 217, 0.16);
    --nb-shadow-btn: 0 6px 16px -4px rgba(109, 40, 217, 0.40);

    /* Radii */
    --nb-radius-xs: 8px;
    --nb-radius-sm: 12px;
    --nb-radius-md: 18px;
    --nb-radius-lg: 24px;

    /* Typography */
    --nb-font-display: 'Outfit', system-ui, sans-serif;
    --nb-font-body:    'Inter', system-ui, sans-serif;

    /* Layout */
    --nb-sidebar-w: 80px;

    /* Legacy aliases (keeps existing page CSS working) */
    --primary-color:    #6d28d9;
    --primary-hover:    #5b21b6;
    --primary-light:    #7c3aed;
    --db-primary:       #6d28d9;
    --db-primary-hover: #5b21b6;
    --db-primary-light: #7c3aed;
    --db-surface:       rgba(255,255,255,0.75);
    --db-border:        rgba(255,255,255,0.65);
    --db-border-tint:   rgba(109,40,217,0.10);
    --db-shadow-sm:     0 4px 16px -4px rgba(109,40,217,0.08);
    --db-shadow-md:     0 12px 32px -12px rgba(109,40,217,0.12);
    --db-shadow-lg:     0 24px 48px -16px rgba(109,40,217,0.16);
    --db-radius-sm:     12px;
    --db-radius-md:     18px;
    --db-radius-lg:     24px;
    --db-sidebar-w:     80px;
    --font-display:     'Outfit', system-ui, sans-serif;
    --font-body:        'Inter', system-ui, sans-serif;
    --card-shadow:      0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --input-shadow:     0 2px 4px rgba(0,0,0,0.05);
    --background-color: #f5f3ff;

    /* Grid */
    --grid-gutter-x: 1.5rem;
    --grid-gutter-y: 0;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: linear-gradient(135deg, #faf9fd 0%, #f4f1fa 100%);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding: 0;
    margin: 0;
    font-family: var(--nb-font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--nb-font-display);
    font-weight: 600;
    line-height: 1.25;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

p { margin-top: 0; margin-bottom: 1rem; }

a { color: var(--nb-primary); text-decoration: none; }
a:hover { color: var(--nb-primary-hover); }

img, svg { vertical-align: middle; max-width: 100%; }

ul, ol { padding-left: 1.5rem; margin-top: 0; margin-bottom: 1rem; }

strong, b { font-weight: 700; }

small, .small { font-size: 0.875em; }

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


/* ============================================================
   3. GRID SYSTEM (Bootstrap-compatible)
   ============================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: calc(var(--grid-gutter-x) * 0.5);
    padding-right: calc(var(--grid-gutter-x) * 0.5);
}
.container-fluid {
    width: 100%;
    padding-left: calc(var(--grid-gutter-x) * 0.5);
    padding-right: calc(var(--grid-gutter-x) * 0.5);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(var(--grid-gutter-y) * -1);
    margin-left: calc(var(--grid-gutter-x) * -0.5);
    margin-right: calc(var(--grid-gutter-x) * -0.5);
}
.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-left: calc(var(--grid-gutter-x) * 0.5);
    padding-right: calc(var(--grid-gutter-x) * 0.5);
    margin-top: var(--grid-gutter-y);
}

/* Gutter helpers */
.g-0  { --grid-gutter-x: 0;       --grid-gutter-y: 0; }
.g-1  { --grid-gutter-x: 0.25rem; --grid-gutter-y: 0.25rem; }
.g-2  { --grid-gutter-x: 0.5rem;  --grid-gutter-y: 0.5rem; }
.g-3  { --grid-gutter-x: 1rem;    --grid-gutter-y: 1rem; }
.g-4  { --grid-gutter-x: 1.5rem;  --grid-gutter-y: 1.5rem; }
.g-5  { --grid-gutter-x: 3rem;    --grid-gutter-y: 3rem; }
.gx-0 { --grid-gutter-x: 0; }
.gx-1 { --grid-gutter-x: 0.25rem; }
.gx-2 { --grid-gutter-x: 0.5rem; }
.gx-3 { --grid-gutter-x: 1rem; }
.gx-4 { --grid-gutter-x: 1.5rem; }
.gy-0 { --grid-gutter-y: 0; }
.gy-2 { --grid-gutter-y: 0.5rem; }
.gy-3 { --grid-gutter-y: 1rem; }
.gy-4 { --grid-gutter-y: 1.5rem; }

/* Column spans */
.col    { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-1  { flex: 0 0 auto; width:  8.3333%; }
.col-2  { flex: 0 0 auto; width: 16.6667%; }
.col-3  { flex: 0 0 auto; width: 25%; }
.col-4  { flex: 0 0 auto; width: 33.3333%; }
.col-5  { flex: 0 0 auto; width: 41.6667%; }
.col-6  { flex: 0 0 auto; width: 50%; }
.col-7  { flex: 0 0 auto; width: 58.3333%; }
.col-8  { flex: 0 0 auto; width: 66.6667%; }
.col-9  { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.3333%; }
.col-11 { flex: 0 0 auto; width: 91.6667%; }
.col-12 { flex: 0 0 auto; width: 100%; }

/* Responsive: md ≥ 768px */
@media (min-width: 768px) {
    .col-md      { flex: 1 0 0%; }
    .col-md-auto { flex: 0 0 auto; width: auto; }
    .col-md-1    { flex: 0 0 auto; width:  8.3333%; }
    .col-md-2    { flex: 0 0 auto; width: 16.6667%; }
    .col-md-3    { flex: 0 0 auto; width: 25%; }
    .col-md-4    { flex: 0 0 auto; width: 33.3333%; }
    .col-md-5    { flex: 0 0 auto; width: 41.6667%; }
    .col-md-6    { flex: 0 0 auto; width: 50%; }
    .col-md-7    { flex: 0 0 auto; width: 58.3333%; }
    .col-md-8    { flex: 0 0 auto; width: 66.6667%; }
    .col-md-9    { flex: 0 0 auto; width: 75%; }
    .col-md-10   { flex: 0 0 auto; width: 83.3333%; }
    .col-md-11   { flex: 0 0 auto; width: 91.6667%; }
    .col-md-12   { flex: 0 0 auto; width: 100%; }
    .d-md-flex   { display: flex !important; }
    .d-md-block  { display: block !important; }
    .d-md-none   { display: none !important; }
    .justify-content-md-end    { justify-content: flex-end !important; }
    .justify-content-md-center { justify-content: center !important; }
    .mb-md-0 { margin-bottom: 0 !important; }
    .mt-md-0 { margin-top: 0 !important; }
}

/* Responsive: lg ≥ 992px */
@media (min-width: 992px) {
    .col-lg      { flex: 1 0 0%; }
    .col-lg-auto { flex: 0 0 auto; width: auto; }
    .col-lg-1    { flex: 0 0 auto; width:  8.3333%; }
    .col-lg-2    { flex: 0 0 auto; width: 16.6667%; }
    .col-lg-3    { flex: 0 0 auto; width: 25%; }
    .col-lg-4    { flex: 0 0 auto; width: 33.3333%; }
    .col-lg-5    { flex: 0 0 auto; width: 41.6667%; }
    .col-lg-6    { flex: 0 0 auto; width: 50%; }
    .col-lg-7    { flex: 0 0 auto; width: 58.3333%; }
    .col-lg-8    { flex: 0 0 auto; width: 66.6667%; }
    .col-lg-9    { flex: 0 0 auto; width: 75%; }
    .col-lg-10   { flex: 0 0 auto; width: 83.3333%; }
    .col-lg-11   { flex: 0 0 auto; width: 91.6667%; }
    .col-lg-12   { flex: 0 0 auto; width: 100%; }
    .mb-lg-0 { margin-bottom: 0 !important; }
    .mt-lg-0 { margin-top: 0 !important; }
}

/* Responsive: xl ≥ 1200px */
@media (min-width: 1200px) {
    .col-xl-3    { flex: 0 0 auto; width: 25%; }
    .col-xl-4    { flex: 0 0 auto; width: 33.3333%; }
    .col-xl-6    { flex: 0 0 auto; width: 50%; }
}

/* row-cols */
.row-cols-1 > * { flex: 0 0 auto; width: 100%; }
.row-cols-2 > * { flex: 0 0 auto; width: 50%; }
@media (min-width: 768px) {
    .row-cols-md-2 > * { flex: 0 0 auto; width: 50%; }
    .row-cols-md-3 > * { flex: 0 0 auto; width: 33.3333%; }
    .row-cols-md-4 > * { flex: 0 0 auto; width: 25%; }
}


/* ============================================================
   4. DISPLAY & FLEX UTILITIES
   ============================================================ */
.d-none        { display: none !important; }
.d-block       { display: block !important; }
.d-inline      { display: inline !important; }
.d-inline-block{ display: inline-block !important; }
.d-flex        { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid        { display: grid !important; }

.flex-row     { flex-direction: row !important; }
.flex-column  { flex-direction: column !important; }
.flex-wrap    { flex-wrap: wrap !important; }
.flex-nowrap  { flex-wrap: nowrap !important; }
.flex-fill    { flex: 1 1 auto !important; }
.flex-grow-1  { flex-grow: 1 !important; }
.flex-grow-0  { flex-grow: 0 !important; }
.flex-shrink-0{ flex-shrink: 0 !important; }
.flex-shrink-1{ flex-shrink: 1 !important; }

.align-items-start    { align-items: flex-start !important; }
.align-items-end      { align-items: flex-end !important; }
.align-items-center   { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch  { align-items: stretch !important; }
.align-self-start     { align-self: flex-start !important; }
.align-self-end       { align-self: flex-end !important; }
.align-self-center    { align-self: center !important; }

.justify-content-start   { justify-content: flex-start !important; }
.justify-content-end     { justify-content: flex-end !important; }
.justify-content-center  { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around  { justify-content: space-around !important; }
.justify-content-evenly  { justify-content: space-evenly !important; }

.gap-0 { gap: 0 !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }


/* ============================================================
   5. SPACING UTILITIES
   ============================================================ */
/* Margin */
.m-0  { margin: 0 !important; }
.m-1  { margin: 0.25rem !important; }
.m-2  { margin: 0.5rem !important; }
.m-3  { margin: 1rem !important; }
.m-4  { margin: 1.5rem !important; }
.m-5  { margin: 3rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.ms-auto { margin-left: auto !important; }
.me-auto { margin-right: auto !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.me-4 { margin-right: 1.5rem !important; }
.me-5 { margin-right: 3rem !important; }

.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.ms-4 { margin-left: 1.5rem !important; }

.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }

/* Padding */
.p-0  { padding: 0 !important; }
.p-1  { padding: 0.25rem !important; }
.p-2  { padding: 0.5rem !important; }
.p-3  { padding: 1rem !important; }
.p-4  { padding: 1.5rem !important; }
.p-5  { padding: 3rem !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }

.pe-0 { padding-right: 0 !important; }
.pe-1 { padding-right: 0.25rem !important; }
.pe-2 { padding-right: 0.5rem !important; }
.pe-3 { padding-right: 1rem !important; }
.pe-4 { padding-right: 1.5rem !important; }

.ps-0 { padding-left: 0 !important; }
.ps-1 { padding-left: 0.25rem !important; }
.ps-2 { padding-left: 0.5rem !important; }
.ps-3 { padding-left: 1rem !important; }
.ps-4 { padding-left: 1.5rem !important; }

.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }


/* ============================================================
   6. TYPOGRAPHY UTILITIES
   ============================================================ */
.text-start   { text-align: left !important; }
.text-center  { text-align: center !important; }
.text-end     { text-align: right !important; }

.fw-light    { font-weight: 300 !important; }
.fw-normal   { font-weight: 400 !important; }
.fw-medium   { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold     { font-weight: 700 !important; }

.fst-italic  { font-style: italic !important; }
.fst-normal  { font-style: normal !important; }

.fs-1 { font-size: 2.5rem !important; }
.fs-2 { font-size: 2rem !important; }
.fs-3 { font-size: 1.75rem !important; }
.fs-4 { font-size: 1.5rem !important; }
.fs-5 { font-size: 1.25rem !important; }
.fs-6 { font-size: 1rem !important; }

/* Font-size icon helpers */
.fs-1.bi, .display-1 { font-size: 2.5rem; }
.fs-2.bi              { font-size: 2rem; }
.fs-3.bi, .fs-3       { font-size: 1.75rem; }
.fs-4.bi              { font-size: 1.5rem; }

.lh-1    { line-height: 1 !important; }
.lh-sm   { line-height: 1.25 !important; }
.lh-base { line-height: 1.6 !important; }

.text-decoration-none { text-decoration: none !important; }
.text-decoration-underline { text-decoration: underline !important; }

.text-uppercase  { text-transform: uppercase !important; }
.text-lowercase  { text-transform: lowercase !important; }
.text-capitalize { text-transform: capitalize !important; }

/* Display sizes (large headings) */
.display-1 { font-size: 5rem; font-weight: 700; line-height: 1.1; }
.display-2 { font-size: 4.5rem; font-weight: 700; line-height: 1.1; }
.display-3 { font-size: 4rem; font-weight: 700; line-height: 1.1; }
.display-4 { font-size: 3.5rem; font-weight: 700; line-height: 1.1; }
.display-5 { font-size: 3rem; font-weight: 700; line-height: 1.1; }
.display-6 { font-size: 2.5rem; font-weight: 700; line-height: 1.1; }

/* Semantic text colors */
.text-muted     { color: #64748b !important; }
.text-primary   { color: var(--nb-primary) !important; }
.text-secondary { color: #64748b !important; }
.text-success   { color: var(--nb-success) !important; }
.text-danger    { color: var(--nb-danger) !important; }
.text-warning   { color: var(--nb-warning) !important; }
.text-info      { color: var(--nb-info) !important; }
.text-dark      { color: #1e293b !important; }
.text-white     { color: #fff !important; }
.text-body      { color: #1e293b !important; }

/* Font-family */
.font-display { font-family: var(--nb-font-display) !important; }


/* ============================================================
   7. BACKGROUND UTILITIES
   ============================================================ */
.bg-white    { background-color: #fff !important; }
.bg-light    { background-color: rgba(245, 243, 255, 0.6) !important; }
.bg-dark     { background-color: #1e293b !important; }
.bg-transparent { background-color: transparent !important; }
.bg-primary  { background-color: var(--nb-primary) !important; }
.bg-success  { background-color: var(--nb-success) !important; }
.bg-danger   { background-color: var(--nb-danger) !important; }
.bg-warning  { background-color: var(--nb-warning) !important; }
.bg-info     { background-color: var(--nb-info) !important; }
.bg-secondary { background-color: #64748b !important; }
.bg-secondary-subtle { background-color: rgba(100, 116, 139, 0.08) !important; }
.bg-success-subtle   { background-color: var(--nb-success-bg) !important; }
.bg-danger-subtle    { background-color: var(--nb-danger-bg) !important; }

/* Opacity modifiers for bg (via separate element not supported — use inline or component-level) */
.bg-opacity-10  { --nb-bg-opacity: 0.10; }
.bg-opacity-25  { --nb-bg-opacity: 0.25; }
.bg-opacity-50  { --nb-bg-opacity: 0.50; }
.bg-opacity-75  { --nb-bg-opacity: 0.75; }

/* Contextual combos used in badges/pills */
.bg-success.bg-opacity-10 { background-color: var(--nb-success-bg) !important; }
.bg-danger.bg-opacity-10  { background-color: var(--nb-danger-bg) !important; }
.bg-warning.bg-opacity-10 { background-color: var(--nb-warning-bg) !important; }
.bg-info.bg-opacity-10    { background-color: var(--nb-info-bg) !important; }
.bg-primary.bg-opacity-10 { background-color: var(--nb-primary-subtle) !important; }


/* ============================================================
   8. BORDER & RADIUS UTILITIES
   ============================================================ */
.border        { border: 1px solid rgba(109, 40, 217, 0.12) !important; }
.border-0      { border: 0 !important; }
.border-top    { border-top: 1px solid rgba(109, 40, 217, 0.10) !important; }
.border-bottom { border-bottom: 1px solid rgba(109, 40, 217, 0.10) !important; }
.border-start  { border-left: 1px solid rgba(109, 40, 217, 0.10) !important; }
.border-end    { border-right: 1px solid rgba(109, 40, 217, 0.10) !important; }
.border-2      { border-width: 2px !important; }

.border-primary { border-color: var(--nb-primary) !important; }
.border-success { border-color: var(--nb-success) !important; }
.border-danger  { border-color: var(--nb-danger) !important; }
.border-warning { border-color: var(--nb-warning) !important; }

.rounded        { border-radius: var(--nb-radius-sm) !important; }
.rounded-0      { border-radius: 0 !important; }
.rounded-1      { border-radius: 4px !important; }
.rounded-2      { border-radius: 8px !important; }
.rounded-3      { border-radius: var(--nb-radius-sm) !important; }
.rounded-4      { border-radius: var(--nb-radius-md) !important; }
.rounded-5      { border-radius: var(--nb-radius-lg) !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-pill   { border-radius: 999px !important; }
.rounded-lg     { border-radius: var(--nb-radius-lg) !important; }


/* ============================================================
   9. SIZING & OVERFLOW
   ============================================================ */
.w-100  { width: 100% !important; }
.w-75   { width: 75% !important; }
.w-50   { width: 50% !important; }
.w-25   { width: 25% !important; }
.w-auto { width: auto !important; }
.h-100  { height: 100% !important; }
.h-50   { height: 50% !important; }
.h-auto { height: auto !important; }
.mw-100 { max-width: 100% !important; }
.vw-100 { width: 100vw !important; }
.min-vw-100 { min-width: 100vw !important; }

/* Min-width helpers */
.min-width-0 { min-width: 0 !important; }
.min-w-0     { min-width: 0 !important; }

.overflow-hidden { overflow: hidden !important; }
.overflow-auto   { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }
.overflow-visible{ overflow: visible !important; }

.opacity-0  { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100{ opacity: 1 !important; }

.cursor-pointer { cursor: pointer !important; }
.user-select-none { user-select: none !important; }

.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed    { position: fixed !important; }
.position-sticky   { position: sticky !important; }

.top-0    { top: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.start-0  { left: 0 !important; }
.end-0    { right: 0 !important; }

.shadow-sm { box-shadow: var(--nb-shadow-xs) !important; }
.shadow    { box-shadow: var(--nb-shadow-sm) !important; }
.shadow-lg { box-shadow: var(--nb-shadow-md) !important; }
.shadow-none { box-shadow: none !important; }


/* ============================================================
   10. APP SHELL — sidebar + main layout
   ============================================================ */
.db-shell {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: clip;
    background: linear-gradient(135deg, #faf9fd 0%, #f4f1fa 100%);
    position: relative;
}
.db-shell::before, .db-shell::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.db-shell::before {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(196,181,253,.35) 0%, transparent 70%);
    top: -150px; left: -100px;
}
.db-shell::after {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(167,139,250,.18) 0%, transparent 70%);
    bottom: -200px; right: -150px;
}

.db-sidebar {
    width: var(--nb-sidebar-w);
    flex-shrink: 0;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--nb-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    justify-content: space-between;
    z-index: 50;
    box-shadow: 4px 0 24px rgba(109,40,217,.04);
}
.db-sidebar-top, .db-sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.db-logo {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--nb-primary), var(--nb-primary-light));
    border-radius: var(--nb-radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-family: var(--nb-font-display);
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    box-shadow: var(--nb-shadow-md);
    margin-bottom: 0.5rem;
    transition: transform .2s, box-shadow .2s;
}
.db-logo:hover { transform: translateY(-2px); box-shadow: var(--nb-shadow-lg); color: #fff; }

.db-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 1rem;
}
.db-nav-item {
    width: 44px; height: 44px;
    border-radius: var(--nb-radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    transition: background .2s, color .2s, transform .2s;
    font-size: 1.25rem;
}
.db-nav-item:hover { background: var(--nb-primary-subtle); color: var(--nb-primary); transform: translateX(2px); }
.db-nav-item.active { background: var(--nb-primary-tint); color: var(--nb-primary); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.db-nav-item--add { background: var(--nb-primary); color: #fff !important; box-shadow: var(--nb-shadow-md); margin-top: .5rem; }
.db-nav-item--add:hover { background: var(--nb-primary-hover) !important; transform: translateX(2px) scale(1.05); }

.db-nav-divider { width: 24px; height: 1px; background: rgba(109,40,217,.10); margin: .25rem auto; }

.db-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nb-primary), var(--nb-primary-light));
    color: #fff;
    font-family: var(--nb-font-display);
    font-weight: 600;
    font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
    box-shadow: var(--nb-shadow-sm);
    cursor: default;
}

.nb-main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}
.nb-main::-webkit-scrollbar { width: 6px; }
.nb-main::-webkit-scrollbar-track { background: transparent; }
.nb-main::-webkit-scrollbar-thumb { background: rgba(109,40,217,.15); border-radius: 999px; }
.nb-main::-webkit-scrollbar-thumb:hover { background: rgba(109,40,217,.3); }


/* ============================================================
   11. PAGE HEADER & BREADCRUMBS
   ============================================================ */
.nb-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2.5rem;
    position: sticky;
    top: 0;
    background: rgba(250,249,253,.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,.6);
    box-shadow: 0 1px 0 rgba(255,255,255,.8), 0 4px 16px -8px rgba(109,40,217,.06);
    z-index: 40;
    flex-shrink: 0;
    gap: 1rem;
}
.nb-page-header-info { display: flex; flex-direction: column; gap: .15rem; }
.nb-header-actions   { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }

.nb-page-breadcrumb {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .7rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0;
}
.nb-page-breadcrumb .bc-active { color: var(--nb-primary); }
.nb-page-breadcrumb .bc-link   { color: var(--nb-primary); text-decoration: none; opacity: .75; }
.nb-page-breadcrumb .bc-link:hover { opacity: 1; text-decoration: underline; }

.nb-page-title {
    font-family: var(--nb-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -.025em;
    margin: 0;
}
.nb-page-subtitle { font-size: .8rem; color: #64748b; margin: .1rem 0 0; }

.nb-page-content { flex: 1; padding: 1.5rem 2.5rem 2.5rem; }
.nb-form-wrap    { max-width: 820px; margin: 0 auto; }

.nb-footer {
    flex-shrink: 0;
    background: rgba(255,255,255,.45);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(109,40,217,.06);
    padding: .75rem 2.5rem;
    text-align: center;
    font-size: .75rem;
    color: #9ca3af;
}

.nb-section-title {
    font-family: var(--nb-font-display);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #94a3b8;
    margin: 1.5rem 0 .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(109,40,217,.06);
}


/* ============================================================
   12. BUTTONS
   ============================================================ */

/* Base btn reset */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .55rem 1.25rem;
    font-family: var(--nb-font-body);
    font-size: .88rem;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: var(--nb-radius-sm);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s, box-shadow .2s, transform .15s, border-color .2s, color .2s;
    vertical-align: middle;
    user-select: none;
}
.btn:focus-visible { outline: 2px solid var(--nb-primary); outline-offset: 2px; }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* Solid primary */
.btn-primary {
    background: linear-gradient(135deg, var(--nb-primary) 0%, var(--nb-primary-light) 100%);
    color: #fff;
    border-color: rgba(109,40,217,.2);
    box-shadow: 0 4px 12px -4px rgba(109,40,217,.35);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--nb-primary-hover) 0%, var(--nb-primary) 100%); box-shadow: 0 8px 20px -6px rgba(109,40,217,.45); transform: translateY(-1px); color: #fff; }
.btn-primary:active { transform: translateY(0); }

/* Solid secondary */
.btn-secondary {
    background: rgba(255,255,255,.8);
    color: #475569;
    border-color: rgba(100,116,139,.2);
    box-shadow: var(--nb-shadow-xs);
}
.btn-secondary:hover { background: rgba(255,255,255,.95); color: #1e293b; box-shadow: var(--nb-shadow-sm); transform: translateY(-1px); }

/* Solid success */
.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    border-color: rgba(16,185,129,.2);
    box-shadow: 0 4px 12px -4px rgba(16,185,129,.3);
}
.btn-success:hover { background: linear-gradient(135deg, #047857, #059669); color: #fff; transform: translateY(-1px); }

/* Solid danger */
.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    border-color: rgba(239,68,68,.2);
    box-shadow: 0 4px 12px -4px rgba(239,68,68,.3);
}
.btn-danger:hover { background: linear-gradient(135deg, #b91c1c, #dc2626); color: #fff; transform: translateY(-1px); }

/* Solid warning */
.btn-warning {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #fff;
    border-color: rgba(245,158,11,.2);
}
.btn-warning:hover { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; transform: translateY(-1px); }

/* Solid info */
.btn-info {
    background: linear-gradient(135deg, #0369a1, #0ea5e9);
    color: #fff;
    border-color: rgba(14,165,233,.2);
}
.btn-info:hover { transform: translateY(-1px); color: #fff; }

/* Outline variants */
.btn-outline-primary {
    background: transparent;
    color: var(--nb-primary);
    border-color: rgba(109,40,217,.3);
}
.btn-outline-primary:hover { background: var(--nb-primary-subtle); border-color: var(--nb-primary); color: var(--nb-primary); }

.btn-outline-secondary {
    background: rgba(255,255,255,.65);
    color: #475569;
    border-color: rgba(100,116,139,.2);
}
.btn-outline-secondary:hover { background: rgba(255,255,255,.9); color: #1e293b; }

.btn-outline-danger {
    background: transparent;
    color: var(--nb-danger);
    border-color: rgba(239,68,68,.3);
}
.btn-outline-danger:hover { background: var(--nb-danger-bg); border-color: var(--nb-danger); }

.btn-outline-success {
    background: transparent;
    color: var(--nb-success);
    border-color: rgba(16,185,129,.3);
}
.btn-outline-success:hover { background: var(--nb-success-bg); border-color: var(--nb-success); }

.btn-outline-info {
    background: transparent;
    color: var(--nb-info);
    border-color: rgba(14,165,233,.3);
}
.btn-outline-info:hover { background: var(--nb-info-bg); border-color: var(--nb-info); }

/* Link button */
.btn-link { background: none; border-color: transparent; color: var(--nb-primary); padding-left: 0; padding-right: 0; box-shadow: none; }
.btn-link:hover { color: var(--nb-primary-hover); text-decoration: underline; }

/* Sizes */
.btn-sm { padding: .3rem .75rem; font-size: .8rem; border-radius: var(--nb-radius-xs); }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; border-radius: var(--nb-radius-md); }

/* Close button */
.btn-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    background: rgba(100,116,139,.1);
    border: none;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    font-size: .85rem;
    transition: background .2s, color .2s;
    flex-shrink: 0;
    padding: 0;
}
.btn-close::before { content: '×'; font-size: 1.2rem; line-height: 1; }
.btn-close:hover { background: rgba(239,68,68,.12); color: var(--nb-danger); }

/* Button group */
.btn-group { display: inline-flex; border-radius: var(--nb-radius-sm); overflow: hidden; }
.btn-group .btn { border-radius: 0; border-right-width: 0; }
.btn-group .btn:first-child { border-radius: var(--nb-radius-sm) 0 0 var(--nb-radius-sm); }
.btn-group .btn:last-child  { border-radius: 0 var(--nb-radius-sm) var(--nb-radius-sm) 0; border-right-width: 1px; }
.btn-group-sm .btn, .btn-group .btn-sm { padding: .28rem .6rem; font-size: .78rem; }
.btn-group-vertical { flex-direction: column; }

/* Check button */
.btn-check { position: absolute; clip: rect(0,0,0,0); pointer-events: none; }

/* Action btn (internal design system — alias for primary) */
.nb-action-btn,
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem 1.25rem;
    background: linear-gradient(135deg, var(--nb-primary) 0%, var(--nb-primary-light) 100%);
    color: #fff;
    font-size: .85rem;
    font-weight: 500;
    border-radius: var(--nb-radius-sm);
    border: 1px solid rgba(109,40,217,.2);
    box-shadow: 0 6px 16px -4px rgba(109,40,217,.4);
    cursor: pointer;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, background .2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.nb-action-btn:hover, .action-btn:hover {
    background: linear-gradient(135deg, var(--nb-primary-hover) 0%, var(--nb-primary) 100%);
    box-shadow: 0 10px 24px -6px rgba(109,40,217,.5);
    transform: translateY(-1px);
    color: #fff;
}
.nb-action-btn:active, .action-btn:active { transform: translateY(0); }

.nb-action-btn-outline,
.action-btn-outline {
    background: rgba(255,255,255,.7);
    color: var(--nb-primary);
    border: 1px solid rgba(109,40,217,.2);
    box-shadow: 0 2px 8px -2px rgba(109,40,217,.08);
}
.nb-action-btn-outline:hover, .action-btn-outline:hover {
    background: rgba(255,255,255,.95);
    box-shadow: 0 4px 12px -4px rgba(109,40,217,.15);
    transform: translateY(-1px);
    color: var(--nb-primary);
}
.action-btn-primary {
    background: linear-gradient(135deg, var(--nb-primary) 0%, var(--nb-primary-light) 100%);
    box-shadow: 0 6px 16px -4px rgba(109,40,217,.4);
}


/* ============================================================
   13. FORMS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    color: #374151;
    font-weight: 500;
    font-size: .92rem;
    margin-bottom: .5rem;
}

.form-control,
.form-select,
textarea.form-control {
    display: block;
    width: 100%;
    padding: .75rem 1rem;
    font-family: var(--nb-font-body);
    font-size: .92rem;
    font-weight: 400;
    line-height: 1.5;
    color: #1e293b;
    background-color: rgba(255,255,255,.9);
    background-clip: padding-box;
    border: 1.5px solid #e2d9f3;
    border-radius: var(--nb-radius-sm);
    box-shadow: 0 1px 4px rgba(109,40,217,.05);
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
}
.form-control::placeholder { color: #94a3b8; opacity: 1; }
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--nb-primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(109,40,217,.10), 0 1px 4px rgba(109,40,217,.05);
}
.form-control:disabled,
.form-select:disabled {
    background-color: rgba(245,243,255,.6);
    color: #94a3b8;
    cursor: not-allowed;
}
.form-control-sm { padding: .4rem .75rem; font-size: .82rem; }
.form-control-lg { padding: 1rem 1.25rem; font-size: 1rem; }

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236d28d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .85rem center;
    background-size: 14px 10px;
    padding-right: 2.5rem;
    cursor: pointer;
}

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

/* Validation states */
.form-control.is-valid,
.form-select.is-valid  { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.1); }
.form-control.is-invalid,
.form-select.is-invalid { border-color: var(--nb-danger); box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.valid-feedback   { display: none; font-size: .8rem; color: #047857; margin-top: .3rem; }
.invalid-feedback { display: none; font-size: .8rem; color: var(--nb-danger); margin-top: .3rem; }
.is-valid  ~ .valid-feedback,
.is-invalid~ .invalid-feedback { display: block; }
.form-text { font-size: .8rem; color: #64748b; margin-top: .35rem; }

/* Checkbox / radio */
.form-check { display: flex; align-items: center; gap: .5rem; min-height: 1.5rem; padding: .2rem 0; margin-bottom: .4rem; }
.form-check-input {
    width: 1rem; height: 1rem;
    flex-shrink: 0;
    appearance: none;
    border: 1.5px solid #c4b5fd;
    border-radius: .25rem;
    background-color: rgba(255,255,255,.9);
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.form-check-input[type="radio"]  { border-radius: 50%; }
.form-check-input:checked { background-color: var(--nb-primary); border-color: var(--nb-primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23fff' d='M8.5 14.5l-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: .75rem; }
.form-check-input[type="radio"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='4' fill='%23fff'/%3E%3C/svg%3E"); }
.form-check-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(109,40,217,.15); }
.form-check-label { font-size: .9rem; color: #374151; cursor: pointer; }

/* Input group */
.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    border-radius: var(--nb-radius-sm);
    overflow: hidden;
}
.input-group .form-control,
.input-group .form-select {
    border-radius: 0;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    border-right-width: 0;
}
.input-group .form-control:focus { z-index: 3; }
.input-group > .form-control:last-child,
.input-group > .btn:last-child { border-radius: 0 var(--nb-radius-sm) var(--nb-radius-sm) 0; }
.input-group > .form-control:first-child,
.input-group > .btn:first-child { border-radius: var(--nb-radius-sm) 0 0 var(--nb-radius-sm); }

.input-group-text {
    display: flex;
    align-items: center;
    padding: .75rem .9rem;
    font-size: .9rem;
    color: #64748b;
    background-color: rgba(245,243,255,.8);
    border: 1.5px solid #e2d9f3;
    white-space: nowrap;
}
.input-group-text:first-child { border-radius: var(--nb-radius-sm) 0 0 var(--nb-radius-sm); border-right: none; }
.input-group-text:last-child  { border-radius: 0 var(--nb-radius-sm) var(--nb-radius-sm) 0; border-left: none; }

.input-group .btn {
    border-radius: 0;
    border-left-width: 0;
    flex-shrink: 0;
    z-index: 2;
}
.input-group .btn:last-child { border-radius: 0 var(--nb-radius-sm) var(--nb-radius-sm) 0; }
.input-group .btn:first-child { border-radius: var(--nb-radius-sm) 0 0 var(--nb-radius-sm); border-left-width: 1px; }

/* Form switch (toggle) */
.form-switch { padding-left: 2.75rem; }
.form-switch .form-check-input {
    width: 2rem;
    height: 1.1rem;
    border-radius: 999px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23aaa'/%3E%3C/svg%3E");
    background-position: left center;
    transition: background-position .15s ease, background-color .15s ease;
    margin-left: -2.75rem;
}
.form-switch .form-check-input:checked {
    background-color: var(--nb-primary);
    border-color: var(--nb-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E");
    background-position: right center;
}

/* Horizontal form label (crispy forms) */
.col-form-label {
    padding-top: calc(.75rem + 1.5px);
    padding-bottom: calc(.75rem + 1.5px);
    line-height: 1.5;
    font-weight: 500;
    color: #374151;
    font-size: .92rem;
}
.col-form-label-sm { padding-top: calc(.35rem + 1.5px); padding-bottom: calc(.35rem + 1.5px); font-size: .8rem; }

/* Form validation states (was-validated pattern) */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid { border-color: var(--nb-danger); box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.was-validated .form-control:valid,
.was-validated .form-select:valid   { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.1); }
.was-validated :invalid ~ .invalid-feedback { display: block; }
.was-validated :valid   ~ .valid-feedback   { display: block; }

/* Crispy forms — asterisk & required markers */
.asteriskField { color: var(--nb-danger); margin-left: .15rem; font-size: .8em; }
.requiredField::after { content: ''; }

/* Form inline check */
.form-check-inline { display: inline-flex; align-items: center; margin-right: 1rem; }

/* Crispy forms compatibility */
.errorlist { list-style: none; padding: 0; margin: .3rem 0 0; }
.errorlist li { font-size: .8rem; color: var(--nb-danger); }


/* ============================================================
   14. CARDS
   ============================================================ */
.glass {
    background: var(--nb-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--nb-border);
    box-shadow: var(--nb-shadow-md), inset 0 1px 0 rgba(255,255,255,1);
}

/* Base card */
.card {
    background: var(--nb-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--nb-radius-lg);
    border: 1px solid var(--nb-border);
    box-shadow: var(--nb-shadow-md), inset 0 1px 0 rgba(255,255,255,1);
    overflow: hidden;
    transition: box-shadow .25s, transform .25s;
}
.card:hover { box-shadow: 0 20px 40px -16px rgba(109,40,217,.14), inset 0 1px 0 rgba(255,255,255,1); }

.card-header {
    background: rgba(255,255,255,.5);
    border-bottom: 1px solid rgba(109,40,217,.08);
    padding: 1.1rem 1.5rem;
}
.card-header h5,
.card-header h6,
.card-header .card-title { color: #1e293b; font-family: var(--nb-font-display); }
.card-header i { color: var(--nb-primary); }

.card-header.card-header--gradient {
    background: linear-gradient(135deg, var(--nb-primary) 0%, var(--nb-primary-light) 100%);
    color: #fff;
    border-bottom: none;
}
.card-header.card-header--gradient h5,
.card-header.card-header--gradient h6,
.card-header.card-header--gradient i { color: #fff; }

.card-body  { padding: 1.5rem; }
.card-footer {
    padding: 1rem 1.5rem;
    background: rgba(245,243,255,.4);
    border-top: 1px solid rgba(109,40,217,.06);
}
.card-title { font-family: var(--nb-font-display); font-size: 1.05rem; font-weight: 600; }
.card-text  { color: #64748b; font-size: .9rem; }

/* Named card variants */
.dashboard-card {
    background: var(--nb-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--nb-radius-lg);
    border: 1px solid var(--nb-border);
    box-shadow: var(--nb-shadow-md), inset 0 1px 0 rgba(255,255,255,1);
    overflow: hidden;
}
.dashboard-card > .card-header {
    background: rgba(255,255,255,.5);
    border-bottom: 1px solid rgba(109,40,217,.08);
    padding: 1.1rem 1.5rem;
}

.budget-card {
    background: var(--nb-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: var(--nb-radius-md);
    box-shadow: 0 4px 16px -4px rgba(109,40,217,.08), inset 0 1px 0 rgba(255,255,255,.9);
    transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s;
    cursor: pointer;
}
.budget-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -12px rgba(109,40,217,.15), inset 0 1px 0 rgba(255,255,255,.9); }
.budget-card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(109,40,217,.06); background: rgba(255,255,255,.5); border-radius: var(--nb-radius-md) var(--nb-radius-md) 0 0; }
.budget-card-body   { padding: 1rem 1.5rem; }
.budget-card-footer { padding: 1rem 1.5rem; background: rgba(245,243,255,.4); border-top: 1px solid rgba(109,40,217,.06); border-radius: 0 0 var(--nb-radius-md) var(--nb-radius-md); }

/* Page card for form wrappers */
.page-card {
    background: var(--nb-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--nb-radius-lg);
    border: 1px solid var(--nb-border);
    box-shadow: var(--nb-shadow-md), inset 0 1px 0 rgba(255,255,255,1);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.page-card > .card-header {
    background: rgba(255,255,255,.5);
    border-bottom: 1px solid rgba(109,40,217,.08);
    padding: 1.1rem 1.5rem;
}


/* ============================================================
   15. TABLES
   ============================================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--nb-radius-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
    color: #1e293b;
}
.table th {
    background: rgba(245,243,255,.7);
    color: #64748b;
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .65rem .85rem;
    border-bottom: 1px solid rgba(109,40,217,.08);
    white-space: nowrap;
}
.table td {
    padding: .7rem .85rem;
    border-bottom: 1px solid rgba(109,40,217,.05);
    color: #334155;
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover { background: rgba(109,40,217,.03); transition: background .15s; }
.table-striped tbody tr:nth-child(even) { background: rgba(245,243,255,.4); }
.table-bordered th, .table-bordered td { border: 1px solid rgba(109,40,217,.08); }
.table-sm th, .table-sm td { padding: .35rem .6rem; }

/* Align helpers within table cells */
.align-middle { vertical-align: middle !important; }
.align-top    { vertical-align: top !important; }
.align-bottom { vertical-align: bottom !important; }

/* Dashboard compact table overrides */
.db-shell .table td   { padding: .55rem .6rem; }
.db-shell .table th   { padding: .5rem .6rem; background: transparent; color: #6b7280; border-bottom: 1px solid rgba(109,40,217,.08); }

/* Transactions-specific table */
.transactions-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.transactions-table th { background: rgba(245,243,255,.7); color: #64748b; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .75rem 1rem; border-bottom: 1px solid rgba(109,40,217,.08); }
.transactions-table td { padding: .75rem 1rem; border-bottom: 1px solid rgba(109,40,217,.04); color: #334155; vertical-align: middle; }
.transactions-table tbody tr:hover { background: rgba(109,40,217,.025); }


/* ============================================================
   16. BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .28rem .65rem;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 999px;
    letter-spacing: .02em;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* Color variants — all use opaque tinted backgrounds */
.badge.bg-success,
.badge-status-validated { background: var(--nb-success-bg) !important; color: var(--nb-success) !important; border-color: var(--nb-success-border) !important; }
.badge.bg-danger,
.badge-status-rejected  { background: var(--nb-danger-bg) !important; color: var(--nb-danger) !important; border-color: var(--nb-danger-border) !important; }
.badge.bg-warning,
.badge-status-pending   { background: var(--nb-warning-bg) !important; color: var(--nb-warning) !important; border-color: var(--nb-warning-border) !important; }
.badge.bg-info          { background: var(--nb-info-bg) !important; color: var(--nb-info) !important; border-color: var(--nb-info-border) !important; }
.badge.bg-primary       { background: var(--nb-primary-subtle) !important; color: var(--nb-primary) !important; border-color: var(--nb-primary-tint) !important; }
.badge.bg-secondary,
.badge.bg-secondary-subtle { background: rgba(100,116,139,.09) !important; color: #475569 !important; border-color: rgba(100,116,139,.2) !important; }
.badge.bg-dark          { background: rgba(30,41,59,.08) !important; color: #1e293b !important; border-color: rgba(30,41,59,.15) !important; }
.badge.bg-light         { background: rgba(245,243,255,.8) !important; color: #64748b !important; border-color: rgba(109,40,217,.08) !important; }

/* Text color modifiers on tinted badges */
.text-success { color: var(--nb-success) !important; }
.text-danger  { color: var(--nb-danger) !important; }
.text-warning { color: var(--nb-warning) !important; }
.text-info    { color: var(--nb-info) !important; }
.text-primary { color: var(--nb-primary) !important; }

/* Explicit text-dark on badge overrides badge color */
.badge.text-dark { color: #1e293b !important; }


/* ============================================================
   17. MODALS
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050;
    overflow-x: hidden;
    overflow-y: auto;
}
.modal.show { display: flex; align-items: center; justify-content: center; }
.modal.fade { opacity: 0; transition: opacity .2s; }
.modal.fade.show { opacity: 1; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 10, 30, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.modal-backdrop.fade       { opacity: 0; transition: opacity .2s; }
.modal-backdrop.fade.show  { opacity: 1; }

.modal-dialog {
    position: relative;
    width: auto;
    max-width: 500px;
    margin: 1.5rem auto;
    pointer-events: none;
}
.modal-dialog-centered { align-items: center; display: flex; min-height: calc(100% - 3rem); }
.modal-dialog-scrollable { max-height: calc(100% - 3rem); }
.modal-dialog-scrollable .modal-content { overflow: hidden; }
.modal-dialog-scrollable .modal-body { overflow-y: auto; }
.modal-lg { max-width: 800px; }
.modal-sm { max-width: 300px; }

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,.8);
    border-radius: var(--nb-radius-lg);
    box-shadow: 0 32px 64px -16px rgba(109,40,217,.25), 0 8px 24px -8px rgba(0,0,0,.12);
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: rgba(245,243,255,.5);
    border-bottom: 1px solid rgba(109,40,217,.08);
    gap: 1rem;
}
.modal-title { font-family: var(--nb-font-display); font-weight: 600; font-size: 1.05rem; color: #1e293b; margin: 0; }
.modal-body   { padding: 1.5rem; color: #334155; line-height: 1.65; }
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    padding: 1rem 1.5rem;
    background: rgba(245,243,255,.4);
    border-top: 1px solid rgba(109,40,217,.06);
}


/* ============================================================
   17b. TOASTS
   ============================================================ */
.toast-container {
    z-index: 1100;
}
.toast {
    display: none;
    min-width: 260px;
    max-width: 360px;
    border-radius: var(--nb-radius-sm);
    padding: 0;
    font-size: .875rem;
    box-shadow: var(--nb-shadow-md);
    opacity: 0;
    transition: opacity .2s ease;
}
.toast.show {
    display: flex;
    align-items: center;
    opacity: 1;
    margin-bottom: .5rem;
}
.toast-body {
    flex: 1;
    padding: .65rem 1rem;
}
.btn-close-white { filter: invert(1) grayscale(1); }


/* ============================================================
   18. ALERTS
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--nb-radius-md);
    border: 1px solid transparent;
    font-size: .9rem;
    line-height: 1.55;
    position: relative;
}
.alert-dismissible { padding-right: 3rem; }
.alert-dismissible .btn-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
}

.alert-success  { background: var(--nb-success-bg); border-color: var(--nb-success-border); color: var(--nb-success); }
.alert-danger   { background: var(--nb-danger-bg); border-color: var(--nb-danger-border); color: var(--nb-danger); }
.alert-warning  { background: var(--nb-warning-bg); border-color: var(--nb-warning-border); color: var(--nb-warning); }
.alert-info     { background: var(--nb-info-bg); border-color: var(--nb-info-border); color: var(--nb-info); }
.alert-primary  { background: var(--nb-primary-subtle); border-color: var(--nb-primary-tint); color: var(--nb-primary); }
.alert-secondary{ background: rgba(100,116,139,.08); border-color: rgba(100,116,139,.2); color: #475569; }

/* Django messages tags map */
.alert-messages { background: var(--nb-success-bg); border-color: var(--nb-success-border); color: var(--nb-success); }
.alert-error    { background: var(--nb-danger-bg); border-color: var(--nb-danger-border); color: var(--nb-danger); }


/* ============================================================
   19. PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.page-item { display: flex; }
.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 .6rem;
    font-size: .85rem;
    font-weight: 500;
    color: var(--nb-primary);
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(109,40,217,.12);
    border-radius: var(--nb-radius-xs);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, box-shadow .15s, color .15s;
    user-select: none;
}
.page-link:hover { background: var(--nb-primary-subtle); box-shadow: var(--nb-shadow-xs); color: var(--nb-primary); }
.page-item.active .page-link {
    background: linear-gradient(135deg, var(--nb-primary), var(--nb-primary-light));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px -4px rgba(109,40,217,.35);
}
.page-item.disabled .page-link { color: #cbd5e1; background: rgba(255,255,255,.4); cursor: default; pointer-events: none; }


/* ============================================================
   20. LIST GROUPS
   ============================================================ */
.list-group {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
    border-radius: var(--nb-radius-md);
    overflow: hidden;
}
.list-group-flush { border-radius: 0; }
.list-group-item {
    display: flex;
    align-items: center;
    padding: .85rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(109,40,217,.05);
    color: #334155;
    font-size: .9rem;
    transition: background .15s;
}
.list-group-item:last-child { border-bottom: none; }
.list-group-item:hover { background: rgba(109,40,217,.025); }
.list-group-item.active { background: var(--nb-primary-subtle); color: var(--nb-primary); font-weight: 600; }

a.list-group-item, .list-group-item-action { cursor: pointer; text-decoration: none; color: inherit; }
a.list-group-item:hover { background: rgba(109,40,217,.03); color: var(--nb-primary); }


/* ============================================================
   21. PROGRESS
   ============================================================ */
.progress {
    height: .65rem;
    background: rgba(109,40,217,.08);
    border-radius: 999px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--nb-primary), var(--nb-primary-light));
    border-radius: 999px;
    transition: width .5s ease;
}
.progress-bar.bg-success { background: linear-gradient(90deg, #059669, #10b981); }
.progress-bar.bg-warning { background: linear-gradient(90deg, #d97706, #f59e0b); }
.progress-bar.bg-danger  { background: linear-gradient(90deg, #dc2626, #ef4444); }
.progress-bar-striped { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.15) 0, rgba(255,255,255,.15) 1rem, transparent 1rem, transparent 2rem); }
.progress-bar-animated { animation: progressStripe 1s linear infinite; }
@keyframes progressStripe { from { background-position: 1rem 0; } to { background-position: 0 0; } }


/* ============================================================
   22. NAV TABS & PILLS
   ============================================================ */
.nav {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0 0 1rem;
    list-style: none;
    gap: .25rem;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1rem;
    font-size: .85rem;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--nb-radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--nb-primary-subtle); color: var(--nb-primary); }
.nav-link.active { background: linear-gradient(135deg, var(--nb-primary), var(--nb-primary-light)); color: #fff; box-shadow: 0 4px 12px -4px rgba(109,40,217,.35); }
.nav-link.disabled { opacity: .45; cursor: default; pointer-events: none; }

.nav-tabs  { border-bottom: 1px solid rgba(109,40,217,.10); border-radius: 0; gap: 0; }
.nav-tabs .nav-link { border-radius: var(--nb-radius-sm) var(--nb-radius-sm) 0 0; border-bottom-color: transparent; }
.nav-tabs .nav-link.active { background: rgba(255,255,255,.75); color: var(--nb-primary); border-color: rgba(109,40,217,.10) rgba(109,40,217,.10) #fff; box-shadow: none; }

.nav-pills .nav-link.active { background: linear-gradient(135deg, var(--nb-primary), var(--nb-primary-light)); color: #fff; }

/* Tab content */
.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.show.active { display: block; }
.tab-content > .fade      { opacity: 0; transition: opacity .2s; }
.tab-content > .fade.show { opacity: 1; }


/* ============================================================
   23. CAROUSEL
   ============================================================ */
.carousel { position: relative; overflow: hidden; }
.carousel-inner { position: relative; width: 100%; overflow: hidden; }
.carousel-item { display: none; float: left; width: 100%; transition: transform .4s ease; }
.carousel-item.active { display: block; }
.carousel-item-next, .carousel-item-prev { display: block; }

.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    border: 1px solid rgba(109,40,217,.1);
    box-shadow: var(--nb-shadow-sm);
    cursor: pointer;
    z-index: 5;
    color: var(--nb-primary);
    text-decoration: none;
    transition: background .2s;
}
.carousel-control-prev { left: 1rem; }
.carousel-control-next { right: 1rem; }
.carousel-control-prev:hover,
.carousel-control-next:hover { background: rgba(255,255,255,.95); }
.carousel-control-prev-icon::before { content: '‹'; font-size: 1.4rem; }
.carousel-control-next-icon::before { content: '›'; font-size: 1.4rem; }

.carousel-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    position: absolute;
    bottom: .75rem; left: 0; right: 0;
    padding: 0; margin: 0; list-style: none;
    z-index: 5;
}
.carousel-indicators li,
.carousel-indicators button {
    width: 8px; height: 8px;
    background: rgba(109,40,217,.3);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: background .2s, transform .2s;
}
.carousel-indicators .active,
.carousel-indicators li.active { background: var(--nb-primary); transform: scale(1.25); }


/* ============================================================
   24. STAT COMPONENTS (mini KPI cards)
   ============================================================ */
.nb-stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .85rem;
    margin-bottom: 1.5rem;
}

.nb-stat-mini {
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: var(--nb-radius-md);
    padding: 1rem 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px -4px rgba(109,40,217,.07), inset 0 1px 0 rgba(255,255,255,.9);
    transition: transform .2s, box-shadow .2s;
    cursor: default;
}
.nb-stat-mini:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(109,40,217,.12), inset 0 1px 0 rgba(255,255,255,.9); }

.nb-stat-mini__blob { position: absolute; border-radius: 50%; opacity: .22; }
.nb-stat-mini__blob--violet { background: radial-gradient(circle, #7c3aed, transparent 70%); }
.nb-stat-mini__blob--green  { background: radial-gradient(circle, #10b981, transparent 70%); }
.nb-stat-mini__blob--amber  { background: radial-gradient(circle, #f59e0b, transparent 70%); }
.nb-stat-mini__blob--red    { background: radial-gradient(circle, #ef4444, transparent 70%); }
.nb-stat-mini__blob--indigo { background: radial-gradient(circle, #6366f1, transparent 70%); }

.nb-stat-mini__label {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: #94a3b8; margin-bottom: .35rem;
}
.nb-stat-mini__value {
    font-family: var(--nb-font-display);
    font-size: 1.35rem; font-weight: 700;
    color: #1e293b; letter-spacing: -.02em; line-height: 1.15;
}


/* ============================================================
   25. EMPTY STATES
   ============================================================ */
.nb-empty-state { text-align: center; padding: 3rem 2rem; color: #94a3b8; }
.nb-empty-state__icon  { font-size: 3rem; margin-bottom: .75rem; display: block; opacity: .35; }
.nb-empty-state__title { font-family: var(--nb-font-display); font-size: 1rem; font-weight: 600; color: #64748b; margin: 0 0 .35rem; }
.nb-empty-state__text  { font-size: .82rem; color: #b0bec5; margin: 0; }


/* ============================================================
   26. TWO-TONE AMOUNTS
   ============================================================ */
.nb-amount {
    font-family: var(--nb-font-display);
    font-weight: 700;
    letter-spacing: -.02em;
    white-space: nowrap;
}
.nb-amount .nb-amount-int { font-size: 1em; }
.nb-amount .nb-amount-dec { font-size: .7em; color: #94a3b8; font-weight: 600; }
.nb-amount.nb-amount--lg  { font-size: 1.75rem; }
.nb-amount.nb-amount--md  { font-size: 1.25rem; }
.nb-amount.nb-amount--sm  { font-size: 1rem; }
.nb-amount.text-success .nb-amount-int { color: var(--nb-success); }
.nb-amount.text-danger  .nb-amount-int { color: var(--nb-danger); }


/* ============================================================
   27. MISC COMPONENTS
   ============================================================ */

/* Spinner */
.spinner-border {
    display: inline-block;
    width: 2rem; height: 2rem;
    vertical-align: text-bottom;
    border: .2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner .75s linear infinite;
}
.spinner-border-sm { width: 1rem; height: 1rem; border-width: .15em; }
.spinner-grow { display: inline-block; width: 2rem; height: 2rem; background-color: currentColor; border-radius: 50%; animation: spinnerGrow .75s linear infinite; }
@keyframes spinner     { to { transform: rotate(360deg); } }
@keyframes spinnerGrow { 0% { transform: scale(0); } 50% { opacity: 1; transform: none; } }

/* Divider */
.divider, hr {
    border: none;
    border-top: 1px solid rgba(109,40,217,.07);
    margin: 1.25rem 0;
}

/* Tooltip placeholder (styles only — no JS) */
[data-tooltip] { position: relative; }

/* Utility: visually hidden (accessibility) */
.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* Interactive cursor helpers */
.budget-card,
.db-stat-card,
.nb-stat-mini,
.budget-summary,
.search-item,
.db-notif-item { cursor: pointer; }


/* ============================================================
   28. RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    body { overflow: auto; }
    .nb-main { height: auto; min-height: 100vh; }

    .db-sidebar {
        position: fixed;
        left: calc(-1 * var(--nb-sidebar-w));
        top: 0; height: 100%;
        transition: left .3s ease;
        z-index: 100;
    }
    .db-sidebar.open {
        left: 0;
        box-shadow: 0 0 0 100vw rgba(0,0,0,.3);
    }

    .nb-page-header { padding: 1rem 1.25rem .75rem; flex-wrap: wrap; }
    .nb-page-content { padding: 1rem 1.25rem 2rem; }
    .nb-footer       { padding: .75rem 1.25rem; }

    .nb-page-title   { font-size: 1.2rem; }
    .nb-header-actions { gap: .4rem; }

    .modal-dialog { margin: .75rem; max-width: calc(100% - 1.5rem); }

    .row { --grid-gutter-x: 1rem; }

    .d-sm-none  { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex  { display: flex !important; }

    .col-sm-12 { flex: 0 0 auto; width: 100%; }
    .col-sm-6  { flex: 0 0 auto; width: 50%; }
}
