:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --soft: #f3f6fb;
  --soft-2: #ebf1fa;
  --text: #10233b;
  --muted: #697b91;
  --primary: #2563eb;
  --primary-soft: #e8f0ff;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --success-soft: #eef7ff;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", Arial, sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 999px; padding: 12px 18px; background: var(--primary); color: #fff; font-weight: 700; }
button:hover { filter: brightness(1.04); }
button.danger { background: var(--danger); }
input, textarea, select {
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: var(--soft);
  color: var(--text);
  padding: 14px 16px;
}
input[type="file"] {
  padding: 10px 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
  color: var(--muted);
  min-height: 58px;
  display: flex;
  align-items: center;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}
input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  margin-right: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}
input[type="file"]::file-selector-button:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}
input[type="file"]::-webkit-file-upload-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  margin-right: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 52px;
  padding-top: 15px;
  padding-bottom: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2310233b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 18px 18px;
}
textarea { resize: vertical; min-height: 92px; }

.hidden { display: none !important; }
.button-muted {
  background: var(--soft-2);
  color: var(--text);
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
}
.button-block { width: 100%; }

.app-shell {
  width: min(1320px, calc(100% - 36px));
  margin: 20px auto 44px;
}

.shell-block { margin-bottom: 18px; }

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 390px);
  gap: 34px;
  padding: 28px 30px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  align-items: start;
}

.site-brand {
  display: grid;
  align-content: start;
  align-items: start;
}
.site-brand h1 { margin: 14px 0 14px; font-size: clamp(34px, 3.4vw, 58px); line-height: 0.98; letter-spacing: -0.045em; max-width: 9.6ch; }
.site-brand p { margin: 0; max-width: 56ch; color: var(--muted); font-size: 17px; line-height: 1.72; }
.eyebrow, .panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 700;
  width: max-content;
  justify-self: start;
}

