:root {
    color-scheme: light;
    --ink: #17202a;
    --muted: #667085;
    --line: #d8dee8;
    --paper: #ffffff;
    --soft: #f5f7fb;
    --blue: #1d4ed8;
    --green: #15803d;
    --red: #b42318;
    --gold: #c47f10;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--soft);
}
a { color: var(--blue); text-decoration: none; font-weight: 700; }
h1, h2, p { margin-top: 0; }
.field-help {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    gap: 8px;
}
.button.subtle {
    background: #e8f3ff;
    color: #075caa;
}
.ghost { background: #eef2ff; color: var(--blue); }
.full { width: 100%; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 260px;
    padding: 20px;
    background:
        linear-gradient(155deg, rgba(255,255,255,.16) 0 18%, transparent 18% 100%),
        linear-gradient(135deg, #0a9ed0, #085cad);
    border-right: 1px solid rgba(255,255,255,.20);
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 8px 0 30px rgba(4, 58, 111, .20);
    transition: width .22s ease, padding .22s ease, transform .22s ease;
}
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .48);
}
.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,.25);
    color: #fff;
}
.brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,.20));
}
.brand div {
    min-width: 0;
}
.brand strong {
    display: block;
    font-size: 15px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.brand span { display: block; color: rgba(255,255,255,.78); font-size: 13px; }
nav { display: grid; gap: 6px; }
nav a,
.nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 0;
    padding: 12px;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-weight: 500;
    text-align: left;
    transition: background .16s ease, transform .16s ease;
}
nav a:hover,
.nav-group-toggle:hover { background: rgba(255,255,255,.16); color: #fff; transform: translateX(2px); }
nav a.active,
.nav-standalone.active {
    color: #bff7ff;
    background: rgba(3, 31, 78, .22);
}
.icon, .nav-icon {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    font-weight: 800;
    background: transparent;
    color: #0874c7;
    box-shadow: none;
}
.nav-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.28));
}
nav a:nth-child(1) .nav-icon { color: #ffffff; }
nav a:nth-child(2) .nav-icon { color: #7dd3fc; }
nav a:nth-child(3) .nav-icon { color: #a7f3d0; }
nav a:nth-child(4) .nav-icon { color: #fde047; }
nav a:nth-child(5) .nav-icon { color: #5eead4; }
nav a:nth-child(6) .nav-icon { color: #f0abfc; }
nav a:nth-child(7) .nav-icon { color: #fecaca; }
nav a:nth-child(8) .nav-icon { color: #e2e8f0; }
nav a:nth-child(9) .nav-icon { color: #fdba74; }
nav a:nth-child(10) .nav-icon { color: #f9a8d4; }
.nav-group-toggle .nav-icon { color: #7dd3fc; }
.borrowers-toggle .nav-icon { color: #a7f3d0; }
.circulation-toggle .nav-icon { color: #f0abfc; }
.admin-toggle .nav-icon { color: #fdba74; }
.report-toggle .nav-icon { color: #93c5fd; }
.nav-standalone .nav-icon { color: #fde68a; }
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    height: 23px;
    margin-left: auto;
    padding: 0 7px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(127, 29, 29, .24);
}
.nav-badge[hidden] {
    display: none;
}
.nav-chevron {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    margin-left: auto;
    color: rgba(255,255,255,.78);
    transition: transform .16s ease;
}
.nav-chevron svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.nav-group.open .nav-chevron { transform: rotate(90deg); }
.nav-submenu {
    display: none;
    gap: 2px;
    padding: 0 0 4px 28px;
}
.nav-group.open .nav-submenu { display: grid; }
.nav-submenu a {
    min-height: 38px;
    padding: 9px 10px;
    color: rgba(255,255,255,.74);
    font-size: 14px;
    transform: none;
}
.nav-submenu a:hover,
.nav-submenu a.active {
    color: #bff7ff;
    background: rgba(3, 31, 78, .22);
}
.nav-dot {
    width: 6px;
    height: 6px;
    margin: 0 8px 0 0;
    border-radius: 999px;
    background: #67e8f9;
    box-shadow: 0 0 12px rgba(103,232,249,.72);
}
.sidebar form { margin-top: auto; }
.sidebar .ghost {
    justify-content: flex-start;
    gap: 12px;
    background: rgba(255,255,255,.16);
    color: #fff;
}
body.sidebar-collapsed .sidebar {
    width: 88px;
    padding: 18px 14px;
}
body.sidebar-collapsed .shell { margin-left: 88px; }
body.sidebar-collapsed .brand {
    justify-content: center;
    padding-bottom: 12px;
}
body.sidebar-collapsed .brand div,
body.sidebar-collapsed .label {
    display: none;
}
body.sidebar-collapsed nav a,
body.sidebar-collapsed .nav-group-toggle,
body.sidebar-collapsed .sidebar .ghost {
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
}
body.sidebar-collapsed .nav-submenu,
body.sidebar-collapsed .nav-chevron {
    display: none;
}
.shell {
    margin-left: 260px;
    padding: 58px 28px 28px;
    transition: margin-left .22s ease;
}
.menubar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    z-index: 10;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 14px;
    background: linear-gradient(90deg, #0a9ed0, #085cad);
    color: #fff;
    box-shadow: 0 8px 22px rgba(67, 39, 3, .18);
    transition: left .22s ease;
}
.top-user {
    position: relative;
    margin-left: auto;
    padding-right: 6px;
}
.top-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-weight: 400;
    font-size: 14px;
}
.top-user-toggle:hover {
    background: rgba(255,255,255,.12);
    padding: 0 8px;
}
.top-user-icon {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
}
.top-user-icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}
.top-user-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.user-dropdown {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 50;
    width: 270px;
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: #26313a;
    color: #d8dee8;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .26);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .16s ease, transform .16s ease;
}
.top-user:hover .user-dropdown,
.top-user.open .user-dropdown,
.top-user:focus-within .user-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.user-dropdown-photo {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    background: #e5e7eb;
    color: #fff;
}
.user-dropdown-photo svg {
    width: 58px;
    height: 58px;
    fill: currentColor;
}
.user-dropdown-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-dropdown-info {
    display: grid;
    align-content: center;
    gap: 8px;
}
.user-dropdown-info strong {
    color: #fff;
    font-weight: 600;
}
.user-dropdown-info span {
    color: #cbd5e1;
    font-size: 13px;
    text-transform: capitalize;
}
.user-dropdown-info form {
    margin: 0;
}
.user-dropdown-info button {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 4px;
    background: #0a9ed0;
    color: #fff;
    font-size: 13px;
}
.user-dropdown-info button:hover {
    background: #0874c7;
}
.menu-toggle {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    background: transparent;
    border-radius: 4px;
    display: grid;
    place-items: center;
    gap: 2px;
}
.menu-toggle:hover { background: rgba(255,255,255,.18); }
.menu-toggle span {
    display: block;
    width: 14px;
    height: 2px;
    background: #fff;
    border-radius: 999px;
}
body.sidebar-collapsed .menubar { left: 88px; }
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(155deg, rgba(255,255,255,.18) 0 18%, transparent 18% 100%),
        linear-gradient(35deg, transparent 0 23%, rgba(255,255,255,.10) 23% 38%, transparent 38%),
        linear-gradient(120deg, rgba(255,255,255,.12) 0 12%, transparent 12% 100%),
        linear-gradient(135deg, #0a9ed0, #085cad);
}
.login-shell {
    width: min(920px, 100%);
    min-height: 410px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 1px minmax(290px, 390px);
    align-items: center;
    gap: 54px;
    padding: 56px 64px;
    background: rgba(6, 70, 130, .18);
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(1, 35, 78, .28);
    backdrop-filter: blur(2px);
}
.login-brand-panel {
    text-align: center;
    color: #fff;
}
.login-logo-large {
    display: block;
    width: 185px;
    height: 185px;
    object-fit: contain;
    margin: 0 auto 18px;
    filter: drop-shadow(0 12px 22px rgba(0,0,0,.18));
}
.login-brand-panel h1 {
    margin: 0;
    color: #fff;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.login-divider {
    width: 1px;
    height: 230px;
    background: rgba(255,255,255,.48);
}
.login-panel {
    width: 100%;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    text-align: center;
}
.user-icon {
    position: relative;
    width: 86px;
    height: 64px;
    margin: 0 auto 22px;
}
.user-icon span {
    position: absolute;
    border: 3px solid #fff;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0,0,0,.16);
}
.user-icon span::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 25px;
    width: 28px;
    height: 20px;
    border: 3px solid #fff;
    border-top: 0;
    border-radius: 0 0 22px 22px;
    transform: translateX(-50%);
}
.user-icon span:nth-child(1) {
    left: 30px;
    top: 0;
    width: 26px;
    height: 26px;
}
.user-icon span:nth-child(2) {
    left: 3px;
    top: 15px;
    width: 20px;
    height: 20px;
    opacity: .88;
}
.user-icon span:nth-child(3) {
    right: 3px;
    top: 15px;
    width: 20px;
    height: 20px;
    opacity: .88;
}
.login-panel .stack {
    gap: 12px;
}
.login-field {
    display: grid;
    grid-template-columns: 40px 1fr;
    min-height: 37px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.65);
    box-shadow: 0 8px 18px rgba(2, 41, 92, .10);
}
.login-field span {
    display: grid;
    place-items: center;
    color: #0c6bbd;
    font-weight: 800;
    background: rgba(255,255,255,.70);
    border-right: 1px solid rgba(12, 107, 189, .13);
}
.login-panel input {
    min-height: 37px;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0 12px;
    font-size: 13px;
}
.login-panel button {
    width: 100%;
    min-height: 42px;
    margin-top: 24px;
    border-radius: 5px;
    background: linear-gradient(90deg, #0a91db, #0874c7);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0;
    box-shadow: 0 10px 26px rgba(2, 79, 151, .28);
}
.auth-panel {
    display: none;
}
.auth-panel.active {
    display: block;
}
.auth-form-head {
    margin-bottom: 18px;
    color: #fff;
    text-align: center;
}
.auth-form-head h2 {
    margin-bottom: 6px;
    font-size: 25px;
    text-shadow: 0 2px 12px rgba(0,0,0,.20);
}
.auth-form-head p {
    margin: 0;
    color: rgba(255,255,255,.82);
    line-height: 1.45;
    font-size: 13px;
}
.auth-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 15px;
}
.login-panel .auth-links button {
    width: auto;
    min-height: auto;
    margin-top: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    box-shadow: none;
    font-size: 13px;
    font-weight: 600;
}
.login-panel .auth-links button:hover {
    text-decoration: underline;
}
.auth-note {
    margin: 2px 0 0;
    color: rgba(255,255,255,.82);
    font-size: 12px;
    line-height: 1.4;
}
.auth-radio-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.auth-radio-group label {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 5px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-weight: 600;
}
.auth-radio-group input {
    width: auto;
    min-height: auto;
}
.signup-extra,
.forgot-extra {
    display: none;
    gap: 12px;
}
.signup-extra.active,
.forgot-extra.active {
    display: grid;
    gap: 12px;
}
.eyebrow {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.page-head h1 { margin-bottom: 0; font-size: 32px; }
.dashboard-clock {
    margin: 6px 0 0;
    color: var(--muted);
}
.head-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.btn-icon {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
}
.btn-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.button.icon-button {
    gap: 10px;
    padding-left: 14px;
}
.btn-icon.large {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,.18);
}
.btn-icon.large svg {
    width: 22px;
    height: 22px;
}
.dashboard-back .btn-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(7, 92, 170, .10);
}
.dashboard-back .btn-icon svg {
    width: 18px;
    height: 18px;
}
.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 18px;
}
.settings-form {
    display: grid;
    gap: 18px;
}
.settings-resource-panel {
    display: grid;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}
.settings-resource-panel h2 {
    margin: 0 0 4px;
    font-size: 20px;
}
.settings-resource-panel p {
    margin: 0;
    color: var(--muted);
}
.settings-resource-list {
    display: grid;
    gap: 10px;
}
.settings-resource-row {
    display: grid;
    grid-template-columns: minmax(180px, .75fr) minmax(260px, 1.25fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fbfdff;
}
.stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.stats a {
    position: relative;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px 16px 16px 94px;
    color: var(--ink);
    font-weight: 400;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.stats a:nth-child(1) { background: #eef6ff; border-color: #cfe7ff; }
.stats a:nth-child(2) { background: #eefcf4; border-color: #c7f0d7; }
.stats a:nth-child(3) { background: #fff4e8; border-color: #ffdfb8; }
.stats a:nth-child(4) { background: #f1efff; border-color: #dcd5ff; }
.stats a:nth-child(5) { background: #edf9fb; border-color: #c5edf2; }
.stats a:nth-child(6) { background: #fff0f3; border-color: #ffd1da; }
.stats a:hover {
    border-color: #0a91db;
    box-shadow: 0 18px 36px rgba(8, 92, 173, .15);
    transform: translateY(-2px);
}
.stats span { display: block; font-size: 28px; font-weight: 700; }
.stats p { margin: 4px 0 0; color: var(--muted); }
.stats small {
    display: block;
    margin-top: 10px;
    color: #0874c7;
    font-weight: 500;
}
.stat-icon {
    position: absolute;
    left: 16px;
    top: 16px;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}
.stat-icon svg {
    width: 34px;
    height: 34px;
    fill: #0874c7;
}
.stats a:nth-child(2) .stat-icon svg { fill: #15803d; }
.stats a:nth-child(3) .stat-icon svg { fill: #c47f10; }
.stats a:nth-child(4) .stat-icon svg { fill: #6554c0; }
.stats a:nth-child(5) .stat-icon svg { fill: #057c8d; }
.stats a:nth-child(6) .stat-icon svg { fill: #b42318; }
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.quick-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    background: linear-gradient(90deg, #0a91db, #0874c7);
    box-shadow: 0 12px 28px rgba(2, 79, 151, .18);
}
.quick-actions .btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255,255,255,.18);
    color: #fff;
}
.quick-actions .btn-icon svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}
.notification-dock {
    position: fixed;
    right: 24px;
    bottom: 22px;
    z-index: 30;
}
.notification-button {
    position: relative;
    width: 56px;
    min-width: 56px;
    height: 56px;
    min-height: 56px;
    padding: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #0a9ed0, #085cad);
    box-shadow: 0 18px 38px rgba(8, 92, 173, .30);
}
.notification-button svg {
    width: 27px;
    height: 27px;
    fill: #fff;
}
.notification-button span {
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    box-shadow: 0 0 0 3px #f5f7fb;
}
.notification-button span[hidden] {
    display: none;
}
.notification-panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    width: min(340px, calc(100vw - 32px));
    max-height: 420px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .16s ease, transform .16s ease;
}
.notification-dock.open .notification-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.notification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.notification-head strong {
    font-weight: 600;
}
.notification-head small {
    color: var(--muted);
}
.notification-list {
    max-height: 350px;
    overflow-y: auto;
}
.notification-item {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid #eef2f7;
    color: var(--ink);
    font-weight: 400;
}
.notification-item:hover {
    background: #f8fbff;
}
.notification-item.read {
    opacity: .58;
}
.notification-item.read b,
.notification-item.read em,
.notification-item.read small {
    font-weight: 400;
}
.notification-item i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #e8f3ff;
    color: #0874c7;
}
.notification-item.student i,
.notification-item.teacher i {
    background: #fff4e8;
    color: #c47f10;
}
.notification-item.late i {
    background: #fff0f3;
    color: #b42318;
}
.notification-item svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
.notification-item b,
.notification-item em,
.notification-item small {
    display: block;
    font-style: normal;
}
.notification-item b {
    margin-bottom: 3px;
    font-weight: 600;
}
.notification-item em {
    color: var(--muted);
    font-size: 13px;
}
.notification-item small {
    margin-top: 5px;
    color: #0874c7;
    font-size: 12px;
}
.notification-empty {
    padding: 18px;
    color: var(--muted);
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.panel-head h2 { margin-bottom: 0; }
.panel-head p {
    margin: 5px 0 0;
    color: var(--muted);
}
.panel-head input { max-width: 320px; }
.borrower-history {
    margin-top: 16px;
}
.history-check-all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    padding: 9px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #075caa;
    font-weight: 800;
}
.history-check-all input,
.return-loan-check {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}
.empty-state {
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #f8fbff;
}
.grid { display: grid; gap: 14px; align-items: end; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 7px; font-weight: 700; color: #344054; }
.required-label::after {
    content: " *";
    color: var(--red);
}
.inline { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.compact-check {
    width: max-content;
    min-width: 110px;
}
.compact-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
}
.inline-master-form input {
    max-width: 360px;
}
input, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
}
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    font: inherit;
    background: #fff;
}
input:focus, textarea:focus {
    outline: 3px solid rgba(29, 78, 216, .16);
    border-color: var(--blue);
}
.hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    margin: 16px 0 0;
}
.cover-preview {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
    color: var(--muted);
    font-size: 13px;
}
.cover-preview img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, .12);
}
.search {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.search input { max-width: 460px; }
.search .btn-icon svg {
    width: 18px;
    height: 18px;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th, td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.cover-trigger {
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: zoom-in;
}
.cover-trigger:focus {
    outline: 3px solid rgba(29, 78, 216, .18);
}
.book-thumb {
    width: 42px;
    height: 56px;
    object-fit: cover;
    display: inline-grid;
    place-items: center;
    border-radius: 6px;
    background: #eef6ff;
    color: #0874c7;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .10);
}
.book-thumb.empty svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.record-thumb {
    width: 38px;
    height: 50px;
}
.student-thumb {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    object-fit: cover;
    border-radius: 8px;
    background: #eef6ff;
    color: #0874c7;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .10);
}
.student-thumb.empty svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.cover-modal[hidden] {
    display: none;
}
.cover-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 24px;
}
.cover-modal-backdrop {
    position: absolute;
    inset: 0;
    min-height: 0;
    width: 100%;
    border-radius: 0;
    background: rgba(15, 23, 42, .68);
}
.cover-modal-card {
    position: relative;
    z-index: 1;
    width: min(720px, calc(100vw - 48px));
    display: grid;
    gap: 12px;
    justify-items: center;
    padding: 18px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0,0,0,.28);
}
.cover-modal-card img {
    width: min(620px, 100%);
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    background: #f8fbff;
}
.cover-modal-card strong {
    text-align: center;
    font-weight: 600;
}
.cover-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    font-size: 22px;
    line-height: 1;
}
.message-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 24px;
}
.message-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .56);
}
.message-modal-card {
    position: relative;
    z-index: 1;
    width: min(420px, calc(100vw - 48px));
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 26px;
    border-radius: 8px;
    background: #fff;
    text-align: center;
    box-shadow: 0 28px 80px rgba(0,0,0,.28);
}
.message-modal-icon {
    width: 52px;
    height: 52px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #fef3f2;
    color: var(--red);
}
.message-modal-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}
.message-modal-card h2 {
    margin-bottom: 0;
}
.message-modal-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.message-modal-card button {
    min-width: 120px;
}
.pwa-install {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 85;
    width: min(520px, calc(100vw - 28px));
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto 34px;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(216, 222, 232, .95);
    border-radius: 8px;
    background: rgba(255, 255, 255, .98);
    color: var(--ink);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
    transform: translateX(-50%);
}
.pwa-install img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
}
.pwa-install strong,
.pwa-install span {
    display: block;
}
.pwa-install strong {
    margin-bottom: 3px;
    font-size: 15px;
}
.pwa-install span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}
.pwa-install-action {
    min-height: 36px;
    padding: 0 13px;
    border-radius: 8px;
    background: #0b75b7;
}
.pwa-install-close {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 8px;
    background: #f2f4f7;
    color: #475467;
}
.pwa-install-close svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.password-change-page {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 18px;
}
.password-change-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}
.password-change-panel {
    position: relative;
    z-index: 1;
    width: min(430px, calc(100vw - 32px));
    display: grid;
    gap: 12px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}
.password-change-panel h1 {
    margin-bottom: 0;
    font-size: 25px;
}
.password-change-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.password-change-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #e8f3ff;
    color: #075caa;
}
.password-change-icon > svg {
    width: 30px;
    height: 30px;
    max-width: 30px;
    max-height: 30px;
    fill: currentColor;
    display: block;
}
.student-modal[hidden] {
    display: none;
}
.student-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 24px;
}
.student-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .62);
}
.student-modal-card {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 48px));
    padding: 22px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0,0,0,.28);
}
.student-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    font-size: 22px;
    line-height: 1;
}
.student-modal-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 34px;
    margin-bottom: 18px;
}
.student-modal-head h2 {
    margin-bottom: 4px;
}
.student-modal-head p {
    margin: 0;
    color: var(--muted);
}
.student-modal-photo {
    width: 86px;
    height: 98px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #eef6ff;
    color: #0874c7;
}
.student-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.student-modal-photo svg {
    width: 42px;
    height: 42px;
    fill: currentColor;
}
.student-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}
.student-details div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}
.student-details dt {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}
.student-details dd {
    margin: 4px 0 0;
    font-weight: 700;
}
.student-edit-form {
    display: grid;
    gap: 14px;
}
.sort-header {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.sort-header span::before {
    content: "↕";
    font-size: 11px;
    opacity: .55;
}
.sort-header.ascending span::before {
    content: "↑";
    opacity: 1;
}
.sort-header.descending span::before {
    content: "↓";
    opacity: 1;
}
.pill {
    display: inline-flex;
    min-width: 78px;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}
.pending { background: #e8f3ff; color: #075caa; }
.borrowed { background: #fff7ed; color: var(--gold); }
.returned, .pill.active { background: #ecfdf3; color: var(--green); }
.unpaid { background: #fef3f2; color: var(--red); }
.partial { background: #fff7ed; color: var(--gold); }
.paid { background: #ecfdf3; color: var(--green); }
.cancelled { background: #f2f4f7; color: #667085; }
.pill.inactive { background: #f2f4f7; color: #667085; }
.role { background: #eef2ff; color: var(--blue); min-width: 110px; }
.is-unavailable {
    background: #fff7f7;
}
tr:has(.pill.inactive) {
    background: #f8fafc;
}
.table-actions {
    white-space: nowrap;
}
.table-actions a,
.table-actions > button,
.table-actions form {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0 6px 0 0;
}
.link-button {
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid #b9dbff;
    border-radius: 8px;
    background: #e8f3ff;
    color: var(--blue);
    font: inherit;
    font-weight: 500;
    box-shadow: 0 6px 14px rgba(8, 92, 173, .08);
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.link-button:hover {
    background: #dceeff;
    border-color: #8cc7ff;
    text-decoration: none;
    transform: translateY(-1px);
}
.link-button.danger {
    border-color: #fecaca;
    background: #fef3f2;
    color: var(--red);
}
.link-button.danger:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}
.stock-warning {
    display: inline-flex;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
}
.payment-box {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid #cfe7ff;
    border-radius: 8px;
    background: #f8fbff;
}
.payment-box h2 {
    margin: 0;
    font-size: 18px;
}
.payment-box p {
    margin: 4px 0 0;
    color: var(--muted);
}
.payment-stats {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}
.payment-stats > div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}
.payment-stats span {
    display: block;
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
}
.payment-stats strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
}
.payment-filter select {
    max-width: 190px;
}
.payment-cell {
    min-width: 420px;
}
.payment-inline-form {
    display: grid;
    grid-template-columns: 95px 130px 140px 140px 70px;
    gap: 8px;
    align-items: center;
}
.payment-inline-form input,
.payment-inline-form select {
    padding: 8px 9px;
    border-radius: 7px;
}
.payment-inline-form button {
    min-height: 36px;
}
td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}
.alert {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-weight: 700;
}
.success { background: #ecfdf3; color: var(--green); }
.warning { background: #fff7ed; color: var(--gold); }
.error { background: #fef3f2; color: var(--red); }
.tabs { display: flex; gap: 10px; margin-bottom: 14px; }
.tabs a {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 14px;
}
.tabs a.active {
    background: #e8f3ff;
    border-color: #b9dbff;
    color: #075caa;
}
.portal-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(300px, 420px);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}
.portal-main-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .04);
}
.portal-card-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}
.portal-card-toolbar h2 {
    margin-bottom: 0;
}
.portal-kicker {
    display: block;
    margin-bottom: 5px;
    color: #0874c7;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.portal-side {
    display: grid;
    gap: 14px;
}
.portal-help h2 {
    margin-bottom: 14px;
}
.portal-steps {
    display: grid;
    gap: 12px;
}
.portal-steps div {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: start;
}
.portal-steps span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #e8f3ff;
    color: #075caa;
    font-weight: 700;
}
.portal-steps p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.45;
}
.portal-card-number {
    display: grid;
    gap: 10px;
}
.portal-card-number > span,
.portal-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.portal-card-number > strong {
    display: block;
    padding: 12px;
    border-radius: 8px;
    background: #f8fbff;
    color: #075caa;
    font-size: 20px;
    letter-spacing: 0;
    word-break: break-word;
}
.portal-card-number small {
    min-height: 18px;
    color: var(--green);
    font-weight: 700;
}
.portal-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.portal-summary .panel {
    margin-bottom: 0;
}
.portal-summary strong {
    display: block;
    margin-top: 7px;
    font-size: 24px;
}
.portal-records {
    margin-top: 0;
}
.portal-book-requests {
    margin-bottom: 18px;
}
.portal-book-list {
    display: grid;
    align-items: stretch;
    gap: 10px;
    max-height: min(58vh, 560px);
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-gutter: stable;
}
.portal-book-list::-webkit-scrollbar {
    width: 10px;
}
.portal-book-list::-webkit-scrollbar-track {
    background: #edf4fb;
    border-radius: 999px;
}
.portal-book-list::-webkit-scrollbar-thumb {
    background: #b7cbe0;
    border-radius: 999px;
    border: 2px solid #edf4fb;
}
.portal-book-list::-webkit-scrollbar-thumb:hover {
    background: #8da9c5;
}
.portal-book-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) minmax(130px, auto);
    gap: 12px;
    align-items: center;
    min-width: 0;
    overflow: hidden;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.portal-book-cover {
    width: 58px;
    min-width: 58px;
    height: 72px;
    min-height: 72px;
    display: grid;
    grid-column: 1;
    grid-row: 1;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #eef6ff;
    color: #0874c7;
}
.portal-book-cover img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: cover;
}
.portal-cover-trigger {
    display: block;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border-radius: inherit;
}
.portal-book-cover svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}
.portal-book-info h3 {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.portal-book-title {
    display: inline;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-weight: 800;
    line-height: inherit;
    text-align: left;
    cursor: pointer;
}
.portal-book-title:hover,
.portal-book-title:focus-visible {
    color: #1d4ed8;
    text-decoration: underline;
}
.portal-book-info p {
    margin: 0 0 5px;
    color: var(--muted);
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.portal-book-info small {
    display: block;
    color: #075caa;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.portal-book-item form {
    justify-self: end;
    min-width: 130px;
    margin: 0;
}
.portal-book-item form .button,
.portal-book-item form button {
    width: 100%;
}
.portal-book-item button:disabled {
    cursor: not-allowed;
    opacity: .68;
}
.portal-copy-list-meta {
    margin: 0;
    padding: 0 22px 4px;
    color: #475569;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.virtual-card-wrap {
    display: flex;
    justify-content: center;
}
.library-card {
    width: min(390px, 100%);
    min-height: 620px;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.58), transparent 38%),
        linear-gradient(155deg, #9fd8ff, #b8f1df 48%, #ffe4ac);
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 8px;
    padding: 18px;
    color: #17324d;
    box-shadow: 0 24px 70px rgba(23,32,42,.18);
}
.library-card[data-card-zoom] {
    cursor: zoom-in;
    transition: box-shadow .18s ease, transform .18s ease;
}
.library-card[data-card-zoom]:hover,
.library-card[data-card-zoom]:focus-visible {
    outline: 0;
    transform: translateY(-2px);
    box-shadow: 0 28px 78px rgba(23,32,42,.24);
}
.card-zoom-open {
    overflow: hidden;
}
.card-zoom-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
}
.card-zoom-backdrop {
    position: absolute;
    inset: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .72);
}
.card-zoom-scroll {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: 100vh;
    overflow: auto;
    padding: 34px 18px;
}
.card-zoom-shell {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}
.card-zoom-shell .library-card {
    width: min(460px, calc(100vw - 36px));
    min-height: 700px;
    cursor: default;
    box-shadow: 0 34px 90px rgba(0,0,0,.36);
}
.card-zoom-close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 2;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 16px 34px rgba(0,0,0,.28);
}
.card-zoom-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}
.card-top img { width: 38px; height: 38px; object-fit: contain; }
.card-top span { display: block; color: rgba(23,50,77,.72); }
.virtual-card-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.virtual-card-main small,
.virtual-meta small {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    color: rgba(23,50,77,.70);
}
.library-card h2 {
    margin-bottom: 0;
    font-size: 28px;
    line-height: 1.06;
}
.virtual-photo {
    width: 78px;
    height: 92px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255,255,255,.62);
    color: #0874c7;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .13);
}
.virtual-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.virtual-photo svg {
    width: 42px;
    height: 42px;
    fill: currentColor;
}
.virtual-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}
.virtual-meta strong {
    display: block;
    font-size: 16px;
}
.barcode, .qrbox {
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 8px;
    padding: 9px;
    text-align: center;
    margin: 10px auto;
    font-weight: 800;
    font-size: 12px;
    background: rgba(255,255,255,.70);
    color: #17324d;
}
.qrbox {
    width: min(190px, 70%);
}
.barcode {
    width: min(230px, 78%);
}
.barcode img, .qrbox img {
    display: block;
    max-width: 100%;
    margin: 0 auto 5px;
}
.barcode img {
    max-height: 34px;
}
.qrbox img {
    max-height: 154px;
}
.bars {
    height: 76px;
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 10px;
}
.bars i { display: block; background: #111827; height: 100%; }
.qrgrid {
    width: 154px;
    height: 154px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin: 0 auto 10px;
    padding: 8px;
    border: 6px solid #111827;
}
.qrgrid i { background: #fff; }
.qrgrid i.dark { background: #111827; }

nav[role="navigation"] {
    margin-top: 16px;
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}
nav[role="navigation"] > div:first-child {
    display: none;
}
nav[role="navigation"] > div:last-child {
    display: grid;
    gap: 10px;
}
nav[role="navigation"] > div:last-child > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
nav[role="navigation"] > div:last-child > div:last-child {
    justify-content: flex-end;
}
nav[role="navigation"] p {
    margin: 0;
}
nav[role="navigation"] a.relative,
nav[role="navigation"] span.relative {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    line-height: 1;
}
nav[role="navigation"] a.relative:hover {
    border-color: var(--blue);
    background: #eaf5ff;
    color: var(--blue-dark);
}
nav[role="navigation"] span[aria-current="page"] span.relative {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}
nav[role="navigation"] span[aria-disabled="true"] span.relative {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}
nav[role="navigation"] svg {
    width: 18px !important;
    height: 18px !important;
    display: block;
}
.pager {
    width: min(100%, 1120px);
    margin: 16px auto 0;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 62px;
    padding: 10px 18px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
    color: #17202a;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
    font-size: 14px;
}
.pager p {
    margin: 0;
}
.pager-links {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 10px;
    min-width: 0;
}
.pager-link,
.pager-current,
.pager-disabled {
    min-width: 30px;
    height: 34px;
    padding: 0 9px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 7px;
    background: #fff;
    color: #1d4ed8;
    font-weight: 700;
    line-height: 1;
}
.pager .pager-links {
    flex-direction: row !important;
}
.pager-link:hover {
    border-color: #1d4ed8;
    background: #e8f3ff;
    color: #1d4ed8;
}
.pager-current {
    border-color: #94a3b8;
    background: #fff;
    color: #17202a;
    box-shadow: inset 0 0 0 1px #94a3b8;
}
.pager-disabled {
    background: #fff;
    color: #94a3b8;
}
.pager-summary {
    flex: 0 0 auto;
    color: #17202a;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.kiosk-body {
    background: #f2f4f6;
    color: #17202a;
    overflow-x: hidden;
}
.kiosk-nav {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: clamp(18px, 4vw, 48px);
    width: 100%;
    padding: 0 18px;
    background: #208ecb;
    overflow: hidden;
}
.kiosk-nav a {
    color: #fff;
    flex: 0 1 auto;
    font-size: 14px;
    font-weight: 500;
    line-height: 50px;
    white-space: nowrap;
}
.kiosk-hero {
    background: #d9eaf4;
    border-bottom: 1px solid #c3d8e6;
}
.kiosk-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 44px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.kiosk-hero img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 8px 14px rgba(15, 23, 42, .18));
}
.kiosk-hero section {
    min-width: 0;
}
.kiosk-hero h1 {
    margin: 0 0 8px;
    font-size: 22px;
}
.kiosk-hero p {
    margin: 0;
    max-width: 900px;
    line-height: 1.55;
}
.kiosk-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 40px auto;
    display: grid;
    gap: 34px;
    overflow: hidden;
}
.kiosk-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.kiosk-card,
.kiosk-section {
    border: 1px solid #d6dde5;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
}
.kiosk-card {
    padding: 22px 20px;
    min-width: 0;
}
.kiosk-card-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    color: #075caa;
}
.kiosk-card-title svg {
    width: 42px;
    height: 42px;
    fill: #2f2d2b;
}
.kiosk-card-title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
}
.kiosk-card form,
.kiosk-card label {
    display: grid;
    gap: 10px;
}
.kiosk-card label {
    color: #334155;
    font-size: 13px;
}
.kiosk-card input,
.kiosk-card select {
    width: 100%;
    min-height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    background: #fff;
}
.kiosk-card button,
.kiosk-book button {
    min-height: 36px;
    border-radius: 4px;
    background: #1f9bd2;
}
.kiosk-card button {
    justify-self: start;
}
.kiosk-member {
    display: grid;
    gap: 4px;
    margin-top: 18px;
    padding: 12px;
    border-radius: 5px;
    background: #eef9ff;
}
.kiosk-member span,
.kiosk-member small {
    color: #475569;
}
.kiosk-links {
    display: grid;
    gap: 14px;
    margin: 0;
    padding-left: 64px;
}
.kiosk-section {
    padding: 22px 12px 12px;
    min-width: 0;
}
.kiosk-section > header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    color: #075caa;
}
.kiosk-section > header h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 500;
}
.kiosk-section > header span {
    color: #64748b;
    font-size: 13px;
}
.kiosk-collection-section > header {
    justify-content: space-between;
    text-align: left;
}
.kiosk-section-search {
    width: min(320px, 100%);
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #0f172a;
}
.kiosk-az {
    min-height: 290px;
}
.az-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    width: min(680px, 100%);
    margin: 0 auto;
}
.az-grid + .az-grid {
    margin-top: 20px;
}
.az-grid a {
    width: 38px;
    height: 29px;
    display: inline-grid;
    place-items: center;
    border-radius: 4px;
    background: #12669d;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .18);
}
.az-grid.numbers a {
    background: #35322f;
}
.az-grid a.active {
    background: #22c55e;
}
.kiosk-book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    padding: 0 0 8px;
}
.kiosk-book {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid #dbe4ee;
    border-radius: 6px;
    background: #fbfdff;
}
.kiosk-book h3 {
    margin: 0 0 5px;
    font-size: 15px;
}
.kiosk-card-title-button {
    display: block;
    min-height: 0;
    width: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
}
.kiosk-book .kiosk-card-title-button {
    min-height: 0;
    width: auto;
    background: transparent;
    color: #0f172a;
}
.kiosk-card-title-button:hover,
.kiosk-card-title-button:focus-visible {
    color: #075caa;
    text-decoration: underline;
    outline: none;
}
.kiosk-book p {
    margin: 0 0 4px;
    color: #475569;
}
.kiosk-book small {
    color: #075caa;
    font-weight: 700;
}
.kiosk-book form {
    grid-column: 1 / -1;
}
.kiosk-book button {
    width: 100%;
}
.kiosk-book .kiosk-cover {
    width: 72px;
}
.kiosk-book button:disabled {
    background: #e8f3ff;
    color: #5790c4;
    cursor: not-allowed;
}
.kiosk-cover,
.kiosk-arrival-cover {
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: #eaf4fb;
    color: #1587ce;
    overflow: hidden;
}
.kiosk-cover {
    width: 72px;
    height: 92px;
    min-height: 92px;
    padding: 0;
    border: 0;
    background: #eaf4fb;
    cursor: pointer;
}
.kiosk-cover:disabled {
    cursor: default;
}
.kiosk-cover img,
.kiosk-arrival-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.kiosk-cover svg {
    width: 34px;
    height: 34px;
    fill: currentColor;
}
.kiosk-arrivals {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 180px;
    gap: 18px;
    overflow-x: auto;
    padding: 0 0 14px;
}
.kiosk-arrivals article {
    display: grid;
    gap: 10px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
}
.kiosk-arrival-cover {
    height: 190px;
    width: 100%;
    min-height: 190px;
    padding: 0;
    border: 0;
    cursor: pointer;
}
.kiosk-arrival-cover:disabled {
    cursor: default;
}
.kiosk-arrival-cover svg {
    width: 48px;
    height: 48px;
    fill: currentColor;
}
.kiosk-arrivals strong,
.kiosk-arrival-title-button {
    font-size: 13px;
    line-height: 1.35;
}
.kiosk-arrival-title-button {
    display: block;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #0f172a;
    font-weight: 700;
    text-align: left;
}
.kiosk-arrival-title-button:hover,
.kiosk-arrival-title-button:focus-visible {
    color: #075caa;
    text-decoration: underline;
    outline: none;
}
.kiosk-collection-scroll {
    overflow-x: auto;
}
.kiosk-collection-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}
.kiosk-collection-table th {
    padding: 12px 10px;
    background: #208ecb;
    color: #fff;
    text-align: left;
    font-size: 14px;
}
.kiosk-collection-table td {
    padding: 10px;
    border-bottom: 1px solid #b9d9f0;
    border-right: 1px dotted #d8e2ea;
    vertical-align: top;
}
.kiosk-collection-table tbody tr:nth-child(odd) {
    background: #f6fbff;
}
.kiosk-title-button {
    display: block;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #0f172a;
    font-weight: 700;
    text-align: left;
    line-height: 1.3;
}
.kiosk-title-button:hover,
.kiosk-title-button:focus-visible {
    color: #075caa;
    text-decoration: underline;
    outline: none;
}
.kiosk-table-cover {
    width: 64px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: #eaf4fb;
    color: #1587ce;
    overflow: hidden;
}
.kiosk-table-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.kiosk-table-cover svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}
.kiosk-table-meta {
    display: grid;
    gap: 5px;
    margin-top: 10px;
    color: #334155;
    font-size: 12px;
}
.chat-page {
    width: min(820px, calc(100% - 28px));
    margin: 34px auto;
}
.chat-card {
    display: grid;
    gap: 16px;
    padding: 22px;
    border: 1px solid #d6dde5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}
.chat-card header h1 {
    margin-bottom: 6px;
    color: #075caa;
}
.chat-card header p {
    margin: 0;
    color: #64748b;
}
.staff-chat {
    min-height: calc(100vh - 170px);
}
.chat-window {
    height: 430px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #f8fafc;
}
.chat-empty {
    margin: auto;
    color: #64748b;
}
.chat-bubble {
    width: min(76%, 560px);
    display: grid;
    gap: 5px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #dbe4ee;
}
.chat-bubble.staff {
    align-self: flex-end;
    background: #dff3ff;
    border-color: #b9def4;
}
.chat-bubble.visitor {
    align-self: flex-start;
}
.chat-bubble strong {
    color: #075caa;
    font-size: 13px;
}
.chat-bubble p {
    margin: 0;
    line-height: 1.4;
    white-space: pre-wrap;
}
.chat-bubble small {
    color: #64748b;
    font-size: 11px;
}
.chat-form {
    display: grid;
    gap: 12px;
}
.chat-identity {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.chat-identity div {
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fbff;
}
.chat-identity span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}
.chat-identity strong {
    display: block;
    margin-top: 3px;
    color: #0f172a;
    overflow-wrap: anywhere;
}
.chat-form label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 13px;
}
.chat-form input,
.chat-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
}
.chat-form textarea {
    min-height: 90px;
    resize: vertical;
}
.chat-form button {
    justify-self: start;
    border-radius: 6px;
    background: #0ea5e9;
}
.report-sheet {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
}
.report-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
    text-align: center;
}
.report-title img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}
.report-title h2 {
    margin: 0 0 4px;
}
.report-title p {
    margin: 0;
    color: #64748b;
}
.student-report-grid {
    display: grid;
    grid-template-columns: minmax(360px, .92fr) minmax(420px, 1.08fr);
    gap: 30px;
    align-items: start;
}
.report-left h3,
.report-chart-panel h3 {
    margin-bottom: 14px;
    color: #075caa;
}
.report-table {
    width: 100%;
}
.report-table th,
.report-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: middle;
}
.report-table thead th {
    background: #0ea5e9;
    color: #fff;
}
.report-table tfoot th {
    background: #eef9ff;
}
.legend-swatch {
    width: 13px;
    height: 13px;
    display: inline-block;
    margin-right: 8px;
    border-radius: 3px;
    background: var(--swatch);
    vertical-align: middle;
}
.report-chart-panel {
    display: grid;
    justify-items: center;
    gap: 18px;
    padding: 12px;
}
.report-pie {
    width: 300px;
    height: 300px;
    display: grid;
    place-items: center;
    position: relative;
    border-radius: 50%;
    background: conic-gradient(var(--pie-gradient));
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08), 0 18px 42px rgba(15, 23, 42, .12);
}
.report-pie::after {
    content: "";
    position: absolute;
    inset: 82px;
    border-radius: 50%;
    background: #fff;
}
.report-pie-labeled::after {
    display: none;
}
.report-pie span,
.report-pie small {
    position: relative;
    z-index: 1;
}
.report-pie-label {
    position: absolute !important;
    transform: translate(-50%, -50%);
    z-index: 2;
    min-width: 46px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.15;
    text-align: center;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .15);
}
.report-pie span {
    font-size: 42px;
    font-weight: 800;
    color: #075caa;
}
.report-pie small {
    margin-top: 48px;
    color: #64748b;
}
.report-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    width: 100%;
}
.report-legend div {
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    font-size: 13px;
}
.report-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #f8fafc;
}
.report-filter-bar label {
    display: grid;
    gap: 6px;
    min-width: 190px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}
