:root {
    color-scheme: light;
    --navy: #2B3C73;
    --navy-deep: #23315F;
    --yellow: #FFD447;
    --background: #F6F4EB;
    --surface: #FFFFFF;
    --muted: #667085;
    --text: #202A3D;
    --border: #E6E8EF;
    --blue-soft: #EAF0FF;
    --green: #278253;
    --red: #B54747;
    --radius-card: 18px;
    --radius-control: 13px;
    font-family: Roboto, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 5;
    display: flex;
    width: 254px;
    flex-direction: column;
    padding: 27px 18px 17px;
    border-right: 1px solid var(--border);
    background: var(--surface);
}

.brand, .login-brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 14px;
    color: var(--navy);
    background: var(--yellow);
    font-size: 22px;
    font-weight: 900;
}
.brand-copy, .login-brand > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.brand-copy strong, .login-brand strong { color: var(--navy); font-size: 16px; font-weight: 900; letter-spacing: .8px; }
.brand-copy small, .login-brand small { color: var(--muted); font-size: 11px; }
.nav-caption { margin: 42px 10px 12px; color: #98A0AF; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.side-nav { display: grid; gap: 7px; }
.side-nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 46px;
    padding: 0 13px;
    border-radius: 12px;
    color: #667085;
    font-size: 13px;
    font-weight: 650;
    transition: background .16s ease, color .16s ease;
}
.side-nav a:hover, .side-nav a.is-active { color: var(--navy); background: #EAF0FF; }
.side-nav a.is-active { font-weight: 800; }
.nav-icon { display: grid; width: 21px; place-items: center; font-size: 20px; }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 14px 2px 3px; border-top: 1px solid var(--border); }
.profile-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 13px; color: var(--navy); background: var(--yellow); font-weight: 850; }
.profile-copy { display: grid; min-width: 0; gap: 3px; flex: 1; }
.profile-copy strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy span { color: var(--muted); font-size: 11px; }
.sidebar-footer form { margin: 0; }
.icon-button { border: 0; color: var(--muted); background: transparent; font-size: 21px; }
.icon-button:hover { color: var(--navy); }

