/* ═══════════════════════════════════════════════════════════
   ORBIT OPAC — site.css
   Khalsa College Library Management System
   ═══════════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ──────────────────────────────────────── */
:root {
    --navy: #1a3558;
    --navy-d: #0f2240;
    --navy-l: #24497a;
    --blue: #2563eb;
    --blue-lt: #eff6ff;
    --blue-mid: #bfdbfe;
    --gold: #b45309;
    --gold-lt: #fffbeb;
    --gold-mid: #fde68a;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --surface2: #f8fafc;
    --border: #e2e8f0;
    --border2: #cbd5e1;
    --text: #0f172a;
    --text2: #475569;
    --text3: #94a3b8;
    --ok: #16a34a;
    --ok-lt: #f0fdf4;
    --err: #dc2626;
    --err-lt: #fef2f2;
    --warn: #d97706;
    --warn-lt: #fffbeb;
    --r: 10px;
    --r-lg: 16px;
    --r-xl: 22px;
    --shadow: 0 1px 4px rgba(0,0,0,.08);
    --shadow-md: 0 4px 14px rgba(0,0,0,.1);
    --font: 'Inter', system-ui, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 68px; /* space for bottom nav */
}

img {
    max-width: 100%;
}

a {
    text-decoration: none;
}

button {
    font-family: var(--font);
    cursor: pointer;
    border: none;
}

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
    background: linear-gradient(135deg,#2f5d9b,#4f82c3);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.topbar-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 18px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.topbar-icon {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,.12);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.topbar-name {
    font-family: var(--font-serif);
    font-size: 15px;
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
}

.topbar-sub {
    font-size: 9.5px;
    color: rgba(255,255,255,.5);
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.live-clock {
    font-size: 12px;
    color: rgba(255,255,255,.5);
    font-family: var(--font-mono);
}

/* ── PAGE SYSTEM ────────────────────────────────────────── */
.page {
    display: none;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 16px;
}

    .page.active {
        display: block;
    }

/* ── HERO ───────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg,#2f5d9b,#4f82c3);
    border-radius: var(--r-xl);
    padding: 36px 28px 30px;
    text-align: center;
    color: #fff;
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
}

    .hero::after {
        content: '';
        position: absolute;
        bottom: -50px;
        right: -50px;
        width: 180px;
        height: 180px;
        background: rgba(255,255,255,.04);
        border-radius: 50%;
        pointer-events: none;
    }

.hero-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
}

.hero-college {
    font-size: 20.5px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    font-weight: 800;
    color: rgba(255,255,255,.6);
    margin-bottom: 8px;
}

.hero--bottom {
    margin-bottom: 6px;
}

.hero-sub {
    font-size: 13.5px;
    color: rgba(255,255,255,.6);
    margin-bottom: 22px;
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,.1);
    border-radius: 40px;
    padding: 10px 24px;
}

.hstat {
    text-align: center;
}

.hstat-n {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}

.hstat-l {
    font-size: 10.5px;
    color: rgba(255,255,255,.55);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-top: 2px;
}

.hstat-div {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,.2);
    margin: 0 20px;
}

/* ── OPTION CARDS ───────────────────────────────────────── */
.opt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.opt-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--r-xl);
    padding: 26px 22px;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}

    .opt-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-color: var(--blue-mid);
    }

        .opt-card:hover .opt-go {
            letter-spacing: .5px;
        }

/* Book Search card — light blue tint matching site theme */
.opt-grid .opt-card:nth-child(1) {
    background: var(--blue-lt);
}

/* Member Dashboard card — light gold tint matching site theme */
.opt-grid .opt-card:nth-child(2) {
    background: var(--gold-lt);
}

.opt-icon-bg {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 14px;
}

.opt-book {
    background: var(--blue-lt);
}

.opt-member {
    background: var(--gold-lt);
}

.opt-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.opt-desc {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.55;
    margin-bottom: 16px;
}

.opt-go {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--blue);
    transition: letter-spacing .18s;
}

.opt-go-gold {
    color: var(--gold);
}

/* ── NOTICE STRIP ───────────────────────────────────────── */
.notice-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gold-lt);
    border: 1px solid var(--gold-mid);
    border-radius: var(--r);
    padding: 10px 14px;
    overflow: hidden;
}

.notice-tag {
    font-size: 16px;
    flex-shrink: 0;
}

