/* School Library Management System – application styles (Bootstrap 5 based, no build step required). */
:root {
    --app-primary-dark: #0b4f6c;
    --bs-primary: #0d6e8c;
    --bs-primary-rgb: 13, 110, 140;
    --bs-link-color: #0b5f79;
    --bs-link-color-rgb: 11, 95, 121;
}
.btn-primary { --bs-btn-bg: #0d6e8c; --bs-btn-border-color: #0d6e8c; --bs-btn-hover-bg: #0b5f79; --bs-btn-hover-border-color: #0b5f79; --bs-btn-active-bg: #0a5167; }
.btn-outline-primary { --bs-btn-color: #0d6e8c; --bs-btn-border-color: #0d6e8c; --bs-btn-hover-bg: #0d6e8c; --bs-btn-hover-border-color: #0d6e8c; --bs-btn-active-bg: #0b5f79; }
.text-bg-primary { background-color: #0d6e8c !important; }
.bg-primary-dark { background-color: var(--app-primary-dark); }

.app-topbar { min-height: 56px; }
.app-sidebar { width: 250px; flex-shrink: 0; }
@media (min-width: 992px) {
    .app-sidebar { position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; }
}
.app-main { min-width: 0; max-width: 100%; }
.app-nav .nav-link { color: #334155; padding: .45rem 1rem; border-inline-start: 3px solid transparent; font-size: .93rem; }
.app-nav .nav-link:hover { background: #f1f5f9; color: #0b4f6c; }
.app-nav .nav-link.active { background: #e0f2f7; color: #0b4f6c; font-weight: 600; border-inline-start-color: #0d6e8c; }
.app-nav .nav-heading { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; padding: .9rem 1rem .25rem; font-weight: 600; }

.stat-card .stat-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.min-w-0 { min-width: 0; }

.book-cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: linear-gradient(135deg, #e2e8f0, #cbd5e1); border-radius: .375rem; }
.book-cover-placeholder { width: 100%; aspect-ratio: 2 / 3; display: flex; align-items: center; justify-content: center; text-align: center; padding: .5rem;
    background: linear-gradient(135deg, #0d6e8c, #0b4f6c); color: #fff; border-radius: .375rem; font-weight: 600; font-size: .85rem; overflow: hidden; }
.book-thumb { width: 42px; height: 60px; object-fit: cover; border-radius: .25rem; }
.book-thumb.book-cover-placeholder { font-size: .5rem; padding: 2px; }

.table-responsive { -webkit-overflow-scrolling: touch; }
.table th { white-space: nowrap; font-weight: 600; font-size: .85rem; color: #475569; }
.table td { vertical-align: middle; }

:focus-visible { outline: 3px solid #f59e0b !important; outline-offset: 2px; }

/* Labels */
.label-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; }
.label-item { border: 1px dashed #94a3b8; padding: 2mm; text-align: center; font-size: 9pt; page-break-inside: avoid; overflow: hidden; }
.label-item svg { max-width: 100%; height: 40px; }
.label-item .lbl-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Reader */
.reader-shell { position: fixed; inset: 0; display: flex; flex-direction: column; background: #525659; }
.reader-toolbar { background: #1f2937; color: #fff; padding: .4rem .5rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.reader-toolbar .form-control, .reader-toolbar .form-select { max-width: 7rem; }
.reader-viewport { position: absolute; inset: 0; overflow: auto; }
.reader-container-wrap { position: relative; flex: 1; }
.reader-watermark { position: fixed; bottom: .5rem; inset-inline-end: .75rem; color: rgba(255,255,255,.75); font-size: .75rem; pointer-events: none; z-index: 5; }

@media print {
    .app-sidebar, .app-topbar, .d-print-none, .alert, .pagination { display: none !important; }
    .app-main { padding: 0 !important; }
    body { background: #fff !important; }
    .card { box-shadow: none !important; border: none !important; }
    a { text-decoration: none; color: #000; }
    .reader-shell { display: none !important; }
}
