/* ==========================================================================
   Dispense Licensing - admin UI
   Layered on top of Bootstrap 5: design tokens, app shell, and the handful of
   components the dashboard needs (stat cards, status badges, key chips).
   ========================================================================== */

:root {
    --brand-50:  #eef2ff;
    --brand-100: #e0e7ff;
    --brand-200: #c7d2fe;
    --brand-400: #818cf8;
    --brand-500: #6366f1;
    --brand-600: #4f46e5;
    --brand-700: #4338ca;

    --ink-900: #0f172a;
    --ink-800: #1e293b;
    --ink-700: #334155;
    --ink-600: #475569;
    --ink-500: #64748b;
    --ink-400: #94a3b8;
    --ink-300: #cbd5e1;
    --ink-200: #e2e8f0;
    --ink-100: #f1f5f9;
    --ink-50:  #f8fafc;

    --success-50:  #ecfdf5;
    --success-500: #10b981;
    --success-700: #047857;
    --danger-50:   #fef2f2;
    --danger-500:  #ef4444;
    --danger-600:  #dc2626;
    --warning-50:  #fffbeb;
    --warning-500: #f59e0b;
    --info-500:    #0ea5e9;

    --sidebar-width: 264px;
    --sidebar-collapsed: 78px;
    --topbar-height: 68px;

    --radius-sm: 8px;
    --radius:    12px;
    --radius-lg: 16px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);

    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --------------------------------------------------------------- base ---- */

body {
    font-family: var(--bs-body-font-family);
    background: var(--ink-50);
    color: var(--ink-800);
    font-size: .9375rem;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--ink-900); }

code, .mono {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

:focus-visible {
    outline: 3px solid var(--brand-200);
    outline-offset: 2px;
}

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

/* ---------------------------------------------------------- app shell ---- */

.app-shell { min-height: 100vh; }

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #131c31 0%, #0f172a 100%);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    z-index: 1045;
    transition: transform .25s ease, width .25s ease;
}

.app-sidebar__brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    height: var(--topbar-height);
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    color: #fff;
    flex: 0 0 auto;
}

.app-sidebar__logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #fff;
    flex: 0 0 auto;
    overflow: hidden;
}

.app-sidebar__logo img { width: 100%; height: 100%; object-fit: cover; }

.app-sidebar__name {
    font-weight: 650;
    font-size: 1rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar__tag {
    display: block;
    font-size: .6875rem;
    font-weight: 500;
    color: var(--ink-400);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.app-sidebar__nav {
    padding: 1rem .75rem;
    overflow-y: auto;
    flex: 1 1 auto;
}

.app-sidebar__heading {
    font-size: .6875rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    padding: .75rem .75rem .375rem;
    font-weight: 600;
}

.nav-item-link {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .625rem .75rem;
    border-radius: var(--radius-sm);
    color: #cbd5e1;
    font-weight: 500;
    margin-bottom: .125rem;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}

.nav-item-link i { width: 18px; text-align: center; font-size: .95rem; flex: 0 0 auto; }

.nav-item-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }

.nav-item-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, .22), rgba(99, 102, 241, .06));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--brand-500);
}

.app-sidebar__footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .07);
    flex: 0 0 auto;
}

.app-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .25s ease;
}

.app-topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--ink-200);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.app-content { padding: 1.75rem 1.5rem 3rem; flex: 1 1 auto; }