.notice-text {
    font-size: 12.5px;
    color: var(--gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── PAGE NAV ───────────────────────────────────────────── */
.page-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.back-btn {
    padding: 7px 16px;
    background: var(--surface);
    border: 1.5px solid var(--border2);
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text2);
    transition: all .15s;
}

    .back-btn:hover {
        border-color: var(--blue);
        color: var(--blue);
    }

.page-nav-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* ── SEARCH WRAP ────────────────────────────────────────── */
.search-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 18px 18px 14px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}

.search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    position: relative;
}

.s-ico {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
}

.s-inp {
    flex: 1;
    padding: 10px 12px 10px 12px;
    border: 1.5px solid var(--border2);
    border-radius: var(--r);
    font-family: var(--font);
    font-size: 16px;
    color: var(--text);
    background: var(--surface2);
    outline: none;
    transition: border .18s, box-shadow .18s;
    width: 100%;
    max-width: 240px; /* adjust */
    box-sizing: border-box;
}

    .s-inp:focus {
        border-color: var(--blue);
        box-shadow: 0 0 0 3px rgba(37,99,235,.1);
        background: #fff;
    }

    .s-inp::placeholder {
        color: var(--text3);
    }

.s-btn {
    padding: 10px 22px;
    background: var(--blue);
    color: #fff;
    border-radius: var(--r);
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37,99,235,.28);
    transition: background .15s, transform .15s;
    white-space: nowrap;
}

    .s-btn:hover {
        background: #1d4ed8;
        transform: translateY(-1px);
    }

.filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.f-sel {
    padding: 7px 10px;
    border: 1.5px solid var(--border2);
    border-radius: 8px;
    font-family: var(--font);
    font-size: 12.5px;
    background: var(--surface2);
    color: var(--text);
    outline: none;
    min-width: 120px;
    flex: 1;
}

    .f-sel:focus {
        border-color: var(--blue);
    }

.clear-btn {
    padding: 7px 14px;
    background: var(--surface);
    border: 1.5px solid var(--border2);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    transition: all .15s;
}

    .clear-btn:hover {
        border-color: var(--err);
        color: var(--err);
    }

/* ── RESULTS BAR ────────────────────────────────────────── */
.results-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.stag {
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--blue-lt);
    color: var(--blue);
    border: 1px solid var(--blue-mid);
    font-size: 12px;
    font-weight: 600;
}

/* ── BOOK ROW ───────────────────────────────────────────── */
.book-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.book-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    display: flex;
    gap: 0;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    overflow: hidden;
}

    .book-row:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--blue-mid);
    }

.br-num {
    width: 44px;
    flex-shrink: 0;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgba(255,255,255,.8);
    font-weight: 600;
}

.br-body {
    flex: 1;
    padding: 12px 14px;
    min-width: 0;
}

.br-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    line-height: 1.1;
}

.br-author {
    font-size: 12.5px;
    color: var(--text2);
    margin-bottom: 2px;
    line-height: 1.1;
    margin-top: 0;
}

.br-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
}

.chip {
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 500;
    border: 1px solid;
}

.c-navy {
    background: #eef2ff;
    color: var(--navy);
    border-color: #c7d2fe;
}

.c-gray {
    background: var(--surface2);
    color: var(--text2);
    border-color: var(--border2);
}

.c-gold {
    background: var(--gold-lt);
    color: var(--gold);
    border-color: var(--gold-mid);
}

.br-loc {
    font-size: 11.5px;
    color: var(--text3);
    font-family: var(--font-mono);
}

/* Class No — light, readable, matches site's default font (not heavy mono) */
.br-classno {
    font-size: 11px;
    color: var(--text3);
    margin-top: 4px;
    letter-spacing: 0.2px;
    font-family: var(--font);
}

    .br-classno strong {
        color: var(--text2);
        font-family: var(--font);
        font-weight: 500;
    }

.br-right {
    width: 88px;
    flex-shrink: 0;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border-left: 1px solid var(--border);
    text-align: center;
}

.avpill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.avpill-available {
    background: var(--ok-lt);
    color: var(--ok);
}

.avpill-issued {
    background: var(--err-lt);
    color: var(--err);
}

.copies {
    text-align: center;
}

.copies-n {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
}