.report-filter-bar select,
.report-filter-bar input {
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
}
.collection-report-table th:last-child,
.collection-report-table td:last-child {
    width: 110px;
    text-align: center;
}
.inventory-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.inventory-summary-grid div {
    padding: 14px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #f8fafc;
}
.inventory-summary-grid span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.inventory-summary-grid strong {
    display: block;
    margin-top: 7px;
    color: #0f172a;
    font-size: 22px;
}

.visitor-log-grid {
    display: grid;
    grid-template-columns: minmax(320px, .9fr) minmax(460px, 1.1fr);
    gap: 18px;
    margin-bottom: 18px;
}
.visitor-log-card,
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}
.visitor-log-card h2,
.card h2 {
    margin: 0 0 14px;
    color: #0f172a;
}
.visitor-log-form {
    display: grid;
    gap: 12px;
}
.visitor-log-form label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-weight: 700;
}
.visitor-log-form input,
.visitor-log-form select,
.visitor-log-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    color: #0f172a;
}
.visitor-log-form textarea {
    resize: vertical;
}
.visitor-log-form button {
    justify-self: start;
}
.visitor-kiosk-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(145deg, rgba(14, 165, 233, .16), rgba(29, 78, 216, .10)),
        #f5f7fb;
}
.visitor-kiosk-panel {
    width: min(620px, 100%);
    padding: 28px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}