.sidebar-toggle {
    border: 1px solid var(--ink-200);
    background: #fff;
    color: var(--ink-600);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.sidebar-toggle:hover { background: var(--ink-100); color: var(--ink-900); }

/* Collapsed state (desktop) */
body.sidebar-collapsed .app-sidebar { width: var(--sidebar-collapsed); }
body.sidebar-collapsed .app-main { margin-left: var(--sidebar-collapsed); }
body.sidebar-collapsed .app-sidebar__name,
body.sidebar-collapsed .app-sidebar__heading,
body.sidebar-collapsed .nav-item-link span,
body.sidebar-collapsed .app-sidebar__footer .sidebar-user__meta { display: none; }
body.sidebar-collapsed .app-sidebar__brand { justify-content: center; padding: 0; }
body.sidebar-collapsed .nav-item-link { justify-content: center; padding: .7rem; }

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

/* --------------------------------------------------------- page header --- */

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1 { font-size: 1.5rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
.page-header p { margin: 0; color: var(--ink-500); font-size: .9rem; max-width: 68ch; }

.breadcrumb-bar {
    font-size: .8125rem;
    color: var(--ink-500);
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    min-width: 0;
}

.breadcrumb-bar a { color: var(--ink-500); }
.breadcrumb-bar a:hover { color: var(--brand-600); }
.breadcrumb-bar .sep { color: var(--ink-300); }
.breadcrumb-bar .current { color: var(--ink-800); font-weight: 550; }

/* ---------------------------------------------------------------- cards -- */

.card {
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    background: #fff;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--ink-200);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

.card-header h2, .card-header h3 { font-size: 1rem; margin: 0; }
.card-body { padding: 1.25rem; }

.stat-card {
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-xs);
    height: 100%;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform .15s ease, box-shadow .15s ease;
}

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

.stat-card__icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    flex: 0 0 auto;
}

.stat-card__icon--brand   { background: var(--brand-50);   color: var(--brand-600); }
.stat-card__icon--success { background: var(--success-50); color: var(--success-700); }
.stat-card__icon--info    { background: #e0f2fe;           color: #0369a1; }
.stat-card__icon--warning { background: var(--warning-50); color: #b45309; }

.stat-card__label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-500);
    font-weight: 600;
    margin-bottom: .2rem;
}

.stat-card__value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; color: var(--ink-900); }
.stat-card__hint  { font-size: .78rem; color: var(--ink-500); margin-top: .2rem; }

/* --------------------------------------------------------------- tables -- */

.table-wrap { overflow-x: auto; }

.table {
    margin: 0;
    --bs-table-bg: #fff;
    font-size: .875rem;
    vertical-align: middle;
}

.table > thead > tr > th {
    background: var(--ink-50);
    color: var(--ink-600);
    font-size: .72rem;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--ink-200);
    padding: .75rem 1rem;
    white-space: nowrap;
}

.table > tbody > tr > td { padding: .85rem 1rem; border-bottom: 1px solid var(--ink-100); }
.table > tbody > tr:last-child > td { border-bottom: 0; }
.table > tbody > tr:hover { background: var(--ink-50); }

.table-actions { display: flex; gap: .25rem; justify-content: flex-end; }

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    border: 1px solid var(--ink-200);
    background: #fff;
    color: var(--ink-600);
    font-size: .8rem;
    transition: all .15s ease;
}

.btn-icon:hover { background: var(--ink-100); color: var(--ink-900); border-color: var(--ink-300); }
.btn-icon--danger:hover { background: var(--danger-50); color: var(--danger-600); border-color: #fecaca; }

.client-name-cell { display: flex; align-items: center; gap: .7rem; min-width: 0; }

.client-avatar {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--brand-50);
    color: var(--brand-600);
    display: grid;
    place-items: center;
    font-weight: 650;
    font-size: .78rem;
    flex: 0 0 auto;
}

/* --------------------------------------------------------------- badges -- */

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.4;
}

.badge-status .badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-status--active   { background: var(--success-50); color: var(--success-700); }
.badge-status--inactive { background: var(--ink-100);    color: var(--ink-600); }

.badge-soft {
    background: var(--ink-100);
    color: var(--ink-600);
    font-weight: 600;
    padding: .25rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
}

/* ----------------------------------------------------------- key chips --- */

.key-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--ink-50);
    border: 1px solid var(--ink-200);
    border-radius: 7px;
    padding: .25rem .35rem .25rem .6rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .78rem;
    color: var(--ink-700);
    max-width: 100%;
}

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

.copy-btn {
    border: 0;
    background: transparent;
    color: var(--ink-500);
    padding: .15rem .3rem;
    border-radius: 5px;
    font-size: .75rem;
    line-height: 1;
    flex: 0 0 auto;
}

.copy-btn:hover { background: var(--ink-200); color: var(--ink-800); }
.copy-btn.is-copied { color: var(--success-700); }

.secret-field { position: relative; }

.secret-field .form-control { padding-right: 5.5rem; font-family: ui-monospace, Menlo, Consolas, monospace; }

.secret-field__actions {
    position: absolute;
    top: 50%;
    right: .4rem;
    transform: translateY(-50%);
    display: flex;
    gap: .1rem;
}

.secret-field.has-one-action .form-control { padding-right: 3rem; }

/* ---------------------------------------------------------------- forms -- */

.form-label { font-weight: 600; font-size: .8125rem; color: var(--ink-700); margin-bottom: .35rem; }
.form-label .req { color: var(--danger-500); }

