/* ==========================================================================
   Library Management System — UI theme
   Layers on top of Bootstrap 5.3. Every existing page picks this up through
   the shared layouts, so no per-page markup changes are required.
   ========================================================================== */

:root {
    --lib-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --lib-primary: #4f46e5;
    --lib-primary-600: #4338ca;
    --lib-primary-soft: #eef2ff;
    --lib-accent: #0ea5e9;
    --lib-bg: #f4f6fb;
    --lib-surface: #ffffff;
    --lib-surface-2: #f8fafc;
    --lib-border: #e5e9f2;
    --lib-text: #1e293b;
    --lib-muted: #64748b;
    --lib-sidebar-bg: #111827;
    --lib-sidebar-text: #aab3c5;
    --lib-sidebar-active: #ffffff;
    --lib-radius: 14px;
    --lib-radius-sm: 10px;
    --lib-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);
    --lib-shadow-lg: 0 10px 40px rgba(15, 23, 42, .12);
    --lib-sidebar-w: 264px;

    --bs-font-sans-serif: var(--lib-font);
    --bs-body-font-family: var(--lib-font);
    --bs-body-bg: var(--lib-bg);
    --bs-body-color: var(--lib-text);
    --bs-primary: var(--lib-primary);
    --bs-primary-rgb: 79, 70, 229;
    --bs-link-color: var(--lib-primary);
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color: var(--lib-primary-600);
    --bs-border-color: var(--lib-border);
    --bs-border-radius: var(--lib-radius-sm);
    --bs-border-radius-lg: var(--lib-radius);
}

[data-bs-theme="dark"] {
    --lib-primary: #818cf8;
    --lib-primary-600: #a5b4fc;
    --lib-primary-soft: rgba(129, 140, 248, .14);
    --lib-bg: #0b1020;
    --lib-surface: #131a2e;
    --lib-surface-2: #182038;
    --lib-border: #243049;
    --lib-text: #e2e8f0;
    --lib-muted: #94a3b8;
    --lib-sidebar-bg: #0a0f1d;
    --lib-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --bs-body-bg: var(--lib-bg);
    --bs-body-color: var(--lib-text);
    --bs-border-color: var(--lib-border);
    --bs-link-color: var(--lib-primary);
    --bs-link-color-rgb: 129, 140, 248;
    --bs-link-hover-color: var(--lib-primary-600);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--lib-font);
    background: var(--lib-bg) !important;
    color: var(--lib-text);
    font-size: .93rem;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { letter-spacing: -.01em; font-weight: 650; }
a { text-decoration: none; }
.text-muted { color: var(--lib-muted) !important; }

/* ---------- App shell: sidebar + main ---------- */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--lib-sidebar-w);
    background: var(--lib-sidebar-bg);
    color: var(--lib-sidebar-text);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease;
}

.sidebar-brand {
    display: flex; align-items: center; gap: .75rem;
    padding: 1.25rem 1.25rem 1rem;
    color: #fff; font-weight: 700; font-size: 1.02rem; line-height: 1.2;
}
.sidebar-brand:hover { color: #fff; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 12px; flex: none;
    display: grid; place-items: center; font-size: 1.2rem; color: #fff;
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
    box-shadow: 0 6px 18px rgba(99, 102, 241, .45);
}
.brand-sub { display: block; font-size: .68rem; font-weight: 500; opacity: .6; letter-spacing: .06em; text-transform: uppercase; }