.visitor-kiosk-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}
.visitor-kiosk-brand img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}
.visitor-kiosk-brand h1 {
    margin: 0 0 4px;
}
.visitor-kiosk-brand p {
    margin: 0;
    color: #64748b;
}
.visitor-kiosk-form {
    display: grid;
    gap: 14px;
}
.visitor-kiosk-form input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 16px;
}
.visitor-kiosk-form button {
    width: 100%;
    min-height: 50px;
}
.compact-grid {
    gap: 12px;
}
.visitor-log-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}
.visitor-log-divider::before,
.visitor-log-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}
.visitor-log-table-wrap {
    overflow-x: auto;
}
.visitor-log-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}
.visitor-log-table th,
.visitor-log-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: middle;
}
.visitor-log-table th {
    background: #0ea5e9;
    color: #fff;
    font-size: 12px;
    text-transform: uppercase;
}
.visitor-log-table td small {
    display: block;
    margin-top: 3px;
    color: #64748b;
}
.public-register-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    background: linear-gradient(135deg, #e0f2fe, #f8fafc 54%, #e0f7fa);
}
.public-register-card {
    width: min(920px, 100%);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
    padding: 28px;
}
.public-register-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
}
.public-register-head img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex: 0 0 auto;
}
.public-register-head h1 {
    margin: 0 0 4px;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
}
.public-register-head p {
    margin: 0;
    color: #475569;
}
.public-register-form {
    display: grid;
    gap: 16px;
}
.public-register-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.public-register-form label {
    display: grid;
    gap: 7px;
    font-weight: 700;
    color: #172033;
}
.public-register-form input,
.public-register-form select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}
.public-register-form button,
.public-register-success a {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    background: #1d4ed8;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.public-register-success {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 18px;
    background: #f0fdf4;
}
.public-register-success h2 {
    margin: 0;
    color: #166534;
}
.public-register-success dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}
.public-register-success div {
    border: 1px solid #dcfce7;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}
.public-register-success dt {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.public-register-success dd {
    margin: 4px 0 0;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 800;
}
.status-pill.muted {
    background: #e2e8f0;
    color: #475569;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.section-head .search {
    margin: 0;
}

.catalog-page {
    display: grid;
    gap: 14px;
}
.catalog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 14px;
    background: #fff;
    border-left: 4px solid #0ea5e9;
    border-bottom: 1px solid var(--line);
}
.catalog-head h1 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 500;
}
.catalog-head p {
    margin: 0;
    color: #475569;
    font-size: 14px;
}
.catalog-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
}
.catalog-search select,
.catalog-search input {
    min-height: 28px;
    border: 1px solid #cbd5e1;
    border-radius: 0;
    background: #fff;
}
.catalog-search input {
    width: 210px;
}
.catalog-search button,
.smart-add-card footer button[type="submit"] {
    min-height: 28px;
    border-radius: 3px;
    background: #0ea5e9;
}
.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    padding: 12px 14px 0;
}
.catalog-toolbar form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex: 0 0 auto;
    flex-wrap: nowrap;
}
.catalog-toolbar select {
    width: min(280px, 100%);
    min-height: 38px;
    padding: 0 34px 0 14px;
    border: 1px solid #0ea5e9;
    border-radius: 4px;
    background: #fff;
    color: #075985;
    font: inherit;
    line-height: 1;
}
.outline-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #0ea5e9;
    border-radius: 4px;
    background: #fff;
    color: #0284c7;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}
