:root {
  --arit: #3154A3;
  --orange: #D97721;
  --ink: #1E293B;
  --bg: #F8FAFC;
  --soft-blue: #EEF4FF;
  --soft-orange: #FFF4E8;
}

* { box-sizing: border-box; }
body { font-family: "Prompt", sans-serif; min-height: 100vh; }
a { color: inherit; text-decoration: none; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 280px; background: #fff; border-right: 1px solid #e2e8f0; padding: 20px;
  position: fixed; inset: 0 auto 0 0; z-index: 40; transition: transform .2s ease;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center;
  color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--arit), var(--orange));
}
.brand span { display: block; color: #64748b; font-size: 13px; }
.nav-menu { display: grid; gap: 8px; }
.nav-menu a {
  padding: 12px 14px; border-radius: 8px; color: #475569; font-weight: 500;
}
.nav-menu a:hover, .nav-menu a.active { background: var(--soft-blue); color: var(--arit); }
.sidebar-footer { position: absolute; left: 20px; right: 20px; bottom: 20px; color: #64748b; font-size: 13px; }
.main-content { margin-left: 280px; width: calc(100% - 280px); padding: 24px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px;
}
.user-chip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 18px; }
.grid-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat-card { border-left: 4px solid var(--arit); }
.stat-card strong { display: block; font-size: 28px; color: var(--ink); }
.stat-card span { color: #64748b; font-size: 14px; }
.btn-primary, .btn-secondary, .btn-danger, .btn-warning {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 14px; border-radius: 8px; font-weight: 600; border: 0; cursor: pointer;
}
.btn-primary { background: var(--arit); color: #fff; }
.btn-secondary { background: var(--soft-blue); color: var(--arit); }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-warning { background: var(--soft-orange); color: var(--orange); }
.icon-btn { width: 40px; height: 40px; border-radius: 8px; background: var(--soft-blue); color: var(--arit); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.form-field { display: grid; gap: 6px; }
.form-field label { color: #334155; font-weight: 500; font-size: 14px; }
input, select, textarea {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px 12px; background: #fff;
}
textarea { min-height: 110px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
th { background: #f8fafc; color: #475569; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-muted { background: #e2e8f0; color: #475569; }
.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid transparent; }
.flash-success { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.flash-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #EEF4FF 0%, #FFF4E8 100%); }
.login-box { max-width: 440px; width: 100%; }
.login-logo { width: 56px; height: 56px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 700; background: var(--arit); }

.public-borrow-page { background: #f8fafc; }
.public-wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 44px; }
.public-hero {
  display: flex; align-items: end; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-bottom: 20px; padding: 24px; border-radius: 8px; color: #fff;
  background: linear-gradient(135deg, #3154a3, #1e293b);
}
.service-public .public-hero { background: linear-gradient(135deg, #d97721, #3154a3); }
.public-kicker { font-size: 13px; font-weight: 700; opacity: .8; margin-bottom: 6px; }
.public-hero h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; line-height: 1.15; margin: 0 0 8px; }
.public-hero p { max-width: 680px; color: rgba(255,255,255,.82); }
.public-search { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 18px; }
.borrow-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.borrow-card {
  overflow: hidden; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff;
  display: flex; flex-direction: column; min-height: 100%;
}
.borrow-card img, .borrow-detail > img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e2e8f0;
}
.borrow-card-body { padding: 14px; display: grid; gap: 10px; flex: 1; align-content: start; }
.borrow-card h2, .borrow-detail h2 { font-size: 20px; font-weight: 700; line-height: 1.25; }
.item-meta { color: #64748b; font-size: 13px; }
.stock-pill {
  width: fit-content; display: inline-flex; align-items: center; border-radius: 999px;
  padding: 5px 10px; font-size: 13px; font-weight: 700; color: #15803d; background: #dcfce7;
}
.stock-pill.is-empty { color: #b91c1c; background: #fee2e2; }
.borrow-detail { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 440px); gap: 18px; align-items: start; }
.borrow-detail > img { border-radius: 8px; border: 1px solid #e2e8f0; }
.dashboard-hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px;
  padding: 18px; margin-bottom: 18px; border-radius: 8px; background: #0f172a;
}
.dashboard-hero.service-hero { background: #1f2937; }
.dash-metric { border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 16px; color: #fff; background: rgba(255,255,255,.06); }
.dash-metric span { display: block; color: rgba(255,255,255,.7); font-size: 14px; }
.dash-metric strong { display: block; font-size: 34px; line-height: 1.1; margin-top: 6px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr); gap: 18px; }
.top-list, .compact-list { display: grid; gap: 10px; }
.top-item, .compact-row { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; }
.top-item img { width: 72px; height: 54px; border-radius: 8px; object-fit: cover; background: #e2e8f0; }
.top-item strong, .compact-row strong { display: block; }
.top-item span, .compact-row span { display: block; color: #64748b; font-size: 13px; margin-top: 2px; }
.rank { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; background: var(--soft-blue); color: var(--arit); font-weight: 800; flex: 0 0 auto; }
.compact-row { justify-content: space-between; align-items: flex-start; }
.tour-hero {
  display: flex; align-items: end; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-bottom: 18px; padding: 28px; border-radius: 8px; color: #fff;
  background: linear-gradient(135deg, #1f7a5c, #3154a3);
}
.tour-hero h1 { font-size: clamp(28px, 4vw, 46px); font-weight: 800; line-height: 1.1; margin: 0 0 8px; }
.tour-hero p { max-width: 680px; color: rgba(255,255,255,.84); }
.tour-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.tour-filter input[type="date"] { width: auto; min-width: 170px; }
.tour-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tour-card { display: grid; gap: 10px; align-content: start; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 16px; }
.tour-card h2 { font-size: 20px; font-weight: 700; line-height: 1.25; }
.tour-date { width: fit-content; padding: 5px 10px; border-radius: 999px; background: #dcfce7; color: #15803d; font-weight: 700; font-size: 13px; }
.tour-schedule-head { display: grid; gap: 10px; align-items: start; margin-bottom: 2px; }
.tour-full-date {
  width: fit-content; max-width: 100%; padding: 8px 12px; border-radius: 8px;
  background: #ecfdf5; color: #047857; border: 1px solid #bbf7d0;
  font-weight: 800; font-size: clamp(16px, 2vw, 22px); line-height: 1.25;
}
.tour-full-date.is-card { font-size: 15px; padding: 7px 10px; }
.tour-time-badge {
  width: fit-content; display: inline-flex; align-items: center; min-height: 50px;
  padding: 8px 16px; border-radius: 8px; background: #0f172a; color: #fff;
  font-size: clamp(24px, 3vw, 38px); line-height: 1; font-weight: 800;
  box-shadow: 0 12px 28px rgba(15,23,42,.16);
}
.tour-time-badge.is-card {
  min-height: 42px; padding: 8px 12px; font-size: 24px;
  background: linear-gradient(135deg, #132d63, #128f8b);
}
.tour-progress { height: 9px; border-radius: 999px; overflow: hidden; background: #e2e8f0; }
.tour-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22c55e, #3154a3); }
.tour-booking-layout { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.library-tour-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(12, 75, 82, .10), rgba(248,250,252,0) 420px),
    #f8fafc;
}
.tour-app { width: min(1220px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 50px; }
.tour-app-hero {
  position: relative; overflow: hidden; min-height: 430px; display: flex; align-items: end; justify-content: space-between; gap: 18px;
  padding: 34px; border-radius: 8px; color: #fff; margin-bottom: 18px;
  background:
    linear-gradient(90deg, rgba(6, 38, 45, .92), rgba(6, 38, 45, .62), rgba(6, 38, 45, .25)),
    var(--hero-image) center / cover no-repeat;
  box-shadow: 0 26px 70px rgba(15,23,42,.18);
}
.tour-app-hero.is-compact { min-height: 330px; }
.tour-app-hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 42%;
  background: linear-gradient(180deg, transparent, rgba(6,38,45,.72));
}
.tour-hero-content, .tour-hero-panel { position: relative; z-index: 1; }
.tour-hero-content { max-width: 760px; }
.tour-hero-content h1 { font-size: clamp(34px, 6vw, 72px); line-height: .98; font-weight: 800; margin: 0 0 12px; }
.tour-hero-content p { max-width: 650px; color: rgba(255,255,255,.84); font-size: 17px; }
.tour-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.tour-hero-panel {
  width: 178px; padding: 18px; border-radius: 8px; backdrop-filter: blur(16px);
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
}
.tour-hero-panel span, .tour-hero-panel small { display: block; color: rgba(255,255,255,.74); font-size: 13px; }
.tour-hero-panel strong { display: block; font-size: 52px; line-height: 1; margin: 8px 0; }
.tour-glass {
  position: sticky; top: 10px; z-index: 10; padding: 12px; border-radius: 8px;
  background: rgba(255,255,255,.88); backdrop-filter: blur(14px);
  border: 1px solid rgba(226,232,240,.9); box-shadow: 0 14px 34px rgba(15,23,42,.08);
}
.tour-checkout {
  display: grid; grid-template-columns: minmax(320px, .95fr) minmax(360px, 1.05fr); gap: 18px;
  margin: 18px 0;
}
.tour-selected-card, .tour-form-card {
  overflow: hidden; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff;
  box-shadow: 0 20px 48px rgba(15,23,42,.09);
}
.tour-selected-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #e2e8f0; }
.tour-selected-body { display: grid; gap: 12px; padding: 18px; }
.tour-selected-body h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; line-height: 1.12; }
.tour-selected-body p { color: #475569; }
.tour-form-card { padding: 18px; border-top: 4px solid #128f8b; }
.tour-form-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.tour-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; color: #475569; }
.tour-consent input { width: auto; margin-top: 5px; }
.tour-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tour-info-grid span {
  display: block; padding: 12px; border-radius: 8px; background: #f8fafc; color: #64748b; font-size: 13px;
  border: 1px solid #e2e8f0;
}
.tour-info-grid strong { color: #0f172a; font-size: 15px; }
.tour-showtimes { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tour-showtime-card { padding: 0; overflow: hidden; box-shadow: 0 16px 42px rgba(15,23,42,.08); transition: transform .18s ease, box-shadow .18s ease; }
.tour-showtime-card:hover { transform: translateY(-3px); box-shadow: 0 22px 56px rgba(15,23,42,.12); }
.tour-showtime-card > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #e2e8f0; }
.tour-card-body { display: grid; gap: 10px; padding: 15px; }
.tour-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tour-meta-line { display: flex; flex-wrap: wrap; gap: 8px; color: #64748b; font-size: 13px; }
.tour-meta-line span {
  display: inline-flex; align-items: center; min-height: 30px; padding: 5px 9px; border-radius: 999px;
  background: #f8fafc; border: 1px solid #e2e8f0;
}
.tour-admin-preview { width: min(420px, 100%); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid #e2e8f0; }
.tour-admin-page .topbar { border-top: 4px solid #128f8b; }
.tour-admin-hero {
  display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 18px; padding: 26px; border-radius: 8px; color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(217,119,33,.32), transparent 32%),
    linear-gradient(135deg, #064e3b, #3154a3 55%, #128f8b);
}
.tour-admin-hero h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; line-height: 1.08; margin: 0 0 8px; }
.tour-admin-hero p { color: rgba(255,255,255,.82); max-width: 760px; }
.tour-admin-grid { display: grid; grid-template-columns: minmax(320px, 1.15fr) minmax(280px, .85fr); gap: 18px; }
.tour-admin-list { display: grid; gap: 12px; }
.tour-admin-row {
  display: grid; grid-template-columns: 86px 1fr auto; gap: 12px; align-items: center;
  padding: 12px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff;
}
.tour-admin-row img { width: 86px; height: 66px; object-fit: cover; border-radius: 8px; background: #e2e8f0; }
.tour-admin-row strong { display: block; color: #0f172a; }
.tour-admin-row span, .tour-admin-row small { display: block; color: #64748b; font-size: 13px; margin-top: 2px; }
.tour-manage-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px;
  padding: 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff;
}
.tour-manage-tabs a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 8px 14px; border-radius: 8px; color: #475569; font-weight: 700;
}
.tour-manage-tabs a:hover, .tour-manage-tabs a.is-active {
  color: #fff; background: linear-gradient(135deg, #132d63, #128f8b);
}
.tour-slot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 18px; }
.tour-slot-card { padding: 0; overflow: hidden; }
.tour-slot-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #e2e8f0; }
.tour-status-stack { display: grid; gap: 6px; justify-items: end; }
.tour-booking-list { display: grid; gap: 14px; }
.tour-booking-card {
  display: grid; grid-template-columns: 170px 1fr minmax(280px, .85fr); gap: 14px; align-items: start;
}
.tour-booking-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #e2e8f0; }
.tour-booking-main { display: grid; gap: 8px; }
.tour-booking-main h2 { font-size: 22px; font-weight: 800; line-height: 1.2; }
.tour-booking-actions { display: grid; gap: 10px; }
.tour-status-form { display: grid; gap: 8px; }
.tour-result-list { display: grid; gap: 14px; }
.tour-result-card {
  display: grid; grid-template-columns: 180px 1fr; gap: 14px; align-items: start;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 14px;
  box-shadow: 0 16px 42px rgba(15,23,42,.08);
}
.tour-result-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #e2e8f0; }
.tour-result-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tour-result-head strong { color: #132d63; }
.tour-check-search {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 18px 0;
  padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: rgba(255,255,255,.9);
}
.tour-confirm-card {
  display: grid; grid-template-columns: minmax(260px, .75fr) minmax(320px, 1.25fr); gap: 18px;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 18px;
  box-shadow: 0 22px 56px rgba(15,23,42,.10);
}
.tour-confirm-code {
  display: grid; gap: 10px; align-content: center; padding: 20px; border-radius: 8px;
  color: #fff; background: linear-gradient(135deg, #132d63, #128f8b);
}
.tour-confirm-code span { color: rgba(255,255,255,.75); font-size: 13px; font-weight: 700; }
.tour-confirm-code strong { font-size: clamp(26px, 4vw, 42px); line-height: 1.05; overflow-wrap: anywhere; }
.tour-confirm-details { display: grid; gap: 12px; }
.tour-confirm-details h2 { font-size: 28px; font-weight: 800; }
.tour-note { padding: 12px; border-radius: 8px; background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }
.tour-detail-layout { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr); gap: 18px; align-items: start; }
.report-bar { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 0 12px; border-bottom: 1px solid #e2e8f0; }
.report-bar:last-child { border-bottom: 0; }
.report-bar span, .report-bar strong { position: relative; z-index: 1; }
.report-bar i { position: absolute; left: 0; bottom: 4px; height: 4px; border-radius: 999px; background: linear-gradient(90deg, #22c55e, #3154a3); }

.it-borrow-page {
  background:
    linear-gradient(180deg, rgba(238,244,255,.72), rgba(248,250,252,0) 360px),
    #f8fafc;
}
.it-hero {
  display: flex; align-items: end; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-bottom: 20px; padding: 28px; border-radius: 8px; color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgba(217,119,33,.32), transparent 34%),
    linear-gradient(135deg, #132d63, #3154a3 54%, #128f8b);
  box-shadow: 0 24px 60px rgba(49,84,163,.18);
}
.it-hero h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 800; line-height: 1.08; margin: 0 0 8px; }
.it-hero p { max-width: 760px; color: rgba(255,255,255,.84); }
.it-panel { border-top: 4px solid #128f8b; box-shadow: 0 18px 45px rgba(15,23,42,.08); }
.it-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.it-card:hover { transform: translateY(-3px); border-color: rgba(49,84,163,.45); box-shadow: 0 18px 40px rgba(15,23,42,.10); }
.it-ticket {
  display: grid; gap: 4px; padding: 16px; border-radius: 8px;
  background: linear-gradient(135deg, #ecfdf5, #eef4ff); border: 1px dashed #3154a3;
}
.it-ticket span { color: #64748b; font-size: 13px; font-weight: 700; }
.it-ticket strong { color: #132d63; font-size: 28px; }
.it-admin-page .topbar { border-top: 4px solid #128f8b; }
.it-admin-hero {
  display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 18px; padding: 26px; border-radius: 8px; color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(217,119,33,.34), transparent 30%),
    linear-gradient(135deg, #0f172a, #173a79 48%, #128f8b);
}
.it-admin-hero h2 { font-size: clamp(26px, 3.5vw, 42px); font-weight: 800; margin: 0 0 6px; line-height: 1.12; }
.it-admin-hero p { color: rgba(255,255,255,.82); max-width: 740px; }
.it-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.it-metric {
  padding: 16px; border-radius: 8px; background: #fff; border: 1px solid #dbeafe;
  box-shadow: 0 10px 28px rgba(49,84,163,.07);
}
.it-metric span { display: block; color: #64748b; font-size: 13px; font-weight: 600; }
.it-metric strong { display: block; margin-top: 6px; color: #132d63; font-size: 34px; line-height: 1; }
.it-dashboard-grid { display: grid; grid-template-columns: minmax(320px, 1.2fr) minmax(280px, .8fr); gap: 18px; }
.it-command-card { overflow: hidden; }
.it-ticket-list { display: grid; gap: 12px; }
.it-ticket-row {
  display: grid; grid-template-columns: 82px 1fr auto; align-items: center; gap: 12px;
  padding: 12px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff;
}
.it-ticket-row img { width: 82px; height: 62px; object-fit: cover; border-radius: 8px; background: #e2e8f0; }
.it-ticket-row strong, .it-active-row strong { display: block; color: #0f172a; }
.it-ticket-row span, .it-active-row span { display: block; color: #64748b; font-size: 13px; margin-top: 2px; }
.it-ticket-row small, .it-active-row small { display: block; color: #64748b; font-size: 12px; margin-top: 5px; }
.it-lend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.it-lend-card { padding: 0; overflow: hidden; }
.it-lend-card.is-focus { outline: 3px solid rgba(217,119,33,.35); }
.it-lend-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #e2e8f0; }
.it-lend-body { display: grid; gap: 12px; padding: 16px; }
.it-lend-body h2 { font-size: 22px; font-weight: 800; line-height: 1.2; }
.it-lend-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.it-lend-card .actions .form-field { flex: 1 1 180px; min-width: 180px; }
.it-lend-meta span {
  padding: 9px 10px; border-radius: 8px; background: #f8fafc; color: #475569; font-size: 13px; border: 1px solid #e2e8f0;
}
.it-empty-state { grid-column: 1 / -1; text-align: center; padding: 42px 20px; }
.it-empty-state h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.it-empty-state p { color: #64748b; margin-bottom: 16px; }
.it-return-layout { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr); gap: 18px; align-items: start; }
.it-return-summary { border-top: 4px solid #128f8b; }
.it-return-summary h2 { font-size: 26px; font-weight: 800; margin: 6px 0; }
.it-return-summary p { color: #475569; margin-bottom: 12px; }
.it-return-form { border-top: 4px solid #3154a3; }
.it-qr-card { border-top: 4px solid #128f8b; }
.it-equipment-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px;
}
.it-equipment-card {
  overflow: hidden; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff;
  box-shadow: 0 16px 42px rgba(15,23,42,.08); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.it-equipment-card:hover { transform: translateY(-3px); border-color: rgba(18,143,139,.45); box-shadow: 0 22px 56px rgba(15,23,42,.12); }
.it-equipment-card > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #e2e8f0; }
.it-equipment-body { display: grid; gap: 10px; padding: 15px; }
.it-equipment-body h2 { font-size: 22px; font-weight: 800; line-height: 1.2; color: #0f172a; }
.it-equipment-body p { color: #64748b; font-size: 14px; }
.it-stock-bar { height: 10px; border-radius: 999px; overflow: hidden; background: #e2e8f0; }
.it-stock-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #128f8b, #3154a3); }
.it-stock-line { display: flex; align-items: baseline; gap: 6px; color: #64748b; }
.it-stock-line strong { color: #132d63; font-size: 30px; line-height: 1; }
.it-detail-layout, .it-form-layout {
  display: grid; grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr); gap: 18px; align-items: start;
}
.it-detail-media { overflow: hidden; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff; box-shadow: 0 18px 45px rgba(15,23,42,.08); }
.it-detail-media img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; display: block; background: #e2e8f0; }
.it-detail-panel, .it-form-panel { border-top: 4px solid #128f8b; }
.it-detail-panel h2 { font-size: clamp(26px, 3.5vw, 42px); font-weight: 800; line-height: 1.08; color: #0f172a; }
.it-form-panel { box-shadow: 0 18px 45px rgba(15,23,42,.08); }
.it-return-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.it-return-card { padding: 0; overflow: hidden; box-shadow: 0 16px 42px rgba(15,23,42,.08); }
.it-return-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #e2e8f0; }
.it-return-card-body { display: grid; gap: 12px; padding: 16px; }
.it-return-card-body h2 { font-size: 24px; font-weight: 800; line-height: 1.15; color: #0f172a; }
.it-return-card-body p { color: #475569; }
.it-qr-card { box-shadow: 0 16px 42px rgba(15,23,42,.08); }
.it-qr-card img { border-radius: 8px; border: 1px solid #e2e8f0; padding: 8px; background: #fff; }
.it-qr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.it-qr-feature {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; text-align: left;
  background: linear-gradient(135deg, #fff, #eef4ff);
}
.it-qr-feature h2 { font-size: clamp(26px, 4vw, 42px); font-weight: 800; color: #132d63; line-height: 1.1; }
.it-qr-feature > img { width: 260px; height: 260px; flex: 0 0 auto; }
.it-qr-item { padding: 0; overflow: hidden; }
.it-qr-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 0 !important; padding: 0 !important; border-radius: 0 !important; background: #e2e8f0 !important; }
.it-qr-body { display: grid; gap: 10px; padding: 15px; text-align: center; }
.it-qr-body h2 { font-size: 20px; font-weight: 800; line-height: 1.2; color: #0f172a; }
.it-qr-body p { color: #64748b; }
.it-qr-code { margin: 4px auto; width: 220px; height: 220px; object-fit: contain; }
.it-admin-page .filters.card { box-shadow: 0 12px 32px rgba(15,23,42,.06); }

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; width: 100%; padding: 16px; }
  .topbar { align-items: flex-start; }
}

@media (max-width: 640px) {
  .topbar { flex-direction: column; }
  .user-chip { justify-content: flex-start; width: 100%; }
  .btn-primary, .btn-secondary, .btn-danger, .btn-warning { width: 100%; }
  .actions .btn-primary, .actions .btn-secondary, .actions .btn-danger, .actions .btn-warning { width: auto; }
  table { min-width: 680px; }
  .public-search, .borrow-detail, .dashboard-grid, .it-dashboard-grid, .it-return-layout, .it-detail-layout, .it-form-layout, .tour-admin-grid, .tour-detail-layout { grid-template-columns: 1fr; }
  .tour-booking-layout, .tour-checkout, .tour-confirm-card { grid-template-columns: 1fr; }
  .public-hero { align-items: start; }
  .tour-hero { align-items: start; }
  .it-hero, .it-admin-hero { align-items: start; }
  .compact-row { display: grid; }
  .it-ticket-row { grid-template-columns: 64px 1fr; }
  .it-ticket-row .btn-primary { grid-column: 1 / -1; }
  .it-qr-feature { display: grid; text-align: center; }
  .it-qr-feature > img { margin: 0 auto; }
  .tour-app { width: min(100% - 20px, 1220px); padding-top: 12px; }
  .tour-app-hero { min-height: 520px; padding: 22px; align-items: end; }
  .tour-hero-content h1 { font-size: 42px; }
  .tour-hero-panel { width: 100%; }
  .tour-info-grid { grid-template-columns: 1fr; }
  .tour-admin-row, .tour-booking-card, .tour-result-card { grid-template-columns: 1fr; }
  .tour-check-search { grid-template-columns: 1fr; }
}
