/* --- Design Tokens & Variables --- */
:root {
    --colors-primary: #4f46e5;
    --colors-primary-active: #4338ca;
    --colors-primary-soft: #eef2ff;
    --colors-canvas: #ffffff;
    --colors-surface-soft: #f4f7fb;
    --colors-hairline: #dfe6ef;
    --colors-ink: #0f172a;
    --colors-body: #334155;
    --colors-muted: #64748b;
    --colors-success: #059669;
    --shadow-soft: 0 24px 70px rgba(15, 23, 42, 0.10);
}

/* --- Base & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--colors-surface-soft);
    min-height: 100vh;
    color: var(--colors-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--colors-ink);
    font-weight: 600 !important;
    letter-spacing: -0.03em;
}

/* --- Navbar --- */
.bg-navbar {
    background:
        radial-gradient(circle at 22% -80%, rgba(99, 102, 241, 0.55), transparent 34%),
        linear-gradient(110deg, #10182d, #111c35 60%, #172554) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.05rem;
    letter-spacing: -0.3px;
    color: #f8fafc !important;
    font-weight: 700;
}

.navbar .navbar-brand > span:last-child > span {
    color: #a5b4fc;
}

.navbar-brand-mark {
    width: 2rem;
    height: 2rem;
    display: inline-grid;
    place-items: center;
    border-radius: 0.62rem;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #4338ca);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.20);
}

.navbar .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    color: #cbd5e1 !important;
    transition: background 0.2s ease, color 0.2s ease;
}

.navbar .nav-link:hover, .navbar .nav-link.router-link-active {
    background: rgba(255, 255, 255, 0.11) !important;
    color: #fff !important;
}

.navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.24);
}

.navbar .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

/* --- Auth Pages Layout --- */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 0.92fr) minmax(520px, 1.08fr);
    background: var(--colors-canvas);
}

.auth-story {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: clamp(2rem, 4vw, 4.5rem);
    color: #fff;
    background:
        radial-gradient(circle at 12% 12%, rgba(99, 102, 241, 0.34), transparent 34%),
        linear-gradient(145deg, #10182d 0%, #111c35 52%, #172554 100%);
}

.auth-story::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.auth-story-glow {
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    filter: blur(2px);
    opacity: 0.55;
}

.auth-story-glow-one {
    width: 22rem;
    height: 22rem;
    right: -9rem;
    top: 18%;
    background: rgba(79, 70, 229, 0.42);
}

.auth-story-glow-two {
    width: 18rem;
    height: 18rem;
    left: -10rem;
    bottom: 2%;
    background: rgba(14, 165, 233, 0.22);
}

.brand-lockup,
.auth-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.brand-mark {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 0.85rem;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.30);
}

.brand-name {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.brand-name span {
    color: #a5b4fc;
}

.auth-story-content {
    width: min(100%, 620px);
    margin: auto 0;
    padding: 4rem 0;
}

.auth-eyebrow,
.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #c7d2fe;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-story-content h1 {
    max-width: 720px;
    margin: 1.35rem 0 1.2rem;
    color: #fff;
    font-size: clamp(2.6rem, 5.1vw, 5.25rem);
    font-weight: 650 !important;
    line-height: 0.99;
    letter-spacing: -0.065em;
}

.auth-story-content > p {
    max-width: 580px;
    color: #cbd5e1;
    font-size: clamp(1rem, 1.35vw, 1.16rem);
    line-height: 1.75;
}

.auth-feature-list {
    display: grid;
    gap: 1rem;
    margin-top: 2.25rem;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.95rem;
}

.auth-feature > span {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.75rem;
    color: #c7d2fe;
    background: rgba(255, 255, 255, 0.08);
}

.auth-feature strong,
.auth-feature small {
    display: block;
}

.auth-feature strong {
    color: #f8fafc;
    font-size: 0.9rem;
}

.auth-feature small {
    margin-top: 0.2rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

.auth-story-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #94a3b8;
}

.auth-story-footer p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.55;
}

.auth-story-footer strong {
    color: #e2e8f0;
}

.role-stack {
    display: flex;
}

.role-stack span {
    width: 2.15rem;
    height: 2.15rem;
    display: grid;
    place-items: center;
    margin-left: -0.4rem;
    border: 2px solid #15213c;
    border-radius: 999px;
    color: #e0e7ff;
    background: #293658;
}

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

.auth-panel {
    min-width: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 5.5rem);
    background: var(--colors-canvas);
}

.auth-panel-scroll {
    align-items: flex-start;
}

.auth-panel-inner {
    width: min(100%, 500px);
    margin: auto;
}

.auth-panel-inner.wide {
    width: min(100%, 720px);
}

.auth-mobile-brand {
    display: none;
    margin-bottom: 2.25rem;
}

