:root {
    --paper: #f5f7fb;
    --paper-deep: #edf2f8;
    --surface: #ffffff;
    --ink: #172033;
    --muted: #738096;
    --green: #155eef;
    --green-dark: #0b3da8;
    --green-soft: #eaf1ff;
    --terracotta: #f59e0b;
    --mustard: #f8c14d;
    --red: #e5484d;
    --line: #e5eaf2;
    --white: #ffffff;
    --font-serif: "Plus Jakarta Sans", "DM Sans", sans-serif;
    --font-sans: "DM Sans", Arial, sans-serif;
    --shadow-book: 0 12px 28px rgba(23, 45, 86, .16);
    --shadow-float: 0 18px 45px rgba(31, 56, 100, .10);
    --container: 1220px;
}

[hidden] { display: none !important; }

body { background: var(--paper); color: var(--ink); }
h1, h2, h3 { font-family: var(--font-serif); letter-spacing: -.035em; }
.eyebrow, .card-kicker, .catalog-number { color: var(--green); letter-spacing: .09em; }
.button { min-height: 46px; border: 0; border-radius: 10px; background: var(--green); box-shadow: 0 8px 18px rgba(21, 94, 239, .18); }
.button:hover { background: #0f50d8; box-shadow: 0 11px 24px rgba(21, 94, 239, .24); }
.button-secondary { border: 1px solid #cdd9ee; background: #fff; box-shadow: none; color: var(--green); }
.button-secondary:hover { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.text-link { color: var(--green); text-decoration: none; }
.status-badge { border: 0; border-radius: 999px; padding: 6px 10px; }
.status-available, .status-borrowed { background: #e6f8ef; color: #16815a; }
.status-pending { background: #fff4d8; color: #a46900; }
.status-late, .status-rejected, .status-empty { background: #ffebec; color: #c5323a; }
.status-returned { background: #edf1f7; color: #5c6980; }

/* Public navigation */
.public-site { background: #fff; }
.site-header { border: 0; background: rgba(255,255,255,.95); box-shadow: 0 1px 0 rgba(18, 44, 89, .08); backdrop-filter: blur(16px); }
.header-inner { min-height: 76px; }
.brand img { width: 38px; height: 48px; }
.brand strong { color: #0d2f6e; font-family: var(--font-serif); font-size: 1.05rem; font-weight: 800; }
.brand small { color: #8490a3; font-size: .63rem; }
.site-nav { gap: 30px; color: #516078; font-size: .88rem; }
.site-nav > a[aria-current="page"]:not(.button) { color: var(--green); }
.site-nav > a[aria-current="page"]:not(.button)::after { height: 2px; border-radius: 2px; background: var(--green); }
.nav-toggle { border: 1px solid var(--line); border-radius: 10px; }

/* Modern public hero */
.modern-hero { overflow: hidden; border: 0; background: #f3f7fd; padding: 74px 0 82px; }
.modern-hero::before { top: auto; right: -160px; bottom: -230px; left: auto; width: 540px; height: 540px; border-radius: 50%; background: #e2ecff; }
.modern-hero .hero-grid { grid-template-columns: minmax(0,.9fr) minmax(520px,1.1fr); gap: 72px; }
.modern-hero .hero-copy h1 { max-width: 680px; margin: 15px 0 20px; font-size: clamp(3.1rem,5.2vw,5.3rem); font-weight: 800; line-height: 1.01; }
.modern-hero .hero-copy > p { max-width: 590px; color: #66748a; font-size: 1.05rem; line-height: 1.75; }
.hero-search { position: relative; display: grid; grid-template-columns: 36px 1fr auto; max-width: 650px; align-items: center; border: 1px solid #dfe6f1; border-radius: 14px; margin-top: 30px; background: #fff; padding: 7px; box-shadow: 0 14px 32px rgba(22, 52, 100, .10); }
.hero-search .search-symbol { color: #97a3b5; font-size: 1.5rem; text-align: center; }
.hero-search input { min-height: 48px; padding-left: 2px; }
.hero-search .button { min-width: 112px; }
.hero-actions { display: none; gap: 10px; margin-top: 16px; }
.modern-hero .hero-stats { gap: 40px; margin-top: 34px; }
.modern-hero .hero-stats div { min-width: auto; border: 0; padding: 0; }
.modern-hero .hero-stats strong { color: #0d2f6e; font-family: var(--font-serif); font-size: 1.8rem; font-weight: 800; }
.modern-hero .hero-stats span { color: #8490a3; font-size: .72rem; }
.library-preview { position: relative; min-height: 520px; border: 9px solid #fff; border-radius: 26px; background: #fff; padding: 18px; box-shadow: 0 28px 70px rgba(30, 59, 105, .18); transform: rotate(.7deg); }
.preview-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); padding: 0 2px 15px; }
.preview-toolbar > div { display: flex; gap: 5px; }
.preview-toolbar > div span { width: 7px; height: 7px; border-radius: 50%; background: #d8dfeb; }
.preview-toolbar > div span:first-child { background: #ff7b7f; }
.preview-toolbar > div span:nth-child(2) { background: #ffc95b; }
.preview-toolbar > div span:last-child { background: #55c898; }
.preview-toolbar strong { font-size: .78rem; }
.preview-toolbar em { justify-self: end; color: var(--green); font-size: .68rem; font-style: normal; font-weight: 700; }
.preview-book-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 11px; padding: 22px 2px 18px; }
.preview-book { min-width: 0; }
.preview-book > img, .preview-cover { display: flex; width: 100%; aspect-ratio: 2/3; flex-direction: column; justify-content: space-between; overflow: hidden; border-radius: 6px; object-fit: cover; box-shadow: 0 8px 15px rgba(20,39,75,.17); }
.preview-cover { position: relative; background: var(--preview-color); color: #fff; padding: 11px 9px; }
.preview-cover::after { position: absolute; inset: 0; border-left: 5px solid rgba(0,0,0,.16); content: ""; }
.preview-cover small, .preview-cover strong, .preview-cover em { position: relative; z-index: 1; display: block; }
.preview-cover small { font-size: .46rem; font-weight: 700; text-transform: uppercase; }
.preview-cover strong { font-size: .72rem; line-height: 1.1; }
.preview-cover em { font-size: .43rem; font-style: normal; }
.preview-book > strong, .preview-book > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-book > strong { margin-top: 9px; font-size: .67rem; }
.preview-book > small { color: var(--muted); font-size: .55rem; }
.preview-detail { display: flex; min-height: 96px; align-items: center; justify-content: space-between; gap: 20px; border-radius: 14px; background: #07275f; color: #fff; padding: 18px 20px; }
.preview-detail span, .preview-detail strong, .preview-detail small { display: block; }
.preview-detail span { color: #8eb4ff; font-size: .56rem; font-weight: 700; text-transform: uppercase; }
.preview-detail strong { overflow: hidden; max-width: 340px; margin: 4px 0; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.preview-detail small { color: #afbdd5; font-size: .57rem; }
.preview-detail a { border-radius: 8px; background: var(--green); padding: 8px 12px; font-size: .66rem; font-weight: 700; white-space: nowrap; }

/* Public book and information blocks */
.latest-section { background: #fff; }
.section-heading h2 { font-weight: 800; }
.book-grid { gap: 35px 22px; }
.book-cover-link { width: 100%; margin: 0; }
.book-cover { border-radius: 10px; box-shadow: var(--shadow-book); }
.placeholder-cover { border: 0; border-radius: 10px; padding: 23px; box-shadow: var(--shadow-book); }
.placeholder-cover::before { left: 10px; background: rgba(0,0,0,.14); }
.placeholder-cover::after { display: none; }
.book-card-body { padding: 17px 2px 0; }
.book-card-body .card-kicker { color: var(--green); font-size: .58rem; }
.book-card-body h3 { margin-top: 5px; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.book-card-body p { font-size: .76rem; }
.shelf-tag { right: 9px; bottom: 10px; border: 0; border-radius: 6px; background: rgba(255,255,255,.94); color: #40506a; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.category-section { background: #f4f7fb; color: var(--ink); }
.category-layout { grid-template-columns: .7fr 1.3fr; gap: 7vw; }
.category-intro { top: 108px; }
.category-intro .eyebrow { color: var(--green); }
.category-intro h2 { font-weight: 800; }
.category-intro p { color: var(--muted); }
.category-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; border: 0; }
.category-row { grid-template-columns: 46px 1fr; gap: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 17px; box-shadow: 0 8px 24px rgba(30,58,102,.05); }
.category-index { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--category-accent) 13%, white); color: var(--category-accent); font-family: var(--font-serif); font-weight: 800; }
.category-row strong { font-family: var(--font-serif); font-size: .88rem; font-weight: 700; }
.category-row small { overflow: hidden; color: var(--muted); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.category-row em { grid-column: 2; color: var(--green); font-size: .64rem; }
.category-row:hover { border-color: #b9cdf7; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(30,58,102,.09); }
.category-row:hover strong { color: var(--green); }
.steps-list { gap: 14px; border: 0; }
.steps-list li { grid-template-columns: 42px 1fr; border: 1px solid var(--line) !important; border-radius: 14px; background: #fff; padding: 22px; box-shadow: 0 8px 24px rgba(30,58,102,.05); }
.steps-list > li > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: var(--green-soft); color: var(--green); font-family: var(--font-serif); font-size: .8rem; font-weight: 800; }
.steps-list h3 { font-size: 1rem; font-weight: 700; }
.service-section { background: #f4f7fb; }
.service-details { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.service-details div { border-color: var(--line); padding: 20px; }
.service-details div:first-child { padding-left: 20px; }
.rules-card { border: 0; border-radius: 18px; background: #07275f; color: #fff; box-shadow: 0 20px 45px rgba(7,39,95,.20); }
.rules-card .catalog-number { color: #79a7ff; }
.rules-card ul { border-color: rgba(255,255,255,.15); }
.rules-card p { color: #b9c8df; }
.site-footer { background: #061d49; }
.footer-brand h2 { font-weight: 700; }

/* Interior public pages */
.page-hero { border: 0; background: #f4f7fb; padding: 62px 0 46px; }
.page-hero.compact h1 { font-weight: 800; }
.filter-panel { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 20px; box-shadow: 0 8px 24px rgba(30,58,102,.06); }
.form-field input, .form-field select, .form-field textarea { border-color: #dce3ef; border-radius: 9px; background: #fff; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--green); outline-color: rgba(21,94,239,.12); }
.detail-cover { border-radius: 14px; box-shadow: 0 20px 45px rgba(30,58,102,.18); }
.book-detail-copy h1 { font-weight: 800; }
.metadata-grid { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; padding: 4px 15px; }
.main-form { border: 0; border-radius: 18px; background: #fff; padding: 8px 28px; box-shadow: 0 16px 42px rgba(30,58,102,.08); }
.main-form fieldset { border-color: var(--line); padding: 28px 0; }
.main-form legend { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 800; }
.main-form legend span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--green-soft); color: var(--green); font-size: .72rem; }
.book-choice-list { border-color: var(--line); border-radius: 12px; }
.book-choice { border-color: var(--line); }
.book-choice:has(input:checked) { background: var(--green-soft); }
.camera-stage { min-height: 370px; border: 2px dashed #b9c9e6; border-radius: 14px; background: #eff4fc; }
.camera-stage video, .camera-stage img { min-height: 370px; border-radius: 12px; }
.camera-placeholder { color: #3f506b; }
.camera-placeholder::before { display: none; }
.camera-icon { display: grid !important; width: 56px; height: 56px; place-items: center; border-radius: 16px; margin: 0 auto 14px; background: #dbe7ff; color: var(--green); font-size: 1.5rem; }
.camera-placeholder strong { font-family: var(--font-serif); font-size: 1rem; }
.camera-placeholder span:last-child { color: #70809a; line-height: 1.6; }
.camera-guide { display: flex; align-items: center; gap: 10px; border-radius: 10px; margin-top: 10px; background: #eef5ff; padding: 10px 12px; font-size: .72rem; }
.camera-guide strong { color: var(--green); white-space: nowrap; }
.camera-guide span { color: #65758d; }
.upload-button { border-color: #cbd8ef; border-radius: 10px; background: #fff; color: var(--green); }
.photo-proof-check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; border: 1px solid #cfe0ff; border-radius: 12px; margin-top: 14px; background: #f4f8ff; padding: 14px; }
.photo-proof-check input { width: 18px; height: 18px; accent-color: var(--green); }
.photo-proof-check strong, .photo-proof-check small { display: block; }
.photo-proof-check strong { font-size: .82rem; }
.photo-proof-check small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.form-aside { border: 0; border-radius: 18px; background: #07275f; color: #fff; padding: 28px; box-shadow: 0 18px 42px rgba(7,39,95,.16); }
.form-aside .catalog-number { color: #7ca9ff; }
.form-aside h2 { font-size: 1.7rem; }
.form-aside li { color: #c0cee1; }
.form-aside .text-link { color: #8eb4ff; }
.secure-note { border-color: rgba(255,255,255,.14); }
.secure-note p { color: #adbed6; }
.photo-example { position: relative; display: grid; height: 160px; place-items: center; overflow: hidden; border-radius: 14px; margin: 22px 0; background: #0d377c; }
.person-shape { position: absolute; top: 26px; width: 42px; height: 42px; border-radius: 50%; background: #8eaff0; }
.person-shape::after { position: absolute; top: 38px; left: -25px; width: 92px; height: 84px; border-radius: 45px 45px 14px 14px; background: #6f95e2; content: ""; }
.held-book { position: absolute; z-index: 2; top: 78px; width: 80px; height: 54px; border-radius: 4px; background: #f8c14d; color: #102a58; padding-top: 18px; font-size: .62rem; font-weight: 800; text-align: center; transform: rotate(-3deg); }
.photo-example strong { position: absolute; z-index: 3; bottom: 8px; color: #d9e5fa; font-size: .62rem; }
.confirmation-card, .status-form, .status-result { border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 40px rgba(30,58,102,.08); }

/* Admin shell based on the supplied dashboard reference */
.admin-body { background: #edf2f8; }
.admin-shell { grid-template-columns: 225px 1fr; }
.admin-sidebar { background: #fff; color: var(--ink); box-shadow: 1px 0 0 var(--line); }
.admin-brand { min-height: 86px; border-color: var(--line); padding: 15px 18px; }
.brand-symbol { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; background: var(--green-soft); }
.admin-brand img { width: 31px; height: 39px; }
.admin-brand strong { color: #102a58; font-family: var(--font-serif); font-size: 1rem; font-weight: 800; }
.admin-brand small { color: #929daf; font-size: .54rem; }
.nav-section-label { color: #a1aabc; }
.admin-sidebar nav a { border: 0; border-radius: 9px; color: #758198; margin: 3px 0; padding: 9px 11px; }
.admin-sidebar nav a:hover { background: #f5f8fd; color: var(--green); }
.admin-sidebar nav a[aria-current="page"] { border: 0; background: var(--green-soft); color: var(--green); }
.nav-mark { border: 0; border-radius: 7px; background: #f0f3f8; color: #8390a5; font-family: var(--font-serif); font-size: .66rem; font-weight: 800; }
.admin-sidebar nav a[aria-current="page"] .nav-mark { background: var(--green); color: #fff; }
.sidebar-bottom { border-color: var(--line); }
.sidebar-bottom small { color: #9aa5b7; }
.sidebar-bottom strong { color: #42506a; }
.sidebar-bottom button { color: var(--red); }
.admin-topbar { min-height: 72px; border: 0; background: #fff; box-shadow: 0 1px 0 var(--line); padding: 12px 28px; }
.admin-global-search { display: flex; width: min(430px,45vw); align-items: center; gap: 8px; border: 1px solid #edf0f5; border-radius: 10px; background: #f5f7fb; padding: 0 13px; }
.admin-global-search > span { color: #95a0b1; font-size: 1.35rem; }
.admin-global-search input { width: 100%; min-height: 42px; border: 0; outline: 0; background: transparent; color: var(--ink); }
.admin-top-actions { display: flex !important; align-items: center; gap: 20px; }
.public-link { color: var(--green) !important; }
.admin-profile { display: flex; align-items: center; gap: 9px; }
.profile-avatar { display: grid !important; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: #f3c6a8; color: #743c23 !important; font-weight: 800; }
.admin-profile strong, .admin-profile small { display: block; }
.admin-profile strong { max-width: 160px; overflow: hidden; color: #33415b; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-profile small { color: #9aa5b5; font-size: .58rem; }
.admin-content { padding: 30px 28px 60px; }
.admin-page-head h1 { color: #15233c; font-family: var(--font-serif); font-size: clamp(2rem,3vw,2.75rem); font-weight: 800; }
.admin-card { border-color: var(--line); border-radius: 14px; box-shadow: 0 7px 25px rgba(35,60,100,.05); }
.modern-stats { gap: 14px; }
.modern-stats article { display: flex; min-height: 112px; align-items: center; gap: 14px; border: 0 !important; border-radius: 14px; background: #fff; padding: 18px; box-shadow: 0 7px 25px rgba(35,60,100,.05); }
.modern-stats article > div > span, .modern-stats article > div > strong, .modern-stats article > div > small { display: block; }
.modern-stats article > div > span { color: #7a879b; font-size: .63rem; font-weight: 700; text-transform: uppercase; }
.modern-stats article > div > strong { margin: 2px 0; color: #17243a; font-family: var(--font-serif); font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.modern-stats article > div > small { color: #9aa5b6; font-size: .61rem; }
.stat-icon { display: grid !important; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 11px; font-family: var(--font-serif); font-weight: 800; }
.stat-icon.blue { background: #e8f0ff; color: #155eef; }
.stat-icon.cyan { background: #e4f7fb; color: #1490ad; }
.stat-icon.amber { background: #fff3d8; color: #b77800; }
.stat-icon.red { background: #ffebec; color: #d23c44; }
.library-dashboard { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 18px; align-items: stretch; margin-bottom: 20px; }
.library-main-column { display: grid; gap: 18px; }
.recommendation-panel, .category-browser { padding: 20px; }
.modern-card-head { align-items: center; margin-bottom: 16px; }
.modern-card-head h2 { margin-top: 2px; font-family: var(--font-serif); font-size: 1.05rem; font-weight: 800; }
.modern-card-head a { color: var(--green); font-size: .67rem; font-weight: 700; }
.dashboard-book-row { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 13px; }
.dashboard-book { min-width: 0; }
.dashboard-book-cover { display: flex; width: 100%; aspect-ratio: 2/3; flex-direction: column; justify-content: space-between; overflow: hidden; border-radius: 7px; object-fit: cover; box-shadow: 0 8px 17px rgba(22,43,80,.15); }
.dashboard-placeholder { position: relative; background: var(--book-color); color: #fff; padding: 12px 10px; }
.dashboard-placeholder::before { position: absolute; top: 0; bottom: 0; left: 8px; width: 1px; background: rgba(0,0,0,.18); content: ""; }
.dashboard-placeholder small, .dashboard-placeholder strong, .dashboard-placeholder em { position: relative; z-index: 1; display: block; }
.dashboard-placeholder small { font-size: .42rem; font-weight: 700; text-transform: uppercase; }
.dashboard-placeholder strong { font-family: var(--font-serif); font-size: .65rem; line-height: 1.15; }
.dashboard-placeholder em { font-size: .4rem; font-style: normal; letter-spacing: .08em; }
.dashboard-book > strong, .dashboard-book > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-book > strong { margin-top: 8px; color: #28364f; font-size: .65rem; }
.dashboard-book > small { color: #929daf; font-size: .55rem; }
.category-pills { display: flex; overflow-x: auto; gap: 7px; margin-bottom: 16px; padding-bottom: 3px; }
.category-pills a { border-radius: 7px; background: #f2f5fa; color: #67758c; padding: 6px 10px; font-size: .6rem; font-weight: 700; white-space: nowrap; }
.category-pills a.active, .category-pills a:hover { background: var(--green); color: #fff; }
.category-summary-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.category-summary-grid > a { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.category-summary-grid > a > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--category-color) 14%, white); color: var(--category-color); font-weight: 800; }
.category-summary-grid strong, .category-summary-grid small { display: block; }
.category-summary-grid strong { font-size: .65rem; }
.category-summary-grid small { color: #99a4b5; font-size: .52rem; }
.category-summary-grid em { color: var(--green); font-size: .72rem; font-style: normal; }
.featured-book-panel { display: flex; flex-direction: column; border-radius: 14px; background: #06265d; color: #fff; padding: 20px; box-shadow: 0 18px 40px rgba(6,38,93,.20); }
.featured-top { display: flex; align-items: center; justify-content: space-between; color: #b6c7e2; font-size: .58rem; }
.featured-top em { color: #7ca9ff; font-style: normal; }
.featured-cover { width: 130px; aspect-ratio: 2/3; align-self: center; border-radius: 7px; margin: 18px 0 14px; object-fit: cover; box-shadow: 0 14px 26px rgba(0,0,0,.3); }
.featured-cover.dashboard-placeholder { padding: 15px 13px; }
.featured-cover.dashboard-placeholder strong { font-size: .82rem; }
.featured-category { color: #78a7ff; font-size: .55rem; font-weight: 700; text-align: center; text-transform: uppercase; }
.featured-book-panel h2 { margin: 6px 0 3px; font-family: var(--font-serif); font-size: 1.05rem; font-weight: 700; line-height: 1.25; text-align: center; }
.featured-author { color: #adbeda; font-size: .62rem; text-align: center; }
.featured-metrics { display: grid; grid-template-columns: repeat(3,1fr); border-block: 1px solid rgba(255,255,255,.14); margin: 14px 0; padding: 12px 0; text-align: center; }
.featured-metrics div { border-right: 1px solid rgba(255,255,255,.12); }
.featured-metrics div:last-child { border: 0; }
.featured-metrics strong, .featured-metrics span { display: block; }
.featured-metrics strong { font-size: .72rem; }
.featured-metrics span { color: #8ea4c5; font-size: .48rem; }
.featured-summary { flex: 1; color: #aebed6; font-size: .6rem; line-height: 1.65; }
.featured-button { display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; background: var(--green); padding: 11px; font-size: .66rem; font-weight: 700; }
.recent-dashboard-table { margin-top: 0; }
.recent-dashboard-table .modern-card-head { padding: 0 20px; }
.filter-card, .form-card, .detail-card, .action-card, .timeline-card { border-radius: 14px; }
.table-card { border-radius: 14px; }
th { background: #f5f7fb; color: #7f8a9c; }
tbody tr:nth-child(even) { background: #fbfcfe; }
.auth-identity { background: #06265d; }

@media (max-width: 1100px) {
    .modern-hero .hero-grid { grid-template-columns: 1fr; }
    .library-preview { width: min(100%,650px); margin-inline: auto; }
    .library-dashboard { grid-template-columns: 1fr; }
    .featured-book-panel { display: grid; grid-template-columns: 170px 1fr; column-gap: 22px; }
    .featured-top { grid-column: 1/-1; }
    .featured-cover { grid-row: 2/9; width: 150px; margin: 18px auto 0; }
    .featured-category, .featured-book-panel h2, .featured-author { text-align: left; }
}

@media (max-width: 880px) {
    .admin-sidebar { position: fixed; }
    .admin-global-search { width: min(360px,55vw); }
    .admin-profile > div { display: none; }
    .public-link { display: none; }
}

@media (max-width: 760px) {
    .site-nav { border-color: var(--line); background: #fff; box-shadow: 0 16px 30px rgba(30,58,102,.11); }
    .modern-hero { padding: 54px 0 62px; }
    .modern-hero .hero-copy h1 { font-size: clamp(2.6rem,12vw,4rem); }
    .hero-search { grid-template-columns: 32px 1fr; }
    .hero-search .button { grid-column: 1/-1; width: 100%; }
    .hero-actions { display: none; }
    .library-preview { min-height: auto; border-width: 6px; border-radius: 20px; padding: 13px; }
    .preview-book-grid { grid-template-columns: repeat(4,135px); overflow-x: auto; }
    .preview-detail { margin-top: 6px; }
    .category-layout { grid-template-columns: 1fr; }
    .category-list { grid-template-columns: 1fr; }
    .form-aside { position: static; }
    .admin-content { padding: 24px 16px 50px; }
    .admin-topbar { padding-inline: 16px; }
    .admin-global-search { width: 100%; }
    .admin-top-actions { display: none !important; }
    .modern-stats { grid-template-columns: repeat(2,1fr); }
    .dashboard-book-row { grid-template-columns: repeat(5,120px); overflow-x: auto; padding-bottom: 6px; }
}

@media (max-width: 520px) {
    .modern-hero .hero-stats { justify-content: space-between; gap: 14px; }
    .modern-hero .hero-stats div { width: auto; }
    .preview-detail strong { max-width: 200px; }
    .main-form { padding: 6px 17px; }
    .camera-stage, .camera-stage video, .camera-stage img { min-height: 280px; }
    .camera-guide { align-items: flex-start; flex-direction: column; }
    .modern-stats { grid-template-columns: 1fr; }
    .modern-stats article { min-height: 96px; }
    .category-summary-grid { grid-template-columns: 1fr; }
    .featured-book-panel { display: flex; }
    .featured-cover { width: 140px; margin: 18px auto 14px; }
    .featured-category, .featured-book-panel h2, .featured-author { text-align: center; }
}

@media (min-width: 651px) and (max-width: 1100px) {
    .library-dashboard { grid-template-columns: minmax(0,1fr) 255px; }
    .featured-book-panel { display: flex; }
    .featured-top { grid-column: auto; }
    .featured-cover { grid-row: auto; width: 125px; margin: 16px auto 12px; }
    .featured-category, .featured-book-panel h2, .featured-author { text-align: center; }
}

@media (max-width: 650px) {
    .library-dashboard { grid-template-columns: 1fr; }
}
