:root {
  --bg: #f7f5f0;
  --paper: #fffefa;
  --ink: #302f2c;
  --muted: #85827b;
  --line: #e6e2d9;
  --red: #853d37;
  --green: #356d58;
  --gold: #9b7334;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: inherit;
}
.app {
  display: flex;
  min-height: 100vh;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 35px 24px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 1px;
}
.brand-icon {
  background: var(--red);
  color: #fff;
  width: 43px;
  height: 48px;
  display: grid;
  place-items: center;
  font: 38px Georgia;
  border-radius: 14px 3px 14px 3px;
}
.brand small {
  display: block;
  font: 9px/2.2 Georgia;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.side-label {
  font-size: 11px;
  color: var(--muted);
  margin: 28px 0;
}
nav {
  display: grid;
  gap: 8px;
}
nav button {
  border: 0;
  background: none;
  text-align: left;
  padding: 12px 16px;
  border-radius: 7px;
  color: #706e66;
}
nav button span {
  font-size: 20px;
  display: inline-block;
  width: 28px;
  vertical-align: middle;
}
nav b {
  font-weight: 400;
}
nav button.active {
  background: #f1e8e3;
  color: var(--red);
  font-weight: 600;
}
.side-bottom {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
}
.local-dot:before {
  content: " ";
  /* display: inline-block; */
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #709579;
  margin-right: 7px;
  display: none;
}
.side-bottom p {
  padding: 4px 0 15px;
}
.account {
  background: transparent;
  border: 1px solid var(--line);
  padding: 11px;
  width: 100%;
  text-align: left;
  border-radius: 7px;
  font-size: 12px;
}
.account span {
  float: right;
}
.main {
  margin-left: 240px;
  width: calc(100% - 240px);
}
header {
  height: 78px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  color: var(--muted);
  font-size: 12px;
}
header i {
  margin: 0 16px;
  color: #c9c4b9;
}
header b {
  font-weight: 400;
  color: var(--ink);
}
#identity {
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  background: #e9e1d6;
  color: #766452;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 38px 42px 60px;
  min-height: calc(100vh - 140px);
}
.eyebrow {
  font: 10px Georgia;
  letter-spacing: 2.2px;
  color: var(--red);
}
h1 {
  font:
    500 33px/1.4 "Songti SC",
    "STSong",
    Georgia,
    serif;
  margin: 10px 0;
}
h2 {
  font-size: 22px;
  font-weight: 550;
  margin: 8px 0;
}
h3 {
  font-size: 17px;
  font-weight: 550;
  margin: 0;
}
p {
  color: var(--muted);
  margin: 8px 0;
}
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 16px;
}
.primary {
  border: 1px solid var(--red);
  background: var(--red);
  color: white;
  border-radius: 6px;
  padding: 11px 20px;
  font-weight: 500;
  white-space: nowrap;
}
.secondary {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 10px 16px;
}
.text-btn {
  border: 0;
  background: transparent;
  color: var(--red);
  padding: 4px 0;
}
.hero {
  position: relative;
  overflow: hidden;
  background: #eae9df;
  min-height: 200px;
  display: flex;
  align-items: center;
  border-radius: 9px;
  padding: 30px 34px;
  margin-bottom: 26px;
}
.hero h2 {
  font:
    500 26px/1.6 "Songti SC",
    serif;
  margin: 8px 0;
}
.hero p {
  color: #7b7b6c;
  max-width: 390px;
  font-size: 13px;
}
.hero-art {
  width: 250px;
  height: 180px;
  position: absolute;
  right: 20px;
  top: 14px;
  opacity: 0.8;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0 0 30px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px;
}
.stat .label {
  color: var(--muted);
  font-size: 12px;
}
.stat strong {
  display: block;
  font: 34px/1.5 Georgia;
  margin-top: 6px;
}
.stat small {
  font-size: 11px;
  color: var(--muted);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.section-heading p {
  font-size: 12px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.loan-card {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.loan-card .id {
  color: var(--muted);
  font: 10px monospace;
  letter-spacing: 0.4px;
}
.loan-card h3 {
  margin: 14px 0 4px;
}
.loan-card .info {
  color: var(--muted);
  font-size: 12px;
}
.card-bottom {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 4px;
  white-space: nowrap;
}
.badge.borrowed {
  background: #eeeee4;
  color: #777347;
}
.badge.pending {
  background: #f5ead9;
  color: #a17632;
}
.badge.returned {
  background: #e5eee6;
  color: var(--green);
}
.badge.overdue {
  background: #f6e4e0;
  color: var(--red);
}
.empty {
  border: 1px dashed #d7d2c7;
  border-radius: 8px;
  text-align: center;
  background: #ffffff55;
  padding: 48px 20px;
  grid-column: 1/-1;
}
.empty .empty-icon {
  font: 36px Georgia;
  color: #bcb5a6;
}
.empty h3 {
  margin: 10px 0 4px;
}
.empty p {
  font-size: 13px;
  margin-bottom: 18px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 12px;
}
.step strong {
  border: 1px solid #d8d3c7;
  border-radius: 50%;
  min-width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #9e927f;
  font: 13px Georgia;
}
.step b {
  font-weight: 550;
}
.step p {
  margin-top: 3px;
  font-size: 11px;
}
.filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 22px 0 18px;
}
.filters button {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 15px;
  background: transparent;
  font-size: 12px;
  color: #747067;
}
.filters button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.search {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 11px 14px;
  border-radius: 6px;
}
.rules-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
}
.rules-box ol {
  padding-left: 22px;
}
.rules-box li {
  margin: 13px 0;
  color: #656158;
}
.notice {
  border-left: 3px solid var(--gold);
  background: #f6efdf;
  color: #8b6b38;
  padding: 11px 14px;
  font-size: 12px;
  margin: 16px 0;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 20px 42px;
  font: 10px Georgia;
  letter-spacing: 1.4px;
  color: #aaa396;
  display: flex;
  justify-content: space-between;
}
footer span {
  font:
    11px -apple-system,
    sans-serif;
  letter-spacing: 0;
}
dialog {
  width: min(650px, calc(100% - 28px));
  max-height: 90vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 100px #30271f30;
}
dialog::backdrop {
  background: #24221e66;
  backdrop-filter: blur(3px);
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--line);
}
.close {
  border: 0;
  background: none;
  font-size: 28px;
  color: var(--muted);
  padding: 0 4px;
}
#modal-body {
  padding: 22px 26px 28px;
}
form {
  display: grid;
  gap: 17px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
label .req {
  color: var(--red);
}
input:not([type="checkbox"]),
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #dcd7cd;
  background: white;
  border-radius: 5px;
  padding: 10px 12px;
  margin-top: 6px;
  color: var(--ink);
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #a16d60;
  box-shadow: 0 0 0 2px #853d3710;
}
textarea {
  min-height: 75px;
  resize: vertical;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.8;
}
.check input {
  margin-top: 5px;
  accent-color: var(--red);
  flex-shrink: 0;
}
.upload {
  background: #f7f5f0;
  border: 1px dashed #c9c2b3;
  border-radius: 6px;
  padding: 16px;
  text-align: center;
  margin-top: 7px;
}
.upload input {
  font-size: 12px;
  background: transparent;
  border: 0 !important;
  padding: 0 !important;
}
.upload p {
  font-size: 11px;
}
.thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.thumbs img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--line);
}
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}
.error {
  display: none;
  color: #963f36;
  background: #f9e8e3;
  padding: 10px 13px;
  border-radius: 5px;
  font-size: 12px;
}
.error:not(:empty) {
  display: block;
}
.auth-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.auth-tabs button {
  background: none;
  border: 0;
  padding: 0 0 10px;
  color: var(--muted);
}
.auth-tabs button.active {
  color: var(--red);
  border-bottom: 2px solid var(--red);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
.detail-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.detail-grid div {
  overflow-wrap: anywhere;
}
.photo-heading {
  margin: 22px 0 8px;
  font-weight: 500;
  font-size: 13px;
}
.detail-photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-photos img {
  width: 110px;
  height: 95px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--line);
}
.detail-photos a {
  display: inline-flex;
}
.form-subtitle {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 24px;
  margin-bottom: 16px;
}
.loading {
  text-align: center;
  padding: 50px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #333c33;
  color: white;
  border-radius: 7px;
  padding: 12px 24px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 10;
  font-size: 13px;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 8px;
}
@media (min-width: 1400px) {
  main {
    padding-top: 48px;
  }
  .hero {
    min-height: 220px;
  }
}
@media (max-width: 1050px) {
  aside {
    width: 200px;
    padding: 30px 18px;
  }
  .main {
    margin-left: 200px;
    width: calc(100% - 200px);
  }
  main {
    padding: 28px 25px;
  }
  header {
    padding: 0 25px;
  }
  .hero-art {
    right: -45px;
    opacity: 0.45;
  }
  .hero p {
    max-width: 300px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .app {
    display: block;
  }
  aside {
    position: static;
    width: 100%;
    padding: 17px 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 17px;
  }
  .brand-icon {
    width: 32px;
    height: 36px;
    font-size: 28px;
  }
  .brand small {
    font-size: 8px;
  }
  .side-label,
  .side-bottom {
    display: none;
  }
  nav {
    display: flex;
    margin-top: 17px;
    gap: 10px;
  }
  nav button {
    padding: 9px 11px;
    font-size: 12px;
    border-radius: 5px 5px 0 0;
  }
  nav button span {
    font-size: 16px;
    width: 20px;
  }
  .main {
    width: 100%;
    margin: 0;
  }
  header {
    height: 50px;
    padding: 0 20px;
    font-size: 10px;
  }
  header i {
    margin: 0 6px;
  }
  main {
    padding: 25px 20px 40px;
  }
  .page-title {
    align-items: flex-start;
    margin-bottom: 20px;
  }
  h1 {
    font-size: 27px;
  }
  .page-title p {
    font-size: 12px;
  }
  .page-title > .primary {
    padding: 10px 13px;
    font-size: 12px;
    margin-top: 21px;
  }
  .hero {
    min-height: 190px;
    padding: 24px;
  }
  .hero h2 {
    font-size: 23px;
  }
  .hero p {
    max-width: 220px;
    font-size: 12px;
  }
  .hero-art {
    width: 170px;
    right: -48px;
    top: 30px;
    opacity: 0.3;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 24px;
  }
  .stat {
    padding: 14px 17px;
  }
  .stat strong {
    font-size: 30px;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .section-heading h3 {
    font-size: 16px;
  }
  .loan-card {
    padding: 18px;
  }
  footer {
    padding: 20px;
    font-size: 8px;
  }
  footer span {
    font-size: 10px;
  }
  .row {
    grid-template-columns: 1fr;
  }
  .modal-head {
    padding: 18px 20px 12px;
  }
  #modal-body {
    padding: 20px;
  }
  .detail-grid {
    font-size: 13px;
  }
  #identity {
    gap: 5px;
  }
  .avatar {
    width: 24px;
    height: 24px;
  }
  .form-actions .primary {
    flex: 1;
  }
  .rules-box {
    padding: 20px;
  }
}
@media (max-width: 420px) {
  .page-title {
    display: block;
  }
  .page-title > .primary,
  .page-title > .secondary {
    display: inline-block;
    margin-top: 12px;
  }
  h1 {
    font-size: 26px;
  }
  nav {
    gap: 3px;
    justify-content: space-between;
  }
  nav button {
    padding: 9px 6px;
    white-space: nowrap;
  }
  nav button span {
    width: 18px;
  }
  .eyebrow {
    letter-spacing: 1.6px;
  }
}
@media (max-width: 700px) {
  .page-title {
    display: block;
  }
  .page-title > .primary,
  .page-title > .secondary {
    display: inline-block;
    margin-top: 12px;
  }
}
/* Catalog and bilingual lending flow */
[hidden] {
  display: none !important;
}
.header-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
.language {
  background: none;
  border: 1px solid var(--line);
  color: var(--red);
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 12px;
}
.header-actions small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.room-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 27px;
}
.room-chips button {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 6px;
  color: var(--muted);
}
.room-chips button.active {
  background: #eee4dc;
  color: var(--red);
  border-color: #c9a499;
}
.room-section {
  margin-bottom: 30px;
}
.instrument-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.instrument {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  overflow: hidden;
}
.instrument-photo {
  position: relative;
  aspect-ratio: 1.6;
  background: #eae7de;
}
.instrument-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.instrument-photo .badge {
  position: absolute;
  left: 12px;
  top: 12px;
  box-shadow: 0 2px 5px #0001;
}
.instrument-body {
  padding: 18px;
}
.instrument-body > p {
  font-size: 12px;
  margin: 5px 0;
}
.instrument-body .accessories {
  font-size: 11px;
  min-height: 18px;
}
.instrument-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  flex-shrink: 0;
}
.stepper button {
  border: 0;
  background: none;
  width: 29px;
  height: 30px;
  color: var(--red);
  font-size: 17px;
}
.stepper button:disabled {
  opacity: 0.25;
  cursor: default;
}
.stepper output {
  min-width: 28px;
  text-align: center;
  color: var(--ink);
  font-size: 14px;
}
.instrument.unavailable .instrument-photo img {
  filter: saturate(0.35);
  opacity: 0.7;
}
.cart-bar {
  position: sticky;
  bottom: 15px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 22px;
  background: #fffefaed;
  border: 1px solid #cfbcae;
  border-radius: 8px;
  box-shadow: 0 5px 30px #59443312;
  backdrop-filter: blur(12px);
  margin-top: 24px;
}
.cart-bar > div {
  min-width: 0;
}
.cart-bar strong {
  font-size: 14px;
}
.cart-bar small {
  display: block;
  max-width: 550px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.checkout-list {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 15px;
  background: #f7f5f0;
}
.checkout-list > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.checkout-list > div:last-child {
  border-bottom: 0;
}
.checkout-list b {
  font-weight: 500;
}
.checkout-list strong {
  white-space: nowrap;
}
.due-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.due-presets button {
  border: 1px solid #d8c6b8;
  background: #f5eee7;
  border-radius: 5px;
  padding: 6px 11px;
  color: var(--red);
  font-size: 12px;
}
.line-table {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 15px;
}
.line-table > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.line-table > div:last-child {
  border: 0;
}
.line-table small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.line-table b {
  font-weight: 500;
}
.return-history {
  background: #f6f3ec;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 6px;
  margin: 20px 0;
}
.return-history h3 {
  font-size: 15px;
}
.return-history form {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.return-quantity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 12px 0;
}
.return-quantity small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.return-quantity input {
  max-width: 80px;
  margin: 0 !important;
}
.badge.partial {
  background: #e8e5f1;
  color: #71628a;
}
.manage-toolbar {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.button-group {
  display: flex;
  gap: 13px;
  align-items: center;
}
.inventory-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 18px;
}
.inventory-list > p {
  padding: 15px;
}
.inventory-row {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.inventory-row:last-child {
  border: 0;
}
.inventory-row img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 5px;
}
.inventory-row > div {
  flex: 1;
}
.inventory-row h3 {
  font-size: 14px;
}
.inventory-row p {
  font-size: 11px;
  margin: 3px 0;
}
.qr-box {
  padding: 15px;
  text-align: center;
}
.qr-box img {
  width: 220px;
  max-width: 100%;
  image-rendering: pixelated;
}
#copy-link {
  margin: 15px 0;
}
.brand {
  font-size: 18px;
}
nav button {
  display: flex;
  align-items: center;
  gap: 4px;
}
nav b {
  font-size: 13px;
}
.side-label {
  margin: 25px 0;
}
input[type="datetime-local"] {
  min-width: 0;
}
main {
  overflow-wrap: anywhere;
}
html[lang="en"] .eyebrow {
  letter-spacing: 1.5px;
}
html[lang="en"] h1 {
  font-family: Georgia, serif;
  font-size: 30px;
}
html[lang="en"] .brand {
  font-size: 16px;
  letter-spacing: 0;
}
html[lang="en"] .hero h2 {
  font-family: Georgia, serif;
  font-size: 25px;
}
html[lang="en"] nav b {
  font-size: 12px;
}
html[lang="en"] .primary {
  white-space: normal;
}
html[lang="en"] .stats small {
  font-size: 10px;
}
@media (max-width: 1150px) {
  .instrument-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .button-group {
    gap: 8px;
  }
  .button-group button {
    font-size: 11px;
  }
}
@media (max-width: 700px) {
  nav {
    display: flex;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 4px;
  }
  nav button {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 10px 9px;
  }
  nav button span {
    width: 18px;
  }
  nav b {
    font-size: 12px;
  }
  .header-actions {
    gap: 9px;
  }
  header {
    height: auto;
    min-height: 58px;
    gap: 8px;
  }
  #breadcrumb {
    max-width: 40%;
    font-size: 10px;
  }
  #identity > span:not(.avatar) {
    max-width: 95px;
    font-size: 10px;
  }
  .language {
    padding: 3px 7px;
    font-size: 11px;
  }
  .instrument-grid {
    gap: 12px;
  }
  .instrument-body {
    padding: 12px;
  }
  .instrument-body h3 {
    font-size: 15px;
  }
  .instrument-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .instrument-photo {
    aspect-ratio: 1.2;
  }
  .instrument-photo .badge {
    left: 7px;
    top: 7px;
    font-size: 9px;
  }
  .cart-bar {
    padding: 13px;
    gap: 10px;
    bottom: 10px;
  }
  .cart-bar .primary {
    font-size: 12px;
    padding: 10px 12px;
    white-space: normal;
    max-width: 160px;
  }
  .cart-bar strong {
    font-size: 12px;
  }
  .cart-bar small {
    max-width: 160px;
  }
  .room-section .section-heading {
    gap: 12px;
    flex-wrap: wrap;
  }
  .room-chips {
    gap: 8px;
  }
  .room-chips button {
    font-size: 12px;
    padding: 8px 12px;
  }
  .button-group {
    flex-wrap: wrap;
  }
  .inventory-row {
    gap: 10px;
  }
  .inventory-row img {
    width: 48px;
    height: 48px;
  }
  .inventory-row .secondary {
    padding: 7px 11px;
  }
  .inventory-list {
    padding: 5px 12px;
  }
  html[lang="en"] h1 {
    font-size: 26px;
  }
  html[lang="en"] .hero h2 {
    font-size: 22px;
  }
  .hero-art {
    opacity: 0.22;
  }
  .hero h2,
  .hero p {
    position: relative;
    z-index: 1;
  }
}
@media (max-width: 350px) {
  .instrument-grid {
    grid-template-columns: 1fr;
  }
  .instrument-controls {
    flex-direction: row;
    align-items: center;
  }
  .instrument-photo {
    aspect-ratio: 1.8;
  }
  .header-actions {
    gap: 5px;
  }
  #identity .avatar {
    display: none;
  }
}
.upload:focus-within,
.upload:focus,
.upload.drag-over {
  border-color: var(--red);
  outline: 2px solid #853d3715;
  background: #f1e8df;
}
.upload-status {
  font-size: 12px;
  margin-top: 10px;
  color: var(--muted);
}
.upload-status.ready-photo {
  color: var(--green);
}
.upload-status.photo-error {
  color: var(--red);
  background: #f8e8e2;
  padding: 8px;
  border-radius: 4px;
}
.loading-photo {
  color: var(--gold);
}
.clear-photos {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}
.photo-field .thumbs:empty {
  display: none;
}
.no-photo {
  height: 100%;
  min-height: 65px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #ece8df;
  color: #b2a58e;
  font: 35px Georgia;
}
.no-photo small {
  font:
    11px/2 -apple-system,
    sans-serif;
  color: var(--muted);
}
.inventory-row > .no-photo {
  width: 65px;
  min-width: 65px;
  border-radius: 5px;
}
.inventory-row > .no-photo small {
  font-size: 9px;
}
.room-date-bar {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 25px;
}
.room-date-bar label {
  min-width: 180px;
}
.room-date-bar > p {
  max-width: 400px;
}
.room-booking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.room-booking-card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 22px;
}
.time-slots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.time-slot {
  border: 1px solid #b9d1c0;
  background: #edf4ed;
  border-radius: 5px;
  padding: 9px 13px;
  color: var(--green);
  font-size: 13px;
}
.time-slot span {
  margin-left: 12px;
}
.blocked-slot,
.occupied-slot {
  padding: 8px 11px;
  border-radius: 5px;
  font-size: 12px;
  margin: 8px 0;
  background: #f8eae4;
  color: #925c50;
}
.blocked-slot span {
  margin-left: 12px;
}
.occupied-slot {
  background: #edece7;
  color: #7b786e;
}
.room-booking-card > .text-btn {
  font-size: 12px;
  margin-top: 12px;
}
.schedule-panel {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 7px;
  padding: 20px;
  margin-top: 25px;
}
.schedule-panel > summary {
  cursor: pointer;
  font-weight: 500;
}
.schedule-rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding: 15px 0;
}
.schedule-rule p,
.schedule-rule small {
  font-size: 11px;
  color: var(--muted);
}
.room-record-title {
  margin-top: 35px;
}
.weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 12px;
}
.weekdays legend {
  font-size: 12px;
  color: var(--muted);
}
.weekdays label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.weekdays input {
  accent-color: var(--red);
}
#room-cancel-form,
#room-review-form,
#room-return-form {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
@media (max-width: 850px) {
  .room-booking-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .room-date-bar {
    gap: 12px;
  }
  .room-date-bar label {
    min-width: 0;
    flex: 1;
  }
  .room-date-bar p {
    flex-basis: 100%;
  }
  .room-booking-card {
    padding: 18px;
  }
  .schedule-panel {
    padding: 16px;
  }
  .schedule-rule .secondary {
    padding: 7px 11px;
  }
  .weekdays {
    gap: 10px;
  }
}
/* Seven-day room calendar */
.calendar-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 4px 18px #322a2005;
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.calendar-room-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}
.calendar-room-picker > span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.calendar-room-picker select {
  margin: 0;
  min-width: 150px;
  font-size: 16px;
  font-weight: 550;
  padding: 9px 30px 9px 12px;
}
.calendar-navigation {
  display: flex;
  gap: 5px;
}
.calendar-navigation button {
  padding: 7px 12px;
  font-size: 13px;
}
.calendar-navigation button:first-child,
.calendar-navigation button:last-child {
  font-size: 24px;
  line-height: 1;
  padding: 8px 12px;
}
.calendar-date-range {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calendar-date-range > strong {
  font-size: 14px;
  font-weight: 500;
}
.calendar-date-range label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}
.calendar-date-range input {
  border: 0 !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 11px !important;
  width: auto !important;
  box-shadow: none !important;
}
.calendar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 24px;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.calendar-legend {
  display: flex;
  gap: 17px;
  flex-wrap: wrap;
}
.calendar-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.calendar-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.legend-free {
  background: #8bb69a;
}
.legend-blocked {
  background: #d5a494;
}
.legend-occupied {
  background: #9bacc1;
}
.calendar-scroll {
  overflow: auto;
  max-height: 620px;
  height: 620px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #c7c0b3 #f3f0e9;
}
.calendar-board {
  display: grid;
  grid-template-columns: 54px repeat(7, minmax(95px, 1fr));
  grid-template-rows: 64px 1248px;
  min-width: 750px;
  position: relative;
  isolation: isolate;
}
.calendar-day-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  font-size: 11px;
  color: var(--muted);
}
.calendar-day-head strong {
  font-size: 15px;
  font-weight: 550;
  color: #4b473f;
}
.calendar-day-head.is-today {
  background: #f5eee8;
  color: var(--red);
}
.calendar-day-head.is-today strong {
  color: var(--red);
}
.calendar-day-head em {
  position: absolute;
  bottom: 3px;
  font-style: normal;
  font-size: 9px;
}
.calendar-corner {
  position: sticky;
  left: 0;
  z-index: 7;
  align-items: center;
}
.calendar-time-axis {
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--paper);
  border-right: 1px solid var(--line);
  height: 1248px;
}
.calendar-time-axis span {
  position: absolute;
  right: 8px;
  font-size: 10px;
  line-height: 1;
  color: #8f887a;
  transform: translateY(-5px);
}
.calendar-time-axis span:first-child {
  transform: translateY(5px);
}
.calendar-column {
  position: relative;
  height: 1248px;
  overflow: hidden;
  border-right: 1px solid #e3e0d7;
  cursor: crosshair;
  touch-action: pan-y pan-x;
  user-select: none;
  background: #f7f4ed;
  outline: none;
}
.calendar-column:focus-visible {
  box-shadow: inset 0 0 0 2px var(--red);
}
.calendar-column:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 25px,
    #72715c0d 25px,
    #72715c0d 26px,
    transparent 26px,
    transparent 51px,
    #72715c1c 51px,
    #72715c1c 52px
  );
}
.calendar-event {
  position: absolute;
  left: 4px;
  right: 4px;
  padding: 7px 7px;
  overflow: hidden;
  border-radius: 3px;
  pointer-events: none;
  font-size: 11px;
  line-height: 1.45;
}
.calendar-event b {
  font-weight: 500;
  display: block;
  position: sticky;
  top: 70px;
}
.calendar-event small {
  font-size: 9px;
  display: block;
  position: sticky;
  top: 88px;
  white-space: nowrap;
}
.calendar-event.free {
  background: #e4efe3;
  color: #497454;
  border-left: 2px solid #94b49a;
}
.calendar-event.blocked {
  z-index: 1;
  background: #f1ded7;
  color: #9b6253;
  border-left: 2px solid #c49180;
}
.calendar-event.occupied {
  z-index: 2;
  background: #dde5f0;
  color: #62758d;
  border-left: 2px solid #93a6bf;
}
.calendar-event.compact {
  padding: 1px 5px;
  font-size: 9px;
}
.calendar-past {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(
    135deg,
    #f0eee9c4 0,
    #f0eee9c4 5px,
    #e4e0d8a6 5px,
    #e4e0d8a6 6px
  );
}
.calendar-now {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  height: 1px;
  background: #a95345;
  pointer-events: none;
}
.calendar-now span {
  display: block;
  position: absolute;
  left: 0;
  top: -3px;
  border-radius: 50%;
  width: 6px;
  height: 6px;
  background: #a95345;
}
.calendar-drag-selection {
  position: absolute;
  z-index: 6;
  left: 2px;
  right: 2px;
  background: #853d3730;
  border: 2px solid var(--red);
  border-radius: 4px;
  pointer-events: none;
  padding: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--red);
  overflow: hidden;
}
.calendar-help {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.calendar-help button {
  white-space: nowrap;
  font-size: 12px;
}
.calendar-selection:not(:empty) {
  padding: 0 20px 12px;
  color: var(--red);
  font-size: 12px;
}
@media (max-width: 1050px) {
  .calendar-toolbar {
    gap: 13px;
    padding: 18px;
  }
  .calendar-date-range {
    margin-left: 0;
  }
  .calendar-meta {
    padding: 12px 18px;
  }
}
@media (max-width: 700px) {
  .calendar-toolbar {
    padding: 16px;
    gap: 14px;
  }
  .calendar-room-picker {
    width: 100%;
    justify-content: space-between;
  }
  .calendar-room-picker select {
    min-width: 180px;
    max-width: 75%;
  }
  .calendar-date-range {
    flex: 1;
    align-items: flex-end;
  }
  .calendar-date-range > strong {
    font-size: 11px;
  }
  .calendar-meta {
    font-size: 10px;
    padding: 12px 16px;
  }
  .calendar-legend {
    gap: 12px;
  }
  .calendar-scroll {
    max-height: 540px;
    height: 540px;
  }
  .calendar-board {
    grid-template-columns: 46px repeat(7, 100px);
    min-width: 746px;
  }
  .calendar-help {
    padding: 12px 14px;
    flex-wrap: wrap;
  }
  .calendar-help > span {
    max-width: 100%;
    font-size: 10px;
  }
  .calendar-time-axis span {
    font-size: 9px;
    right: 6px;
  }
}
.main {
  min-width: 0;
}
main {
  min-width: 0;
  max-width: 100%;
}
.calendar-card,
.calendar-scroll {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.calendar-event-label {
  position: absolute;
  left: 7px;
  right: 3px;
  padding-top: 6px;
}
.calendar-event-label b,
.calendar-event-label small {
  position: static;
}
.calendar-event.compact .calendar-event-label {
  left: 4px;
  padding-top: 0;
}
.calendar-board {
  width: 100%;
}
/* Booking hours, identity and management actions */
.calendar-board {
  grid-template-rows: 64px 728px;
}
.calendar-column,
.calendar-time-axis {
  height: 728px;
}
.calendar-event.occupied,
.calendar-event.mine {
  z-index: 4;
}
.calendar-event.mine {
  background: #d7e7ee;
  color: #315c78;
  border-left: 3px solid #547c9d;
}
.calendar-event.requested {
  z-index: 3;
  background: #f9ecccbf;
  color: #9d7b31;
  border: 1px dashed #c6a552;
}
.legend-requested {
  background: #d0b16e;
}
.calendar-event-hit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  border-radius: 3px;
}
.calendar-event-hit:hover,
.calendar-event-hit:focus-visible {
  background: #ffffff25;
  outline: 2px solid #7a96ae;
}
.calendar-event-label {
  pointer-events: none;
}
.booking-actions,
.inventory-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.inventory-actions {
  flex-direction: column;
  gap: 6px;
}
.danger,
.cancel-booking {
  color: #a75444 !important;
}
.booking-actions button {
  font-size: 12px;
}
.calendar-help {
  font-size: 10px;
}
@media (max-width: 700px) {
  .booking-actions {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .inventory-actions {
    min-width: 50px;
  }
  .button-group {
    gap: 10px;
  }
  .calendar-legend {
    row-gap: 7px;
  }
}

/* Compact instrument selection, with usable quantity controls. */
.instrument-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.instrument-photo {
  aspect-ratio: 2;
  height: auto;
}
.instrument-body {
  padding: 11px 12px;
}
.instrument-body h3 {
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.instrument-body > p {
  font-size: 11px;
  margin: 3px 0;
}
.instrument-body .accessories {
  font-size: 10px;
  min-height: 0;
  overflow-wrap: anywhere;
}
.instrument-controls {
  flex-direction: row;
  align-items: center;
  margin-top: 9px;
  padding-top: 8px;
  gap: 5px;
}
.instrument-controls > span {
  font-size: 10px;
}
.instrument-photo .badge {
  left: 7px;
  top: 7px;
  font-size: 10px;
  padding: 2px 6px;
}
.instrument:has(output:not(:empty)) {
  transition: border-color 0.15s;
}
.instrument.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}
.calendar-event.blocked {
  pointer-events: auto;
  cursor: not-allowed;
  z-index: 2;
}
@media (max-width: 700px) {
  .instrument-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .instrument-body {
    padding: 10px;
  }
  .instrument-controls {
    flex-wrap: wrap;
  }
  .stepper button {
    width: 32px;
    height: 34px;
  }
  .stepper output {
    min-width: 26px;
  }
  .instrument-controls > span {
    display: none;
  }
  .instrument-photo {
    aspect-ratio: 1.8;
  }
  .auth-tabs button {
    padding: 9px 10px;
  }
}

/* One borrowing record per row. */
.records-list {
  display: block;
}
.loan-table-scroll {
  width: 100%;
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.loan-record-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 850px;
  table-layout: fixed;
  text-align: left;
  font-size: 12px;
}
.loan-record-table th {
  font-weight: 500;
  color: var(--muted);
  background: #f0eee7;
  padding: 12px 14px;
  white-space: nowrap;
}
.loan-record-table th:nth-child(1) {
  width: 28%;
}
.loan-record-table th:nth-child(2) {
  width: 19%;
}
.loan-record-table th:nth-child(3),
.loan-record-table th:nth-child(4) {
  width: 18%;
}
.loan-record-table th:nth-child(5) {
  width: 6%;
}
.loan-record-table th:nth-child(6) {
  width: 11%;
}
.loan-record-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
.loan-record-table tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}
.loan-record-table tbody tr:hover {
  background: #f3f0e8;
}
.loan-record-table tbody tr:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: -2px;
  background: #f3f0e8;
}
.loan-row-open {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--ink);
  font: inherit;
}
.loan-row-open strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 550;
}
.loan-row-open:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}
.loan-item-summary,
.loan-room-summary {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loan-item-summary {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.loan-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.loan-date small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.loan-total {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
@media (max-width: 700px) {
  .loan-record-table {
    min-width: 820px;
  }
  .loan-record-table td,
  .loan-record-table th {
    padding: 11px 12px;
  }
}

.rules-page-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  color: var(--red);
}
.rules-page-links a {
  text-underline-offset: 4px;
}
.rules-box + .rules-box {
  margin-top: 20px;
}
.rules-page-links ~ .rules-box {
  scroll-margin-top: 20px;
}
.booking-record-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 780px;
  text-align: left;
  font-size: 12px;
}
.booking-record-table th {
  background: #f0eee7;
  color: var(--muted);
  font-weight: 500;
  padding: 12px 14px;
  white-space: nowrap;
}
.booking-record-table td {
  border-top: 1px solid var(--line);
  padding: 14px;
  white-space: nowrap;
}
.booking-record-table tbody tr {
  cursor: pointer;
}
.booking-record-table tbody tr:hover {
  background: #f3f0e8;
}
.booking-record-table tr:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

.calendar-event.weekend-request {
  background: #f7dfdc;
  color: #a43c36;
  border-left: 2px solid #c65a51;
}
.legend-weekend {
  background: #c65a51;
}
.calendar-day-head.weekend-head {
  background: #fbefed;
  color: #a43c36;
}
.calendar-day-head.weekend-head strong {
  color: #a43c36;
}

nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}
nav button b {
  flex: 1;
}
nav .nav-attention {
  font-style: normal;
  font-size: 10px;
  line-height: 18px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 10px;
  color: white;
  background: #bd493f;
  text-align: center;
  margin-left: 5px;
}
.list-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 0;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}
.list-pagination > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.list-pagination button {
  padding: 6px 12px;
}
.list-pagination button:disabled {
  cursor: default;
  opacity: 0.4;
}
.loan-record-table th:nth-child(1) {
  width: 12%;
}
.loan-record-table th:nth-child(2) {
  width: 27%;
}
.loan-record-table th:nth-child(3) {
  width: 18%;
}
.loan-record-table th:nth-child(4),
.loan-record-table th:nth-child(5) {
  width: 18%;
}
.loan-record-table th:nth-child(6) {
  width: 7%;
}
.loan-record-table th:first-child,
.loan-record-table td.loan-status {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--paper);
  box-shadow: 1px 0 var(--line);
}
.loan-record-table th:first-child {
  background: #f0eee7;
  z-index: 2;
}
.loan-record-table tr:hover td.loan-status {
  background: #f3f0e8;
}
.booking-record-table tr.needs-action {
  background: #fff7ed;
}
.booking-record-table tr.needs-action td:first-child {
  border-left: 3px solid #bd493f;
}
.manage-filter-bar {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  position: sticky;
  top: 0;
  z-index: 3;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px #302f2c08;
}
.manage-filter-bar label {
  font-size: 11px;
  min-width: 140px;
}
.manage-filter-bar .inventory-search-label {
  flex: 1;
  min-width: 180px;
}
.manage-filter-bar input,
.manage-filter-bar select {
  padding: 8px 10px;
}
.manage-filter-bar .secondary {
  padding: 8px 12px;
}
.compact-inventory .inventory-row {
  padding: 10px 12px;
  gap: 14px;
}
.compact-inventory .inventory-row img,
.compact-inventory .inventory-row > .no-photo {
  width: 48px;
  height: 48px;
  min-width: 48px;
  object-fit: cover;
  border-radius: 5px;
}
.compact-inventory .inventory-row h3 {
  font-size: 14px;
}
.compact-inventory .inventory-row p {
  font-size: 11px;
  margin: 2px 0;
}
.compact-inventory .inventory-actions {
  flex-direction: row;
  gap: 15px;
}
.compact-inventory .inventory-actions .secondary {
  padding: 6px 12px;
}
.inventory-heading {
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .manage-filter-bar {
    gap: 10px;
    padding: 12px;
  }
  .manage-filter-bar label {
    min-width: 110px;
    flex: 1;
  }
  .manage-filter-bar .inventory-search-label {
    order: 3;
    flex-basis: 100%;
  }
  .compact-inventory .inventory-row {
    gap: 10px;
    padding: 10px 0;
  }
  .compact-inventory .inventory-actions {
    gap: 8px;
  }
  .list-pagination {
    font-size: 11px;
  }
}

.bounded-time{display:grid;grid-template-columns:1fr 1fr;gap:8px}.bounded-time select{min-width:0}

.storage-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:20px 0}.storage-stats small{display:block;color:var(--muted)}.storage-stats strong{font-size:22px;font-weight:500}.rules-box progress{width:100%;height:14px;accent-color:var(--green)}#history-filter{margin-top:18px}@media(max-width:700px){.storage-stats{grid-template-columns:1fr;gap:12px}.storage-stats strong{font-size:20px}}