.auth-mobile-brand .brand-name {
    color: var(--colors-ink);
}

.auth-mobile-brand .brand-name span {
    color: var(--colors-primary);
}

.auth-card {
    width: 100%;
    max-width: 500px;
}

.auth-card.wide {
    max-width: 720px;
}

.auth-card-header {
    margin-bottom: 2rem;
}

.auth-card-header .auth-kicker {
    color: var(--colors-primary);
}

.auth-card-header h2 {
    margin: 0.55rem 0 0.75rem;
    font-size: clamp(2rem, 3vw, 2.75rem);
    line-height: 1.08;
}

.auth-card-header p {
    max-width: 590px;
    margin: 0;
    color: var(--colors-muted);
    font-size: 0.94rem;
    line-height: 1.7;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 2rem;
    color: var(--colors-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-back-link:hover {
    color: var(--colors-primary);
}

.auth-form-section {
    margin-bottom: 1.4rem;
}

.auth-form-label {
    display: block;
    margin-bottom: 0.65rem;
    color: var(--colors-ink);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* --- Form Controls --- */
.auth-card .form-floating > .form-control,
.auth-card .form-floating > .form-select {
    border: 1px solid var(--colors-hairline);
    border-radius: 0.85rem;
    font-size: 0.95rem;
    background-color: #fbfcfe;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-card .form-floating > .form-control:focus,
.auth-card .form-floating > .form-select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
    background: var(--colors-canvas);
}

.auth-card .form-floating > label {
    color: var(--colors-muted);
    font-size: 0.9rem;
}

.auth-field-note {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0.75rem 0 0;
    color: var(--colors-muted);
    font-size: 0.76rem;
}

/* --- Buttons --- */
.btn-primary-gradient {
    min-height: 3.35rem;
    background: linear-gradient(135deg, #5b5be7, #4338ca);
    border: none;
    color: #fff;
    font-weight: 650;
    padding: 0.75rem 1.5rem;
    border-radius: 0.9rem;
    font-size: 0.95rem;
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    width: 100%;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #4f46e5, #3730a3);
    box-shadow: 0 18px 36px rgba(79, 70, 229, 0.28);
    color: #fff;
}

.btn-primary-gradient:active {
    transform: translateY(0);
}

.btn-primary-gradient:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline-subtle {
    border: 1px solid var(--colors-hairline);
    background: var(--colors-canvas);
    color: var(--colors-body);
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-outline-subtle:hover {
    border-color: var(--colors-ink);
    color: var(--colors-ink);
    background: var(--colors-surface-soft);
}

/* --- Links --- */
.auth-link {
    color: var(--colors-primary);
    font-weight: 650;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--colors-primary-active);
    text-decoration: underline;
}

/* --- Divider --- */
.divider {
    display: flex;
    align-items: center;
    margin: 1.75rem 0 1.25rem;
    color: var(--colors-muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

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

.divider::before { margin-right: 1rem; }
.divider::after  { margin-left: 1rem; }

.role-choice-grid {
    display: grid;
    gap: 0.75rem;
}

.role-choice {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--colors-hairline);
    border-radius: 0.9rem;
    color: var(--colors-body);
    text-decoration: none;
    background: #fbfcfe;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.role-choice:hover {
    border-color: #c7d2fe;
    color: var(--colors-ink);
    background: var(--colors-primary-soft);
    transform: translateY(-1px);
}

.role-choice-icon {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: 0.75rem;
    color: var(--colors-primary);
    background: var(--colors-primary-soft);
}

.role-choice strong,
.role-choice small {
    display: block;
}

.role-choice strong {
    color: var(--colors-ink);
    font-size: 0.84rem;
}

.role-choice small {
    margin-top: 0.12rem;
    color: var(--colors-muted);
    font-size: 0.72rem;
}

.role-choice-arrow {
    color: #94a3b8;
    font-size: 0.75rem;
}

.auth-footnote,
.auth-switch-copy {
    margin: 1.35rem 0 0;
    color: var(--colors-muted);
    font-size: 0.77rem;
    text-align: center;
}

.auth-footnote i {
    margin-right: 0.35rem;
    color: var(--colors-success);
}

.auth-switch-copy {
    font-size: 0.84rem;
}

/* --- Alert styling --- */
.alert {
    border-radius: 0.85rem;
    font-size: 0.9rem;
    border: 1px solid var(--colors-hairline);
}

/* --- Card Redesign --- */
.card {
    background: var(--colors-canvas) !important;
    border: 1px solid var(--colors-hairline) !important;
    border-radius: 1.1rem !important;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.055) !important;
}

.card-header {
    background: var(--colors-canvas) !important;
    border-bottom: 1px solid var(--colors-hairline) !important;
    color: var(--colors-ink) !important;
    padding: 1rem 1.2rem !important;
    border-radius: 1rem 1rem 0 0 !important;
}

/* --- Spinner --- */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* --- Utility: Main Content --- */
.main-content {
    min-height: calc(100vh - 65px);
    background:
        radial-gradient(circle at 92% 4%, rgba(99, 102, 241, 0.075), transparent 28rem),
        linear-gradient(180deg, #f6f8fc, #f3f6fa);
}

.dashboard-shell {
    max-width: 1320px;
    padding-top: 2rem !important;
    padding-bottom: 4rem !important;
}

.dashboard-page {
    min-width: 0;
}

.dashboard-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: clamp(1.55rem, 3vw, 2.35rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.4rem;
    color: #cbd5e1;
    background:
        radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.40), transparent 28%),
        linear-gradient(135deg, #10182d, #111c35 58%, #172554);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.15;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(90deg, black, transparent 82%);
}

.dashboard-hero > * {
    position: relative;
    z-index: 1;
}

.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
    color: #c7d2fe;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.dashboard-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 650 !important;
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.dashboard-hero p {
    max-width: 650px;
    margin: 0.7rem 0 0;
    color: #aebbd0;
    font-size: 0.9rem;
}

.dashboard-hero-compact {
    margin-bottom: 1.5rem;
    padding-block: 1.7rem;
}

.dashboard-search {
    position: relative;
    width: min(100%, 340px);
    flex: 0 0 min(100%, 340px);
}

.dashboard-search i {
    position: absolute;
    top: 50%;
    left: 1rem;
    z-index: 2;
    color: #64748b;
    transform: translateY(-50%);
}

.dashboard-search .form-control {
    min-height: 3rem;
    padding-left: 2.65rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
}

.dashboard-hero .badge {
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.dashboard-hero-action {
    min-height: 2.9rem;
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(8px);
}

.dashboard-hero-action:hover {
    border-color: rgba(255, 255, 255, 0.48);
    color: #111827;
    background: #fff;
}

/* --- Hover Card Effect --- */
.hover-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border-radius: 1rem;
    border: 1px solid var(--colors-hairline);
}

.hover-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
}

/* --- Dashboard Cards --- */
.stat-card {
    min-height: 8.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--colors-canvas) !important;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--colors-hairline);
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #6366f1, #4338ca);
}

.stat-card::after {
    content: '';
    position: absolute;
    width: 5rem;
    height: 5rem;
    right: -2.5rem;
    top: -2.5rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.07);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.09) !important;
}

