/* Variables */
:root {
    --primary:       #0052cc;
    --secondary:     #00a859;
    --background:    #f5f7fa;
    --text:          #1a1a1a;

    --danger:        #dc2626;
    --danger-light:  #fef2f2;
    --warning:       #f59e0b;
    --warning-light: #fffbeb;
    --success:       #16a34a;
    --success-light: #f0fdf4;
    --disabled-bg:   #e5e7eb;
    --disabled-fg:   #9ca3af;
    --focus-ring:    rgba(0, 82, 204, .25);
}

/* Global box-model & overflow guard */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    overflow-x: hidden;
    max-width: 100%;
    font-family: 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text);
}



/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: #0a2540;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
}

.logo img {
    max-width: 40px;
    height: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    margin-left: 20px;
    text-decoration: none;
    color: white;
}

/* Hamburger toggle button (hidden on desktop) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
/* Animated X when open */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Language switcher — public navbar (dark background) */
.lang-switcher { position: relative; margin-left: 16px; }
.lang-switcher__btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 6px;
    padding: 5px 10px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: .04em;
    line-height: 1;
    transition: background .15s, border-color .15s;
}
.lang-switcher__btn:hover,
.lang-switcher__btn[aria-expanded="true"] {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.6);
}
.lang-switcher__dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.13);
    min-width: 150px;
    z-index: 300;
    overflow: hidden;
}
.lang-switcher__dropdown.open { display: block; }
.lang-switcher__dropdown form { display: flex; flex-direction: column; margin: 0; padding: 4px 0; }
.lang-switcher__option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    font-family: inherit;
    transition: background .1s;
}
.lang-switcher__option:hover { background: #f3f4f6; }
.lang-switcher__option--active { color: var(--primary); font-weight: 700; }
.lang-switcher__check { color: var(--primary); font-size: 13px; flex-shrink: 0; }

/* =========================================
   Homepage – new design
   ========================================= */

/* Shared home buttons */
.home-btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
}
.home-btn:hover { opacity: .88; transform: translateY(-1px); }

.home-btn--primary {
    background: #0052cc;
    color: #fff;
}
.home-btn--outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,.7);
    color: #fff;
}
.home-btn--ghost {
    background: transparent;
    border: 2px solid rgba(255,255,255,.6);
    color: #fff;
}
.home-btn--ghost:hover {
    border-color: #fff;
    background: rgba(255,255,255,.1);
}
.home-btn--lg { padding: 16px 36px; font-size: 16px; }

/* Shared section titles */
.home-section-title {
    font-size: 30px;
    font-weight: 700;
    color: #0a2540;
    margin-bottom: 10px;
}
.home-section-sub {
    font-size: 16px;
    color: #555;
    margin-bottom: 48px;
}

/* ---- Hero ---- */
.home-hero {
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding: 80px 80px 60px;
    background: linear-gradient(135deg, #0a2540 0%, #0052cc 60%, #0077b6 100%);
    color: #fff;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.home-hero__inner {
    flex: 1 1 300px;
    min-width: 0;
    max-width: 580px;
    width: 100%;
}

.home-hero__badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    letter-spacing: .5px;
    margin-bottom: 24px;
}

.home-hero__title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 20px;
}