.main-content { max-width: 1600px; min-height: 100vh; margin-left: 254px; padding: 28px 36px 46px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.eyebrow { margin: 0 0 7px; color: #8A93A6; font-size: 10px; font-weight: 800; letter-spacing: 1.15px; }
.topbar h1 { margin: 0; color: var(--text); font-size: 25px; letter-spacing: -.5px; }
.topbar-user { display: flex; align-items: center; gap: 8px; color: #4B5567; font-size: 12px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #37A56B; box-shadow: 0 0 0 3px #E6F5ED; }
.role-badge { margin-left: 4px; padding: 6px 9px; border-radius: 20px; color: var(--navy); background: #EAF0FF; font-size: 10px; font-weight: 800; }
.mobile-nav { display: none; }

.welcome-banner {
    position: relative;
    display: flex;
    min-height: 191px;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    padding: 30px 37px;
    border-radius: 20px;
    color: #fff;
    background: var(--navy);
    box-shadow: 0 10px 24px rgba(43, 60, 115, .12);
}
.welcome-content { position: relative; z-index: 1; max-width: 650px; }
.banner-kicker { color: #E8D47D; font-size: 10px; font-weight: 800; letter-spacing: 1.15px; }
.welcome-banner h2 { margin: 11px 0 7px; font-size: clamp(23px, 3vw, 29px); letter-spacing: -.65px; }
.welcome-banner p { max-width: 520px; margin: 0; color: #E0E5F3; font-size: 13px; line-height: 1.6; }
.banner-book { position: relative; width: 145px; height: 135px; margin-right: 18px; transform: rotate(5deg); }
.banner-book span { position: absolute; z-index: 2; top: 10px; left: 20px; display: grid; width: 76px; height: 111px; place-items: center; border: 5px solid #fff; border-radius: 9px 13px 13px 9px; color: var(--navy); background: var(--yellow); font-size: 21px; font-weight: 900; box-shadow: 8px 8px 0 rgba(255,255,255,.14); }
.banner-book i, .banner-book b { position: absolute; right: 7px; width: 69px; height: 92px; border-radius: 9px; background: #6277B5; }
.banner-book i { top: 23px; transform: rotate(13deg); }
.banner-book b { top: 34px; right: 17px; background: #8FA0D0; transform: rotate(23deg); }

.section-block { margin-top: 30px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section-heading h2, .page-intro h2 { margin: 0; color: var(--text); font-size: 19px; letter-spacing: -.25px; }
.text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--navy); font-size: 12px; font-weight: 800; }
.text-link span, .secondary-button span { margin-left: 5px; }
.text-link .material-symbols-rounded { margin-left: 0; font-size: 16px; line-height: 1; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat-card, .panel-card, .quick-card { border: 1px solid #EAEBF0; border-radius: var(--radius-card); background: var(--surface); box-shadow: 0 5px 16px rgba(34, 48, 82, .035); }
.stat-card { display: grid; min-height: 148px; grid-template-columns: 36px 1fr; grid-template-rows: 34px auto auto; align-content: start; column-gap: 10px; padding: 17px; }
.stat-icon { display: grid; width: 34px; height: 34px; grid-column: 1; grid-row: 1; align-self: center; place-items: center; border-radius: 11px; font-size: 18px; font-weight: 800; }
.stat-icon-yellow { color: #866A00; background: #FFF4C7; }
.stat-icon-blue { color: #315EDB; background: #EAF0FF; }
.stat-icon-green { color: #278253; background: #E7F8F1; }
.stat-label { grid-column: 2; grid-row: 1; align-self: center; color: var(--muted); font-size: 11px; font-weight: 650; }
.stat-value { grid-column: 2; grid-row: 2; margin-top: 8px; color: var(--text); font-size: 28px; line-height: 1; }
.stat-footnote { grid-column: 2; grid-row: 3; margin-top: 6px; color: #9299A8; font-size: 10px; }
.quick-card { display: flex; align-items: center; gap: 11px; margin-top: 24px; padding: 15px 18px; }
.quick-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--navy); background: var(--blue-soft); font-size: 18px; }
.quick-card h2 { margin: 0 0 5px; font-size: 14px; }
.quick-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.secondary-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 3px; margin-left: auto; padding: 0 15px; border-radius: var(--radius-control); color: var(--navy); background: #EAF0FF; font-size: 12px; font-weight: 800; white-space: nowrap; }
.secondary-button:hover { background: #DDE6FF; }

.notice { margin: 0 0 18px; padding: 12px 15px; border: 1px solid transparent; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.notice-error { border-color: #F1CCCC; color: #8E3535; background: #FFF1F1; }
.notice-success { border-color: #CDE9D8; color: #236742; background: #EDF9F1; }
.notice-info { border-color: #D9E1F7; color: var(--navy); background: #F0F3FF; }
.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 4px 0 20px; }
.page-intro > div > p:last-child { max-width: 720px; margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.intro-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #DDEDE3; border-radius: 20px; color: #397451; background: #F4FBF6; font-size: 11px; font-weight: 750; white-space: nowrap; }
.intro-chip .status-dot { width: 7px; height: 7px; box-shadow: none; }
.intro-chip-error { border-color: #F1CCCC; color: #8E3535; background: #FFF1F1; }
.verification-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .85fr); align-items: stretch; gap: 18px; }
.panel-card { padding: 22px; }
.panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 21px; }
.panel-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: var(--navy); background: #EAF0FF; font-size: 18px; }
.panel-heading h2, .guide-card h2 { margin: 0; font-size: 16px; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.verification-card label, .login-form label { display: block; margin: 0 0 7px; color: #344054; font-size: 12px; font-weight: 750; }
.verification-card select, .verification-card input[type="text"], .login-form input {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid #DDE4F0;
    border-radius: var(--radius-control);
    outline: none;
    color: var(--text);
    background: #FAFAFC;
    transition: border-color .16s, box-shadow .16s;
}
.verification-card select:focus, .verification-card input:focus, .login-form input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(43, 60, 115, .1); }
.scanner-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 19px 0 7px; }
.scanner-heading label { margin: 0; }
.scan-button { padding: 7px 10px; border: 1px solid #DDE4F0; border-radius: 9px; color: var(--navy); background: #fff; font-size: 11px; font-weight: 750; }
.scan-button:hover { background: #F2F4FF; }
.field-help { margin: 7px 0 0; color: #858E9F; font-size: 11px; line-height: 1.45; }
.scanner-wrap { margin-top: 14px; padding: 12px; border: 1px dashed #D6DCEA; border-radius: 14px; background: #FAFBFE; }
.scanner-wrap[hidden] { display: none; }
#qr-reader { max-width: 390px; margin: 0 auto; overflow: hidden; border: 0 !important; border-radius: 11px; }
#qr-reader__dashboard_section_csr button { min-height: 34px; border: 0; border-radius: 8px; color: var(--navy); background: #EAF0FF; font-weight: 700; }
#qr-reader__dashboard_section_swaplink { color: var(--navy); }
.primary-button { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--radius-control); color: var(--navy); background: var(--yellow); font-size: 13px; font-weight: 850; transition: filter .15s, transform .15s; }
.primary-button:hover { filter: brightness(.97); transform: translateY(-1px); }
.verify-submit { margin-top: 16px; }
.verification-hint { display: flex; gap: 9px; margin-top: 16px; padding: 11px; border-radius: 11px; color: #5D6781; background: #F3F5FB; }
.verification-hint > span { display: grid; width: 17px; height: 17px; flex: 0 0 auto; place-items: center; border: 1px solid #9AA7C9; border-radius: 50%; font-size: 10px; font-weight: 800; }
.verification-hint p { margin: 0; font-size: 10px; line-height: 1.55; }
.guide-card { padding: 22px 20px; }
.guide-card > .eyebrow { margin-bottom: 6px; }
.guide-list { display: grid; gap: 18px; margin: 22px 0 0; padding: 0; list-style: none; }
.guide-list li { display: flex; gap: 12px; }
.guide-list li > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--navy); background: #EAF0FF; font-size: 10px; font-weight: 850; }
.guide-list strong { font-size: 12px; }
.guide-list p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.guide-list code { padding: 2px 4px; border-radius: 4px; color: var(--navy); background: #F0F2F8; font-size: 10px; }
.queue-count { padding: 7px 10px; border-radius: 18px; color: var(--navy); background: #EAF0FF; font-size: 11px; font-weight: 800; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 15px; background: #fff; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 12px 13px; border-bottom: 1px solid var(--border); color: #8A93A6; background: #FAFAFC; font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px; border-bottom: 1px solid #F0F1F4; color: #475164; font-size: 11px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td strong, td small { display: block; }
td strong { max-width: 190px; overflow: hidden; color: #303A4D; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
td small { margin-top: 4px; color: #9098A6; font-size: 10px; white-space: nowrap; }
.transaction-code { color: var(--navy); font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-pill { display: inline-block; padding: 6px 8px; border-radius: 20px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.status-pending { color: #826800; background: #FFF4C7; }
.status-pending-return { color: #8A5C18; background: #FFF0D7; }
.status-borrowed { color: #315EDB; background: #EAF0FF; }
.table-action { min-height: 33px; padding: 0 9px; border: 0; border-radius: 8px; color: var(--navy); background: #EAF0FF; font-size: 10px; font-weight: 800; white-space: nowrap; }
.table-action:hover { background: #DDE6FF; }
.queue-action { margin: 0; }
.empty-state { display: grid; justify-items: center; padding: 38px 16px; border: 1px dashed #D9DDE7; border-radius: 15px; color: var(--muted); background: rgba(255,255,255,.65); text-align: center; }
.empty-state > span { display: grid; width: 34px; height: 34px; place-items: center; margin-bottom: 10px; border-radius: 11px; color: var(--green); background: #E7F8F1; font-size: 18px; }
.empty-state strong { color: var(--text); font-size: 13px; }
.empty-state p { margin: 6px 0 0; font-size: 11px; }

.login-page { min-height: 100vh; background: radial-gradient(ellipse at 18% 0%, #E8ECF9 0, transparent 42%), var(--background); }
.login-shell { display: flex; min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; padding: 34px 18px; }
.login-brand { align-self: center; margin-bottom: 23px; }
.login-brand .brand-mark { width: 48px; height: 48px; overflow: visible; border-radius: 0; background: transparent; font-size: 24px; }
.login-brand .brand-mark img { width: 100%; height: 100%; object-fit: contain; transform: translateY(-3px); }
.login-brand strong { font-size: 18px; font-weight: 900; letter-spacing: .2px; }
.login-brand small { font-size: 11px; }
.login-card { width: min(100%, 440px); padding: 31px; border: 1px solid #E1E5ED; border-radius: 20px; background: #fff; box-shadow: 0 16px 42px rgba(35, 49, 95, .09); }
.login-heading { margin-bottom: 23px; }
.login-kicker { color: #8A93A6; font-size: 10px; font-weight: 850; letter-spacing: 1px; }
.login-heading h1 { margin: 8px 0 6px; color: var(--navy); font-size: 26px; letter-spacing: -.5px; }
.login-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.login-form { display: grid; gap: 9px; }
.login-form label:not(:first-of-type) { margin-top: 8px; }
.login-form input { min-height: 47px; background: var(--blue-soft); }
.login-form .primary-button { margin-top: 12px; }
.login-footnote { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 21px 0 0; color: #8A93A6; font-size: 10px; }
.secure-mark { color: var(--green); font-size: 9px; }
.login-download-card { display: grid; width: min(100%, 440px); grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; margin-top: 12px; padding: 13px 15px; border: 1px solid #E1E5ED; border-radius: 17px; background: #fff; box-shadow: 0 8px 22px rgba(35, 49, 95, .06); }
.login-download-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; color: var(--navy); background: #FFF4C7; font-size: 19px; }
.login-download-copy strong { display: block; color: var(--navy); font-size: 11px; font-weight: 850; }
.login-download-copy p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.login-download-button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 0 12px; border-radius: 10px; color: var(--navy); background: var(--yellow); font-size: 10px; font-weight: 850; white-space: nowrap; transition: filter .15s, transform .15s; }
.login-download-button:hover { filter: brightness(.97); transform: translateY(-1px); }
.login-copyright { display: grid; justify-items: center; gap: 4px; margin: 21px 0 0; color: #9BA2AF; font-size: 10px; }
.login-copyright strong { color: var(--navy); font-size: 12px; font-weight: 800; }

@media (max-width: 1050px) {
    .main-content { padding-right: 25px; padding-left: 25px; }
    .verification-layout { grid-template-columns: minmax(0, 1.35fr) minmax(240px, .8fr); gap: 14px; }
    .panel-card { padding: 18px; }
    .guide-card { padding: 18px 15px; }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { min-height: 100vh; margin-left: 0; padding: 19px 16px 104px; }
    .topbar { align-items: flex-start; margin-bottom: 19px; }
    .topbar h1 { font-size: 21px; }
    .topbar-user { display: none; }
    .mobile-nav { position: fixed; inset: auto 0 0; z-index: 10; display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px 9px max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: rgba(255,255,255,.97); box-shadow: 0 -7px 25px rgba(35,49,95,.07); }
    .mobile-nav a, .mobile-nav button { display: grid; min-height: 49px; align-content: center; justify-items: center; gap: 3px; border: 0; border-radius: 11px; color: #778094; background: transparent; }
    .mobile-nav a > span, .mobile-nav button > span { font-size: 19px; line-height: 1; }
    .mobile-nav small { font-size: 9px; font-weight: 700; }
    .mobile-nav a.is-active { color: var(--navy); background: #EAF0FF; }
    .mobile-nav form { margin: 0; }
    .mobile-nav button { width: 100%; font-size: inherit; }
    .welcome-banner { min-height: 166px; padding: 24px 21px; border-radius: 18px; }
    .welcome-banner h2 { max-width: 330px; font-size: 23px; }
    .welcome-banner p { max-width: 340px; font-size: 12px; }
    .banner-book { width: 88px; height: 100px; flex: 0 0 88px; margin-right: -6px; transform: scale(.72) rotate(5deg); transform-origin: center; }
    .section-block { margin-top: 25px; }
    .section-heading h2, .page-intro h2 { font-size: 17px; }
    .stats-grid { grid-template-columns: 1fr; gap: 10px; }
    .stat-card { min-height: 120px; grid-template-columns: 43px 1fr; padding: 17px; }
    .stat-value { margin-top: 6px; font-size: 25px; }
    .stat-footnote { margin-top: 4px; }
    .quick-card { align-items: flex-start; flex-wrap: wrap; padding: 16px; }
    .quick-card > div:nth-child(2) { flex: 1; }
    .secondary-button { width: 100%; margin: 2px 0 0; }
    .page-intro { align-items: flex-start; flex-direction: column; gap: 12px; }
    .verification-layout { grid-template-columns: 1fr; }
    .panel-card, .guide-card { padding: 18px; }
    .guide-list { gap: 14px; }
    .queue-section { margin-top: 25px; }
    .table-wrap { border: 0; background: transparent; overflow: visible; }
    table, tbody, tr, td { display: block; width: 100%; }
    thead { display: none; }
    tbody { display: grid; gap: 10px; }
    tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 4px 12px rgba(34,48,82,.03); }
    td { min-width: 0; padding: 0; border: 0; }
    td:nth-child(3), td:nth-child(5) { align-self: center; }
    td:nth-child(6) { grid-column: 1 / -1; }
    td strong { max-width: 100%; }
    .table-action { width: 100%; min-height: 38px; }
}

@media (max-width: 390px) {
    .main-content { padding-right: 12px; padding-left: 12px; }
    .welcome-banner { padding: 20px 16px; }
    .banner-book { margin-right: -18px; transform: scale(.6) rotate(5deg); }
    .welcome-banner h2 { font-size: 21px; }
    .section-heading { align-items: flex-start; }
    .section-heading .text-link { font-size: 10px; white-space: nowrap; }
    .section-heading .text-link .material-symbols-rounded { font-size: 14px; }
    .login-card { padding: 25px 20px; }
    .login-download-card { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; padding: 12px; }
    .login-download-icon { width: 34px; height: 34px; }
    .login-download-button { grid-column: 2; justify-self: start; }
}

.admin-panel { margin-bottom: 20px; }
.admin-panel .section-heading { margin-bottom: 17px; }
.admin-panel h2, .section-heading h2 { margin: 0; color: var(--text); font-size: 17px; }
.quiet-count { margin-left: 5px; color: #9299A8; font-size: 12px; font-weight: 600; }
.compact-button { display: inline-flex; width: auto; min-height: 42px; padding: 0 15px; white-space: nowrap; }
.admin-form, .filter-form { display: grid; gap: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.book-form-grid { align-items: start; }
.admin-form label, .filter-form label, .adjustment-form label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-size: 11px;
    font-weight: 750;
}
.admin-form input, .admin-form select, .admin-form textarea,
.filter-form input, .filter-form select, .inline-role-form select,
.adjustment-form input {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #DDE4F0;
    border-radius: var(--radius-control);
    outline: none;
    color: var(--text);
    background: #FAFAFC;
}
.admin-form textarea { min-height: 100px; font-family: inherit; font-size: 12px; line-height: 1.55; resize: vertical; }
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus,
.filter-form input:focus, .filter-form select:focus, .inline-role-form select:focus,
.adjustment-form input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(43,60,115,.1); }
.admin-form input[type="file"] { padding: 7px; background: #fff; font-size: 11px; }
.form-span-full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; }
.book-form-actions { gap: 10px; }
.book-form-actions .cancel-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 15px; border-radius: var(--radius-control); color: #9B3737; background: #FFF0F0; font-size: 13px; font-weight: 850; white-space: nowrap; transition: background .16s, transform .16s; }
.book-form-actions .cancel-button:hover { background: #FFE2E2; transform: translateY(-1px); }
.cover-current { margin-top: 6px; color: var(--muted); font-size: 10px; }
.cover-preview-area { display: grid; justify-items: start; gap: 6px; }
.cover-preview-area[hidden] { display: none; }
.cover-preview { display: block; width: 100px; height: 150px; object-fit: contain; object-position: center; border: 0; border-radius: 0; background: transparent; }
.search-form { display: flex; align-items: center; gap: 8px; }
.search-form input {
    width: min(320px, 42vw);
    min-height: 41px;
    padding: 0 12px;
    border: 1px solid #DDE4F0;
    border-radius: var(--radius-control);
    outline: none;
    color: var(--text);
    background: #fff;
}
.search-form input[type="hidden"] { display: none; }
.search-form .secondary-button { display: inline-flex; min-height: 41px; align-items: center; justify-content: center; margin: 0; border: 1px solid #AAB9E0; border-radius: var(--radius-control); }
.filter-form { grid-template-columns: minmax(160px, .75fr) minmax(240px, 1.4fr) auto; align-items: end; }
.filter-form .secondary-button { min-height: 42px; margin: 0; }
.filter-search { min-width: 0; }
.admin-table { min-width: 760px; }
.admin-table th { padding: 12px 10px; }
.admin-table td { padding: 13px 10px; }
.admin-table td strong { max-width: 220px; }
.book-table { min-width: 680px; }
.book-table td:first-child { width: 82px; }
.catalog-cover {
    display: grid;
    width: 51px;
    height: 68px;
    place-items: center;
    border: 1px solid #E5E8F0;
    border-radius: 8px;
    object-fit: cover;
    color: var(--navy);
    background: #EDF1FC;
    font-size: 20px;
    font-weight: 800;
}
.cover-placeholder { display: inline-grid; }
.row-actions, .inline-role-form { display: flex; align-items: center; gap: 6px; }
.row-actions form { margin: 0; }
.table-action { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 10px; }
.danger-action { color: #9B3737; background: #FFF0F0; }
.danger-action:hover { background: #FFE2E2; }
.inline-role-form select { min-width: 115px; min-height: 35px; padding: 5px 8px; border-radius: 8px; font-size: 10px; }
.point-adjustment { min-width: 170px; }
.point-adjustment summary { color: var(--navy); cursor: pointer; font-size: 11px; font-weight: 800; }
.adjustment-form { display: grid; min-width: 190px; gap: 9px; margin-top: 10px; }
.adjustment-form input { min-height: 36px; padding: 7px 9px; font-size: 10px; }
.adjustment-form .table-action { width: 100%; }
.report-tabs { position: relative; isolation: isolate; display: grid; width: min(100%, 390px); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0 0 15px; padding: 4px; border: 0; border-radius: 15px; background: #EEF1FA; }
.report-tabs::before { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 2); border-radius: 11px; background: var(--navy); content: ""; transition: transform .2s ease; }
.report-tabs[data-active-type="redemptions"]::before { transform: translateX(100%); }
.report-tabs a { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 8px 12px; border: 0; border-radius: 11px; color: var(--muted); font-size: 12px; font-weight: 750; text-align: center; transition: color .18s ease; }
.report-tabs a.is-active { color: #fff; }
.report-tabs[data-active-type="redemptions"] a[data-report-type="loans"],
.report-tabs[data-active-type="loans"] a[data-report-type="redemptions"] { color: var(--muted); }
.report-filters { padding: 15px 16px; }
.report-filters .filter-form { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.report-filters .filter-search { min-width: 0; }
.report-filters .filter-form .secondary-button,
.report-intro .print-button { display: inline-flex; width: auto; min-height: 41px; align-items: center; justify-content: center; margin: 0; padding: 0 16px; border: 1px solid #AAB9E0; border-radius: var(--radius-control); color: var(--navy); background: #EAF0FF; font-size: 12px; font-weight: 800; white-space: nowrap; }
.report-filters .filter-form .secondary-button:hover,
.report-intro .print-button:hover { background: #DDE6FF; }
.report-intro .print-button { flex: 0 0 auto; }
.report-results { margin-top: 23px; }
.report-results .section-heading { margin-bottom: 13px; }
.report-results .table-wrap { box-shadow: 0 4px 14px rgba(34,48,82,.025); }
.report-table-wrap { max-height: 580px; overflow: auto; overscroll-behavior: contain; }
.report-table-wrap .report-table thead th { position: sticky; top: 0; z-index: 1; }
.report-results .status-pill { padding: 5px 8px; }
.report-table { min-width: 960px; }
.redemption-table { min-width: 850px; }
.status-pending, .status-pending-pickup { color: #826800; background: #FFF4C7; }
.status-pending-return { color: #8A5C18; background: #FFF0D7; }
.status-returned, .status-completed { color: #236742; background: #E7F8F1; }
.status-cancelled, .status-expired { color: #8E3535; background: #FFF0F0; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .mobile-nav-admin { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .mobile-nav-admin a, .mobile-nav-admin button { min-width: 0; }
    .mobile-nav-admin small { font-size: 8px; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .search-form { width: 100%; }
    .search-form input[type="search"] { width: 0; min-width: 0; flex: 1 1 auto; }
    .search-form .secondary-button { width: auto; min-width: 60px; flex: 0 0 auto; margin: 0; padding: 0 18px; }
    .filter-form { grid-template-columns: 1fr; }
    .filter-form .secondary-button { width: 100%; }
    .users-filter-panel { padding: 15px; }
    .users-filter-panel .filter-form { grid-template-columns: 1fr; gap: 12px; }
    .users-filter-panel .filter-form .secondary-button { width: auto; min-height: 39px; justify-self: end; padding: 0 15px; }
    .report-filters .filter-form { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
    .report-filters .filter-form .secondary-button { width: auto; min-width: 104px; padding: 0 12px; }
    .report-filters { padding: 13px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-span-full { grid-column: auto; }
    .form-actions .primary-button { width: 100%; }
    .book-form-actions .cancel-button, .book-form-actions .primary-button { flex: 1; width: auto; }
    .compact-button { width: auto; }
    .admin-table { min-width: 0; }
    .admin-table tbody tr { align-items: start; }
    .admin-table td::before {
        display: block;
        margin-bottom: 5px;
        color: #9299A8;
        content: attr(data-label);
        font-size: 9px;
        font-weight: 800;
        letter-spacing: .3px;
        text-transform: uppercase;
    }
    .book-table td:first-child { grid-column: 1 / -1; }
    .book-table td:last-child, .users-table td:nth-child(2), .users-table td:last-child { grid-column: 1 / -1; }
    .report-table td { overflow-wrap: anywhere; }
    .report-table td strong { white-space: normal; }
    .report-tabs { width: 100%; margin-bottom: 13px; }
    .report-tabs a { padding: 7px 6px; font-size: 10px; }
    .report-intro { flex-direction: row; align-items: center; }
    .report-intro .print-button { width: auto; min-height: 38px; padding: 0 11px; font-size: 10px; }
    .report-results { margin-top: 19px; }
    .report-table tbody tr { gap: 10px 12px; padding: 13px; }
    .report-table td { font-size: 10px; }
    .report-table td::before { margin-bottom: 4px; }
    .report-results .status-pill { padding: 4px 7px; font-size: 9px; white-space: normal; }
    .report-table-wrap { max-height: none; overflow: visible; }
    .report-table-wrap .report-table thead th { position: static; }
}

@media print {
    @page { margin: 12mm; }
    body { color: #111; background: #fff; font-size: 10px; }
    .sidebar, .mobile-nav, .topbar, .no-print { display: none !important; }
    .main-content { max-width: none; min-height: 0; margin: 0; padding: 0; }
    .panel-card { padding: 0; border: 0; box-shadow: none; }
    .report-results { margin-top: 15px; }
    .table-wrap { overflow: visible; border: 0; }
    .admin-table { display: table !important; width: 100%; min-width: 0; border-collapse: collapse; }
    .admin-table thead { display: table-header-group !important; }
    .admin-table tbody { display: table-row-group !important; }
    .admin-table tr { display: table-row !important; padding: 0; border: 0; box-shadow: none; }
    .admin-table th, .admin-table td { display: table-cell !important; padding: 6px 5px; border: 1px solid #D5D5D5; color: #111; font-size: 8px; }
    .admin-table td::before { display: none !important; }
    .admin-table th { color: #111; background: #F1F1F1; }
    .admin-table td strong { max-width: none; overflow: visible; color: #111; white-space: normal; }
    .status-pill { border: 1px solid #999; color: #111; background: #fff; }
    a { color: #111; }
}

.material-symbols-rounded {
    font-family: "Material Symbols Rounded";
    font-weight: normal;
    font-style: normal;
    font-size: 22px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "liga";
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.brand-mark { overflow: hidden; background: #fff; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.profile-avatar { overflow: hidden; border-radius: 50%; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.topbar-avatar { width: 34px; height: 34px; font-size: 13px; }
.nav-icon { font-size: 21px; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; }
.logout-button { font-size: 20px; }

.toast {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 20;
    width: min(420px, calc(100vw - 32px));
    margin: 0;
    padding: 14px 18px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(35, 49, 95, .15);
    animation: toast-in .22s ease-out both;
    transition: opacity .3s ease, transform .3s ease;
}
.toast-hiding { opacity: 0; transform: translateY(-8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.howto-banner {
    padding: 25px;
    border: 1px solid #E8E8E1;
    border-radius: 21px;
    background: linear-gradient(135deg, #fff 0%, #FBFAF4 100%);
    box-shadow: 0 7px 22px rgba(34, 48, 82, .045);
}
.howto-heading { display: flex; align-items: center; gap: 11px; }
.howto-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--navy); background: #FFF1BB; font-size: 18px; }
.howto-heading .banner-kicker { margin: 0; color: #A88100; font-size: 9px; letter-spacing: .8px; }
.howto-heading h2 { margin: 3px 0; color: var(--navy); font-size: 18px; }
.howto-heading p:last-child { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.howto-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 21px; }
.howto-steps a { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; column-gap: 9px; row-gap: 7px; padding: 15px; border: 1px solid #EAE9E1; border-radius: 15px; background: #fff; transition: border-color .16s, transform .16s; }
.howto-steps a:hover { border-color: #D7C25E; transform: translateY(-2px); }
.howto-steps a > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; color: var(--navy); background: #EAF0FF; font-size: 10px; font-weight: 850; }
.howto-steps strong { align-self: center; color: var(--text); font-size: 13px; }
.howto-steps small { grid-column: 2; color: var(--muted); font-size: 11px; line-height: 1.5; }
.quick-icon { font-size: 18px; }
.quick-card .secondary-button { gap: 6px; }
.quick-card .secondary-button .material-symbols-rounded { margin-left: 0; font-size: 16px; line-height: 1; }
.stat-icon { font-size: 19px; }

.collapsible-panel { overflow: hidden; animation: panel-open .24s ease-out both; scroll-margin-top: 16px; }
.collapsible-panel[hidden] { display: none; }
@keyframes panel-open { from { opacity: .3; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.book-toggle { gap: 6px; }
.book-toggle .material-symbols-rounded { font-size: 18px; line-height: 1; }
.book-toggle.is-open { color: #667085; background: #E8EAF0; }
.book-toggle.is-open:hover { background: #DDE0E7; filter: none; transform: none; }
.bulk-action-form { display: flex; align-items: center; gap: 12px; margin: 0 0 15px; padding: 12px 14px; border-radius: 13px; background: #F7F8FC; }
.select-all-control { display: flex; align-items: center; gap: 8px; margin-right: auto; color: #475164; font-size: 11px; font-weight: 750; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--navy); cursor: pointer; }
.book-grid input[type="checkbox"], .bulk-action-form input[type="checkbox"] { display: grid; width: 18px; height: 18px; place-content: center; appearance: none; border: 1px solid #CDD5E3; border-radius: 5px; color: #fff; background: #fff; cursor: pointer; transition: background .14s, border-color .14s; }
.book-grid input[type="checkbox"]::after, .bulk-action-form input[type="checkbox"]::after { width: 4px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; content: ""; transform: translateY(-1px) rotate(45deg) scale(0); transition: transform .12s; }
.book-grid input[type="checkbox"]:checked, .bulk-action-form input[type="checkbox"]:checked { border-color: var(--navy); background: var(--navy); }
.book-grid input[type="checkbox"]:checked::after, .bulk-action-form input[type="checkbox"]:checked::after { transform: translateY(-1px) rotate(45deg) scale(1); }
.book-grid input[type="checkbox"]:focus-visible, .bulk-action-form input[type="checkbox"]:focus-visible { outline: 3px solid rgba(43,60,115,.18); outline-offset: 2px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 14px; }
.book-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #E8EAF0; border-radius: 17px; background: #fff; box-shadow: 0 5px 16px rgba(34, 48, 82, .035); transition: transform .16s, box-shadow .16s; }
.book-card:hover { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(34, 48, 82, .08); }
.card-select { position: absolute; z-index: 1; top: 13px; left: 13px; display: grid; width: 18px; height: 18px; place-items: center; border: 0; border-radius: 5px; background: transparent; }
.book-card-cover { display: grid; height: 186px; place-items: center; overflow: hidden; padding: 8px 10px; background: #fff; }
.book-cover-frame { display: grid; width: auto; max-width: 100%; height: 100%; aspect-ratio: 2 / 3; place-items: center; overflow: hidden; border-radius: 0; background: transparent; box-shadow: none; }
.book-cover-frame .catalog-cover { width: 100%; height: 100%; border: 0; border-radius: 0; object-fit: contain; object-position: center; box-shadow: none; }
.book-cover-frame .cover-placeholder { color: #7A87AC; background: transparent; font-size: 38px; }
.book-card-content { display: flex; flex: 1; flex-direction: column; padding: 12px; }
.book-category { display: inline-flex; width: fit-content; align-self: flex-start; padding: 4px 7px; border-radius: 20px; color: var(--navy); background: #EEF1FA; font-size: 8px; font-weight: 800; }
.book-card h3 { display: -webkit-box; min-height: 34px; margin: 7px 0 3px; overflow: hidden; color: #303A4D; font-size: 12px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.book-card-content > p { min-height: 15px; margin: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.book-stock { display: flex; justify-content: space-between; gap: 5px; margin: 11px 0; color: #8790A1; font-size: 8px; }
.book-stock strong { color: #397451; }
.book-card .row-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: auto; }
.book-card .row-actions form { display: contents; }
.book-card .table-action { width: 100%; min-height: 32px; padding: 0 7px; font-size: 9px; }

.status-chips { display: flex; gap: 8px; margin: 0 0 16px; padding: 3px 1px 5px; overflow-x: auto; scrollbar-width: thin; }
.filter-chip { flex: 0 0 auto; padding: 9px 14px; border: 1px solid #E4E7EF; border-radius: 22px; color: #697386; background: #fff; font-size: 11px; font-weight: 750; white-space: nowrap; transition: color .15s, background .15s, border-color .15s; }
.filter-chip:hover { border-color: #C9D2EA; color: var(--navy); }
.filter-chip.is-active { border-color: var(--navy); color: #fff; background: var(--navy); }
.custom-select { position: relative; width: 100%; }
.native-select-source { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; opacity: 0 !important; }
.custom-select-trigger { display: flex; width: 100%; min-height: 46px; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid #DDE4F0; border-radius: var(--radius-control); color: var(--text); background: #FAFAFC; text-align: left; }
.custom-select-trigger { transition: border-color .16s, background .16s, box-shadow .16s; }
.custom-select-trigger > span:first-child { color: var(--navy); font-size: 20px; }
.custom-select-label { flex: 1; font-size: 12px; font-weight: 650; }
.custom-select-chevron { color: #798397; font-size: 20px; transition: transform .16s; }
.custom-select.is-open .custom-select-chevron { transform: rotate(180deg); }
.custom-select-trigger:focus-visible { outline: 3px solid rgba(43,60,115,.14); border-color: var(--navy); }
.custom-select.is-open .custom-select-trigger { border-color: #AAB9E0; background: #fff; }
.custom-select-menu { position: absolute; top: calc(100% + 6px); right: 0; left: 0; z-index: 8; display: grid; gap: 3px; max-height: 220px; padding: 6px; overflow: auto; border: 1px solid var(--border); border-radius: 13px; background: #fff; box-shadow: 0 12px 25px rgba(35,49,95,.12); opacity: 0; pointer-events: none; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility 0s linear .15s; }
.custom-select.is-open .custom-select-menu { opacity: 1; pointer-events: auto; visibility: visible; transform: translateY(0); transition-delay: 0s; }
.page-size-control .custom-select-menu { top: auto; bottom: calc(100% + 6px); transform: translateY(4px); }
.page-size-control .custom-select.is-open .custom-select-menu { transform: translateY(0); }
.custom-select-option { display: flex; min-height: 38px; align-items: center; gap: 9px; padding: 0 10px; border: 0; border-radius: 9px; color: #475164; background: transparent; text-align: left; font-size: 11px; }
.custom-select-option-icon { display: grid; width: 20px; flex: 0 0 20px; place-items: center; color: var(--navy); font-size: 18px; line-height: 1; }
.custom-select-option:hover, .custom-select-option[aria-selected="true"] { color: var(--navy); background: #EEF1FA; }
.custom-select-option[aria-selected="true"] { font-weight: 800; }

.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 14px; border: 1px solid #EAEBF0; border-radius: 13px; background: #fff; color: var(--muted); font-size: 10px; }
.pagination-bar form { display: none; }
.page-size-control { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.page-size-control select { min-height: 34px; padding: 0 28px 0 9px; border: 1px solid #E0E4ED; border-radius: 9px; outline: none; color: var(--navy); background-color: #FAFAFC; font-weight: 750; }
.page-size-control select:focus { border-color: var(--navy); }
.page-size-control .custom-select { width: 112px; flex: 0 0 112px; }
.page-size-control .custom-select-trigger { min-height: 36px; gap: 6px; padding: 0 8px; border-radius: 10px; }
.page-size-control .custom-select-trigger > span:first-child { font-size: 17px; }
.page-size-control .custom-select-label { font-size: 11px; font-weight: 750; }
.page-size-control .custom-select-chevron { font-size: 18px; }
.pagination-actions { display: flex; align-items: center; gap: 7px; }
.page-button { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; color: var(--navy); background: #EEF1FA; font-size: 20px; }
.page-button:hover { background: #E0E6F6; }
.users-table-wrap { max-height: 620px; overflow: auto; overscroll-behavior: contain; }
.users-table-wrap .users-table thead th { position: sticky; top: 0; z-index: 1; }
.users-table { min-width: 930px; }
.users-table td:first-child { width: 54px; }
.users-table td:last-child form { margin: 0; }
.users-filter-panel .filter-form { grid-template-columns: minmax(145px, .7fr) minmax(240px, 1.35fr) auto; gap: 12px; }
.users-filter-panel .filter-form > label { min-width: 0; }
.users-filter-panel .custom-select-trigger { min-height: 42px; gap: 8px; padding: 0 11px; }
.users-filter-panel .custom-select-trigger > span:first-child { font-size: 18px; }
.users-filter-panel .custom-select-chevron { font-size: 18px; }
.users-filter-panel .filter-form .secondary-button { display: inline-flex; width: auto; min-height: 42px; align-items: center; justify-self: start; margin: 0; padding: 0 16px; border: 1px solid #AAB9E0; border-radius: var(--radius-control); color: var(--navy); background: #EAF0FF; font-size: 12px; font-weight: 800; white-space: nowrap; }
.users-filter-panel .filter-form .secondary-button:hover { background: #DDE6FF; }
.users-table .status-pill { padding: 5px 8px; font-size: 9px; }
.users-table .inline-role-form { gap: 7px; }
.users-table .inline-role-form .custom-select { width: 132px; flex: 0 0 132px; }
.users-table .inline-role-form .custom-select-trigger { min-height: 36px; gap: 6px; padding: 0 8px; border-radius: 10px; }
.users-table .inline-role-form .custom-select-trigger > span:first-child,
.users-table .inline-role-form .custom-select-chevron { font-size: 17px; }
.users-table .inline-role-form .custom-select-label { font-size: 10px; }
.users-table .inline-role-form .table-action { min-height: 34px; padding: 0 11px; border-radius: 9px; }
.users-table .point-adjustment summary { display: inline-flex; min-height: 30px; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 9px; background: #EEF1FA; font-size: 10px; list-style: none; }
.users-table .point-adjustment summary::-webkit-details-marker { display: none; }
.users-table .point-adjustment summary::before { color: var(--navy); content: "tune"; font-family: "Material Symbols Rounded"; font-size: 16px; line-height: 1; }
.users-table .point-adjustment[open] summary { color: var(--navy-deep); background: #EAF0FF; }
.users-table td:last-child .table-action { min-height: 32px; padding: 0 12px; border-radius: 9px; }
.users-table input[type="checkbox"] { display: grid; width: 18px; height: 18px; place-content: center; appearance: none; border: 1px solid #CDD5E3; border-radius: 5px; color: #fff; background: #fff; cursor: pointer; transition: background .14s, border-color .14s; }
.users-table input[type="checkbox"]::after { width: 4px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; content: ""; transform: translateY(-1px) rotate(45deg) scale(0); transition: transform .12s; }
.users-table input[type="checkbox"]:checked { border-color: var(--navy); background: var(--navy); }
.users-table input[type="checkbox"]:checked::after { transform: translateY(-1px) rotate(45deg) scale(1); }
.users-table input[type="checkbox"]:focus-visible { outline: 3px solid rgba(43,60,115,.18); outline-offset: 2px; }
.report-tabs a { display: inline-flex; align-items: center; gap: 7px; }
.table-action, .secondary-button, .primary-button { transition: background .16s, color .16s, transform .16s; }
.table-action:focus-visible, .secondary-button:focus-visible, .primary-button:focus-visible, .book-form-actions .cancel-button:focus-visible,
.mobile-nav button:focus-visible, .scan-button:focus-visible {
    outline: 3px solid rgba(43, 60, 115, .2);
    outline-offset: 2px;
}
.inline-role-form .custom-select { width: 145px; }
.scan-button, .table-action, .filter-form select, .admin-form select, .search-form input, .filter-form input, .admin-form input, .adjustment-form input, .admin-form textarea {
    border-color: #DFE3EC;
    border-radius: 12px;
}
.admin-form input[type="file"] { border: 1px solid #DFE3EC; background: #FAFAFC; }
.admin-form input[type="file"]::file-selector-button { margin-right: 10px; padding: 8px 11px; border: 0; border-radius: 9px; color: var(--navy); background: #EAF0FF; font-weight: 750; cursor: pointer; }
.filter-form select, .admin-form select, .inline-role-form select, .page-size-control select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232B3C73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }

@media (max-width: 1050px) {
    .users-filter-panel .filter-form { grid-template-columns: minmax(125px, .7fr) minmax(0, 1.35fr) auto; gap: 10px; }
}
@media (max-width: 768px) {
    .users-filter-panel { padding: 15px; }
    .users-filter-panel .filter-form { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .users-filter-panel .filter-form .secondary-button { width: auto; min-height: 39px; justify-self: end; padding: 0 15px; }
}
@media (max-width: 1100px) {
    .book-grid { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 12px; }
}
@media (min-width: 1600px) {
    .book-grid { grid-template-columns: repeat(6, minmax(185px, 1fr)); }
}
@media (max-width: 768px) {
    .toast { top: 12px; right: 12px; width: calc(100vw - 24px); }
    .howto-banner { padding: 18px; }
    .howto-icon { width: 34px; height: 34px; border-radius: 11px; font-size: 18px; }
    .howto-heading h2 { font-size: 17px; }
    .howto-steps { grid-template-columns: 1fr; gap: 8px; margin-top: 15px; }
    .howto-steps a { grid-template-columns: 32px 1fr; column-gap: 10px; padding: 11px; }
    .howto-steps a > span { grid-row: span 2; }
    .howto-steps small { grid-column: 2; }
    .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .book-card-cover { height: 170px; }
    .book-card-content { padding: 10px; }
    .bulk-action-form { flex-wrap: wrap; padding: 10px; }
    .bulk-action-form > .table-action { min-height: 36px; }
    .pagination-bar { align-items: flex-start; flex-direction: column; }
    .pagination-actions { width: 100%; justify-content: space-between; }
    .mobile-nav-manager { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .mobile-nav-admin { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .mobile-nav small { font-size: 8px; }
    .users-table { min-width: 0; }
    .users-table tbody tr { grid-template-columns: 28px repeat(2, minmax(0, 1fr)); gap: 9px 10px; padding: 12px; }
    .users-table td { width: auto; min-width: 0; }
    .users-table td:first-child { grid-column: 1; grid-row: 1; }
    .users-table td:nth-child(2) { grid-column: 2 / -1; grid-row: 1; }
    .users-table td:nth-child(3) { grid-column: 1 / -1; }
    .users-table td:nth-child(4) { grid-column: 2; }
    .users-table td:nth-child(5) { grid-column: 3; }
    .users-table td:nth-child(6) { grid-column: 2; }
    .users-table td:nth-child(7) { grid-column: 3; }
    .users-table td::before { margin-bottom: 4px; font-size: 8px; }
    .users-table .inline-role-form { flex-wrap: wrap; }
    .users-table .inline-role-form .custom-select { min-width: 120px; flex: 1 1 120px; }
    .users-table .inline-role-form .table-action { width: auto; flex: 0 0 auto; }
    .users-table .point-adjustment { min-width: 0; }
    .users-table .adjustment-form { min-width: 0; }
    .users-table td:last-child form { display: flex; justify-content: flex-end; }
    .users-table td:last-child .table-action { width: auto; }
    .users-table-wrap { max-height: none; overflow: visible; }
    .users-table-wrap .users-table thead th { position: static; }
}
@media (max-width: 390px) {
    .book-card-cover { height: 145px; }
    .book-stock { flex-direction: column; }
    .book-card .row-actions { grid-template-columns: 1fr; }
    .bulk-action-form .table-action { width: 100%; }
}
@media print {
    .toast, .howto-banner, .pagination-bar { display: none !important; }
    .users-table-wrap { max-height: none; overflow: visible; }
    .report-table-wrap { max-height: none; overflow: visible; }
}

.users-table .user-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.users-table .user-actions form { margin: 0; }
.users-table .account-status-pill { display: inline-flex; width: max-content; max-width: 100%; align-items: center; gap: 5px; margin: 3px 4px 3px 0; padding: 6px 9px; border-radius: 999px; font-size: 9px; line-height: 1.3; white-space: normal; }
.users-table .temp-password-code { color: #315A83; background: #EAF4FF; }
.users-table .temp-password-code .material-symbols-rounded { font-size: 13px; }
.users-table .temp-password-code strong { color: #24496D; font-size: 10px; letter-spacing: .5px; }
.users-table .reset-password-action { color: #765900; background: #FFF4C7; }
.users-table .reset-password-action:hover { background: #FFE99A; }
.status-info { color: #315A83; background: #EAF4FF; }
.confirm-dialog { width: min(420px, calc(100vw - 32px)); max-width: none; padding: 0; overflow: hidden; border: 1px solid #E1E5ED; border-radius: 20px; color: var(--text); background: var(--surface); box-shadow: 0 24px 70px rgba(27, 38, 68, .22); }
.confirm-dialog::backdrop { background: rgba(25, 34, 59, .42); backdrop-filter: blur(3px); }
.confirm-dialog-card { padding: 26px; text-align: center; }
.confirm-dialog-icon { display: inline-grid; width: 48px; height: 48px; place-items: center; border-radius: 16px; color: #765900; background: #FFF4C7; font-size: 24px; }
.confirm-dialog h2 { margin: 15px 0 8px; color: var(--navy-deep); font-size: 18px; }
.confirm-dialog p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.confirm-dialog-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.confirm-dialog-actions .secondary-button { margin: 0; border: 0; box-shadow: none; }
.confirm-dialog-actions .secondary-button:focus-visible { outline: 2px solid rgba(43, 60, 115, .35); outline-offset: 2px; }
.confirm-dialog-actions .table-action { min-height: 42px; padding: 0 16px; border-radius: var(--radius-control); font-size: 12px; }
.confirm-dialog-actions .reset-password-action { color: #765900; background: #FFF4C7; }
@media (max-width: 760px) {
    .users-table .user-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .confirm-dialog-card { padding: 22px; }
}