.header-stack {
  display: grid;
  gap: 14px;
  align-content: start;
  justify-items: end;
  justify-self: end;
  min-width: 0;
  width: 100%;
  height: 100%;
}
.header-stack:has(.control-card):not(:has(.inline-auth-compact)) {
  align-content: center;
}
.header-stack:has(.inline-auth-compact) {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}
.status-row:has(.inline-auth-compact) {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 260px;
  margin-inline: auto;
  padding: 16px;
  border-radius: 26px;
  background: var(--soft);
}
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  min-height: 48px;
  width: 220px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.control-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 26px;
  background: var(--soft);
  min-width: 100%;
  width: 100%;
  justify-self: end;
  align-self: center;
}
.login-intro {
  display: grid;
  gap: 4px;
  text-align: center;
}
.login-intro strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}
.login-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.field-label { display: inline-block; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.control-row, .toolbar-row { display: flex; gap: 10px; flex-wrap: wrap; }
.auth-row {
  display: flex;
  justify-content: flex-end;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.campus-switcher .control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.control-row select { min-width: 220px; }
.campus-switcher .control-row button {
  white-space: nowrap;
}
.toolbar-row button { flex: 1 1 140px; }

.inline-auth {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
  min-height: auto;
  width: 100%;
}
.inline-auth-compact {
  display: flex;
  justify-content: flex-end;
}
.inline-auth-compact .button-block {
  width: 220px;
  min-width: 220px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
}
.inline-auth-compact .button-block.button-muted {
  background: var(--danger);
  color: #fff;
}
.header-stack .control-card:has(.inline-auth-compact) {
  padding: 0;
  background: transparent;
  box-shadow: none;
  min-width: auto;
}
.inline-auth input {
  min-height: 50px;
  padding: 0 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(16, 35, 59, 0.08);
}
.inline-auth button {
  min-height: 50px;
  padding-inline: 20px;
  width: 100%;
  align-self: stretch;
}
.login-help-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  margin-top: 2px;
  cursor: pointer;
}
.login-help-row input {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: var(--primary);
  padding: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  flex: 0 0 auto;
}
.login-help-row span {
  color: var(--muted);
  font-size: 13px;
}
.status-row + .control-card .inline-auth-compact {
  margin-top: 0;
}
.login-error { margin: 0; color: #b91c1c; font-weight: 700; }

.section-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 320px) auto;
  gap: 14px;
  align-items: end;
  padding: 18px 20px;
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.section-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.section-campus-form,
.section-category-switcher {
  min-width: 0;
}
.section-campus-form,
.section-category-switcher {
  display: grid;
  gap: 8px;
}
.section-refresh-btn,
.section-settings-btn {
  align-self: end;
  white-space: nowrap;
  flex: 0 0 auto;
}
.tab-chip {
  background: var(--soft);
  color: var(--text);
  padding: 12px 18px;
}
.tab-chip.settings-chip { background: var(--primary-soft); color: var(--primary); }
.tab-chip.active {
  background: var(--primary);
  color: #fff;
}
.status-row .tab-chip.active {
  background: var(--soft);
  color: var(--text);
}
.settings-chip { margin-left: 0; }

.site-header {
  display: none !important;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
}

.login-shell {
  width: min(100%, 460px);
}

.login-panel {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.login-form {
  display: grid;
  gap: 14px;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}
.page-content { display: grid; gap: 22px; min-width: 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.page-grid { display: grid; gap: 22px; }

.latest-strip {
  display: grid;
  gap: 22px;
  overflow: hidden;
  padding: 30px;
  background: #ffffff;
}
.latest-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
  align-items: end;
}
.latest-head {
  margin-bottom: 0;
}
.latest-head h2 {
  margin: 12px 0 0;
  font-size: 38px;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.latest-copy {
  margin: 12px 0 0;
  max-width: 54ch;
  color: var(--muted);
  line-height: 1.75;
  font-size: 15px;
}
.latest-side-note {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}
.latest-side-note strong {
  font-size: 14px;
  color: var(--text);
}
.latest-side-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.latest-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.latest-nav-btn {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}
.latest-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(560px, 640px);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 12px;
  scrollbar-width: none;
}
.latest-slider::-webkit-scrollbar { display: none; }
.latest-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(220px, 0.95fr);
  gap: 0;
  padding: 0;
  border-radius: 30px;
  background: #ffffff;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
}
.latest-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 26px 54px rgba(15, 23, 42, 0.12);
}
.latest-card-thumb {
  aspect-ratio: auto;
  min-height: 280px;
  overflow: hidden;
  border-radius: 0;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.latest-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #eef3fb;
}
.latest-card-body {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 24px 24px 24px 26px;
  background: #ffffff;
  border-left: 1px solid rgba(16, 35, 59, 0.06);
  color: var(--text);
}
.latest-card-body strong {
  font-size: 30px;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--text);
}
.latest-card-body span,
.latest-card-body small,
.latest-card-date {
  color: var(--muted);
}
.latest-card-body span {
  font-size: 15px;
  line-height: 1.65;
}
.latest-card-body small {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
.latest-card-date {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.panel-head-inline input[type="search"] { max-width: 360px; }
.panel-head-inline {
  align-items: end;
}
.panel-head h2, .settings-panel h2 { margin: 8px 0 0; font-size: 24px; letter-spacing: -0.03em; }
.panel-head-actions { display: flex; gap: 10px; align-items: center; }

.collapsible-panel.is-collapsed .entry-form { display: none; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.entry-form { display: grid; gap: 14px; }
.form-group { display: grid; gap: 8px; }
.form-group label { font-weight: 700; }
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.card-list { display: grid; gap: 18px; }
.empty-state {
  padding: 34px 18px;
  text-align: center;
  border-radius: 20px;
  background: var(--soft);
  color: var(--muted);
}

.record-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border-radius: 28px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}
.record-thumb-wrap {
  min-height: 240px;
  border-radius: 24px;
  background: var(--soft);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.record-thumb-scroller {
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
  scrollbar-width: none;
  user-select: none;
}
.record-thumb-scroller::-webkit-scrollbar { display: none; }
.record-thumb-slide {
  min-width: 100%;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
}
.record-thumb-slide:not(:first-child) {
  display: none;
}
.record-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.record-thumb-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: none;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.34);
}
.record-thumb-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
}
.record-thumb-dot.active {
  background: #ffffff;
}
.record-body { display: grid; gap: 14px; align-content: start; }
.record-title-row { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; }
.record-title { margin: 0; font-size: 28px; letter-spacing: -0.035em; }
.record-price { font-size: 22px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.record-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.record-meta span, .viewer-meta span, .summary-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
}
.record-detail { margin: 0; line-height: 1.75; font-size: 16px; }
.reserve-status {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--danger-soft);
  color: #991b1b;
  font-weight: 700;
}
.reserve-note {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}
.record-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.record-actions .reserve-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
  order: 98;
  background: #25d366;
  color: #ffffff;
}
.record-actions .reserve-btn::before {
  content: '';
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M20.52 3.48A11.8 11.8 0 0 0 12.09 0C5.58 0 .28 5.3.28 11.81c0 2.08.54 4.11 1.57 5.9L0 24l6.47-1.7a11.8 11.8 0 0 0 5.62 1.43h.01c6.51 0 11.81-5.3 11.81-11.81 0-3.15-1.22-6.11-3.39-8.44Zm-8.43 18.25h-.01a9.86 9.86 0 0 1-5.03-1.38l-.36-.21-3.84 1.01 1.03-3.74-.23-.38a9.83 9.83 0 0 1-1.5-5.22c0-5.42 4.41-9.84 9.84-9.84 2.63 0 5.1 1.02 6.95 2.88a9.79 9.79 0 0 1 2.88 6.96c0 5.42-4.41 9.84-9.83 9.84Z'/%3E%3Cpath fill='%23fff' d='M17.64 14.43c-.3-.15-1.77-.87-2.04-.97-.27-.1-.47-.15-.66.15-.19.3-.76.97-.92 1.16-.17.2-.33.22-.63.08-.3-.15-1.25-.46-2.39-1.47-.89-.79-1.5-1.77-1.67-2.07-.17-.3-.02-.46.13-.61.13-.13.3-.34.44-.5.15-.17.2-.3.3-.49.1-.2.05-.37-.02-.52-.08-.15-.67-1.62-.92-2.22-.24-.58-.49-.5-.67-.51h-.57c-.2 0-.52.08-.79.38-.27.3-1.03 1-1.03 2.43 0 1.44 1.05 2.82 1.2 3.02.15.2 2.06 3.15 4.99 4.42.7.3 1.25.48 1.68.62.71.22 1.36.19 1.88.11.57-.09 1.77-.72 2.02-1.43.25-.7.25-1.31.17-1.43-.08-.12-.27-.2-.57-.35Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.record-actions .mark-reserved-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
  order: 99;
  background: #fff4db;
  color: #8a5a00;
}
.record-actions .reserve-btn:disabled { background: var(--soft); color: var(--muted); cursor: default; }
.record-actions .reserve-btn:disabled::before { opacity: 0.55; }
.record-actions .like-btn.is-liked {
  background: #ffe6ee;
  color: #d11a5a;
}