.home-hero__accent { color: #4cd964; }

.home-hero__sub {
    font-size: 18px;
    line-height: 1.6;
    opacity: .85;
    margin-bottom: 36px;
}

.home-hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Decorative mock-credit card */
.home-hero__visual {
    flex: 0 0 320px;
    min-width: 0;
    max-width: 100%;
}

.home-hero__card {
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.home-hero__card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.home-hero__card-row:last-of-type { border-bottom: none; }

.home-hero__card-label { font-size: 13px; opacity: .7; }
.home-hero__card-value { font-size: 16px; font-weight: 700; }
.home-hero__card-value--accent { color: #4cd964; font-size: 20px; }

.home-hero__card-status { margin-top: 20px; text-align: center; }

.home-status {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.home-status--approved { background: #d4f8e4; color: #1a7a45; }

/* ---- Stats bar ---- */
.home-stats {
    background: #fff;
    border-bottom: 1px solid #edf0f5;
}
.home-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1100px;
    margin: 0 auto;
}
.home-stats__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 20px;
    border-right: 1px solid #edf0f5;
    text-align: center;
}
.home-stats__item:last-child { border-right: none; }
.home-stats__number {
    font-size: 32px;
    font-weight: 800;
    color: #0052cc;
    margin-bottom: 6px;
}
.home-stats__label { font-size: 14px; color: #666; }

/* ---- Steps ---- */
.home-steps {
    background: #f5f7fa;
    padding: 80px 40px;
    text-align: center;
}
.home-steps__inner { max-width: 1100px; margin: 0 auto; }

.home-steps__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.home-step {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    position: relative;
}

.home-step__num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0052cc, #0077b6);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.home-step__title {
    font-size: 17px;
    font-weight: 700;
    color: #0a2540;
    margin-bottom: 10px;
}
.home-step__desc { font-size: 14px; color: #666; line-height: 1.6; }

/* ---- Features ---- */
.home-features {
    background: #fff;
    padding: 80px 40px;
    text-align: center;
}
.home-features__inner { max-width: 1100px; margin: 0 auto; }

.home-features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    text-align: left;
}

.home-feature-card {
    border: 1px solid #edf0f5;
    border-radius: 16px;
    padding: 28px;
    transition: box-shadow .2s, transform .2s;
}
.home-feature-card:hover {
    box-shadow: 0 8px 28px rgba(0,82,204,.12);
    transform: translateY(-3px);
}

.home-feature-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.home-feature-card__icon svg { width: 24px; height: 24px; }

.home-feature-card__icon--blue   { background: #e8f0fe; color: #0052cc; }
.home-feature-card__icon--green  { background: #e6f9ef; color: #00a859; }
.home-feature-card__icon--orange { background: #fff4e6; color: #e07b00; }
.home-feature-card__icon--purple { background: #f3eeff; color: #7048e8; }

.home-feature-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #0a2540;
    margin-bottom: 8px;
}
.home-feature-card__desc { font-size: 14px; color: #666; line-height: 1.6; }

/* ---- CTA ---- */
.home-cta {
    background: linear-gradient(135deg, #0a2540 0%, #0052cc 100%);
    color: #fff;
    padding: 80px 40px;
    text-align: center;
}
.home-cta__inner { max-width: 640px; margin: 0 auto; }
.home-cta__title { font-size: 34px; font-weight: 800; margin-bottom: 14px; }
.home-cta__sub { font-size: 17px; opacity: .85; margin-bottom: 36px; }
.home-cta__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- Responsive ---- */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
    /* Navbar */
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0a2540;
        padding: 16px 24px 24px;
        z-index: 100;
        border-top: 1px solid rgba(255,255,255,.1);
    }
    .nav-links.open { display: flex; }
    .nav-links a { margin-left: 0; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); width: 100%; }
    .nav-links .btn-primary { margin-top: 8px; width: 100%; text-align: center; }
    .nav-links form { width: 100%; }
    .nav-links form .btn-link { padding: 10px 0; color: #fff; width: 100%; text-align: left; }
    .nav-links .lang-switcher { margin-left: 0; width: 100%; border-top: 1px solid rgba(255,255,255,.07); padding-top: 10px; }
    .nav-links .lang-switcher__btn { width: 100%; justify-content: flex-start; padding: 8px 0; border: none; border-radius: 0; }
    .nav-links .lang-switcher__dropdown { left: 0; right: auto; }

    /* Hero */
    .home-hero {
        min-height: auto;
        padding: 60px 30px 50px;
        flex-direction: column;
        text-align: center;
    }
    .home-hero__inner { max-width: 100%; }
    .home-hero__actions { justify-content: center; }
    .home-hero__visual { width: 100%; }
    .home-hero__card { max-width: 380px; margin: 0 auto; }

    /* Stats */
    .home-stats__grid { grid-template-columns: repeat(2, 1fr); }
    .home-stats__item { border-right: none; border-bottom: 1px solid #edf0f5; }
    .home-stats__item:last-child { border-bottom: none; }

    /* Steps & Features */
    .home-steps { padding: 60px 24px; }
    .home-steps__grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .home-features { padding: 60px 24px; }
    .home-features__grid { grid-template-columns: 1fr 1fr; gap: 20px; }

    /* CTA */
    .home-cta { padding: 60px 24px; }
}

/* Mobile (≤ 560px) */
@media (max-width: 560px) {
    /* Navbar */
    .navbar { padding: 14px 20px; }
    .logo-text { font-size: 16px; }

    /* Hero */
    .home-hero { padding: 48px 20px 40px; gap: 32px; }
    .home-hero__title { font-size: 26px; }
    .home-hero__sub { font-size: 15px; }
    .home-hero__badge { font-size: 11px; }
    .home-hero__visual { display: none; } /* hide decorative card to save space */
    .home-btn { width: 100%; text-align: center; }
    .home-hero__actions { flex-direction: column; gap: 12px; }

    /* Stats */
    .home-stats__grid { grid-template-columns: 1fr; }
    .home-stats__item { border-bottom: 1px solid #edf0f5; }
    .home-stats__number { font-size: 26px; }

    /* Steps */
    .home-steps { padding: 48px 16px; }
    .home-steps__grid { grid-template-columns: 1fr; gap: 16px; }
    .home-section-title { font-size: 22px; }
    .home-section-sub { font-size: 14px; margin-bottom: 28px; }

    /* Features */
    .home-features { padding: 48px 16px; }
    .home-features__grid { grid-template-columns: 1fr; gap: 16px; }

    /* CTA */
    .home-cta { padding: 48px 20px; }
    .home-cta__title { font-size: 22px; }
    .home-cta__sub { font-size: 15px; }
    .home-cta__actions { flex-direction: column; gap: 12px; }
    .home-btn--lg { width: 100%; text-align: center; padding: 14px 20px; }
}

/* Legacy .hero kept for other potential uses */
.hero {
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(to right, #0052cc, #00a859);
    color: white;
}
.hero-content { max-width: 600px; }
.hero h1 { font-size: 42px; margin-bottom: 20px; }
.hero p { font-size: 18px; margin-bottom: 30px; }

/* Buttons (legacy) */
.btn-primary {
    background: #0052cc;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background .15s, transform .1s, box-shadow .15s;
}
.btn-primary:hover  { background: #003899; box-shadow: 0 4px 12px rgba(0,82,204,.35); }
.btn-secondary {
    margin-left: 10px;
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: background .15s, transform .1s;
}
.btn-secondary:hover { background: rgba(255,255,255,.15); }

/* Features (legacy) */
.features { display: flex; justify-content: center; gap: 40px; padding: 60px 20px; background: white; }
.feature { max-width: 250px; text-align: center; }


/* Alerts */
.alert {
    max-width: 500px;
    margin: 20px auto;
    padding: 10px;
    border-radius: 5px;
}

.alert.success { background: #d4edda; }
.alert.error { background: #f8d7da; }
.alert.info { background: #d1ecf1; }
.alert.warning { background: #fff3cd; }

/* Logout button in public navbar */
.btn-link {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 20px;
    font-size: 15px;
    font-family: inherit;
    padding: 0;
    transition: color .15s;
}
.nav-links .btn-link {
    color: rgba(255,255,255,.8);
}
.nav-links .btn-link:hover { color: #fff; }

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 64px);
    padding: 32px 16px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f5ee 100%);
}

.auth-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 82, 204, .12);
    padding: 40px 36px;
}

/* Header */
.auth-box__header {
    text-align: center;
    margin-bottom: 32px;
}
.auth-box__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0052cc, #0077b6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.auth-box__icon svg {
    width: 26px;
    height: 26px;
    stroke: #fff;
}
.auth-box__title {
    font-size: 24px;
    font-weight: 800;
    color: #0a2540;
    margin: 0 0 6px;
}
.auth-box__sub {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Fields */
.auth-form { display: flex; flex-direction: column; gap: 20px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }

.auth-field__label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.auth-field__label {
    font-size: 13px;
    font-weight: 600;
    color: #0a2540;
}
.auth-field__forgot {
    font-size: 12px;
    color: #0052cc;
    text-decoration: none;
}
.auth-field__forgot:hover { text-decoration: underline; }

.auth-field__wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-field__icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    stroke: #999;
    pointer-events: none;
    flex-shrink: 0;
}
.auth-field__input {
    width: 100%;
    padding: 11px 40px 11px 38px;
    border: 1.5px solid #dde3ee;
    border-radius: 10px;
    font-size: 14px;
    color: #0a2540;
    background: #f8faff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.auth-field__input:focus {
    border-color: #0052cc;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, .1);
    background: #fff;
}
.auth-field--error .auth-field__input {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .1);
}
.auth-field__error {
    font-size: 12px;
    color: var(--danger);
}

/* Show/hide password toggle */
.auth-field__toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: .5;
    transition: opacity .2s;
    display: flex;
    align-items: center;
}
.auth-field__toggle:hover { opacity: 1; }
.auth-field__toggle svg { width: 16px; height: 16px; stroke: #555; }

/* Global error alert */
.auth-alert {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-left: 4px solid #e53e3e;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #c53030;
}

/* Submit button */
.auth-submit {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #0052cc, #0077b6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 4px;
    transition: opacity .2s, transform .15s;
}
.auth-submit:hover              { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,82,204,.4); }
.auth-submit:active:not(:disabled) { transform: translateY(1px) scale(0.98); box-shadow: none; opacity: 1; }
.auth-submit:disabled {
    background: var(--disabled-bg);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
    opacity: 1;
}

/* Footer link */
.auth-box__footer {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin: 20px 0 0;
}
.auth-box__footer a {
    color: #0052cc;
    font-weight: 600;
    text-decoration: none;
}
.auth-box__footer a:hover { text-decoration: underline; }

/* Wide variant for signup (more fields) */
.auth-box--wide { max-width: 520px; }

/* Two-column row (e.g. first name / last name) */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 480px) {
    .auth-row { grid-template-columns: 1fr; }
    .auth-box { padding: 28px 20px; }
}

.profile-container {
    max-width: 800px;
    margin: auto;
}

table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    min-width: 480px;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
}

th {
    background: #0052cc;
    color: white;
}

td, th {
    padding: 12px;
}

/* Status amélioré */
.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.status.draft        { background: #f3f4f6; color: #6b7280; }
.status.submitted    { background: var(--warning-light); color: #92400e; }
.status.under_review { background: #eff6ff; color: #1e40af; }
.status.approved     { background: var(--success-light); color: #14532d; }
.status.rejected     { background: var(--danger-light); color: #7f1d1d; }
.status.needs_info   { background: #fff7ed; color: #7c2d12; }

button:disabled,
input[type="submit"]:disabled {
    background:   var(--disabled-bg) !important;
    color:        var(--disabled-fg) !important;
    border-color: var(--disabled-bg) !important;
    cursor: not-allowed;
    opacity: 1;
    transform: none !important;
    box-shadow: none !important;
}

.alert.error {
    background: #ffe5e5;
    color: #a94442;
    border-left: 5px solid red;
}

#drop-zone {
    border: 2px dashed #0052cc;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    background: #f5f7fa;
    margin-bottom: 20px;
}

#drop-zone.dragover {
    background: #e0ecff;
}

#preview-container {
    margin-bottom: 20px;
}

#preview-container img,
#preview-container iframe {
    border-radius: 10px;
    margin-top: 10px;
}


.btn-delete:hover {
    text-decoration: underline;
}

.container {
    max-width: 1000px;
    margin: auto;
    padding: 30px;
    background: transparent;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.page-header {
    margin-bottom: 20px;
}

.drop-zone {
    border: 2px dashed #0052cc;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.drop-zone:hover {
    background: #f0f6ff;
}

.doc-list {
    list-style: none;
    padding: 0;
}

.doc-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.btn-delete {
    background: red;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
}

/* (btn-link second definition removed — nav-links scoped rule above takes precedence) */

.input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
}

.dashboard-header { margin-bottom: 30px; }
.dashboard-header h1 { font-size: 28px; margin-bottom: 5px; }

/* (legacy stats/action classes — kept for orphaned templates) */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 15px; margin-bottom: 30px; }
.stat-card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.08); text-align: center; }
.stat-value { font-size: 24px; font-weight: bold; margin-top: 10px; }
.action-card { margin-bottom: 30px; }
.action-grid { display: flex; gap: 15px; flex-wrap: wrap; }
.action-btn { padding: 12px 18px; background: #f5f7fa; border-radius: 8px; text-decoration: none; color: #333; font-weight: 500; transition: .2s; }
.action-btn:hover { transform: translateY(-2px); }
.action-btn.primary { background: #0052cc; color: white; }

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table th {
    text-align: left;
    background: #f4f6f9;
}

.table th, .table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.logo-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: white;
}

.logo-sub {
    font-size: 11px;
    opacity: 0.7;
    color: white;
}

/* =========================================
   Simulator
   ========================================= */

.sim-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

/* Hero */
.sim-hero {
    text-align: center;
    margin-bottom: 40px;
}
.sim-hero__badge {
    display: inline-block;
    background: #e8f0fe;
    color: #0052cc;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
    margin-bottom: 14px;
}
.sim-hero__title {
    font-size: 32px;
    font-weight: 800;
    color: #0a2540;
    margin: 0 0 10px;
}
.sim-hero__sub {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Two-col layout */
.sim-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

/* Left card */
.sim-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Field */
.sim-field { display: flex; flex-direction: column; gap: 8px; }

.sim-field__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.sim-field__label {
    font-size: 13px;
    font-weight: 600;
    color: #0a2540;
}
.sim-field__value {
    font-size: 14px;
    font-weight: 700;
    color: #0052cc;
}

/* Range slider */
.sim-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #dde3ee;
    outline: none;
    cursor: pointer;
}
.sim-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0052cc;
    box-shadow: 0 2px 6px rgba(0,82,204,.4);
    cursor: pointer;
    transition: transform .15s;
}
.sim-range::-webkit-slider-thumb:hover { transform: scale(1.2); }
.sim-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: #0052cc;
    cursor: pointer;
}
.sim-range-bounds {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #aaa;
}

/* Select */
.sim-select-wrap { position: relative; }
.sim-select-wrap::after {
    content: '▾';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #555;
}
.sim-select {
    width: 100%;
    padding: 11px 36px 11px 14px;
    border: 1.5px solid #dde3ee;
    border-radius: 10px;
    font-size: 14px;
    color: #0a2540;
    background: #f8faff;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
}
.sim-select:focus { border-color: #0052cc; box-shadow: 0 0 0 3px rgba(0,82,204,.1); }

/* Number inputs */
.sim-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.sim-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #dde3ee;
    border-radius: 10px;
    font-size: 14px;
    color: #0a2540;
    background: #f8faff;
    outline: none;
}
.sim-input:focus { border-color: #0052cc; box-shadow: 0 0 0 3px rgba(0,82,204,.1); }

/* Results panel */
.sim-results {
    background: linear-gradient(160deg, #0a2540 0%, #0052cc 100%);
    border-radius: 20px;
    padding: 32px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* KPI */
.sim-kpi { text-align: center; }
.sim-kpi__label {
    font-size: 13px;
    opacity: .7;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: .8px;
}
.sim-kpi__amount {
    font-size: 42px;
    font-weight: 800;
    margin: 0;
    line-height: 1;
}

/* Detail rows */
.sim-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,.12);
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.sim-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 14px;
}
.sim-detail:last-child { border-bottom: none; }
.sim-detail__label { opacity: .75; }
.sim-detail__value { font-weight: 700; }

/* Score badge */
.sim-score {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255,255,255,.1);
}
.sim-score__icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
    background: rgba(255,255,255,.2);
}
.sim-score--good  { background: rgba(0,168,89,.25); }
.sim-score--good .sim-score__icon  { background: #00a859; }
.sim-score--warning { background: rgba(255,165,0,.25); }
.sim-score--warning .sim-score__icon { background: orange; }
.sim-score--danger  { background: rgba(220,53,69,.25); }
.sim-score--danger .sim-score__icon  { background: #dc3545; }

/* Chart */
.sim-chart-wrap {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,.06);
    padding: 12px;
}

/* CTA */
.sim-cta {
    display: block;
    text-align: center;
    background: #fff;
    color: #0052cc;
    font-weight: 700;
    font-size: 15px;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
}
.sim-cta:hover { opacity: .9; transform: translateY(-1px); }

/* Responsive */
@media (max-width: 860px) {
    .sim-layout { grid-template-columns: 1fr; }
    .sim-page { padding: 32px 16px 48px; }
    .sim-hero__title { font-size: 26px; }
}
@media (max-width: 480px) {
    .sim-row { grid-template-columns: 1fr; }
    .sim-card { padding: 24px 20px; gap: 20px; }
    .sim-results { padding: 24px 20px; }
    .sim-kpi__amount { font-size: 32px; }
}

/* =============================================
   Dashboard app shell  (db-*)
   All values keyed off --role-accent which is
   injected inline per role.
   ============================================= */

.db-body { overflow: hidden; height: 100vh; margin: 0; }

/* ---- Layout ---- */
.db-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ---- Sidebar ---- */
.db-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #0a2540;
    display: flex;
    flex-direction: column;
    height: 100vh;
    z-index: 200;
    transition: transform .3s ease;
}

.db-sidebar__header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.db-sidebar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 12px;
}
.db-sidebar__logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
}

