:root {
  --ink: #202b3c;
  --muted: #6d7787;
  --line: #e3e7ed;
  --paper: #ffffff;
  --background: #f5f6f8;
  --accent: #315b82;
  --accent-dark: #244664;
  --accent-pale: #edf3f8;
  --danger: #b43c3c;
  --danger-pale: #fff0ef;
  --success: #26704d;
  --success-pale: #edf8f1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); font-size: 14px; line-height: 1.5; }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar { min-height: 76px; padding: 0 max(24px, calc((100vw - 1200px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; background: var(--accent); color: white; border-radius: 9px; font-family: Georgia, serif; font-size: 23px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.2px; }
.brand small { color: var(--muted); font-size: 12px; margin-top: 1px; }
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4c9b71; }
.container { max-width: 1200px; padding: 36px 24px 22px; margin: 0 auto; }
.welcome { display: flex; justify-content: space-between; align-items: end; margin-bottom: 26px; gap: 24px; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: 1.25px; margin: 0 0 7px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(27px, 3vw, 34px); letter-spacing: -1.1px; line-height: 1.2; margin-bottom: 9px; font-weight: 700; }
.subheading { margin: 0; color: var(--muted); font-size: 14px; }
.book-count { min-width: 145px; padding: 13px 17px; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; }
.book-count span { display: block; font-size: 25px; line-height: 1.15; font-weight: 700; }
.book-count small { color: var(--muted); font-size: 11px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 20px; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 3px 12px rgba(26, 39, 57, .025); min-width: 0; }
.collection-panel { padding: 22px 22px 14px; }
.form-panel { padding: 22px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.panel-heading h2 { font-size: 18px; letter-spacing: -.35px; margin: 0; }
.panel-heading .eyebrow { margin-bottom: 4px; }
.button { border: 1px solid transparent; border-radius: 7px; padding: 9px 13px; font-size: 12px; font-weight: 650; transition: background .15s, border-color .15s; }
.button:disabled { opacity: .6; cursor: wait; }
.button-primary { background: var(--accent); color: white; }
.button-primary:hover { background: var(--accent-dark); }
.button-light { background: white; border-color: var(--line); color: #445064; }
.button-light:hover { background: #f7f9fb; border-color: #cbd3dd; }
.toolbar { margin: 20px 0 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.search-box { height: 38px; width: min(100%, 350px); display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; color: #778395; }
.search-box span { font-size: 21px; line-height: 1; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 11px; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #f8f9fb; }
th { padding: 11px 10px; color: #778091; font-size: 10px; letter-spacing: .65px; text-transform: uppercase; font-weight: 700; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
td { padding: 13px 10px; border-bottom: 1px solid #edf0f4; color: #4b5668; vertical-align: middle; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
.id-col { width: 48px; }
td:first-child { color: #7b8594; font-variant-numeric: tabular-nums; }
.book-title { color: var(--ink); font-weight: 650; font-size: 12px; overflow-wrap: anywhere; }
.book-author { overflow-wrap: anywhere; }
.actions-col { width: 115px; }
.row-actions { display: flex; gap: 6px; }
.action-button { padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--accent); font-size: 11px; }
.action-button:hover { background: var(--accent-pale); }
.action-button.delete { color: var(--danger); }
.action-button.delete:hover { background: var(--danger-pale); }
.table-message { text-align: center; color: var(--muted); padding: 35px 12px; }
.table-footnote { margin: 12px 0 0; color: #87909d; font-size: 10px; }
.form-heading { margin-bottom: 10px; }
.form-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent-pale); color: var(--accent); font-size: 22px; }
.form-intro { font-size: 12px; margin-bottom: 20px; }
form label { display: block; margin: 15px 0 6px; color: #3b4657; font-size: 12px; font-weight: 650; }
form input { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid #dce2e9; border-radius: 7px; outline: none; color: var(--ink); background: #fff; font-size: 12px; }
form input:focus, .search-box:focus-within { border-color: #7899b7; box-shadow: 0 0 0 3px rgba(49, 91, 130, .08); }
form input::placeholder { color: #a1a9b5; }
.required { color: var(--danger); }
.field-help { display: block; margin-top: 5px; font-size: 10px; color: #8a93a0; }
.form-actions { display: flex; gap: 8px; margin-top: 21px; }
.form-actions .button-primary { flex: 1; }
.permission-note { display: flex; gap: 9px; padding: 12px; margin-top: 23px; border-radius: 8px; background: #f7f9fb; color: #788496; font-size: 11px; }
.permission-note > span { color: var(--accent); font-size: 15px; }
.permission-note p { margin: 0; }
.permission-note strong { color: #465367; font-size: 11px; }
.notice { margin: 0 0 18px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.notice.success { background: var(--success-pale); border-color: #cfe8d8; color: var(--success); }
.notice.error { background: var(--danger-pale); border-color: #f0d0cd; color: #973535; }
footer { display: flex; justify-content: space-between; gap: 15px; color: #929aa6; font-size: 10px; padding: 24px 2px 0; }
[hidden] { display: none !important; }
@media (max-width: 860px) { .workspace { grid-template-columns: 1fr; } .form-panel { order: -1; } .form-panel form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; } .form-panel form label { margin-top: 10px; } .form-panel form .field-help { grid-column: 1 / -1; } .form-actions { grid-column: 1 / -1; } .permission-note { margin-top: 16px; } }
@media (max-width: 560px) { .topbar { padding: 0 18px; min-height: 68px; } .status { font-size: 0; gap: 0; } .container { padding: 27px 14px 18px; } .welcome { align-items: start; flex-direction: column; gap: 18px; } .book-count { width: 100%; } .collection-panel, .form-panel { padding: 16px; } .toolbar { align-items: start; flex-direction: column; } .search-box { width: 100%; } .form-panel form { display: block; } .form-actions { display: flex; } footer { flex-direction: column; gap: 4px; } }

.logged-in-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 9px 11px;
  border-radius: 7px;
  background: var(--success-pale);
  color: var(--success);
  font-size: 11px;
  font-weight: 600;
}

.logged-in-info .status-dot {
  flex-shrink: 0;
}

.logout-button {
  width: 100%;
  margin-top: 14px;
  color: var(--danger);
}

#loginForm .form-actions {
  margin-top: 20px;
}

#loginForm .form-actions button {
  width: 100%;
}

#librarianSection .form-intro {
  margin-bottom: 12px;
}

#librarianSection form label {
  margin-top: 13px;
}

@media (max-width: 860px) {
  #loginForm {
    display: block;
  }
}