.catalog-toolbar form .outline-button,
.catalog-toolbar form button {
    flex: 0 0 auto;
    min-width: max-content;
    white-space: nowrap;
}
.outline-button:hover {
    background: #eef9ff;
}
.outline-button.warning {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
}
.outline-button.muted {
    color: #64748b;
    border-color: #93c5fd;
}
.outline-button.with-caret::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}
.outline-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.compact-tabs {
    margin: 0 14px;
}
.catalog-table-panel {
    padding: 0 14px 14px;
}
.catalog-table-scroll {
    overflow-x: auto;
    background: #fff;
}
.catalog-table {
    width: 100%;
    min-width: 1260px;
    table-layout: fixed;
}
.catalog-table thead th {
    background: #0ea5e9;
    color: #fff;
    border-bottom: 0;
    height: 38px;
    padding-top: 10px;
    padding-bottom: 10px;
    vertical-align: middle;
    white-space: nowrap;
}
.catalog-table .sort-header {
    color: #fff;
}
.catalog-table tbody tr:nth-child(odd) {
    background: #effbff;
}
.catalog-table td {
    height: 52px;
    vertical-align: middle;
    padding-top: 10px;
    padding-bottom: 10px;
    overflow-wrap: anywhere;
}
.catalog-table th:first-child,
.catalog-table td:first-child {
    width: 76px;
}
.catalog-table th:nth-child(2),
.catalog-table td:nth-child(2) {
    width: 9%;
}
.catalog-table th:nth-child(3),
.catalog-table td:nth-child(3) {
    width: 22%;
}
.catalog-table th:nth-child(4),
.catalog-table td:nth-child(4) {
    width: 12%;
}
.catalog-table th:nth-child(5),
.catalog-table td:nth-child(5) {
    width: 11%;
}
.catalog-table th:nth-child(6),
.catalog-table td:nth-child(6) {
    width: 12%;
}
.catalog-table th:nth-child(7),
.catalog-table td:nth-child(7) {
    width: 12%;
}
.catalog-table th:nth-child(8),
.catalog-table td:nth-child(8) {
    width: 9%;
}
.catalog-table th:nth-child(9),
.catalog-table td:nth-child(9) {
    width: 7%;
}
.catalog-table th:nth-child(10),
.catalog-table td:nth-child(10) {
    width: 7%;
}
.catalog-table th:last-child,
.catalog-table td:last-child {
    width: 132px;
}
.catalog-table th:nth-last-child(2),
.catalog-table td:nth-last-child(2) {
    width: 96px;
    text-align: center;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}