.stat-card .stat-value {
    margin-top: 0.35rem;
    font-size: clamp(1.65rem, 2.8vw, 2.25rem);
    font-weight: 700;
    color: var(--colors-ink);
    letter-spacing: -0.045em;
}

.stat-card .stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--colors-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.table {
    margin-bottom: 0;
    color: var(--colors-body);
}

.table > :not(caption) > * > * {
    padding: 0.9rem 1rem;
    border-bottom-color: #edf1f6;
    vertical-align: middle;
}

.table thead th {
    color: var(--colors-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.065em;
    text-transform: uppercase;
    background: #f8fafc;
}

.nav-pills {
    padding: 0.35rem;
    border: 1px solid var(--colors-hairline);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.78);
    width: fit-content;
}

.nav-pills .nav-link {
    border: 0;
    border-radius: 0.65rem;
}

.nav-pills .nav-link.active {
    color: #fff !important;
    background: linear-gradient(135deg, #5b5be7, #4338ca) !important;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
}

.dashboard-page .list-group-item {
    border-color: #edf1f6;
    background: transparent;
    transition: background 0.18s ease;
}

.dashboard-page .list-group-item:hover {
    background: #fafbff;
}

.dashboard-page .card-body > hr {
    border-color: var(--colors-hairline);
    opacity: 1;
}

.dashboard-page .btn-primary,
.dashboard-page .btn-dark {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #5b5be7, #4338ca);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.18);
}

.dashboard-page .btn-primary:hover,
.dashboard-page .btn-dark:hover {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #3730a3);
}

.dashboard-page .btn-outline-primary,
.dashboard-page .btn-outline-dark {
    border-color: #c7d2fe;
    color: #4338ca;
    background: #fff;
}

.dashboard-page .btn-outline-primary:hover,
.dashboard-page .btn-outline-dark:hover {
    border-color: #4f46e5;
    color: #fff;
    background: #4f46e5;
}

.form-control,
.form-select {
    border-color: var(--colors-hairline);
    border-radius: 0.72rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}

.btn:focus-visible,
.nav-link:focus-visible,
.role-choice:focus-visible,
.demo-access-button:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.28);
    outline-offset: 2px;
    box-shadow: none;
}

.btn {
    border-radius: 0.7rem;
    font-weight: 600;
}

.badge {
    border-radius: 999px;
    padding: 0.42rem 0.65rem;
    font-weight: 650;
}