.form-control, .form-select {
    border-color: var(--ink-200);
    border-radius: var(--radius-sm);
    padding: .55rem .75rem;
    font-size: .875rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-400);
    box-shadow: 0 0 0 3px var(--brand-100);
}

.form-text { font-size: .78rem; color: var(--ink-500); }
.invalid-feedback { font-size: .78rem; }

.form-section + .form-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--ink-200); }
.form-section__title { font-size: .95rem; font-weight: 650; margin-bottom: .25rem; }
.form-section__hint  { font-size: .82rem; color: var(--ink-500); margin-bottom: 1rem; }

.btn { border-radius: var(--radius-sm); font-weight: 550; font-size: .875rem; padding: .55rem 1rem; }

.btn-primary {
    background: var(--brand-600);
    border-color: var(--brand-600);
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover, .btn-primary:focus { background: var(--brand-700); border-color: var(--brand-700); }
.btn-outline-secondary { border-color: var(--ink-200); color: var(--ink-700); }
.btn-outline-secondary:hover { background: var(--ink-100); color: var(--ink-900); border-color: var(--ink-300); }

.btn .spinner-border { width: .85rem; height: .85rem; border-width: .15em; }

/* Radio-style status picker */
.status-toggle { display: flex; gap: .5rem; flex-wrap: wrap; }

.status-toggle input { position: absolute; opacity: 0; pointer-events: none; }

.status-toggle label {
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-sm);
    padding: .5rem .9rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink-600);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: #fff;
}

.status-toggle input:checked + label {
    border-color: var(--brand-500);
    background: var(--brand-50);
    color: var(--brand-700);
    box-shadow: 0 0 0 3px var(--brand-100);
}

.status-toggle input:focus-visible + label { outline: 3px solid var(--brand-200); outline-offset: 2px; }

/* ------------------------------------------------------- domain editor --- */

.domain-row {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
    margin-bottom: .5rem;
}

.domain-row .form-control { flex: 1 1 auto; }
.domain-row__prefix { color: var(--ink-400); font-size: .8rem; padding-top: .6rem; }

.domain-hint {
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    color: var(--brand-700);
    border-radius: var(--radius-sm);
    padding: .75rem .9rem;
    font-size: .82rem;
    display: flex;
    gap: .6rem;
    align-items: flex-start;
}

/* ---------------------------------------------------------- empty state -- */

.empty-state { text-align: center; padding: 3rem 1.5rem; }

.empty-state__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--ink-100);
    color: var(--ink-400);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    margin: 0 auto 1rem;
}

.empty-state h3 { font-size: 1rem; margin-bottom: .35rem; }
.empty-state p  { color: var(--ink-500); font-size: .875rem; max-width: 42ch; margin: 0 auto 1.25rem; }

/* --------------------------------------------------------------- toasts -- */

.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    max-width: min(380px, calc(100vw - 2rem));
}

.app-toast {
    background: #fff;
    border: 1px solid var(--ink-200);
    border-left: 4px solid var(--ink-400);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: .85rem 1rem;
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    animation: toast-in .25s ease;
}

.app-toast--success { border-left-color: var(--success-500); }
.app-toast--error   { border-left-color: var(--danger-500); }
.app-toast--warning { border-left-color: var(--warning-500); }
.app-toast--info    { border-left-color: var(--info-500); }

.app-toast__icon { font-size: .95rem; margin-top: .1rem; }
.app-toast--success .app-toast__icon { color: var(--success-500); }
.app-toast--error   .app-toast__icon { color: var(--danger-500); }
.app-toast--warning .app-toast__icon { color: var(--warning-500); }
.app-toast--info    .app-toast__icon { color: var(--info-500); }

.app-toast__title { font-weight: 650; font-size: .85rem; margin-bottom: .1rem; }
.app-toast__body  { font-size: .82rem; color: var(--ink-600); }

.app-toast__close {
    border: 0;
    background: transparent;
    color: var(--ink-400);
    margin-left: auto;
    font-size: .8rem;
    line-height: 1;
    padding: .2rem;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(1rem); }
    to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------- auth UI --- */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--ink-50);
}

.auth-aside {
    background: linear-gradient(155deg, #1e1b4b 0%, #312e81 45%, #4338ca 100%);
    color: #e0e7ff;
    padding: 3rem;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-aside::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    right: -140px;
    bottom: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(129, 140, 248, .35), transparent 65%);
}