.catalog-table th:nth-last-child(3),
.catalog-table td:nth-last-child(3) {
    width: 92px;
    text-align: center;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}
.catalog-table th:nth-last-child(4),
.catalog-table td:nth-last-child(4) {
    width: 84px;
    text-align: center;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}
.catalog-title-cell {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.catalog-title-cell strong,
.catalog-title-button {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}
.catalog-title-button {
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    text-align: left;
    justify-content: flex-start;
    cursor: pointer;
}
.catalog-title-button:hover,
.catalog-title-button:focus-visible {
    color: #075caa;
    text-decoration: underline;
    outline: none;
}
.catalog-title-cell small {
    color: #64748b;
}
.identifier-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}
.identifier-stack span {
    padding: 3px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    background: #fff;
    color: #334155;
    font-size: 11px;
}
.copy-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 4px;
    background: #22d399;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
}
.copy-pill.empty {
    background: #ef4444;
}
.age-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 800;
}
.age-pill.near-obsolete {
    background: #fef3c7;
    color: #92400e;
}
.age-pill.obsolete {
    background: #fee2e2;
    color: #991b1b;
}
.age-pill.archived {
    background: #e2e8f0;
    color: #475569;
}
.age-pill.no-year {
    background: #f1f5f9;
    color: #64748b;
}
.age-pill + small,
.age-pill + small + small {
    display: block;
    margin-top: 5px;
    color: #64748b;
}
.catalog-actions {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}
.catalog-actions .icon-action,
.catalog-actions form {
    display: inline-grid;
    vertical-align: middle;
}
.catalog-actions form {
    margin: 0 0 0 6px;
}
.icon-action {
    display: inline-grid;
    place-items: center;
    width: 34px;
    min-width: 34px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 4px;
    background: #0ea5e9;
    color: #fff;
    cursor: pointer;
}
.icon-action.danger { background: #ef4444; }
.icon-action::-webkit-details-marker { display: none; }
.icon-action svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.copy-list-modal[hidden] {
    display: none;
}
.copy-list-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 24px;
}
.copy-list-backdrop {
    position: fixed;
    inset: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .48);
}
.copy-list-card {
    position: relative;
    z-index: 1;
    width: min(840px, calc(100vw - 32px));
    max-height: min(720px, calc(100vh - 48px));
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
    text-align: left;
}
.copy-list-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 56px 16px 22px;
    border-bottom: 1px solid #e2e8f0;
}
.copy-list-card header > div {
    max-width: 100%;
}
.copy-list-card h2 {
    margin: 0 0 5px;
    font-size: 22px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.copy-list-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.copy-list-card p + p {
    margin-top: 6px;
}
.copy-list-card p strong,
.copy-list-card p b {
    color: #0f172a;
}
.copy-list-close {
    position: absolute;
    top: 12px;
    right: 14px;
    min-height: 34px;
    width: 34px;
    padding: 0;
    border-radius: 999px;
    background: #eef2ff;
    color: #1d4ed8;
    font-size: 22px;
}
.copy-list-table-wrap {
    max-height: 520px;
    overflow: auto;
    padding: 16px 22px 22px;
}
.copy-list-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    table-layout: fixed;
}
.copy-list-table th {
    background: #0ea5e9;
    color: #fff;
    padding: 11px 12px;
    font-size: 12px;
    line-height: 1.2;
    text-align: left;
    text-transform: uppercase;
    vertical-align: middle;
}
.copy-list-table td {
    padding: 12px;
    border-bottom: 1px solid #d8dee8;
    vertical-align: top;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.copy-list-table th:nth-child(1),
.copy-list-table td:nth-child(1) {
    width: 56px;
    text-align: center;
}
.copy-list-table th:nth-child(2),
.copy-list-table td:nth-child(2) {
    width: 46%;
}
.copy-list-table th:nth-child(3),
.copy-list-table td:nth-child(3) {
    width: 132px;
}
.copy-list-table th:nth-child(4),
.copy-list-table td:nth-child(4) {
    width: 112px;
}
.copy-list-table th:nth-child(5),
.copy-list-table td:nth-child(5) {
    width: 88px;
    text-align: center;
    white-space: nowrap;
}
.copy-list-table th:nth-child(6),
.copy-list-table td:nth-child(6) {
    width: 96px;
    text-align: center;
}
.copy-list-table tbody tr:nth-child(odd) {
    background: #effbff;
}
.copy-list-status {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #334155;
    font-weight: 700;
    font-size: 12px;
}
.copy-list-status.active {
    background: #dcfce7;
    color: #166534;
}
.copy-list-status.archived {
    background: #fee2e2;
    color: #991b1b;
}
.catalog-head.compact {
    align-items: center;
    margin-bottom: 0;
}
.catalog-master-page {
    display: grid;
    gap: 14px;
}
.catalog-master-form {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .04);
}
.catalog-master-form h2 {
    margin: 0;
    padding: 18px 16px;
    border-left: 4px solid #0ea5e9;
    border-bottom: 1px solid #e2e8f0;
    font-size: 19px;
    font-weight: 500;
}
.catalog-entry-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr)) auto;
    gap: 16px;
    align-items: end;
    padding: 24px 30px;
}
.catalog-entry-form.wide {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
}
.catalog-entry-form label,
.mini-edit-form label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 13px;
}
.catalog-entry-form input,
.catalog-entry-form textarea,
.mini-edit-form input,
.mini-edit-form textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #f8fafc;
}
.catalog-entry-form textarea,
.mini-edit-form textarea {
    min-height: 72px;
    resize: vertical;
}
.catalog-entry-form button {
    min-height: 38px;
    border-radius: 4px;
    background: #0ea5e9;
}
.switch-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px !important;
    min-height: 38px;
}
.switch-row input[type="checkbox"] {
    width: 20px;
    min-height: 20px;
}
.master-table {
    min-width: 980px;
}
.master-table th,
.master-table td {
    text-align: left;
}
.master-table th:last-child,
.master-table td:last-child {
    width: 150px;
}
.master-table td:nth-last-child(2),
.master-table th:nth-last-child(2) {
    width: 110px;
}
.master-actions {
    white-space: nowrap;
}
.master-actions details,
.master-actions form {
    display: inline-grid;
    vertical-align: middle;
}
.master-actions form {
    margin-left: 8px;
}
.master-actions form {
    margin: 0;
}
.master-actions details {
    position: relative;
}
.master-actions summary {
    list-style: none;
}
.mini-edit-form {
    position: absolute;
    right: 0;
    z-index: 4;
    width: min(360px, 84vw);
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
}
.mini-edit-form.wide {
    width: min(520px, 86vw);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.mini-edit-form button {
    min-height: 34px;
    border-radius: 4px;
    background: #0ea5e9;
}
.smart-add-modal[hidden] {
    display: none;
}
.smart-add-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 18px;
}
.smart-add-backdrop {
    position: absolute;
    inset: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, .48);
}
.smart-add-card {
    position: relative;
    z-index: 1;
    width: min(500px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(15, 23, 42, .28);
}
.smart-add-card header,
.smart-add-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
}
.smart-add-card header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
}
.smart-add-card header button {
    min-height: 28px;
    padding: 0 8px;
    background: transparent;
    color: #64748b;
    font-size: 26px;
}
.smart-add-body {
    display: grid;
    gap: 16px;
    padding: 18px 40px 32px;
}
.smart-add-body label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 13px;
}
.smart-add-body input,
.smart-add-body select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #f8fafc;
    color: #475569;
    font-size: 15px;
}
.smart-add-body small {
    color: #64748b;
    font-size: 11px;
}
.smart-add-card footer {
    justify-content: flex-end;
    border-top: 1px solid #e2e8f0;
    border-bottom: 0;
}
.smart-add-card footer .secondary {
    background: #7c8a97;
}