/* --- Badge Styles --- */
.badge-pending {
    background: #fff7df;
    color: #946200;
    font-weight: 500;
}

.badge-approved {
    background: #dcfce7;
    color: #166534;
    font-weight: 500;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
    font-weight: 500;
}

/* --- Responsive --- */
@media (min-width: 992px) and (max-height: 820px) {
    .auth-story {
        padding: 2.5rem 3.2rem;
    }

    .auth-story-content {
        padding: 2rem 0;
    }

    .auth-story-content h1 {
        font-size: clamp(2.55rem, 4.2vw, 4rem);
    }

    .auth-feature-list {
        margin-top: 1.35rem;
    }

    .auth-story-footer {
        display: none;
    }

    .auth-panel {
        padding: 2.5rem 4rem;
    }
}

@media (max-width: 991.98px) {
    .auth-shell {
        display: block;
        background:
            radial-gradient(circle at 10% 5%, rgba(99, 102, 241, 0.11), transparent 28%),
            var(--colors-surface-soft);
    }

    .auth-story {
        display: none;
    }

    .auth-panel,
    .auth-panel-scroll {
        min-height: 100vh;
        align-items: center;
        padding: 2.5rem 1.5rem;
        background: transparent;
    }

    .auth-mobile-brand {
        display: inline-flex;
    }

    .auth-card {
        max-width: 620px;
        padding: clamp(1.5rem, 5vw, 2.5rem);
        border: 1px solid var(--colors-hairline);
        border-radius: 1.25rem;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: var(--shadow-soft);
    }

    .auth-card.wide {
        max-width: 720px;
    }
}

@media (max-width: 575.98px) {
    .auth-panel,
    .auth-panel-scroll {
        display: block;
        padding: 1.25rem 1rem;
    }

    .auth-panel-inner,
    .auth-panel-inner.wide {
        margin: 0 auto;
    }

    .auth-mobile-brand {
        margin: 0.25rem 0 1.35rem;
    }

    .brand-mark {
        width: 2.35rem;
        height: 2.35rem;
        border-radius: 0.7rem;
    }

    .auth-back-link {
        display: flex;
        width: fit-content;
        margin-bottom: 1rem;
    }

    .auth-card {
        padding: 1.35rem;
        border-radius: 1rem;
    }

    .auth-card-header {
        margin-bottom: 1.5rem;
    }

    .auth-card-header h2 {
        font-size: 1.8rem;
    }

    .auth-card-header p {
        font-size: 0.86rem;
    }

    .auth-form-section {
        margin-bottom: 1.15rem;
    }

    .divider {
        margin: 1.4rem 0 1rem;
    }
}

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

.demo-access {
    margin-top: 1rem;
    padding: 0.9rem;
    border: 1px solid #dddffc;
    border-radius: 14px;
    background: #f7f7ff;
}

.demo-access-heading {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.7rem;
}

.demo-access-heading span {
    color: var(--colors-primary-active);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.demo-access-heading small {
    color: var(--colors-muted);
    font-size: 0.68rem;
    text-align: right;
}

.demo-access-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.demo-access-button {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    min-width: 0;
    padding: 0.65rem;
    border: 1px solid #e0e2ef;
    border-radius: 10px;
    color: var(--colors-ink);
    text-align: left;
    background: white;
}

.demo-access-button:hover {
    border-color: var(--colors-primary);
    background: #f9f8ff;
}

.demo-access-button > i { color: var(--colors-primary); }
.demo-access-button strong,
.demo-access-button small { display: block; }
.demo-access-button strong { font-size: 0.74rem; }
.demo-access-button small {
    overflow: hidden;
    color: var(--colors-muted);
    font-size: 0.58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-demo-pill {
    margin-left: 0.75rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    color: #e0e7ff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.10);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

@media (max-width: 700px) {
    .demo-access-heading { align-items: flex-start; flex-direction: column; }
    .demo-access-heading small { text-align: left; }
    .demo-access-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .navbar-demo-pill {
        display: none;
    }

    .dashboard-shell {
        padding-top: 1rem !important;
        padding-inline: 1rem;
    }

    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 1.25rem;
        margin-bottom: 1.35rem;
        border-radius: 1.1rem;
    }

    .dashboard-search,
    .dashboard-hero-action {
        width: 100%;
        flex-basis: auto;
    }

    .nav-pills {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .nav-pills .nav-link {
        white-space: nowrap;
    }

    .admin-dashboard .row > .col-md-3 {
        width: 50%;
    }

    .admin-dashboard .stat-card {
        min-height: 7.2rem;
        padding: 1.1rem;
    }
}

@media (max-width: 575.98px) {
    .admin-dashboard .list-group-item {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 0.85rem;
    }

    .admin-dashboard .list-group-item > div:last-child {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.35rem;
    }
}
