:root { font-synthesis: none; text-rendering: optimizeLegibility; }
body { min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.display-font { font-family: "Plus Jakarta Sans", sans-serif; }
.app-shell { min-height: 100vh; }
.sidebar { width: 258px; flex: 0 0 258px; }
.main-panel { min-width: 0; }
.nav-link { transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-link:hover { transform: translateX(2px); }
.nav-link { display: flex; }
.nav-link.active { background: #e7f6f2; color: #0f766e; font-weight: 700; }
.nav-link.active .nav-icon { background: #d5f0e9; color: #0f766e; }
.nav-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #73818a; }
.card-shadow { box-shadow: 0 8px 28px rgba(24, 50, 58, .045); }
.field { width: 100%; border: 1px solid #dce5e2; border-radius: 12px; background: #fff; padding: 10px 13px; color: #172b35; outline: none; transition: border .15s, box-shadow .15s; }
.field:focus { border-color: #18a999; box-shadow: 0 0 0 3px rgba(24,169,153,.12); }
.field-label { display: block; margin-bottom: 6px; color: #52626b; font-size: 12px; font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; padding: 10px 14px; font-size: 13px; font-weight: 700; transition: .16s ease; white-space: nowrap; }
.btn-primary { background: #0f887d; color: #fff; }
.btn-primary:hover { background: #0b7068; transform: translateY(-1px); }
.btn-soft { background: #eaf6f3; color: #0f766e; }
.btn-soft:hover { background: #d8eee8; }
.btn-muted { background: #f0f3f2; color: #42535c; }
.btn-muted:hover { background: #e5eae8; }
.btn-danger { background: #fff0ef; color: #c24136; }
.btn-danger:hover { background: #ffe3e0; }
.btn-small { padding: 7px 10px; font-size: 12px; border-radius: 9px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { background: #f8faf9; color: #74818a; font-size: 10px; text-transform: uppercase; letter-spacing: .075em; font-weight: 700; padding: 12px 16px; white-space: nowrap; }
.data-table td { padding: 14px 16px; border-top: 1px solid #eef1f0; color: #40515a; font-size: 13px; vertical-align: middle; }
.data-table tbody tr:hover { background: #fcfdfd; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 9px; font-size: 11px; line-height: 1; font-weight: 700; white-space: nowrap; }
.badge-green { color: #13795b; background: #e6f7ed; }
.badge-amber { color: #9a6507; background: #fff4d6; }
.badge-red { color: #b83c35; background: #ffebea; }
.badge-gray { color: #63717a; background: #eef1f2; }
.badge-blue { color: #3266a8; background: #eaf2ff; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 9px; color: #687780; background: #f5f7f6; }
.icon-btn:hover { color: #0f766e; background: #e7f6f2; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(17, 36, 42, .48); padding: 16px; backdrop-filter: blur(3px); }
.modal-card { width: min(100%, 640px); max-height: min(90vh, 800px); overflow: auto; border-radius: 20px; background: #fff; box-shadow: 0 24px 80px rgba(10,35,40,.2); }
.toast { animation: toast-in .22s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.cover-art { display: grid; place-items: center; width: 42px; height: 54px; flex: 0 0 42px; border-radius: 7px 11px 11px 7px; color: #fff; font-size: 18px; box-shadow: inset 4px 0 0 rgba(0,0,0,.09); }
.login-bg { background: radial-gradient(circle at 18% 18%, rgba(76,201,177,.22), transparent 30%), linear-gradient(135deg, #0c554f, #102d39 70%); }
.mobile-menu { display: none; }

:root {
  color-scheme: light;
  --digilib-ink: #18313b;
  --digilib-muted: #71818a;
  --digilib-teal: #0e8178;
  --digilib-teal-dark: #0a655f;
  --digilib-line: #e6eeeb;
  --digilib-surface: #ffffff;
  --digilib-canvas: #f3f7f6;
  --digilib-shadow: 0 12px 34px rgba(24, 49, 59, .055), 0 2px 7px rgba(24, 49, 59, .035);
}
html { scroll-behavior: smooth; }
body {
  background: var(--digilib-canvas) !important;
  color: var(--digilib-ink);
  font-family: "DM Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.display-font { font-family: "Plus Jakarta Sans", "DM Sans", sans-serif; letter-spacing: -.025em; }
.app-shell { background: var(--digilib-canvas); }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 32;
  height: 100vh;
  overflow-y: auto;
  background: #fbfdfc !important;
  border-color: var(--digilib-line) !important;
  box-shadow: 5px 0 24px rgba(20, 51, 56, .025);
}
.sidebar > a:first-child { margin-bottom: 2.25rem; }
.sidebar > a:first-child > span:first-child { box-shadow: 0 8px 18px rgba(15, 118, 110, .18); }
.nav-label { color: #91a09f !important; letter-spacing: .14em !important; }
.nav-link {
  min-height: 46px;
  color: #60717a !important;
  border: 1px solid transparent;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.nav-link:hover { color: var(--digilib-teal-dark) !important; background: #f0f7f5; transform: translateX(2px); }
.nav-link.active {
  color: var(--digilib-teal-dark) !important;
  background: #e8f5f1 !important;
  border-color: #dcefe9;
  box-shadow: inset 3px 0 0 #16877d;
}
.nav-link.active .nav-icon { color: var(--digilib-teal-dark) !important; background: #d8eee8 !important; }
.nav-icon { transition: color .18s ease, background .18s ease; }
.sidebar-footer { border: 1px solid #e6eeeb; background: #f3f7f6 !important; }
.main-panel { background: var(--digilib-canvas); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  min-height: 76px;
  background: rgba(255, 255, 255, .92) !important;
  border-color: var(--digilib-line) !important;
  box-shadow: 0 5px 18px rgba(24, 49, 59, .035);
  backdrop-filter: blur(14px);
}
.topbar > div:first-child > div:first-child { color: #8a999e !important; letter-spacing: .12em; }
.topbar-user { padding: 7px 11px 7px 7px; border: 1px solid #edf1ef; border-radius: 999px; background: #fff; }
.topbar-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #0d7069;
  background: #e3f3ef;
  font-size: 13px;
  font-weight: 800;
}
.content-area { max-width: 1680px; margin-inline: auto; }
.page-header { padding-bottom: 2px; }
.page-header h1 { color: var(--digilib-ink) !important; letter-spacing: -.035em; }
.page-header p { color: #75848b !important; }
.card-shadow {
  border-color: var(--digilib-line) !important;
  border-radius: 18px !important;
  background-color: var(--digilib-surface) !important;
  box-shadow: var(--digilib-shadow);
  transition: box-shadow .2s ease, transform .2s ease;
}
.content-area > .grid > article.card-shadow { position: relative; overflow: hidden; }
.content-area > .grid > article.card-shadow::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #16877d, #8bd2c1);
  content: "";
}
.content-area > .grid > article.card-shadow:nth-child(2)::before { background: linear-gradient(90deg, #5086c5, #a9c9ec); }
.content-area > .grid > article.card-shadow:nth-child(3)::before { background: linear-gradient(90deg, #15a58e, #94dfcd); }
.content-area > .grid > article.card-shadow:nth-child(4)::before { background: linear-gradient(90deg, #8e72bd, #cdbde9); }
.content-area > .grid > article.card-shadow.bg-amber-50 { background-color: #fffbeb !important; border-color: #f6e7bd !important; }
.content-area > .grid > article.card-shadow.bg-amber-50::before { background: linear-gradient(90deg, #e09b23, #f4ce76); }
article.card-shadow:hover { box-shadow: 0 16px 36px rgba(24, 49, 59, .09); transform: translateY(-2px); }
.data-table { min-width: 640px; }
.data-table th {
  padding-top: 13px;
  padding-bottom: 13px;
  color: #788990;
  background: #f6f9f8;
  border-bottom: 1px solid var(--digilib-line);
  font-size: 10px;
  letter-spacing: .09em;
}
.data-table td { padding-top: 13px; padding-bottom: 13px; border-top-color: #edf2f0; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: #f7fbf9; }
.table-wrap { border-radius: inherit; }
.field {
  min-height: 44px;
  border-color: #dce7e3;
  border-radius: 11px;
  background: #fff;
  color: var(--digilib-ink);
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.field:hover { border-color: #b9d3cd; }
.field:focus { border-color: #16877d; box-shadow: 0 0 0 4px rgba(22, 135, 125, .12); }
.field-label { color: #53666e; font-size: 12px; letter-spacing: .01em; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(.field),
select:not(.field), textarea:not(.field) {
  border-color: #dce7e3;
  border-radius: 11px;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--digilib-teal); }
.btn {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .005em;
  transition: transform .16s ease, box-shadow .16s ease, color .16s ease, background .16s ease, border-color .16s ease;
}
.btn:focus-visible, .icon-btn:focus-visible, .nav-link:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(22, 135, 125, .25);
  outline-offset: 2px;
}
.btn-primary { color: #fff !important; background: linear-gradient(135deg, #11877d, #0b7169) !important; box-shadow: 0 5px 12px rgba(15, 118, 110, .16); }
.btn-primary:hover { color: #fff !important; background: linear-gradient(135deg, #0f766e, #095e58) !important; box-shadow: 0 8px 18px rgba(15, 118, 110, .23); transform: translateY(-1px); }
.btn-soft { color: #0f7169 !important; background: #e8f5f1 !important; border-color: #d8ece6; }
.btn-soft:hover { color: #095e58 !important; background: #dcefe9 !important; border-color: #cce5dd; }
.btn-muted { color: #4d6068 !important; background: #f3f6f5 !important; border-color: #e7edeb; }
.btn-muted:hover { color: var(--digilib-ink) !important; background: #e9efed !important; }
.btn-danger { color: #b93f3b !important; background: #fff1ef !important; border-color: #f7d9d5; }
.btn-danger:hover { color: #9e302c !important; background: #ffe5e1 !important; }
.btn-small { min-height: 32px; }
.icon-btn { border: 1px solid transparent; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.icon-btn:hover { border-color: #d9ebe5; }
.badge { padding: 6px 10px; font-size: 10px; letter-spacing: .015em; }
.badge-green { color: #147456; background: #e5f5ed; }
.badge-amber { color: #94610c; background: #fff4d9; }
.badge-red { color: #b43d37; background: #ffedeb; }
.badge-gray { color: #64747b; background: #eef2f1; }
.badge-blue { color: #35669e; background: #eaf2fb; }
[role="status"], [role="alert"] {
  padding: 13px 16px;
  border-radius: 12px !important;
  box-shadow: 0 5px 16px rgba(24, 49, 59, .04);
}
[role="status"] { border: 1px solid #cce9df !important; background: #eff9f4 !important; color: #17694f !important; }
[role="alert"] { border: 1px solid #f2d6d2 !important; background: #fff4f2 !important; color: #a83c36 !important; }
.modal-backdrop {
  background: rgba(17, 35, 42, .55);
  backdrop-filter: blur(5px);
  animation: digilib-fade-in .16s ease-out;
}
.modal-card {
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(10, 35, 40, .28);
  animation: digilib-modal-in .2s ease-out;
}
#toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  width: min(390px, calc(100vw - 32px));
}
.toast {
  max-width: 100%;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  background: #183a40 !important;
  box-shadow: 0 14px 34px rgba(16, 44, 49, .22) !important;
  animation: digilib-toast-in .22s ease-out;
}
.toast.bg-red-600 { background: #a83f3a !important; }
.toast.bg-amber-600 { background: #90620e !important; }
.mobile-sidebar-backdrop { display: none; }
.login-brand-panel {
  position: relative;
  isolation: isolate;
  min-height: 620px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 10% 90%, rgba(48, 168, 145, .3), transparent 40%),
    linear-gradient(145deg, #0b625d 0%, #104d50 50%, #173845 100%);
}
.login-brand-panel::before,
.login-brand-panel::after {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(220, 255, 241, .12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.login-brand-panel::before { top: -150px; right: -170px; width: 440px; height: 440px; }
.login-brand-panel::after { right: -95px; bottom: -210px; width: 480px; height: 480px; border-color: rgba(220, 255, 241, .09); }
.login-brand-content, .login-brand-footer, .login-book-art { position: relative; z-index: 1; }
.login-brand-mark {
  color: #eafff7;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .17);
  box-shadow: 0 10px 24px rgba(4, 36, 39, .18);
}
.login-book-art { width: min(100%, 390px); margin: .25rem auto; filter: drop-shadow(0 16px 15px rgba(3, 34, 38, .16)); }
.login-book-art svg { display: block; width: 100%; height: auto; }
.login-brand-footer {
  padding: 14px 15px;
  border: 1px solid rgba(229, 255, 246, .17);
  border-radius: 15px;
  background: rgba(255, 255, 255, .085);
  backdrop-filter: blur(8px);
}
.login-brand-footer-icon { flex: 0 0 36px; color: #c7f5e5; background: rgba(255, 255, 255, .12); }
@keyframes digilib-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes digilib-modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes digilib-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) {
  .sidebar { width: 76px; flex-basis: 76px; padding-left: 10px; padding-right: 10px; }
  .brand-copy, .nav-label, .sidebar-footer-copy { display: none; }
  .nav-link { justify-content: center; padding-left: 0; padding-right: 0; }
  .nav-icon { width: 42px; height: 42px; }
  .sidebar-footer { justify-content: center; }
}
@media (max-width: 640px) {
  .sidebar {
    position: fixed;
    z-index: 61;
    top: 0;
    bottom: 0;
    left: 0;
    width: 276px;
    height: 100dvh;
    padding: 20px 14px;
    background: #fbfdfc !important;
    box-shadow: 12px 0 40px rgba(23,43,53,.14);
    transform: translateX(-105%);
    transition: transform .22s ease;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(17, 35, 42, .38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  body.menu-open .mobile-sidebar-backdrop { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .brand-copy, .nav-label, .sidebar-footer-copy { display: block; }
  .sidebar .nav-link { justify-content: flex-start; padding-left: 12px; padding-right: 12px; }
  .nav-icon { width: 34px; height: 34px; }
  .mobile-menu { display: inline-flex; }
  .content-area { padding: 18px 14px 28px !important; }
  .page-header { align-items: flex-start !important; flex-direction: column; }
  .topbar { min-height: 68px; height: 68px !important; padding-inline: 14px !important; }
  .topbar-user { padding: 0; border: 0; background: transparent; }
  .topbar-user > div { display: none; }
  .page-header h1 { font-size: 1.25rem; }
  #toast-root { right: 16px; bottom: 16px; width: calc(100vw - 32px); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .login-brand-panel { min-height: 590px; padding: 2rem !important; }
  .login-book-art { width: min(100%, 330px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  body { background: white !important; }
  .sidebar, .topbar, .no-print, .mobile-menu { display: none !important; }
  .app-shell { display: block !important; }
  .content-area { padding: 0 !important; }
  .card-shadow { box-shadow: none !important; border: 1px solid #ddd !important; }
  .table-wrap { overflow: visible; }
  .data-table th, .data-table td { padding: 8px; }
  #app { width: 100%; }
}
@media print {
  body * { visibility: hidden !important; }
  #report-print-area, #report-print-area * { visibility: visible !important; }
  #report-print-area { position: absolute; inset: 0 auto auto 0; width: 100%; padding: 0 !important; border: 0 !important; box-shadow: none !important; }
  #report-print-area .table-wrap { overflow: visible; }
  #report-print-area .data-table { width: 100%; font-size: 9pt; }
  #report-print-area .data-table th, #report-print-area .data-table td { padding: 6px 8px; color: #111827 !important; }
  #report-print-area .data-table th { background: #f1f5f9 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  #report-print-area tr { break-inside: avoid; }
  @page { size: auto; margin: 14mm; }
}