@media (max-width: 980px) {
    .sidebar {
        width: min(82vw, 292px);
        max-width: 292px;
        padding: 18px;
        transform: translateX(-105%);
        overflow-y: auto;
        box-shadow: 16px 0 34px rgba(15, 23, 42, .28);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; }
    body.sidebar-open { overflow: hidden; }
    .shell, body.sidebar-collapsed .shell { margin-left: 0; padding: 56px 18px 18px; }
    .menubar, body.sidebar-collapsed .menubar { left: 0; }
    body.sidebar-collapsed .sidebar { width: min(82vw, 292px); }
    body.sidebar-collapsed .brand div,
    body.sidebar-collapsed .label { display: inline; }
    body.sidebar-collapsed nav a,
    body.sidebar-collapsed .nav-group-toggle,
    body.sidebar-collapsed .sidebar .ghost {
        justify-content: flex-start;
        padding-left: 12px;
        padding-right: 12px;
    }
    body.sidebar-collapsed .nav-submenu {
        display: grid;
    }
    body.sidebar-collapsed .nav-chevron {
        display: inline-grid;
    }
    .stats, .three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kiosk-cards { grid-template-columns: 1fr; }
    .kiosk-nav {
        justify-content: flex-start;
        gap: 22px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-grid { grid-template-columns: 1fr; }
    .login-shell {
        grid-template-columns: 1fr;
        gap: 26px;
        width: min(480px, 100%);
        padding: 38px 28px;
    }
    .login-divider { display: none; }
    .login-logo-large {
        width: 132px;
        height: 132px;
    }
    .login-brand-panel h1 { font-size: 27px; }
}
@media (max-width: 640px) {
    .shell, body.sidebar-collapsed .shell { padding: 54px 14px 16px; }
    .menubar {
        height: 40px;
        gap: 10px;
        padding: 0 10px;
    }
    .top-user-toggle {
        max-width: calc(100vw - 70px);
        padding: 0 8px;
        gap: 6px;
    }
    .top-user-toggle > span:last-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .user-dropdown {
        right: 0;
        width: min(280px, calc(100vw - 20px));
    }
    .pwa-install {
        bottom: 10px;
        width: calc(100vw - 20px);
        grid-template-columns: 40px minmax(0, 1fr) 32px;
    }
    .pwa-install img {
        width: 40px;
        height: 40px;
    }
    .pwa-install-action {
        grid-column: 1 / -1;
        width: 100%;
    }
    .pwa-install-close {
        grid-column: 3;
        grid-row: 1;
    }
    .card-zoom-scroll { padding: 46px 10px 18px; }
    .card-zoom-shell .library-card {
        width: calc(100vw - 20px);
        min-height: 0;
        padding: 16px;
    }
    .card-zoom-close {
        top: -34px;
        right: 0;
    }
    .library-card h2 { font-size: 24px; }
    .page-head, .search { flex-direction: column; align-items: stretch; }
    .public-register-shell { padding: 16px 10px; }
    .public-register-card { padding: 18px; }
    .public-register-head {
        align-items: flex-start;
        gap: 12px;
    }
    .public-register-head img {
        width: 54px;
        height: 54px;
    }
    .public-register-grid,
    .public-register-success dl {
        grid-template-columns: 1fr;
    }
    .settings-resource-row {
        grid-template-columns: 1fr;
    }
    .kiosk-shell {
        width: calc(100% - 20px);
        margin: 22px auto;
    }
    .kiosk-hero > div {
        width: calc(100% - 28px);
        padding: 24px 0;
        gap: 12px;
    }
    .kiosk-hero img {
        width: 58px;
        height: 58px;
    }
    .kiosk-book-grid {
        grid-template-columns: 1fr;
    }
    .kiosk-section > header {
        flex-direction: column;
        align-items: flex-start;
    }
    .student-report-grid,
    .report-legend {
        grid-template-columns: 1fr;
    }
    .visitor-log-grid,
    .inventory-summary-grid,
    .chat-identity,
    .compact-grid {
        grid-template-columns: 1fr;
    }
    .section-head {
        display: grid;
        align-items: stretch;
    }
    .section-head .search {
        width: 100%;
    }
    .visitor-log-form button {
        width: 100%;
    }
    .report-pie {
        width: 240px;
        height: 240px;
    }
    .report-pie::after {
        inset: 66px;
    }
    .catalog-head,
    .catalog-search {
        flex-direction: column;
        align-items: stretch;
    }
    .catalog-search input {
        width: 100%;
    }
    .catalog-toolbar,
    .catalog-table-panel {
        padding-left: 0;
        padding-right: 0;
    }
    .compact-tabs {
        margin-left: 0;
        margin-right: 0;
    }
    .outline-button {
        flex: 1 1 145px;
    }
    .smart-add-body {
        padding: 16px;
    }
    .two, .three, .four, .stats, .payment-stats { grid-template-columns: 1fr; }
    .payment-inline-form {
        grid-template-columns: 1fr;
    }
    .payment-cell {
        min-width: 260px;
    }
    .quick-actions { grid-template-columns: 1fr; }
    .portal-card-toolbar,
    .portal-summary { grid-template-columns: 1fr; }
    .portal-card-toolbar {
        display: grid;
        align-items: stretch;
    }
    .portal-card-toolbar .button {
        width: 100%;
    }
    .portal-book-item {
        grid-template-columns: 52px minmax(0, 1fr);
    }
    .portal-book-item form {
        grid-column: 1 / -1;
    }
    .portal-book-item button {
        width: 100%;
    }
    .panel-head { flex-direction: column; align-items: stretch; }
    .head-actions { justify-content: stretch; }
    .head-actions .button { width: 100%; }
    table { display: block; overflow-x: auto; }
    .login-page { padding: 18px; }
    .login-shell { padding: 32px 22px; }
    .login-logo-large {
        width: 112px;
        height: 112px;
    }
    .login-brand-panel h1 { font-size: 24px; }
}
@media print {
    .sidebar, .page-head, .alert { display: none; }
    .shell { margin: 0; padding: 0; }
    body { background: #fff; }
    .library-card { box-shadow: none; }
    @page { margin: 10mm; }
    .student-report-sheet {
        box-shadow: none;
        border: 0;
        border-radius: 0;
        padding: 0;
    }
    .student-report-grid {
        grid-template-columns: 44% 56%;
        gap: 18px;
    }
    .student-report-sheet {
        page: student-report-landscape;
    }
    @page student-report-landscape {
        size: landscape;
        margin: 10mm;
    }
    .report-pie {
        width: 250px;
        height: 250px;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    .report-pie::after {
        inset: 70px;
    }
    .report-table thead th,
    .legend-swatch,
    .report-legend div {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

.catalog-toolbar > form {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: auto !important;
    max-width: 100% !important;
}

.catalog-toolbar > form select {
    flex: 0 1 280px !important;
}

.catalog-toolbar > form .outline-button,
.catalog-toolbar > form button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 100px !important;
    padding: 0 14px !important;
    overflow: visible !important;
    text-indent: 0 !important;
    white-space: nowrap !important;
}
