/* Shared dashboard/My Reading styles — ported from prototype-reference/index.html
   and my-reading.html, scoped to what Section 5 actually needs. */

/* Sticky footer: body.pb-dashboard pages (home, My Reading, guest catalog,
   the three archives) don't always have enough content to fill the
   viewport, and header/main/footer were plain block-flow siblings with
   nothing pushing the footer to the bottom — so on short pages it sat
   right under the content with the page's paper background showing below
   it instead of the footer resting at the viewport edge. Flex column +
   main flex-growing (below, on main.pb-main) fixes that without changing
   layout at all on pages tall enough to scroll normally. */
body.pb-dashboard { background: var(--paper); min-height: 100vh; display: flex; flex-direction: column; }

/* Warm ledger-to-amber gradient (the site's two hero accents — "miner's
   lamp + reading lamp", Prototype Guide 2.4) instead of the flat black bar.
   A dark scrim layered underneath keeps white nav text legible across the
   whole gradient, since amber alone is too light for that on its own (the
   existing amber-background nav-active pill already needed dark text for
   the same reason). */
header.site {
	background:
		linear-gradient(rgba(32, 28, 24, .3), rgba(32, 28, 24, .3)),
		linear-gradient(95deg, var(--accent-employee-ledger) 0%, var(--accent-employee-ledger) 55%, var(--accent-employee-amber) 100%);
	color: var(--paper-raised);
	position: sticky;
	top: 0;
	z-index: 50;
}
.site-bar { position: relative; max-width: 1180px; margin: 0 auto; padding: .7rem 1.5rem; display: flex; align-items: center; gap: 1.25rem; }

/* Hamburger — hidden on desktop, where nav.primary renders inline. Sits
   first in the bar (before the logo), the conventional mobile position. */