.sidebar-scroll { flex: 1; overflow-y: auto; padding: .25rem .75rem 1rem; scrollbar-width: thin; scrollbar-color: #2a3350 transparent; }

.nav-group-label {
    font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: #6b7690; padding: 1.1rem .75rem .4rem;
}

.sidebar-link {
    display: flex; align-items: center; gap: .7rem;
    padding: .55rem .75rem; border-radius: 10px; margin-bottom: 2px;
    color: var(--lib-sidebar-text); font-weight: 500; font-size: .88rem;
    transition: background .15s, color .15s;
}
.sidebar-link i { font-size: 1.05rem; width: 1.25rem; text-align: center; opacity: .85; }
.sidebar-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, .35), rgba(99, 102, 241, .12));
    color: var(--lib-sidebar-active);
    box-shadow: inset 3px 0 0 #818cf8;
}
.sidebar-link.active i { opacity: 1; color: #a5b4fc; }
.sidebar-link .badge { margin-left: auto; }

.sidebar-footer { padding: .85rem 1rem; border-top: 1px solid rgba(255, 255, 255, .07); }
.user-chip { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: #fff;
    background: linear-gradient(135deg, #6366f1, #ec4899);
}
.user-chip .name { color: #fff; font-weight: 600; font-size: .85rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .role { font-size: .72rem; opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-main { flex: 1; margin-left: var(--lib-sidebar-w); min-width: 0; display: flex; flex-direction: column; }

.app-topbar {
    position: sticky; top: 0; z-index: 1030;
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem 1.5rem;
    background: color-mix(in srgb, var(--lib-surface) 82%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--lib-border);
}
.topbar-title { font-weight: 650; font-size: 1rem; margin: 0; }
.icon-btn {
    width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center;
    border: 1px solid var(--lib-border); background: var(--lib-surface); color: var(--lib-text);
    transition: all .15s; cursor: pointer;
}
.icon-btn:hover { border-color: var(--lib-primary); color: var(--lib-primary); }

.app-content { padding: 1.75rem 1.5rem 2.5rem; max-width: 1480px; width: 100%; margin: 0 auto; flex: 1; }
.app-footer { padding: 1rem 1.5rem; color: var(--lib-muted); font-size: .78rem; text-align: center; border-top: 1px solid var(--lib-border); }

.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.open { transform: none; box-shadow: var(--lib-shadow-lg); }
    .app-main { margin-left: 0; }
    .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 1035; }
    .app-content { padding: 1.25rem 1rem 2rem; }
    .app-topbar { padding: .65rem 1rem; }
}

/* ---------- Cards ---------- */
.card {
    background: var(--lib-surface);
    border: 1px solid var(--lib-border);
    border-radius: var(--lib-radius);
    box-shadow: var(--lib-shadow);
}
.card-header { background: transparent; border-bottom: 1px solid var(--lib-border); font-weight: 600; padding: .9rem 1.15rem; }
.card-body { padding: 1.15rem; }
.card-footer { background: transparent; border-top: 1px solid var(--lib-border); }

/* ---------- Page headings (h1.h4 used across every view) ---------- */
h1.h4, h1.h3, h1.h5 { font-weight: 700; letter-spacing: -.02em; }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--lib-text); --bs-table-hover-bg: var(--lib-primary-soft); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .85rem 1rem; border-bottom-color: var(--lib-border); }
.table thead th, .table-light, .table-light > th, .table > thead.table-light > tr > th {
    background: var(--lib-surface-2) !important;
    color: var(--lib-muted) !important;
    font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    border-bottom: 1px solid var(--lib-border) !important; white-space: nowrap;
}
.card > .table-responsive:first-child, .card > .table:first-child { border-radius: var(--lib-radius) var(--lib-radius) 0 0; overflow: hidden; }
.table-responsive { border-radius: var(--lib-radius); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table a:not(.btn) { font-weight: 600; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .8rem; color: var(--lib-muted); margin-bottom: .35rem; }
.form-control, .form-select {
    background-color: var(--lib-surface);
    border: 1px solid var(--lib-border);
    border-radius: var(--lib-radius-sm);
    padding: .6rem .85rem;
    color: var(--lib-text);
    transition: border-color .15s, box-shadow .15s;
}
.form-control-sm, .form-select-sm { padding: .4rem .7rem; border-radius: 9px; }
.form-control::placeholder { color: #9aa5b8; }
.form-control:focus, .form-select:focus {
    background-color: var(--lib-surface);
    color: var(--lib-text);
    border-color: var(--lib-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .16);
}
.form-check-input:checked { background-color: var(--lib-primary); border-color: var(--lib-primary); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(99, 102, 241, .16); border-color: var(--lib-primary); }
.invalid-feedback, .text-danger.small { font-size: .78rem; }

/* ---------- Buttons ---------- */
.btn { border-radius: var(--lib-radius-sm); font-weight: 600; padding: .5rem 1rem; transition: all .15s; }
.btn-sm { padding: .32rem .7rem; font-size: .8rem; border-radius: 9px; }
.btn-lg { padding: .75rem 1.5rem; border-radius: 12px; }
.btn-primary {
    --bs-btn-bg: var(--lib-primary); --bs-btn-border-color: var(--lib-primary);
    --bs-btn-hover-bg: var(--lib-primary-600); --bs-btn-hover-border-color: var(--lib-primary-600);
    --bs-btn-active-bg: var(--lib-primary-600); --bs-btn-active-border-color: var(--lib-primary-600);
    --bs-btn-color: #fff; --bs-btn-hover-color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, .28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79, 70, 229, .35); }
.btn-outline-primary { --bs-btn-color: var(--lib-primary); --bs-btn-border-color: var(--lib-primary); --bs-btn-hover-bg: var(--lib-primary); --bs-btn-hover-border-color: var(--lib-primary); }
.btn-outline-secondary { --bs-btn-color: var(--lib-muted); --bs-btn-border-color: var(--lib-border); --bs-btn-hover-bg: var(--lib-surface-2); --bs-btn-hover-color: var(--lib-text); --bs-btn-hover-border-color: #c7cfdd; }
.btn-outline-danger { --bs-btn-border-color: rgba(220, 53, 69, .35); }
.btn-outline-light { --bs-btn-border-color: rgba(255, 255, 255, .35); }

/* ---------- Badges (soft pills) ---------- */
.badge { font-weight: 600; padding: .38em .7em; border-radius: 999px; letter-spacing: .01em; }
.badge.text-bg-success   { background: #dcfce7 !important; color: #15803d !important; }
.badge.text-bg-warning   { background: #fef3c7 !important; color: #b45309 !important; }
.badge.text-bg-danger    { background: #fee2e2 !important; color: #b91c1c !important; }
.badge.text-bg-secondary { background: #e2e8f0 !important; color: #475569 !important; }
.badge.text-bg-primary,
.badge.text-bg-info      { background: #e0e7ff !important; color: #4338ca !important; }
.badge.text-bg-dark      { background: #1e293b !important; color: #fff !important; }
[data-bs-theme="dark"] .badge.text-bg-success   { background: rgba(34, 197, 94, .16) !important; color: #4ade80 !important; }
[data-bs-theme="dark"] .badge.text-bg-warning   { background: rgba(245, 158, 11, .16) !important; color: #fbbf24 !important; }
[data-bs-theme="dark"] .badge.text-bg-danger    { background: rgba(239, 68, 68, .16) !important; color: #f87171 !important; }
[data-bs-theme="dark"] .badge.text-bg-secondary { background: rgba(148, 163, 184, .16) !important; color: #cbd5e1 !important; }
[data-bs-theme="dark"] .badge.text-bg-primary,
[data-bs-theme="dark"] .badge.text-bg-info      { background: rgba(129, 140, 248, .18) !important; color: #a5b4fc !important; }

/* ---------- Alerts ---------- */
.alert { border: 0; border-left: 4px solid; border-radius: var(--lib-radius-sm); box-shadow: var(--lib-shadow); }
.alert-success { background: #ecfdf5; color: #065f46; border-color: #10b981; }
.alert-danger  { background: #fef2f2; color: #991b1b; border-color: #ef4444; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #f59e0b; }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: #3b82f6; }
[data-bs-theme="dark"] .alert-success { background: rgba(16, 185, 129, .12); color: #6ee7b7; }
[data-bs-theme="dark"] .alert-danger  { background: rgba(239, 68, 68, .12); color: #fca5a5; }
[data-bs-theme="dark"] .alert-warning { background: rgba(245, 158, 11, .12); color: #fcd34d; }
[data-bs-theme="dark"] .alert-info    { background: rgba(59, 130, 246, .12); color: #93c5fd; }

/* ---------- Pagination ---------- */
.pagination { gap: .25rem; margin-bottom: 0; }
.page-link { border-radius: 9px !important; border: 1px solid var(--lib-border); color: var(--lib-text); background: var(--lib-surface); min-width: 38px; text-align: center; }
.page-link:hover { background: var(--lib-primary-soft); color: var(--lib-primary); }
.page-item.active .page-link { background: var(--lib-primary); border-color: var(--lib-primary); color: #fff; }
.page-item.disabled .page-link { background: var(--lib-surface-2); color: var(--lib-muted); }
nav[role="navigation"] svg { width: 1rem; height: 1rem; }

/* ---------- Misc ---------- */
.list-group-item { background: var(--lib-surface); border-color: var(--lib-border); color: var(--lib-text); }
.dropdown-menu { border: 1px solid var(--lib-border); border-radius: var(--lib-radius-sm); box-shadow: var(--lib-shadow-lg); }
.modal-content { border: 0; border-radius: var(--lib-radius); box-shadow: var(--lib-shadow-lg); }
.border-bottom, .border-top, .border { border-color: var(--lib-border) !important; }
.bg-light { background-color: var(--lib-surface-2) !important; }
dl dt { color: var(--lib-muted); font-weight: 600; font-size: .8rem; }
code { background: var(--lib-primary-soft); color: var(--lib-primary); padding: .12em .4em; border-radius: 6px; }
img.rounded.border { border-color: var(--lib-border) !important; }

/* ---------- Page header helper ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .15rem 0 0; color: var(--lib-muted); }

/* ---------- Welcome banner (dashboards) ---------- */
.welcome-banner {
    position: relative; overflow: hidden;
    border-radius: 18px; padding: 1.75rem 1.9rem; color: #fff; margin-bottom: 1.5rem;
    background: radial-gradient(900px 300px at 100% -20%, rgba(14, 165, 233, .55), transparent 60%),
                linear-gradient(120deg, #4338ca 0%, #6366f1 55%, #8b5cf6 100%);
    box-shadow: 0 14px 40px rgba(79, 70, 229, .28);
}
.welcome-banner::after {
    content: "\f4ae"; font-family: 'bootstrap-icons';
    position: absolute; right: 1.5rem; bottom: -1.6rem; font-size: 9rem; opacity: .12; line-height: 1;
}
.welcome-banner h1 { font-size: 1.5rem; margin: 0 0 .3rem; color: #fff; }
.welcome-banner p { margin: 0; opacity: .85; }
.welcome-banner .btn-light { color: var(--lib-primary-600); font-weight: 600; }

/* ---------- Stat cards ---------- */
.stat-card { padding: 1.1rem 1.15rem; display: flex; align-items: center; gap: .95rem; height: 100%; transition: transform .15s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--lib-shadow-lg); }
.stat-icon { width: 48px; height: 48px; border-radius: 13px; flex: none; display: grid; place-items: center; font-size: 1.3rem; }
.stat-label { font-size: .76rem; font-weight: 600; color: var(--lib-muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 1.6rem; font-weight: 750; line-height: 1.15; letter-spacing: -.02em; }
.tone-indigo { background: #e0e7ff; color: #4338ca; }
.tone-sky    { background: #e0f2fe; color: #0369a1; }
.tone-green  { background: #dcfce7; color: #15803d; }
.tone-amber  { background: #fef3c7; color: #b45309; }
.tone-red    { background: #fee2e2; color: #b91c1c; }
.tone-violet { background: #ede9fe; color: #6d28d9; }
.tone-pink   { background: #fce7f3; color: #be185d; }
.tone-slate  { background: #e2e8f0; color: #334155; }
[data-bs-theme="dark"] .tone-indigo { background: rgba(99, 102, 241, .18); color: #a5b4fc; }
[data-bs-theme="dark"] .tone-sky    { background: rgba(14, 165, 233, .18); color: #7dd3fc; }
[data-bs-theme="dark"] .tone-green  { background: rgba(34, 197, 94, .16); color: #86efac; }
[data-bs-theme="dark"] .tone-amber  { background: rgba(245, 158, 11, .16); color: #fcd34d; }
[data-bs-theme="dark"] .tone-red    { background: rgba(239, 68, 68, .16); color: #fca5a5; }
[data-bs-theme="dark"] .tone-violet { background: rgba(139, 92, 246, .18); color: #c4b5fd; }
[data-bs-theme="dark"] .tone-pink   { background: rgba(236, 72, 153, .16); color: #f9a8d4; }
[data-bs-theme="dark"] .tone-slate  { background: rgba(148, 163, 184, .16); color: #cbd5e1; }

.chart-card .card-title { font-size: .95rem; font-weight: 650; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.chart-card .card-title i { color: var(--lib-primary); }

.row-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--lib-border); font-size: .88rem; }
.row-item:last-of-type { border-bottom: 0; }
.row-item .title { font-weight: 600; }
.empty-state { text-align: center; color: var(--lib-muted); padding: 1.25rem 0; }
.empty-state i { font-size: 1.8rem; display: block; opacity: .5; margin-bottom: .35rem; }

.quick-link {
    display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; border-radius: var(--lib-radius-sm);
    border: 1px solid var(--lib-border); background: var(--lib-surface); color: var(--lib-text); font-weight: 600; transition: all .15s; height: 100%;
}
.quick-link i { font-size: 1.25rem; color: var(--lib-primary); }
.quick-link:hover { border-color: var(--lib-primary); background: var(--lib-primary-soft); color: var(--lib-primary); transform: translateY(-1px); }

/* ==========================================================================
   Public landing page
   ========================================================================== */
.pub-nav { position: sticky; top: 0; z-index: 1030; background: color-mix(in srgb, var(--lib-surface) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--lib-border); }
.pub-nav .navbar-brand { display: flex; align-items: center; gap: .65rem; font-weight: 750; color: var(--lib-text); }
.pub-nav .brand-mark { width: 36px; height: 36px; font-size: 1.05rem; border-radius: 11px; }

.hero {
    position: relative; overflow: hidden; color: #fff; padding: 6rem 0 7rem;
    background: radial-gradient(700px 400px at 85% 10%, rgba(14, 165, 233, .45), transparent 60%),
                radial-gradient(600px 400px at 10% 90%, rgba(236, 72, 153, .28), transparent 60%),
                linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4338ca 100%);
}
.hero::before {
    content: ""; position: absolute; inset: 0; opacity: .08;
    background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
    background-size: 44px 44px; mask-image: radial-gradient(circle at 50% 40%, #000, transparent 70%);
}
.hero .container { position: relative; }
.hero-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); font-size: .8rem; font-weight: 600; margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.hero h1 span { background: linear-gradient(90deg, #7dd3fc, #f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: rgba(255, 255, 255, .8); max-width: 640px; }
.hero .btn-light { color: #3730a3; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.hero-stats { margin-top: -3.25rem; position: relative; z-index: 2; }
.hero-stat { text-align: center; padding: 1.25rem 1rem; }
.hero-stat b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--lib-primary); }
.hero-stat span { font-size: .8rem; color: var(--lib-muted); font-weight: 600; }

.section-title { text-align: center; max-width: 620px; margin: 0 auto 2.5rem; }
.section-title h2 { font-weight: 800; letter-spacing: -.02em; }
.section-title p { color: var(--lib-muted); }
.feature-card { padding: 1.6rem; height: 100%; transition: transform .2s, box-shadow .2s, border-color .2s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--lib-shadow-lg); border-color: rgba(99, 102, 241, .45); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 1rem; }
.feature-card h5 { font-weight: 700; font-size: 1.05rem; }
.feature-card p { color: var(--lib-muted); margin: 0; font-size: .9rem; }

.cta-band { border-radius: 22px; padding: 3rem 2rem; text-align: center; color: #fff; background: linear-gradient(120deg, #4338ca, #6366f1 60%, #0ea5e9); box-shadow: 0 20px 50px rgba(79, 70, 229, .3); }
.cta-band h2 { font-weight: 800; }
.pub-footer { background: #0f172a; color: #94a3b8; padding: 2rem 0; font-size: .85rem; }

/* ==========================================================================
   Auth pages (split screen)
   ========================================================================== */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-aside {
    position: relative; overflow: hidden; color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(600px 400px at 90% 0%, rgba(14, 165, 233, .45), transparent 60%),
                radial-gradient(500px 400px at 0% 100%, rgba(236, 72, 153, .3), transparent 60%),
                linear-gradient(135deg, #1e1b4b, #312e81 50%, #4338ca);
}
.auth-aside::before { content: ""; position: absolute; inset: 0; opacity: .07; background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 40px 40px; }
.auth-aside > * { position: relative; }
.auth-aside h2 { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.auth-aside p { color: rgba(255, 255, 255, .78); max-width: 420px; }
.auth-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .75rem; }
.auth-points li { display: flex; gap: .7rem; align-items: center; font-weight: 500; }
.auth-points i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .14); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--lib-bg); }
.auth-box { width: 100%; max-width: 440px; }
.auth-box .card { border-radius: 18px; box-shadow: var(--lib-shadow-lg); }
.auth-box .card-body { padding: 2rem; }
.auth-box .card-title { font-size: 1.4rem; font-weight: 800; }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--lib-muted); pointer-events: none; }
.input-icon .form-control { padding-left: 2.6rem; }
.auth-links { text-align: center; margin-top: 1.25rem; color: var(--lib-muted); font-size: .88rem; line-height: 1.9; }
.auth-links a { font-weight: 600; }
@media (max-width: 991.98px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
}

/* ---------- Print: keep receipts clean ---------- */
@media print {
    .app-sidebar, .app-topbar, .app-footer, .sidebar-backdrop { display: none !important; }
    .app-main { margin-left: 0 !important; }
    body { background: #fff !important; }
    .card { box-shadow: none; }
}