.auth-aside h2 { color: #fff; font-size: 1.9rem; line-height: 1.25; letter-spacing: -.02em; }
.auth-aside ul { list-style: none; padding: 0; margin: 2rem 0 0; }
.auth-aside li { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; font-size: .9rem; }
.auth-aside li i { color: #a5b4fc; margin-top: .2rem; }

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-brand__logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.1rem;
    overflow: hidden;
}

.auth-brand__logo img { width: 100%; height: 100%; object-fit: cover; }
.auth-brand__name { font-weight: 700; font-size: 1.05rem; color: var(--ink-900); }

/* --------------------------------------------------------- error pages --- */

.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1.25rem;
    text-align: center;
}

.error-code {
    font-size: clamp(4rem, 14vw, 7rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-page h1 { font-size: 1.35rem; margin: 1rem 0 .5rem; }
.error-page p  { color: var(--ink-500); max-width: 46ch; margin: 0 auto 1.5rem; }

.error-debug {
    text-align: left;
    background: var(--ink-900);
    color: #e2e8f0;
    border-radius: var(--radius);
    padding: 1rem;
    font-size: .78rem;
    max-width: 720px;
    margin: 2rem auto 0;
    overflow-x: auto;
}

/* -------------------------------------------------------------- utility -- */

.detail-list { display: grid; gap: 1rem; }

.detail-list__item { display: grid; gap: .2rem; }

.detail-list__label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 650;
    color: var(--ink-500);
}

.detail-list__value { font-size: .9rem; color: var(--ink-800); word-break: break-word; }

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-600);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: .8rem;
    font-weight: 650;
    flex: 0 0 auto;
}

.dropdown-menu {
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: .875rem;
    padding: .4rem;
}

.dropdown-item { border-radius: 6px; padding: .5rem .65rem; }
.dropdown-item:hover { background: var(--ink-100); }
.dropdown-item.text-danger:hover { background: var(--danger-50); }

.pagination { --bs-pagination-font-size: .85rem; margin: 0; }
.page-link { color: var(--ink-600); border-color: var(--ink-200); }
.page-item.active .page-link { background: var(--brand-600); border-color: var(--brand-600); }

.modal-content { border: 0; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.modal-header, .modal-footer { border-color: var(--ink-200); }

.is-loading { position: relative; pointer-events: none; opacity: .65; }

.skeleton {
    background: linear-gradient(90deg, var(--ink-100) 25%, var(--ink-200) 37%, var(--ink-100) 63%);
    background-size: 400% 100%;
    animation: skeleton 1.4s ease infinite;
    border-radius: 6px;
}

@keyframes skeleton {
    from { background-position: 100% 50%; }
    to   { background-position: 0 50%; }
}

/* ---------------------------------------------------------- responsive --- */

@media (min-width: 992px) {
    .auth-page { grid-template-columns: 1.05fr 1fr; }
    .auth-aside { display: flex; }
}

@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-main { margin-left: 0; }

    body.sidebar-open .app-sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }

    /* The collapse toggle is desktop-only; on small screens it slides instead. */
    body.sidebar-collapsed .app-sidebar { width: var(--sidebar-width); }
    body.sidebar-collapsed .app-main { margin-left: 0; }
    body.sidebar-collapsed .app-sidebar__name,
    body.sidebar-collapsed .app-sidebar__heading,
    body.sidebar-collapsed .nav-item-link span,
    body.sidebar-collapsed .app-sidebar__footer .sidebar-user__meta { display: block; }
    body.sidebar-collapsed .app-sidebar__brand { justify-content: flex-start; padding: 0 1.25rem; }
    body.sidebar-collapsed .nav-item-link { justify-content: flex-start; padding: .625rem .75rem; }
}

@media (max-width: 767.98px) {
    .app-content { padding: 1.25rem 1rem 2.5rem; }
    .app-topbar { padding: 0 1rem; }
    .page-header h1 { font-size: 1.25rem; }
    .stat-card { padding: 1rem; }
    .stat-card__value { font-size: 1.5rem; }
    .toast-stack { left: 1rem; right: 1rem; max-width: none; }
    .card-header { padding: .9rem 1rem; }
    .card-body { padding: 1rem; }
}

@media (max-width: 575.98px) {
    .auth-card { padding: 1.5rem; box-shadow: none; border: 0; background: transparent; }
    .table-actions { justify-content: flex-start; }
}

@media print {
    .app-sidebar, .app-topbar, .table-actions, .btn, .toast-stack { display: none !important; }
    .app-main { margin-left: 0; }
}