.mobile-nav-toggle { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: #fff; cursor: pointer; }
.mobile-nav-toggle:hover { background: rgba(255,255,255,.16); }
.brand { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-text .hi { display: block; font-family: 'Noto Serif Devanagari', serif; font-size: 1.05rem; font-weight: 600; color: #fff; white-space: nowrap; }
.brand-text .en { display: block; font-family: var(--font-body); font-size: .72rem; color: rgba(255,255,255,.78); white-space: nowrap; }

/* Bilingual nav items — Hindi primary line on top, English secondary
   below, same Hindi-first pattern used on the auth pages. */
nav.primary { display: flex; gap: .15rem; margin-left: .5rem; flex: 1; }
nav.primary a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .05rem; padding: .4rem .7rem; border-radius: 7px; color: #fff; white-space: nowrap; text-decoration: none; line-height: 1.25; }
nav.primary a .hi { font-size: .78rem; font-weight: 600; }
nav.primary a .en { font-size: .66rem; font-weight: 400; color: rgba(255,255,255,.8); }
nav.primary a:hover { background: rgba(255,255,255,.14); }
nav.primary a.active { background: #fff; }
nav.primary a.active .hi { color: var(--ink); }
nav.primary a.active .en { color: var(--ink-faint); }

/* Search collapses to an icon button in the header bar — the full input only
   ever renders in a floating white panel below it, never directly on the
   dark header background, so contrast is never in question. Collapsing it
   also reclaims the ~260px the old inline input reserved unconditionally,
   which was the main cause of the nav wrapping onto multiple lines. */
.search-box-wrap { position: relative; flex-shrink: 0; }
.search-toggle { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: #CFC8BA; cursor: pointer; }
.search-toggle:hover { background: rgba(255,255,255,.16); color: #fff; }
.search-box-wrap.open .search-toggle { background: rgba(255,255,255,.16); color: #fff; }
.search-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 210; width: 360px; max-width: 90vw; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 16px 40px -14px rgba(32,28,24,.4); overflow: hidden; opacity: 0; pointer-events: none; transform: translateY(-6px); transition: opacity .15s ease, transform .15s ease; }
.search-box-wrap.open .search-panel { opacity: 1; pointer-events: auto; transform: translateY(0); }
.search-panel .search-box { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; border-bottom: 1px solid var(--border); }
.search-panel .search-box svg { color: var(--slate); flex-shrink: 0; }
.search-panel .search-box input { border: none; background: transparent; outline: none; font-family: var(--font-body); font-size: .88rem; flex: 1; color: var(--ink); }
.search-panel .search-box input::placeholder { color: var(--ink-faint); }
.search-panel .pb-search-results { position: static; width: auto; max-width: none; border: none; border-radius: 0; box-shadow: none; max-height: 360px; }
.pb-search-results.open { display: block; }
.pb-search-empty { padding: 1rem; font-size: .82rem; color: var(--ink-faint); text-align: center; }
.pb-search-result { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.pb-search-result:last-child { border-bottom: none; }
.pb-search-result:hover { background: var(--paper); }
.pb-search-cover { width: 34px; height: 34px; border-radius: 5px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: .8rem; color: #fff; background-size: cover; background-position: center; }
.pb-search-info { flex: 1; min-width: 0; }
.pb-search-info .t { font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-search-info .a { font-size: .72rem; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-search-badge { font-family: var(--font-mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; padding: .2rem .45rem; border-radius: 4px; flex-shrink: 0; }
.pb-search-badge.digital { color: #8A5F1E; background: rgba(201,138,46,.16); }
.pb-search-badge.physical { color: var(--accent-employee-ledger); background: rgba(47,93,85,.12); }
.pb-search-badge.document { color: var(--accent-librarian); background: rgba(61,107,140,.14); }

.head-actions { display: flex; align-items: center; gap: .6rem; }

/* ---------- Notification bell (site-header, all employee pages) ---------- */
.notif-bell { position: relative; }
.bell-toggle { position: relative; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: rgba(255,255,255,.06); border: none; border-radius: 50%; color: #fff; cursor: pointer; }
.bell-badge { position: absolute; top: -2px; right: -2px; background: var(--accent-danger); color: #fff; font-size: .62rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 .25rem; line-height: 1; }
.bell-dropdown { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--border); border-radius: 10px; width: 320px; max-height: 380px; overflow-y: auto; box-shadow: 0 16px 40px -14px rgba(32,28,24,.4); z-index: 200; display: none; color: var(--ink); }
.bell-dropdown.open { display: block; }
.bd-header { font-size: .78rem; font-weight: 700; padding: .8rem 1rem .6rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; }
.bd-header .en { display: block; font-size: .68rem; font-weight: 600; text-transform: none; letter-spacing: 0; }
.bd-empty { padding: 1.4rem 1rem; text-align: center; font-size: .82rem; color: var(--ink-faint); }
.bd-empty .en { display: block; font-size: .74rem; margin-top: .15rem; }
.bd-item { display: flex; gap: .6rem; padding: .75rem 1rem; border-top: 1px solid var(--border); text-decoration: none; color: inherit; }
a.bd-item:hover { background: var(--paper); }
.bd-icon { font-size: 1.1rem; flex-shrink: 0; }
.bd-message { font-size: .82rem; font-weight: 600; line-height: 1.35; }
.bd-item.broadcast .bd-message { color: #1F4763; }
.bd-item.ready .bd-message { color: var(--accent-employee-ledger); }
.bd-item.resolved .bd-message { color: var(--accent-employee-ledger); }
.bd-meta { font-size: .7rem; color: var(--ink-faint); margin-top: .2rem; }

.profile-chip { display: flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.06); padding: .3rem .6rem .3rem .3rem; border-radius: 99px; font-size: .78rem; border: none; color: #fff; cursor: pointer; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-employee-ledger); display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: #fff; }
.profile-menu { position: relative; }
.profile-dropdown { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--border); border-radius: 10px; min-width: 220px; box-shadow: 0 16px 40px -14px rgba(32,28,24,.4); z-index: 200; display: none; overflow: hidden; color: var(--ink); }
.profile-dropdown.open { display: block; }
.pd-header { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; }
.avatar-lg { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-employee-ledger); display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }
.pd-name { font-size: .85rem; font-weight: 600; }
.pd-name .en-secondary { font-size: .74rem; color: var(--ink-faint); margin-top: .1rem; }
.profile-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 0; }
.profile-dropdown a, .profile-dropdown .pd-item-btn { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; text-decoration: none; }
.profile-dropdown a:hover, .profile-dropdown .pd-item-btn:hover { background: var(--paper); }
/* Help opens a modal, not a link — reset the <button> defaults (border,
   background, width, text-align, font) so it's visually identical to the
   <a> items around it. */
.profile-dropdown .pd-item-btn { width: 100%; border: none; background: none; text-align: left; font: inherit; cursor: pointer; color: inherit; }
.profile-dropdown a.danger .pd-text .hi, .profile-dropdown a.danger .pd-text .en { color: var(--accent-danger); }
.pd-text { display: flex; flex-direction: column; line-height: 1.3; }
.pd-text .hi { font-size: .82rem; font-weight: 600; color: var(--ink); }
.pd-text .en { font-size: .7rem; color: var(--ink-faint); }

/* width:100% + box-sizing:border-box, not just max-width — as a flex item,
   auto cross-axis margins (the "0 auto" centering) override flex's default
   stretch behavior, so with only max-width set it shrinks to fit its
   content instead of filling out to 1180px like it did as a plain block
   element. Explicit width:100% sidesteps that; border-box keeps the
   padding from pushing it past 100% now that width is explicit. */
main.pb-main { max-width: 1180px; width: 100%; box-sizing: border-box; margin: 0 auto; padding: 2.2rem 1.5rem 4rem; flex: 1 0 auto; }
/* Matches the prototype's own section spacing (index.html), which never
   made it into this port — sections had no gap of their own at all before
   this, just whatever margin their own children happened to carry. */
main.pb-main section { margin-bottom: 1.5rem; }
main.pb-main section:last-child { margin-bottom: 0; }
.page-head { margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.4rem; font-family: var(--font-display); margin: 0; }
.page-head .hi-line { font-family: 'Noto Serif Devanagari', serif; font-size: .95rem; color: var(--ink-faint); margin-top: .3rem; }
/* Hindi eyebrows: the earlier letter-spacing removal wasn't the real fix.
   IBM Plex Mono has no Devanagari glyphs, so the browser substitutes a
   fallback font for those characters but keeps monospace character-cell
   metrics — that's what was actually stretching the text out. Devanagari
   needs a real font switch, not just a spacing tweak. */
.eyebrow { display: block; margin-bottom: .3rem; font-family: var(--font-body); font-size: .72rem; text-transform: uppercase; color: var(--accent-employee-amber); font-weight: 500; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.1rem; border-bottom: 3px solid var(--accent-employee-amber); padding-bottom: .7rem; }
.section-head h2 { font-family: var(--font-display); font-size: 1.5rem; margin: 0; }

/* ---------- Hindi-first pattern (dashboard): Hindi primary, English
   secondary below — same convention as the auth pages and header. ---------- */
.en-secondary { display: block; font-family: var(--font-body); font-weight: 400; }
.page-head h1 .en-secondary { font-family: var(--font-display); font-size: 1rem; color: var(--ink-faint); margin-top: .2rem; }
.page-head .hi-line .en-secondary { font-size: .82rem; color: var(--slate); margin-top: .15rem; }
.section-head h2 .en-secondary { display: inline; font-size: 1rem; font-weight: 400; color: var(--ink-faint); margin-top: 0; }

/* Welcome heading — the tagline sits beside the name instead of stacked
   below it (freed-up horizontal space). Card background reuses the site's
   own established card pattern (paper-raised + border + radius — same as
   .read-card/.stat/.panel/.wing) rather than a one-off color. */
.welcome-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.2rem; background: var(--paper-raised); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem 1.3rem; }
/* Reads var(--catalog-accent) when the page sets one (Digital/Physical
   catalogs already do, for their role-accent buttons) so this border
   matches each page's own identity instead of defaulting to amber
   everywhere. */
.welcome-tagline { padding-left: 1.2rem; border-left: 3px solid var(--catalog-accent, var(--accent-employee-amber)); }

/* My Reading — page-head folded into the stats strip itself: title in the
   first column, the three stat tiles filling the rest, one seamless card
   row instead of two stacked blocks. Sibling pattern to .welcome-row, not
   a reuse of it — the content on the right here is numeric tiles, not a
   description line, so it needed its own proportions. */
.my-reading-head { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 1.8rem; }
.my-reading-head .stat-title { background: var(--paper-raised); padding: 1.1rem 1.3rem; display: flex; flex-direction: column; justify-content: center; }
.my-reading-head .stat-title .eyebrow { margin-bottom: .2rem; }
.my-reading-head .stat-title h1 { font-size: 1.4rem; margin: 0; }
.my-reading-head .stat-title h1 .en-secondary { font-family: var(--font-display); font-size: 1rem; margin-top: .2rem; }
.my-reading-head .stat { display: flex; flex-direction: column; justify-content: center; }

@media (max-width: 760px) {
	.my-reading-head { grid-template-columns: 1fr; }
}
.welcome-tagline .hi { display: block; font-family: 'Noto Serif Devanagari', serif; font-size: .95rem; color: var(--ink-faint); }
.welcome-tagline .en-secondary { font-size: .78rem; color: var(--slate); margin-top: .15rem; }
.empty-shelf .en-secondary { font-size: .82rem; color: var(--slate); margin-top: .3rem; }
.oa-message { display: flex; flex-direction: column; }
.oa-message .en-secondary { font-size: .8rem; color: #8A5F1E; margin-top: .2rem; }
.wing h3 .en-secondary { font-size: .95rem; font-weight: 400; color: rgba(255,255,255,.75); margin-top: .1rem; }
.wing p .en-secondary { font-size: .78rem; color: rgba(255,255,255,.65); margin-top: .3rem; }

.shelf { display: flex; gap: 1.1rem; overflow-x: auto; padding-bottom: .5rem; }
.shelf-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.1rem; }
/* display:flex + .card-body flex:1 + .resume-btn margin-top:auto (below) —
   .shelf's flex row already stretches every card to match the tallest one
   (e.g. a 2-line title next to a 1-line one), but .read-card itself was
   plain block, so the shorter card's leftover stretched height just sat as
   dead space below its button instead of being absorbed. Same fix
   .book-card/.btn-primary already use elsewhere for this identical case. */
.read-card { flex: 0 0 220px; background: var(--paper-raised); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.read-card:hover { box-shadow: 0 10px 24px -12px rgba(32,28,24,.25); }
.read-card .cover { aspect-ratio: 2 / 3; height: auto; display: flex; align-items: flex-end; padding: .7rem; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: #fff; flex-shrink: 0; }
.read-card .cover.has-image { background-size: cover; background-position: center; background-color: var(--ink); }
.read-card .card-body { padding: .85rem .9rem 1rem; flex: 1; display: flex; flex-direction: column; }
/* Clamped, not left to wrap freely — .shelf's flex row stretches every
   card to the tallest one anyway, but clamping keeps that height itself
   predictable instead of varying with whichever title happens to be
   longest. title="" carries the untruncated text as a hover tooltip. */
.read-card .title { font-family: var(--font-display); font-weight: 600; font-size: .95rem; margin-bottom: .15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.read-card .author { font-size: .76rem; color: var(--ink-faint); margin-bottom: .65rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-track { height: 5px; border-radius: 99px; background: var(--border); overflow: hidden; margin-bottom: .4rem; }
.progress-fill { height: 100%; background: var(--accent-employee-amber); border-radius: 99px; }
.progress-meta { display: flex; justify-content: space-between; font-family: var(--font-body); font-size: .68rem; color: var(--ink-faint); }
.resume-btn { display: block; margin-top: auto; text-align: center; text-decoration: none; background: var(--accent-employee-amber); color: var(--ink); font-size: .78rem; font-weight: 600; padding: .5rem; border-radius: 6px; }
.resume-btn:hover { background: #B57A22; color: #fff; }
.empty-shelf { color: var(--ink-faint); font-size: .88rem; padding: 1.5rem 0; }

.tabs { display: flex; gap: .4rem; margin-bottom: 1.3rem; border-bottom: 1px solid var(--border); }
.tab { font-size: .86rem; font-weight: 600; padding: .7rem 1rem; color: var(--ink-faint); border-bottom: 2px solid transparent; cursor: pointer; background: none; border-left: none; border-right: none; border-top: none; }
.tab.active { color: var(--accent-employee-amber); border-color: var(--accent-employee-amber); }

.completed-list { display: flex; flex-direction: column; gap: .1rem; margin-bottom: 1rem; }
.completed-row { display: flex; align-items: center; gap: .9rem; padding: .8rem .5rem; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.completed-row .mini-cover { width: 40px; height: 40px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: #fff; flex-shrink: 0; }
.completed-row .info { flex: 1; min-width: 0; }
.completed-row .t { font-size: .88rem; font-weight: 600; }
.completed-row .a { font-size: .74rem; color: var(--ink-faint); margin-top: .2rem; }
.badge-done { font-family: var(--font-body); font-weight: 600; font-size: .68rem; text-transform: uppercase; color: var(--accent-employee-ledger); background: rgba(47,93,85,.12); padding: .2rem .5rem; border-radius: 4px; white-space: nowrap; }
.badge-done.pending, .badge-done.overdue, .badge-done.late { color: #8A5F1E; background: rgba(201,138,46,.16); }
.badge-done.overdue { color: var(--accent-danger); background: rgba(181,67,46,.12); }
.completed-row .date { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-faint); white-space: nowrap; }

/* ---------- Overdue alert (dashboard) ---------- */
.overdue-alert { display: flex; align-items: center; gap: .7rem; background: rgba(181,67,46,.1); border: 1px solid #E3B3A7; color: #7A2E1E; border-radius: 10px; padding: .85rem 1.1rem; margin-bottom: 1.6rem; font-size: .85rem; flex-wrap: wrap; text-decoration: none; }
.overdue-alert:hover { border-color: var(--accent-danger); }
.oa-icon { font-size: 1.1rem; flex-shrink: 0; }
.overdue-alert b { font-weight: 700; }
.oa-arrow { margin-left: auto; font-weight: 700; white-space: nowrap; flex-shrink: 0; }

/* ---------- Ready-for-pickup alert (dashboard) — good news, so
   employee-ledger green rather than .overdue-alert's red. ---------- */
.ready-alert { display: flex; align-items: center; gap: .7rem; background: #DCE9E5; border: 1px solid rgba(47,93,85,.35); color: var(--accent-employee-ledger); border-radius: 10px; padding: .85rem 1.1rem; margin-bottom: 1.6rem; font-size: .85rem; flex-wrap: wrap; text-decoration: none; }
.ready-alert:hover { border-color: var(--accent-employee-ledger); }
.ready-alert b { font-weight: 700; }

/* ---------- Librarian broadcast banner (dashboard) — informational, not a
   warning, so librarian-accent blue rather than .overdue-alert's red. ---------- */
.pb-broadcast-banner { display: flex; align-items: baseline; gap: .6rem; background: rgba(61,107,140,.1); border: 1px solid rgba(61,107,140,.35); color: #1F4763; border-radius: 10px; padding: .85rem 1.1rem; margin-bottom: 1.6rem; font-size: .85rem; flex-wrap: wrap; }
.pb-bb-icon { font-size: 1.1rem; flex-shrink: 0; align-self: center; }
.pb-bb-message { font-weight: 600; }
.pb-bb-meta { font-size: .74rem; color: #4A6E87; white-space: nowrap; }

/* ---------- My Reading — Physical Library tab ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 1.8rem; }
.stat { background: var(--paper-raised); padding: 1.1rem 1.3rem; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.6rem; }
.stat span { font-size: .72rem; color: var(--ink-faint); font-family: var(--font-body); text-transform: uppercase; }
.stat.warn b { color: var(--accent-danger); }

.panel { background: var(--paper-raised); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 1.8rem; }
.panel table { width: 100%; border-collapse: collapse; }
.panel th { text-align: left; font-family: var(--font-body); font-weight: 600; font-size: .66rem; text-transform: uppercase; color: var(--slate); padding: .7rem 1.1rem; border-bottom: 1px solid var(--border); background: var(--paper); }
.panel td { padding: .7rem 1.1rem; border-bottom: 1px solid var(--border); font-size: .83rem; }
.panel tr:last-child td { border-bottom: none; }
.panel td.book-title { font-family: var(--font-display); font-weight: 600; }

/* ---------- My Profile (view-only) ---------- */
.notice { background: rgba(201,138,46,.14); border: 1px solid #E0C08C; color: #7A521C; font-size: .83rem; padding: .9rem 1.1rem; border-radius: 9px; margin-bottom: 1.8rem; line-height: 1.55; }
.profile-field { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); font-size: .86rem; }
.profile-field:last-child { border-bottom: none; }
.profile-field .label { display: flex; flex-direction: column; gap: .05rem; color: var(--ink-faint); flex-shrink: 0; }
.profile-field .label .hi { font-family: 'Noto Serif Devanagari', serif; font-size: .86rem; color: var(--ink); }
.profile-field .label .en { font-size: .72rem; color: var(--ink-faint); }
.profile-field .value { font-weight: 600; text-align: right; }
.profile-field .value.has-hi { display: flex; flex-direction: column; align-items: flex-end; gap: .05rem; }
.profile-field .value .en-secondary { font-size: .72rem; font-weight: 400; color: var(--ink-faint); }

/* Change Password's header button (My Profile) — a compact right-aligned
   header action, same amber accent as .btn-submit but sized for a header
   slot rather than a full-width form button. */
.pb-header-action-btn { background: var(--accent-employee-amber); color: var(--ink); font-weight: 700; font-size: .82rem; padding: .55rem 1.1rem; border: none; border-radius: 7px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.pb-header-action-btn:hover { background: #B57A22; color: #fff; }

/* Wraps the eyebrow+h2 pair now that Change Password sits inside a .panel
   card (dashboard.css has no .panel-head — that's a librarian-shell-only
   class from reports.css, not loaded on this employee-facing page). */
.panel-head-simple { padding: 1.4rem 1.4rem 0; }
.panel-head-simple h2 { font-size: 1.2rem; margin: .2rem 0 1.1rem; }

/* ---------- Change Password (My Profile) — this page never had a real
   input/button before (every other field is read-only text), so nothing
   styled input[type], .field, or .btn-submit here; auth.css has all three
   but is scoped to .auth-shell / not enqueued on this page. Scoped to the
   form itself rather than added bare, so it can't leak into some future
   unrelated .field usage on the dashboard side. ---------- */
.pb-change-pw-form { padding: 0 1.4rem 1.4rem; }
.pb-change-pw-form .field { margin-bottom: 1.1rem; }
.pb-change-pw-form .field label { display: block; font-size: .78rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
.pb-change-pw-form input[type="password"],
.pb-change-pw-form input[type="text"] {
	width: 100%;
	box-sizing: border-box;
	padding: .7rem .85rem;
	border: 1px solid var(--border);
	border-radius: 7px;
	font-family: var(--font-body);
	font-size: .88rem;
	background: #fff;
	color: var(--ink);
}
.pb-change-pw-form input:focus { outline: 2px solid var(--accent-employee-amber); outline-offset: 1px; border-color: var(--accent-employee-amber); }
.pb-change-pw-form .btn-submit {
	width: 100%;
	background: var(--accent-employee-amber);
	color: var(--ink);
	font-weight: 700;
	font-size: .9rem;
	padding: .8rem;
	border: none;
	border-radius: 7px;
	cursor: pointer;
}
.pb-change-pw-form .btn-submit:hover { background: #B57A22; color: #fff; }
.notice.warn { background: #F3DAD3; color: #7A2E1E; border-color: #E0AFA0; }

/* ---------- Edit These Details (My Profile, 2026-09-23) — same reasoning
   and same rules as .pb-change-pw-form just above: scoped to this one form
   rather than bare, so a future unrelated .field/.btn-submit on the
   dashboard side still starts unstyled by default, not accidentally
   inheriting these. Kept as an exact duplicate of .pb-change-pw-form's
   block instead of a shared class, matching how .pb-concern-form already
   repeats the same pattern rather than being merged with it. ---------- */
.pb-profile-edit-form .field { padding: 0 1.4rem; margin-bottom: 1.1rem; }
.pb-profile-edit-form .field label { display: block; font-size: .78rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
.pb-profile-edit-form input[type="text"] {
	width: 100%;
	box-sizing: border-box;
	padding: .7rem .85rem;
	border: 1px solid var(--border);
	border-radius: 7px;
	font-family: var(--font-body);
	font-size: .88rem;
	background: #fff;
	color: var(--ink);
}
.pb-profile-edit-form input:focus { outline: 2px solid var(--accent-employee-amber); outline-offset: 1px; border-color: var(--accent-employee-amber); }
.pb-profile-edit-form .btn-submit {
	display: block;
	width: calc(100% - 2.8rem);
	margin: 0 1.4rem;
	background: var(--accent-employee-amber);
	color: var(--ink);
	font-weight: 700;
	font-size: .9rem;
	padding: .8rem;
	border: none;
	border-radius: 7px;
	cursor: pointer;
}
.pb-profile-edit-form .btn-submit:hover { background: #B57A22; color: #fff; }
.pb-profile-edit-form .btn-submit:disabled { opacity: .6; cursor: default; }

/* ---------- Guest Preview "switched off" notice (2026-09-23) — scoped to
   this one page's body class, not a site-wide change: no page here uses a
   sticky-footer layout, so a page this short would otherwise leave the
   footer floating right under a few lines of text, with empty page below
   it. Lives here (dashboard.css), not catalog.css: the off-notice branch in
   page-guest-library.php returns before that page's own catalog.css enqueue
   is reached, but 'guest-library' is already one of the pages functions.php
   loads dashboard.css on regardless. ---- */
body.pb-guest-preview-off { display: flex; flex-direction: column; min-height: 100vh; }
body.pb-guest-preview-off .pb-site-footer { margin-top: auto; }

/* ---------- Recently Added mini-cards (dashboard) ---------- */
.mini-card { background: var(--paper-raised); border: 1px solid var(--border); border-radius: 9px; overflow: hidden; display: block; text-decoration: none; color: inherit; }
.mini-card:hover { box-shadow: 0 10px 24px -12px rgba(32,28,24,.25); }
/* Physical/Document cards render as <button> (they open a details modal,
   not a link — see pb_recent_card_physical_data()) — reset button defaults
   so it's visually identical to the <a> version Digital books still use. */
button.mini-card { border: 1px solid var(--border); cursor: pointer; text-align: left; width: 100%; font: inherit; padding: 0; }
.mini-cover { aspect-ratio: 2 / 3; height: auto; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: #fff; }
.mini-cover.has-image { background-size: cover; background-position: center; background-color: var(--ink); }
.mini-body { padding: .6rem .65rem; }
.mini-body .title { font-size: .78rem; font-weight: 600; font-family: var(--font-display); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-body .author { font-size: .68rem; color: var(--ink-faint); margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-body .tag { display: inline-block; font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; padding: .12rem .4rem; border-radius: 4px; margin-bottom: .3rem; }
.mini-body .tag.physical { background: #DCE9E5; color: var(--accent-employee-ledger); }
.mini-body .tag.digital { background: #F3E3C5; color: #8A5F1E; }
.mini-body .tag.document { background: #E3DCEC; color: var(--accent-admin); }

/* ---------- Recently Added: physical/document details modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(32,28,24,.55); display: none; align-items: center; justify-content: center; z-index: 300; padding: 1.5rem; }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border-radius: 12px; max-width: 440px; width: 100%; padding: 1.6rem; max-height: 85vh; overflow-y: auto; }
.modal-box h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: .3rem; }
.modal-box .a { font-size: .85rem; color: var(--ink-faint); margin-bottom: .7rem; }
.modal-box .meta { font-size: .78rem; color: var(--slate); margin-bottom: 1rem; }
.modal-box p { font-size: .85rem; line-height: 1.6; margin-bottom: 1.1rem; }
.modal-cta { display: inline-block; font-size: .84rem; font-weight: 600; color: var(--accent-employee-ledger); text-decoration: none; }
.modal-cta:hover { text-decoration: underline; }
.modal-close { display: block; margin-top: 1.3rem; background: var(--ink); color: #fff; border: none; padding: .6rem 1.1rem; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: .82rem; }

/* ---------- Report a Concern (Help modal, site-header.php) — reuses the
   .modal-overlay/.modal-box pair above; the form's own input styling is
   scoped to .pb-concern-form rather than added bare, same reasoning
   .pb-change-pw-form documents above (nothing else on this page styles a
   bare .field/textarea today). ---------- */
.notice.info { background: #DCE6EC; color: #1F4763; border-color: #B9CEDA; }
.pb-concern-form .field { margin-bottom: 1.1rem; }
.pb-concern-form .field label { display: block; font-size: .78rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
.pb-concern-form textarea { width: 100%; box-sizing: border-box; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: 7px; font-family: var(--font-body); font-size: .88rem; color: var(--ink); resize: vertical; }
.pb-concern-form textarea:focus { outline: 2px solid var(--accent-employee-amber); outline-offset: 1px; border-color: var(--accent-employee-amber); }
.pb-modal-actions { display: flex; justify-content: flex-end; gap: .7rem; }
.pb-modal-actions .btn-cancel { background: none; border: 1px solid var(--border); padding: .6rem 1.1rem; border-radius: 7px; cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--ink-faint); }
.pb-modal-actions .btn-submit { background: var(--accent-employee-amber); color: var(--ink); font-weight: 700; font-size: .85rem; padding: .6rem 1.2rem; border: none; border-radius: 7px; cursor: pointer; }
.pb-modal-actions .btn-submit:hover { background: #B57A22; color: #fff; }

/* ---------- Wings (dashboard) ---------- */
.wings { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.wing { border-radius: 12px; padding: 1.7rem; color: #fff; position: relative; overflow: hidden; min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; }
.wing.physical { background: linear-gradient(150deg, var(--accent-employee-ledger), #204841); }
.wing.digital { background: linear-gradient(150deg, var(--accent-employee-amber), #A96F1F); }
/* Larger than the base .eyebrow — this one carries the wing's actual Hindi
   name (भौतिक पुस्तकालय / डिजिटल पुस्तकालय), not a short uppercase label
   like other .eyebrow usages, so it reads too small at the base size next
   to the h3 below it. */
.wing .eyebrow { color: rgba(255,255,255,.75); font-size: 1.05rem; font-family: 'Noto Serif Devanagari', serif; font-weight: 600; }
.wing h3 { font-size: 1.5rem; color: #fff; margin: .35rem 0 .4rem; font-family: var(--font-display); }
.wing p { font-size: .85rem; color: rgba(255,255,255,.82);}
.wing .stat-row { display: flex; gap: 1.6rem; margin-top: 1.1rem; }
.wing .stat-row div b { display: block; font-family: var(--font-display); font-size: 1.4rem; }
.wing .stat-row div span { font-size: .7rem; color: rgba(255,255,255,.7); font-family: var(--font-body); }
.wing-cta { align-self: flex-start; margin-top: 1.2rem; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4); padding: .55rem 1rem; border-radius: 7px; font-size: .82rem; font-weight: 600; color: #fff; text-decoration: none; display: inline-block; }
.wing-cta:hover { background: #fff; color: var(--ink); }
.lamp-mark { position: absolute; right: -14px; bottom: -14px; opacity: .14; pointer-events: none; }

/* ---------- Recently Added (dashboard) — sliding carousel, since 12 items
   no longer fit in a static grid the way 5 did. ---------- */
.recent-carousel { position: relative; }
.grid-books { display: flex; gap: 1rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
.grid-books::-webkit-scrollbar { display: none; }
.grid-books .mini-card { flex: 0 0 200px; }
.grid-books .mini-cover { height: auto; font-size: 1.3rem; }
.grid-books .mini-body .title { white-space: normal; font-size: .82rem; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid var(--border); box-shadow: 0 6px 16px -6px rgba(32,28,24,.3); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 5; color: var(--ink); font-size: 1.1rem; line-height: 1; }
.carousel-btn:hover { background: var(--paper); }
.carousel-btn.prev { left: -16px; }
.carousel-btn.next { right: -16px; }
.carousel-btn:disabled { opacity: .3; cursor: default; pointer-events: none; }

@media (max-width: 860px) {
	.site-bar { padding: .6rem .7rem; gap: .4rem; }
	.mobile-nav-toggle {
		display: flex;
		/* Rightmost, after search/bell/profile — order alone does this
		   without moving the button in the markup (it stays first in the
		   DOM, right after the skip-link tab order convention). */
		order: 1;
		width: 32px;
		height: 32px;
		flex-shrink: 0;
	}
	/* Logo + name both kept — smaller than desktop, and allowed to shrink/
	   truncate (base CSS sets .brand flex-shrink:0 and nowrap text, meant
	   for a roomy desktop bar) so the icon cluster (search/bell/profile/
	   hamburger, 4 icons wide) still fits next to it without pushing the
	   row wider than the screen. The logo image itself stays fixed-size —
	   only the text truncates if a given phone width is still too tight. */
	.brand { gap: .4rem; flex-shrink: 1; min-width: 0; }
	.pb-logo-chip { flex-shrink: 0; padding: .3rem .5rem; }
	.pb-logo-chip img { height: 24px; }
	.brand-text { min-width: 0; }
	.brand-text .hi { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; }
	.brand-text .en { font-size: .6rem; overflow: hidden; text-overflow: ellipsis; }
	.search-toggle, .bell-toggle { width: 32px; height: 32px; }
	.avatar { width: 24px; height: 24px; font-size: .64rem; }
	.head-actions { gap: .4rem; }
	/* nav.primary normally supplies the flex:1 that pushes the icon cluster
	   to the right edge — hidden on mobile, so nothing does that job
	   without this; the icons would otherwise sit stranded right after the
	   logo instead of anchored to the right like every other row here. */
	.search-box-wrap { margin-left: auto; }
	/* The search icon isn't the header's rightmost element (bell/profile/
	   hamburger sit further right) — anchoring the panel to the icon like
	   desktop does pulls it left of the icon and off the screen. Anchor to
	   the viewport edges instead. */
	.search-panel { position: fixed; top: 58px; left: .7rem; right: .7rem; width: auto; max-width: none; }
	/* Same issue as the search panel above, and the same fix — the bell and
	   profile icons aren't the header's rightmost elements either (the
	   hamburger sits to their right), so right:0 anchored to those small
	   icons left both dropdowns stranded in the middle of the screen
	   instead of reaching the true right edge. Anchor to the viewport
	   edges instead of the icon. */
	.bell-dropdown, .profile-dropdown { position: fixed; top: 58px; left: .7rem; right: .7rem; width: auto; min-width: 0; max-width: none; }
	/* nav.primary becomes a full-width dropdown panel under the header
	   instead of vanishing outright — header.site is the nearest positioned
	   ancestor (position: sticky counts), so top:100% sits it right below
	   the bar regardless of the bar's actual height at any given width. */
	nav.primary {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		gap: 0;
		margin-left: 0;
		background: var(--ink);
		padding: .5rem;
		box-shadow: 0 16px 32px -14px rgba(32,28,24,.5);
		max-height: 80vh;
		overflow-y: auto;
		z-index: 100;
	}
	nav.primary.open { display: flex; }
	nav.primary a { flex-direction: row; justify-content: flex-start; gap: .5rem; padding: .75rem .9rem; border-radius: 6px; }
	nav.primary a .en { color: rgba(255,255,255,.65); }
	nav.primary a.active .en { color: var(--ink-faint); }
	/* Avatar-only on mobile — the full display name was the main cause of
	   the header running out of room next to the hamburger/search/bell. */
	.profile-chip { padding: 0; background: transparent; }
	.profile-chip .profile-name { display: none; }
	.stats { grid-template-columns: repeat(2, 1fr); }
	.search-box { min-width: 0; }
	.pb-search-results { width: 300px; }
	.wings { grid-template-columns: 1fr; }
	.shelf-grid { grid-template-columns: repeat(2, 1fr); }
	.grid-books .mini-card { flex: 0 0 160px; }
	.carousel-btn.prev { left: -8px; }
	.carousel-btn.next { right: -8px; }
}