.pagination-wrap { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.pagination-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
}
.pagination-nav-btn {
  min-width: 42px;
  padding: 0;
  font-size: 20px;
  font-weight: 800;
}
.pagination-btn.active { background: var(--primary); color: #fff; }
.pagination-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  color: var(--muted);
  font-weight: 700;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.preview-item {
  position: relative;
  padding: 8px;
  border-radius: 20px;
  background: var(--soft);
}
.preview-toolbar {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
}
.preview-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}
.preview-move,
.preview-remove {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}
.preview-move {
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
}
.preview-remove {
  background: var(--danger);
  color: #fff;
}

.viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.viewer-modal.hidden { display: none; }
.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
}
.viewer-card {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 16px;
}
.viewer-close, .viewer-nav {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
}
.viewer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--soft);
  color: var(--text);
  font-size: 30px;
}
.viewer-gallery-wrap {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
}
.viewer-gallery-frame {
  overflow: hidden;
  border-radius: 22px;
  background: var(--soft);
}
.viewer-track {
  display: flex;
  transition: transform 0.28s ease;
}
.viewer-slide {
  min-width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.viewer-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.viewer-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.viewer-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: #cbd5e1;
}
.viewer-dot.active { background: var(--primary); }
.viewer-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.viewer-head h2 { margin: 0 0 6px; font-size: 32px; }
.viewer-head p { margin: 0; color: var(--muted); }
.viewer-price { font-size: 24px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.viewer-detail {
  padding: 16px;
  border-radius: 18px;
  background: var(--soft);
  line-height: 1.7;
  white-space: pre-wrap;
}

.contact-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, #2f6bff 0%, #1f56e8 52%, #123fc2 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 18px 42px rgba(18, 63, 194, 0.34),
    0 6px 18px rgba(47, 107, 255, 0.22);
  backdrop-filter: blur(10px);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  animation: contactPulse 2.2s ease-in-out infinite;
}
.contact-fab-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.contact-fab-icon::before {
  content: '';
  width: 18px;
  height: 18px;
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16v12H4z'/%3E%3Cpath d='m4 8 8 6 8-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.contact-fab-text {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 15px;
  line-height: 1;
}
.contact-fab:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    0 24px 52px rgba(18, 63, 194, 0.4),
    0 10px 24px rgba(47, 107, 255, 0.26);
  filter: saturate(1.06);
}
.contact-fab:focus-visible {
  outline: 3px solid rgba(47, 107, 255, 0.22);
  outline-offset: 3px;
}
@keyframes contactPulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow:
      0 18px 42px rgba(18, 63, 194, 0.34),
      0 6px 18px rgba(47, 107, 255, 0.22);
  }
  50% {
    transform: translateY(-4px);
    box-shadow:
      0 24px 54px rgba(18, 63, 194, 0.42),
      0 10px 26px rgba(47, 107, 255, 0.28);
  }
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}
.contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(6px);
}
.contact-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  padding: 24px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
  display: grid;
  gap: 16px;
  overflow-y: auto;
}
.contact-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  font-size: 30px;
}