.copies-l {
    font-size: 10px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* ── PAGINATION ─────────────────────────────────────────── */
.pag-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.pag-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid var(--border2);
    border-radius: 8px;
    background: var(--surface);
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
    cursor: pointer;
    transition: all .15s;
}

    .pag-btn:hover {
        border-color: var(--blue);
        color: var(--blue);
    }

.pag-on {
    background: var(--blue) !important;
    color: #fff !important;
    border-color: var(--blue) !important;
}

/* ── DRAWER (book detail) ───────────────────────────────── */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 400;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(3px);
    align-items: flex-end;
    justify-content: center;
}

    .overlay.open {
        display: flex;
    }

.drawer {
    background: var(--surface);
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    border-radius: 22px 22px 0 0;
    overflow-y: auto;
    animation: slideUp .22s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(28px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}

.drawer-pill {
    width: 40px;
    height: 4px;
    background: var(--border2);
    border-radius: 2px;
    margin: 14px auto 0;
}

.drawer-hd {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.drawer-htitle {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.drawer-x {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface2);
    font-size: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

    .drawer-x:hover {
        background: var(--err-lt);
        color: var(--err);
    }

.drawer-bd {
    padding: 18px 20px;
}

.drawer-load {
    text-align: center;
    padding: 40px;
    color: var(--text3);
}

.d-sec {
    margin-bottom: 18px;
}

.d-sec-title {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text3);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.d-g {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.d-item label {
    font-size: 10.5px;
    color: var(--text3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    display: block;
    margin-bottom: 2px;
}

.d-val {
    font-size: 13.5px;
    color: var(--text);
    font-weight: 500;
}

    .d-val.mono {
        font-family: var(--font-mono);
        color: var(--navy);
        font-size: 13px;
    }

    .d-val.price {
        font-family: var(--font-mono);
        font-size: 18px;
        color: var(--gold);
        font-weight: 700;
    }

    .d-val.green {
        color: var(--ok);
        font-weight: 700;
    }

/* ── MEMBER PROFILE ─────────────────────────────────────── */
.m-profile {
    background: linear-gradient(145deg, var(--navy), #1e4d82);
    border-radius: var(--r-xl);
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.m-ava {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    border: 2px solid rgba(255,255,255,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.m-name {
    font-family: var(--font-serif);
    font-size: 20px;
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
}

.m-roll {
    font-size: 12px;
    color: rgba(255,255,255,.6);
    font-family: var(--font-mono);
    margin-top: 2px;
}

.m-dept {
    font-size: 12px;
    color: rgba(255,255,255,.5);
    margin-top: 1px;
}

.m-badge {
    margin-left: auto;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.badge-ok {
    background: rgba(22,163,74,.2);
    color: #86efac;
}

.badge-err {
    background: rgba(220,38,38,.2);
    color: #fca5a5;
}

/* ── MEMBER GRID ────────────────────────────────────────── */
.m-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.mg-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 12px 14px;
}

.mg-l {
    font-size: 10.5px;
    color: var(--text3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 3px;
}

.mg-v {
    font-size: 13.5px;
    color: var(--text);
    font-weight: 500;
}

/* ── FINE BOX ───────────────────────────────────────────── */
.fine-box {
    background: var(--err-lt);
    border: 1px solid #fca5a5;
    border-radius: var(--r-lg);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.fine-lbl {
    font-size: 12px;
    color: var(--err);
    font-weight: 700;
    margin-bottom: 3px;
}

.fine-amt {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 700;
    color: var(--err);
}

.fine-right {
    font-size: 12px;
    color: var(--err);
    text-align: right;
    line-height: 1.6;
}

/* ── TRANSACTION ────────────────────────────────────────── */
.txn-hd {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.txn-badge {
    padding: 2px 10px;
    border-radius: 20px;
    background: var(--blue-lt);
    color: var(--blue);
    border: 1px solid var(--blue-mid);
    font-size: 12px;
    font-weight: 600;
}

/* mobile card view */
.txn-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.txn-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 14px 16px;
}

.txn-od {
    background: #fff5f5;
    border-color: #fca5a5;
}

.tc-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.tc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.tc-author {
    font-size: 12.5px;
    color: var(--text2);
    margin-bottom: 10px;
}

.tc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.tc-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.tc-l {
    font-size: 10px;
    color: var(--text3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.tc-v {
    font-size: 12.5px;
    color: var(--text);
    font-weight: 500;
}

/* desktop table view */
.txn-table-wrap {
    overflow-x: auto;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
}

.txn-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .txn-tbl th {
        background: var(--navy);
        color: rgba(255,255,255,.9);
        padding: 10px 12px;
        text-align: left;
        font-size: 11.5px;
        font-weight: 600;
        letter-spacing: .3px;
        white-space: nowrap;
    }

    .txn-tbl td {
        padding: 11px 12px;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
    }

    .txn-tbl tr:last-child td {
        border-bottom: none;
    }

    .txn-tbl tr:hover td {
        background: var(--blue-lt);
    }

.tr-od td {
    background: #fff5f5 !important;
}

.tbl-title {
    font-weight: 600;
    font-size: 13px;
}

.tbl-auth {
    font-size: 11.5px;
    color: var(--text3);
}

/* shared */
.mono {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--navy);
    font-weight: 600;
}

.od-date {
    color: var(--err) !important;
    font-weight: 700 !important;
}

.fine-v {
    color: var(--err);
    font-weight: 700;
    font-family: var(--font-mono);
}

/* pills */
.pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.p-green {
    background: var(--ok-lt);
    color: var(--ok);
}

.p-red {
    background: var(--err-lt);
    color: var(--err);
}

.p-amber {
    background: var(--warn-lt);
    color: var(--warn);
}

/* ── EMPTY STATE ────────────────────────────────────────── */
.empty {
    text-align: center;
    padding: 56px 20px;
}

.e-ico {
    font-size: 50px;
    margin-bottom: 14px;
}

.e-h {
    font-size: 17px;
    color: var(--text2);
    font-weight: 600;
    margin-bottom: 6px;
}

.e-p {
    font-size: 13.5px;
    color: var(--text3);
}

/* ── BOTTOM NAV ─────────────────────────────────────────── */
.bottomnav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(0,0,0,.07);
    padding-bottom: env(safe-area-inset-bottom);
}

.bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    font-size: 10.5px;
    color: var(--text3);
    cursor: pointer;
    transition: color .15s;
    gap: 1px;
}

    .bn-item span:first-child {
        font-size: 20px;
    }

    .bn-item.bn-on {
        color: var(--blue);
    }

/* ── VISIBILITY HELPERS ─────────────────────────────────── */
.show-mobile {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.show-desktop {
    display: none;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (min-width: 641px) {
    .show-mobile {
        display: none !important;
    }

    .show-desktop {
        display: block !important;
    }
}

/*@media (max-width: 640px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .bottomnav { display: flex; }
  .hero { padding: 24px 18px 22px; border-radius: var(--r-lg); }
  .hero-title { font-size: 26px; }
  .hero-stats { padding: 8px 16px; }
  .hstat-n { font-size: 18px; }
  .hstat-div { margin: 0 1; }
  .m-profile { flex-wrap: wrap; }
  .m-badge { margin-left: 0; }
  .page { padding: 14px 12px; }
  .topbar-sub { display: none; }
}*/

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-row, .txn-card {
    animation: fadeUp .2s ease both;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.85);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.loading-box {
    text-align: center;
    background: #fff;
    padding: 25px 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

.spinner {
    width: 50px;
    height: 50px;
    margin: auto;
    border: 5px solid #e5e7eb;
    border-top: 5px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #1a3558;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.book-issued {
    font-size: 32px;
    line-height: 1;
}

.valmsg {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    display: block;
}

.search-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 4px;
}

.s-inp {
    flex: 1;
}

.author-row {
    display: block;
    margin-top: 2px;
    margin-top: 0;
}

.card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    background: #F8FBFF;
}

.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    background: #eef4ff;
    border-radius: 14px;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: #16345f;
}

.stats-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
}

.stat-sq {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #dbe2ea;
}

    .stat-sq span {
        font-size: 18px;
        line-height: 1;
    }

    .stat-sq b {
        margin-top: 2px;
    }

.avail {
    background: #ecfdf5;
    color: #15803d;
}

.issued {
    background: #fef2f2;
    color: #dc2626;
}

.copies {
    background: #eff6ff;
    color: #1d4ed8;
}

.book-card {
    background: #f8fbff;
    border: 1px solid #d6e6ff;
}

.book-icon {
    background: #e8f1ff;
    color: #1d4ed8;
}