.db-sidebar__role-badge {
    display: inline-block;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.85);
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: .8px;
    border: 1px solid rgba(255,255,255,.15);
}

/* Nav */
.db-nav {
    flex: 1;
    padding: 16px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.db-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.db-nav__link:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.db-nav__link--active {
    background: var(--role-accent) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.db-nav__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.db-nav__section {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.35);
    padding: 14px 14px 4px;
    margin-top: 4px;
    user-select: none;
}

/* Sidebar footer / logout */
.db-sidebar__footer {
    padding: 14px 10px;
    border-top: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}
.db-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    background: none;
    border: none;
    border-radius: 10px;
    color: rgba(255,255,255,.5);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background .15s, color .15s;
}
.db-logout:hover {
    background: rgba(229,62,62,.15);
    color: #fc8181;
}

/* ---- Main area ---- */
.db-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

/* ---- Topbar ---- */
.db-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 28px;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e8ecf0;
    flex-shrink: 0;
    box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.db-topbar__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #555;
    flex-shrink: 0;
}
.db-topbar__toggle svg { width: 22px; height: 22px; stroke: currentColor; }
.db-topbar__title {
    font-size: 17px;
    font-weight: 700;
    color: #0a2540;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.db-topbar__user {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.db-topbar__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--role-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.db-topbar__name {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.db-topbar__name span { font-size: 14px; font-weight: 600; color: #0a2540; }
.db-topbar__name small { font-size: 12px; color: #888; }

/* Language switcher override — dashboard topbar (light background) */
.db-topbar .lang-switcher { margin-left: 0; }
.db-topbar .lang-switcher__btn {
    color: #374151;
    border-color: #d1d5db;
}
.db-topbar .lang-switcher__btn:hover,
.db-topbar .lang-switcher__btn[aria-expanded="true"] {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* ---- Flash messages ---- */
.db-messages { padding: 16px 28px 0; }
.db-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
    border-left: 4px solid transparent;
}
.db-alert--success { background: #d4f8e4; color: #1a7a45; border-color: #00a859; }
.db-alert--error   { background: #fff5f5; color: #c53030; border-color: #e53e3e; }
.db-alert--info    { background: #ebf4ff; color: #1a56db; border-color: #0052cc; }
.db-alert--warning { background: #fffbeb; color: #92400e; border-color: #f59e0b; }

/* ---- Scrollable content ---- */
.db-content {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
    background: #f0f2f6;
}

/* ---- Stat cards ---- */
.db-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.db-stats--2col { grid-template-columns: repeat(2, 1fr); }

.db-stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(0,0,0,.05);
}
.db-stat-card__icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.db-stat-card__icon-wrap svg { width: 22px; height: 22px; }
/* Tinted icon backgrounds — soft, not solid — with matching stroke color */
.db-stat-card--primary .db-stat-card__icon-wrap { background: color-mix(in srgb, var(--role-accent) 14%, transparent); }
.db-stat-card--primary .db-stat-card__icon-wrap svg { stroke: var(--role-accent); }
.db-stat-card--warning .db-stat-card__icon-wrap { background: rgba(245,158,11,.12); }
.db-stat-card--warning .db-stat-card__icon-wrap svg { stroke: #d97706; }
.db-stat-card--success .db-stat-card__icon-wrap { background: rgba(0,168,89,.12); }
.db-stat-card--success .db-stat-card__icon-wrap svg { stroke: #00a859; }
.db-stat-card--danger  .db-stat-card__icon-wrap { background: rgba(220,38,38,.10); }
.db-stat-card--danger  .db-stat-card__icon-wrap svg { stroke: #dc2626; }
.db-stat-card--info    .db-stat-card__icon-wrap { background: rgba(0,82,204,.10); }
.db-stat-card--info    .db-stat-card__icon-wrap svg { stroke: #0052cc; }
.db-stat-card--purple  .db-stat-card__icon-wrap { background: rgba(112,72,232,.10); }
.db-stat-card--purple  .db-stat-card__icon-wrap svg { stroke: #7048e8; }

.db-stat-card__value {
    font-size: 30px;
    font-weight: 800;
    color: #0a2540;
    line-height: 1;
    margin-bottom: 5px;
    letter-spacing: -.5px;
}
.db-stat-card__label { font-size: 12px; color: #999; font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }

/* ---- Section ---- */
.db-section { margin-bottom: 28px; }
.db-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.db-section__title {
    font-size: 15px;
    font-weight: 700;
    color: #1e2d3d;
    margin: 0 0 12px;
    letter-spacing: -.1px;
}
.db-section__link {
    font-size: 13px;
    color: var(--role-accent);
    text-decoration: none;
    font-weight: 600;
}
.db-section__link:hover { text-decoration: underline; }

/* ---- Card ---- */
.db-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
    border: 1px solid rgba(0,0,0,.05);
    overflow: hidden;
}
.db-card__header {
    padding: 20px 28px 0;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 16px;
    margin-bottom: 0;
}
.db-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #0a2540;
    margin: 0 0 4px;
}
.db-card__sub {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

/* ---- Actions row ---- */
.db-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.db-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #e5e7eb;
    color: #374151;
    background: #f9fafb;
    transition: opacity .2s, transform .15s;
    cursor: pointer;
}
.db-action-btn:disabled {
    background:   var(--disabled-bg);
    color:        var(--disabled-fg);
    border-color: var(--disabled-bg);
    opacity: 1;
    transform: none;
    cursor: not-allowed;
}
.db-action-btn--primary {
    background:   var(--role-accent);
    color:        #fff;
    border-color: var(--role-accent);
    box-shadow:   0 2px 8px color-mix(in srgb, var(--role-accent) 35%, transparent);
}
.db-action-btn--primary:hover:not(:disabled) {
    opacity: 1;
    background: color-mix(in srgb, var(--role-accent) 85%, #000);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--role-accent) 45%, transparent);
    transform: translateY(-2px);
}
.db-action-btn--outline {
    background:   color-mix(in srgb, var(--role-accent) 8%, #fff);
    border-color: color-mix(in srgb, var(--role-accent) 40%, transparent);
    color:        var(--role-accent);
}
.db-action-btn--outline:hover:not(:disabled) {
    opacity: 1;
    background: color-mix(in srgb, var(--role-accent) 15%, #fff);
    border-color: var(--role-accent);
    transform: translateY(-2px);
}
.db-action-btn svg { width: 16px; height: 16px; }

/* ---- Table ---- */
.db-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.db-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}
.db-table th {
    background: #f8faff;
    color: #777;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #edf0f5;
    white-space: nowrap;
}
.db-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: #0a2540;
    border-bottom: 1px solid #f5f7fa;
    vertical-align: middle;
}
.db-table tbody tr:last-child td { border-bottom: none; }
.db-table tbody tr:hover { background: #f8faff; }

.db-table__id   { color: #888; font-size: 13px; }
.db-table__name { display: block; font-weight: 600; }
.db-table__sub  { display: block; font-size: 12px; color: #999; }
.db-table__date { color: #888; font-size: 13px; white-space: nowrap; }

.db-amount { font-weight: 700; }

/* ---- Status badges ---- */
.db-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.db-badge--draft        { background: #f0f0f0; color: #666; }
.db-badge--submitted    { background: #fff3cd; color: #856404; }
.db-badge--under-review,
.db-badge--under_review { background: #cce5ff; color: #0052cc; }
.db-badge--needs-info,
.db-badge--needs_info   { background: #ffedd5; color: #c2410c; }
.db-badge--pending-manager,
.db-badge--pending_manager { background: #ede9fe; color: #6d28d9; }
.db-badge--approved     { background: #d4f8e4; color: #1a7a45; }
.db-badge--rejected     { background: #fff5f5; color: #c53030; }

/* ---- Log transition cell ---- */
.db-log-transition {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

/* ---- Plain link (no border, accent color) ---- */
.db-link-plain {
    color: var(--role-accent);
    text-decoration: none;
    font-weight: 600;
}
.db-link-plain:hover { text-decoration: underline; }

/* ---- Link button ---- */
.db-link-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--role-accent);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--role-accent);
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.db-link-btn:hover { background: var(--role-accent); color: #fff; }
.db-link-btn--muted {
    color: #9ca3af;
    border-color: #e5e7eb;
}
.db-link-btn--muted:hover { background: #f3f4f6; color: #374151; }
.db-link-btn--purple {
    color: #6d28d9;
    border-color: #6d28d9;
}
.db-link-btn--purple:hover { background: #6d28d9; color: #fff; }
.db-link-btn--green {
    color: #16a34a;
    border-color: #16a34a;
}
.db-link-btn--green:hover { background: #16a34a; color: #fff; }
.db-link-btn--red {
    color: #dc2626;
    border-color: #dc2626;
}
.db-link-btn--red:hover { background: #dc2626; color: #fff; }

/* ---- SLA badges ---- */
.db-sla {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.db-sla--ok      { background: #d4f8e4; color: #1a7a45; }
.db-sla--overdue { background: #fff5f5; color: #c53030; }

/* ---- Type select inside user table ---- */
.db-type-select {
    font-size: 13px;
    padding: 4px 8px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    background: #fff;
    color: #0a2540;
    cursor: pointer;
    height: 32px;
}
.db-type-select:focus { outline: 2px solid var(--role-accent); border-color: transparent; }

/* ---- User type badge colours ---- */
.db-badge--client   { background: #dbeafe; color: #1d4ed8; }
.db-badge--agent    { background: #dcfce7; color: #15803d; }
.db-badge--manager  { background: #ede9fe; color: #6d28d9; }
.db-badge--owner    { background: #ffedd5; color: #c2410c; }

/* ---- Action buttons in user table ---- */
.db-btn-danger {
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
    background: #fff5f5;
    border: 1px solid #fca5a5;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.db-btn-danger:hover { background: #dc2626; color: #fff; border-color: #dc2626; }

.db-btn-activate {
    font-size: 13px;
    font-weight: 600;
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #86efac;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.db-btn-activate:hover { background: #15803d; color: #fff; border-color: #15803d; }

.db-btn-ban {
    font-size: 13px;
    font-weight: 600;
    color: #7c3aed;
    background: #f5f3ff;
    border: 1px solid #c4b5fd;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.db-btn-ban:hover { background: #7c3aed; color: #fff; border-color: #7c3aed; }

/* ---- Dashboard form fields (form.as_p inside db-card) ---- */
.db-form p {
    margin: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.db-form label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.db-form input[type="text"],
.db-form input[type="email"],
.db-form input[type="number"],
.db-form input[type="date"],
.db-form input[type="password"],
.db-form textarea,
.db-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #0a2540;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.db-form input:focus,
.db-form textarea:focus,
.db-form select:focus {
    outline: none;
    border-color: var(--role-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--role-accent) 15%, transparent);
}
.db-form textarea { resize: vertical; min-height: 100px; }
.db-form .helptext,
.db-form ul { font-size: 12px; color: #9ca3af; margin: 4px 0 0; padding-left: 16px; }
.db-form .errorlist { color: #dc2626; font-size: 12px; list-style: none; padding: 0; margin: 4px 0 0; }

/* ---- Empty state ---- */
.db-empty {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
}
.db-empty svg { width: 40px; height: 40px; display: block; margin: 0 auto 10px; stroke: #ddd; }
.db-empty p   { font-size: 14px; margin: 0; }

/* ---- Mobile overlay ---- */
.db-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 150;
}
.db-overlay--visible { display: block; }

/* =================================================================
   Universal button interaction states
   Centralised here so every button family gets consistent feedback
   without duplicating rules in each section.
   ================================================================= */

/* --- Pressed (click-down) feel --- */
.home-btn:active:not(:disabled),
.btn-primary:active:not(:disabled),
.btn-secondary:active:not(:disabled),
.db-action-btn:active:not(:disabled),
.db-link-btn:active:not(:disabled),
.db-btn-danger:active:not(:disabled),
.db-btn-activate:active:not(:disabled),
.db-btn-ban:active:not(:disabled),
.sim-cta:active:not(:disabled),
.action-btn:active:not(:disabled),
.db-logout:active:not(:disabled) {
    transform: translateY(1px) scale(0.97) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,.12) !important;
    opacity: 1 !important;
}

/* --- Keyboard-focus ring (hidden for mouse, visible for keyboard) --- */
.home-btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-link:focus-visible,
.auth-submit:focus-visible,
.db-action-btn:focus-visible,
.db-link-btn:focus-visible,
.db-btn-danger:focus-visible,
.db-btn-activate:focus-visible,
.db-btn-ban:focus-visible,
.sim-cta:focus-visible,
.action-btn:focus-visible,
.db-logout:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

/* Make sure buttons with only colour-change hover also include
   transform in their transition so the press animation is smooth */
.db-link-btn,
.db-btn-danger,
.db-btn-activate,
.db-btn-ban {
    transition: background .15s, color .15s, border-color .15s, transform .1s, box-shadow .1s;
}


/* ---- Responsive ---- */
@media (max-width: 900px) {
    .db-sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
    }
    .db-sidebar--open { transform: translateX(0); }
    .db-topbar__toggle { display: flex; }
    .db-topbar { padding: 0 16px; }
    .db-topbar__name { display: none; }
    .db-content { padding: 20px 16px; }
    .db-messages { padding: 12px 16px 0; }
    .db-stats { grid-template-columns: repeat(2, 1fr); }
    .db-stats--2col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .db-stats,
    .db-stats--2col { grid-template-columns: 1fr 1fr; }
    .db-stat-card { padding: 14px; gap: 10px; }
    .db-stat-card__value { font-size: 22px; }
    .db-stat-card__icon-wrap { width: 40px; height: 40px; }
    .db-actions { flex-direction: column; }
    .db-action-btn { width: 100%; justify-content: center; }
}