.inventory-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-top: 34px;
}
.summary-copy h2 { margin: 8px 0 6px; font-size: 28px; }
.summary-copy p { margin: 0; color: var(--muted); line-height: 1.6; max-width: 42ch; }
.summary-stats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.summary-pill strong { color: var(--primary); margin-right: 6px; }

.reserved-sidebar {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 18px;
}
.filter-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: var(--soft);
}
.reserved-head {
  margin-bottom: 0;
}
.reserved-copy {
  margin: -6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}
.reserved-list {
  display: grid;
  gap: 14px;
}
.reserved-more-btn {
  width: 100%;
  margin-top: 2px;
}
.reserved-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: var(--soft);
}
.reserved-thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.reserved-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reserved-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.reserved-body strong,
.reserved-body span,
.reserved-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reserved-body span,
.reserved-body small {
  color: var(--muted);
}
.reserved-note-line {
  color: var(--primary) !important;
  font-weight: 700;
}
.reserved-empty {
  padding: 18px 14px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.admin-inventory-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}
.admin-type-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-type-tab {
  background: var(--soft);
  color: var(--text);
}
.admin-type-tab.active {
  background: var(--primary);
  color: #fff;
}
.settings-copy { margin: 0 0 18px; color: var(--muted); line-height: 1.7; }
.filter-checks {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}
.filter-check input {
  width: 18px;
  height: 18px;
}
.settings-list, .user-list { display: grid; gap: 12px; }
.settings-row, .user-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: var(--soft);
}
.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}
.toggle-field input { width: auto; }
.settings-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.data-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.data-actions button {
  width: 100%;
  min-height: 52px;
  justify-content: center;
}
.user-list-wrap h3 { margin: 18px 0 12px; }
.user-row { grid-template-columns: minmax(0, 1fr) auto; }
.user-row span { display: block; margin-top: 4px; color: var(--muted); }
.message-inbox-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.message-list {
  display: grid;
  gap: 14px;
}
.message-empty {
  padding: 18px;
  border-radius: 18px;
  background: var(--soft);
  color: var(--muted);
}
.message-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.message-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.message-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.message-card-head strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}
.message-card-head span {
  color: var(--muted);
}
.message-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e8f0ff;
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}
.message-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  color: var(--muted);
}
.message-card-grid b {
  color: var(--text);
}
.message-mail-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.message-mail-link:hover {
  text-decoration: underline;
}
.message-delete-btn {
  background: #fff1f2;
  color: #be123c;
}
.message-body {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--soft);
  line-height: 1.7;
  white-space: normal;
}
.compact-form .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .site-header,
  .page-layout,
  .section-bar,
  .settings-grid,
  .inventory-summary,
  .record-card,
  .form-grid,
  .compact-form .form-grid {
    grid-template-columns: 1fr;
  }
  .settings-chip { margin-left: 0; }
  .status-row { justify-content: flex-start; }
  .header-stack,
  .header-stack:has(.inline-auth-compact) {
    display: grid;
    justify-self: stretch;
    justify-items: start;
    width: 100%;
  }
  .status-row:has(.inline-auth-compact) {
    flex-wrap: wrap;
  }
  .record-thumb-wrap { min-height: 280px; }
  .record-thumb-scroller {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    cursor: grab;
    touch-action: pan-y;
  }
  .record-thumb-scroller.is-dragging { cursor: grabbing; }
  .record-thumb-slide:not(:first-child) {
    display: flex;
  }
  .record-thumb-dots {
    display: flex;
  }
  .message-card-grid { grid-template-columns: 1fr; }
  .message-card-head { flex-direction: column; }
  .panel-head-inline input[type="search"] { max-width: none; }
  .reserved-sidebar { position: static; }
  .latest-head {
    align-items: start;
  }
  .latest-hero {
    grid-template-columns: 1fr;
  }
  .latest-nav {
    justify-content: flex-start;
  }
  .site-brand h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .app-shell { width: min(100% - 18px, 1320px); margin: 10px auto 28px; }
  .site-header, .panel, .viewer-card { padding: 18px; border-radius: 22px; }
  .site-brand h1 { font-size: 30px; }
  .inline-auth { grid-template-columns: 1fr; }
  .toolbar-row, .record-actions, .form-actions, .settings-actions { flex-direction: column; }
  .section-bar { grid-template-columns: 1fr; }
  .section-actions { flex-direction: column; align-items: stretch; }
  .section-refresh-btn, .section-settings-btn { width: 100%; }
  .campus-switcher .control-row { grid-template-columns: 1fr; }
  .control-row select, .control-row button, .toolbar-row button, .record-actions button, .form-actions button, .settings-actions button { width: 100%; }
  .record-thumb-wrap { min-height: 320px; }
  .record-thumb { object-fit: contain; background: var(--soft); }
  .viewer-gallery-wrap { grid-template-columns: 1fr; }
  .viewer-nav { width: 100%; height: 42px; }
  .settings-row, .user-row { grid-template-columns: 1fr; }
  .latest-slider { grid-auto-columns: minmax(280px, 92vw); gap: 14px; }
  .latest-strip { padding: 20px; }
  .latest-head h2 { font-size: 30px; }
  .latest-card {
    grid-template-columns: 1fr;
  }
  .latest-card-thumb {
    min-height: 220px;
  }
  .latest-card-body {
    padding: 18px 18px 20px;
    border-left: 0;
    border-top: 1px solid rgba(16, 35, 59, 0.06);
  }
  .contact-modal {
    align-items: start;
    padding: 12px;
  }
  .contact-fab {
    right: 14px;
    bottom: 14px;
    padding: 10px;
  }
  .contact-fab-icon {
    width: 40px;
    height: 40px;
  }
  .contact-fab-text {
    display: none;
  }
  .contact-card {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 18px;
    border-radius: 22px;
  }
  .reserved-list {
    gap: 10px;
  }
  .reserved-card:nth-child(n+4) {
    display: none;
  }
  .reserved-list.has-expanded .reserved-card:nth-child(n+4) {
    display: grid;
  }
}
