/* Wearable Robotics Lab equipment reservation (Phase 07.5, second design round).
   Layout: logo header, left sidebar, content, right panel on calendar pages; resource timelines
   with time on the horizontal axis. Colors come from the lab logo (navy, dark red).
   Every color is a token below; tests/web/contrast.test.ts checks text contrast. */

@font-face {
  font-family: 'Pretendard Variable';
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url('fonts/PretendardVariable.woff2') format('woff2-variations');
}

:root {
  color-scheme: light;
  --page: #f4f5f7;
  --surface: #ffffff;
  --surface-muted: #f8f9fb;
  --sidebar: #f7f8fa;
  --hover: #eef1f5;
  --fg: #1d2433;
  --fg-soft: #344054;
  --muted: #5d6779;
  --line: #e4e7ec;
  --line-faint: #f0f2f5;
  --line-strong: #cfd4dc;
  --brand: #183b8c;
  --brand-hover: #12306f;
  --brand-soft: #eaf0fb;
  --brand-text: #183b8c;
  --on-brand: #ffffff;
  --danger: #c0262d;
  --danger-hover: #a01f25;
  --danger-soft: #fdecec;
  --danger-text: #a01f25;
  --on-danger: #ffffff;
  --ok-soft: #e6f4ec;
  --ok-text: #18693a;
  --warn-soft: #fdf3e1;
  --warn-text: #81520c;
  --neutral-soft: #eef0f3;
  --ev-mine-bg: #e3ebfb;
  --ev-mine-line: #3f68cf;
  --ev-mine-text: #163a8c;
  --ev-other-bg: #f1f3f6;
  --ev-other-line: #c4cad4;
  --ev-other-text: #344054;
  --ev-pending-bg: #fdedf2;
  --ev-pending-line: #e0648a;
  --ev-pending-text: #9b1c46;
  --ev-maint-bg: #eceef1;
  --ev-maint-stripe: #e3e6ea;
  --ev-maint-line: #98a2b3;
  --ev-maint-text: #475467;
  --now: #e5484d;
  --sun: #c22f2f;
  --sat: #2153c4;
  --past: rgb(16 24 40 / 3.5%);
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 5%);
  --shadow-md: 0 1px 3px rgb(16 24 40 / 6%), 0 6px 16px rgb(16 24 40 / 7%);
  --focus: 0 0 0 3px rgb(24 59 140 / 22%);
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;
  --topbar-h: 72px;
  --sidebar-w: 212px;
  --tabbar-h: 64px;
  --font:
    'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo',
    'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

/* ---- base ---- */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--fg);
  background: var(--page);
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-text);
  text-underline-offset: 2px;
}

/* Elements with their own display value still disappear when hidden. */
[hidden] {
  display: none !important;
}

h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h4 {
  margin: 20px 0 8px;
  font-size: 14px;
  font-weight: 700;
}

p {
  margin: 6px 0;
}

.muted {
  color: var(--muted);
}

.hint {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12.5px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: var(--r);
  background: var(--brand);
  color: var(--on-brand);
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* ---- top bar ---- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--topbar-h);
  padding: 0 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  color: var(--fg);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 46px;
}

.env-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn-text);
  font-size: 12px;
  font-weight: 700;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Name and robot picture at the top right; opens the account card. */
.account {
  position: relative;
}

.account-button {
  gap: 10px;
  min-height: 44px;
  padding: 4px 12px 4px 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
}

.account-button:hover,
.account-button[aria-expanded='true'] {
  border: 0;
  background: var(--hover);
}

.avatar-robot {
  display: block;
  flex: none;
  border-radius: 50%;
}

/* Unfolds downward from its top edge, like a sticky note peeled open. */
.account-card {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  width: 380px;
  max-width: calc(100vw - 24px);
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow:
    0 18px 40px rgb(16 24 40 / 16%),
    0 2px 6px rgb(16 24 40 / 8%);
  transform-origin: top center;
  animation: account-unfold 0.26s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.account-card:focus {
  outline: none;
}

@keyframes account-unfold {
  from {
    opacity: 0;
    transform: perspective(700px) rotateX(-70deg) translateY(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-card {
    animation: none;
  }
}

.account-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.account-head b {
  font-size: 17px;
}

.account-card .kv {
  margin: 0;
}

.who {
  font-size: 14px;
  font-weight: 600;
}

.app-banner {
  margin: 0;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--warn-soft);
  color: var(--warn-text);
  font-weight: 600;
}

/* ---- shell and sidebar ---- */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-h));
}

.sidebar {
  position: sticky;
  top: var(--topbar-h);
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: calc(100vh - var(--topbar-h));
  padding: 20px 12px;
  overflow-y: auto;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}

.shell:has(.sidebar:empty) {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar:empty {
  display: none;
}

.nav-rule {
  margin: 12px 8px;
  border: 0;
  border-top: 1px solid var(--line);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r);
  color: var(--fg-soft);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
}

.nav-item svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.nav-item:hover {
  background: var(--hover);
  color: var(--fg);
}

.nav-item[aria-current='page'] {
  background: var(--brand-soft);
  color: var(--brand-text);
  font-weight: 700;
}

.nav-item[aria-current='page'] svg {
  color: var(--brand-text);
}

.nav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  margin: 0 4px 16px;
  border-radius: var(--r);
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.nav-cta:hover {
  background: var(--brand-hover);
}

.nav-cta svg {
  width: 18px;
  height: 18px;
}

.nav-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

main {
  min-width: 0;
  padding: 28px 32px 56px;
}

main:focus {
  outline: none;
}

.tab-bar {
  display: none;
}

/* ---- controls ---- */

button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--brand);
  border-radius: var(--r);
  background: var(--brand);
  color: var(--on-brand);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

button:hover,
a.button:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

a.button {
  text-decoration: none;
}

button.secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--fg-soft);
}

button.secondary:hover {
  background: var(--surface-muted);
  color: var(--fg);
}

button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

button.ghost:hover {
  background: var(--hover);
  color: var(--fg);
}

button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--on-danger);
}

button.danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
}

button.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

button.icon-only {
  min-width: 40px;
  padding: 0;
}

button.small.icon-only {
  min-width: 34px;
}

button svg {
  width: 18px;
  height: 18px;
}

button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.btn-pair {
  display: inline-flex;
}

.btn-pair button:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.btn-pair button:last-child {
  margin-left: -1px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.seg {
  display: inline-flex;
}

.seg button {
  min-width: 72px;
  border-color: var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  color: var(--fg-soft);
}

.seg button:hover {
  background: var(--surface-muted);
}

.seg button + button {
  margin-left: -1px;
}

.seg button:first-child {
  border-radius: var(--r) 0 0 var(--r);
}

.seg button:last-child {
  border-radius: 0 var(--r) var(--r) 0;
}

.seg button[aria-pressed='true'] {
  position: relative;
  z-index: 1;
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-text);
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--fg);
  font: inherit;
}

/* Own arrow with room to its right, so it never touches the rounded edge however narrow the box. */
select {
  padding-right: 34px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9.5l6 6 6-6' fill='none' stroke='%235d6779' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-repeat: no-repeat;
  background-size: 16px;
  text-overflow: ellipsis;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #b3bac6;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--brand);
}

input[type='checkbox'] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
}

.field label {
  color: var(--fg-soft);
  font-size: 13px;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0 12px;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

.actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.status {
  margin: 12px 0;
  color: var(--muted);
  font-size: 13.5px;
}

.status:empty {
  display: none;
}

.status[data-tone] {
  padding: 10px 14px;
  border-radius: var(--r);
  font-weight: 600;
}

.status[data-tone='ok'] {
  background: var(--ok-soft);
  color: var(--ok-text);
}

.status[data-tone='warn'] {
  background: var(--warn-soft);
  color: var(--warn-text);
}

.status[data-tone='error'] {
  background: var(--danger-soft);
  color: var(--danger-text);
}

/* ---- surfaces ---- */

.panel,
.card {
  margin: 16px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel h3,
.card h3 {
  margin-top: 0;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 0 0 20px;
}

.page-head .title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.page-head p {
  margin: 6px 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--neutral-soft);
  color: var(--fg-soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}

.badge[data-tone='ok'] {
  background: var(--ok-soft);
  color: var(--ok-text);
}

.badge[data-tone='warn'] {
  background: var(--warn-soft);
  color: var(--warn-text);
}

.badge[data-tone='accent'] {
  background: var(--brand-soft);
  color: var(--brand-text);
}

.badge[data-tone='danger'] {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.kv {
  display: grid;
  grid-template-columns: minmax(6rem, max-content) 1fr;
  gap: 8px 20px;
  margin: 8px 0;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
}

.kv dd[data-tone='ok'] {
  color: var(--ok-text);
  font-weight: 600;
}

.kv dd[data-tone='warn'] {
  color: var(--warn-text);
  font-weight: 600;
}

.kv dd[data-tone='error'] {
  color: var(--danger-text);
  font-weight: 600;
}

/* ---- tables ---- */

.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th {
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

tbody tr:hover td {
  background: #fafbfc;
}

tr:last-child td {
  border-bottom: 0;
}

table.users td:nth-child(-n + 8),
table.equipment td:nth-child(-n + 4),
table.access td:nth-child(3),
table.access td:nth-child(5) {
  white-space: nowrap;
}

table.users .row-actions {
  flex-wrap: nowrap;
}

td[data-status='SUSPENDED'],
td[data-status='INACTIVE'],
td[data-status='UNAVAILABLE'] {
  color: var(--warn-text);
  font-weight: 600;
}

tr[data-effective='false'] td {
  color: var(--muted);
}

/* "Invite many" preview (Q-26): rows the server refused stand out. */
table.invite-preview td:nth-child(-n + 7) {
  white-space: nowrap;
}

table.invite-preview tr[data-problem='yes'] td {
  background: var(--warn-soft);
}

table.invite-preview .problem {
  color: var(--warn-text);
  font-weight: 600;
}

.table-card {
  padding: 0;
  overflow: hidden;
}

.table-card .card-head {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.table-card .table-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Narrow screens scroll the table sideways instead of squeezing names letter by letter. */
.table-card table {
  min-width: 680px;
}

.table-card table.users {
  min-width: 1180px;
}

/* The Settings list has four short columns next to the opened equipment. */
.table-card table.equipment {
  min-width: 0;
}

.cell-main {
  white-space: nowrap;
}

.cell-main b {
  display: block;
  font-weight: 600;
}

.cell-main small {
  color: var(--muted);
  font-size: 12px;
}

tr[data-selected='true'] td {
  background: var(--brand-soft);
}

.diag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  align-items: start;
}

.diag-grid .card {
  margin: 0;
}

/* ---- loading ---- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Centred in the content area (right of the sidebar), above everything but not blocking clicks. */
.busy {
  position: fixed;
  top: 50%;
  left: calc(var(--sidebar-w) + (100vw - var(--sidebar-w)) / 2);
  z-index: 60;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--shadow-md);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.spinner {
  position: relative;
  width: 40px;
  height: 40px;
  animation: spin 0.8s steps(8) infinite;
}

.spinner i {
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--brand);
  transform-origin: 4px 20px;
}

.spinner i:nth-child(1) {
  transform: rotate(0deg);
}

.spinner i:nth-child(2) {
  transform: rotate(45deg);
  opacity: 0.2;
}

.spinner i:nth-child(3) {
  transform: rotate(90deg);
  opacity: 0.27;
}

.spinner i:nth-child(4) {
  transform: rotate(135deg);
  opacity: 0.36;
}

.spinner i:nth-child(5) {
  transform: rotate(180deg);
  opacity: 0.46;
}

.spinner i:nth-child(6) {
  transform: rotate(225deg);
  opacity: 0.58;
}

.spinner i:nth-child(7) {
  transform: rotate(270deg);
  opacity: 0.72;
}

.spinner i:nth-child(8) {
  transform: rotate(315deg);
  opacity: 0.86;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2.4s;
  }
}

/* ---- result pop-up (Q-19) ---- */

.result-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(16 24 40 / 28%);
  animation: result-fade 0.15s ease-out;
}

.result-card {
  width: min(400px, 100%);
  padding: 28px 26px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow:
    0 24px 60px rgb(16 24 40 / 22%),
    0 2px 8px rgb(16 24 40 / 10%);
  text-align: center;
  animation: result-pop 0.22s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.result-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
}

.result-icon svg {
  width: 28px;
  height: 28px;
}

.result-card[data-tone='ok'] .result-icon {
  background: var(--ok-soft);
  color: var(--ok-text);
}

.result-card[data-tone='warn'] .result-icon {
  background: var(--warn-soft);
  color: var(--warn-text);
}

.result-card[data-tone='error'] .result-icon {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.result-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.result-card p,
.result-card ul {
  margin: 0 0 20px;
  color: var(--fg-soft);
}

.result-card ul {
  padding-left: 18px;
  text-align: left;
}

.result-card button {
  min-width: 128px;
}

@keyframes result-fade {
  from {
    opacity: 0;
  }
}

@keyframes result-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .result-overlay,
  .result-card {
    animation: none;
  }
}

/* ---- equipment page ---- */

.switcher {
  position: relative;
}

.switcher h2 {
  margin: 0;
}

.switcher-button {
  min-height: 44px;
  margin-left: -10px;
  padding: 2px 10px;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--fg);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.switcher-button:hover {
  border: 0;
  background: var(--hover);
}

.switcher-button svg {
  width: 22px;
  height: 22px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.switcher-button[aria-expanded='true'] {
  background: var(--hover);
}

.switcher-button[aria-expanded='true'] svg {
  transform: rotate(180deg);
}

.switcher-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: -10px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 340px;
  max-width: calc(100vw - 32px);
  max-height: min(520px, 70vh);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow:
    0 16px 40px rgb(16 24 40 / 16%),
    0 2px 6px rgb(16 24 40 / 8%);
  animation: menu-in 0.12s ease-out;
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.switcher-search {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin-bottom: 6px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  color: var(--muted);
}

.switcher-search:focus-within {
  border-color: var(--brand);
  box-shadow: var(--focus);
}

.switcher-search svg {
  flex: none;
  width: 17px;
  height: 17px;
}

.switcher-search input {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
}

.switcher-search input:focus {
  box-shadow: none;
}

.switcher-scroll {
  overflow-y: auto;
}

.switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.switcher-item:hover,
.switcher-item:focus-visible {
  outline: none;
  background: var(--hover);
}

.switcher-item[aria-current='page'] {
  background: var(--brand-soft);
  color: var(--brand-text);
  font-weight: 700;
}

.switcher-item .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switcher-item > svg {
  flex: none;
  width: 17px;
  height: 17px;
}

.switcher-group-name {
  padding: 10px 10px 4px;
  color: var(--brand-text);
  font-size: 12px;
  font-weight: 700;
}

.switcher-empty {
  margin: 0;
  padding: 12px 10px;
  color: var(--muted);
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid #c9d7f3;
  border-radius: var(--r);
  background: var(--brand-soft);
  color: var(--brand-text);
}

.notice svg {
  flex: none;
  width: 19px;
  height: 19px;
  margin-top: 1px;
}

.notice p {
  margin: 0;
  color: var(--fg);
  font-weight: 500;
  white-space: pre-line;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin: 0 0 20px;
}

.info-body {
  flex: 1;
  min-width: 0;
}

/* Square photo from assets/equipment/<CODE>.jpg; the box icon shows until one is added. */
.eq-photo {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 200px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface-muted);
  color: var(--line-strong);
}

.eq-photo svg {
  width: 56px;
  height: 56px;
}

.eq-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* My reservations: upcoming on the left, past and cancelled on the right. */
.res-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.res-columns .card {
  margin: 0;
}

/* The reservation opened from the calendar: a ring that fades away by itself. */
.res-list > li.res-focus {
  margin-inline: -12px;
  padding-inline: 12px;
  border-radius: var(--r);
  animation: res-focus 3s ease-out forwards;
}

@keyframes res-focus {
  0%,
  40% {
    background: var(--brand-soft);
    box-shadow:
      0 0 0 2px var(--brand),
      0 0 0 6px rgb(24 59 140 / 16%);
  }

  100% {
    background: transparent;
    box-shadow:
      0 0 0 2px transparent,
      0 0 0 6px transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .res-list > li.res-focus {
    animation-duration: 4s;
    animation-timing-function: steps(1, end);
  }
}

.info-description {
  margin: 0 0 18px;
  white-space: pre-line;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px 32px;
}

.fact {
  display: flex;
  gap: 12px;
}

.fact-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-text);
}

.fact-icon svg {
  width: 18px;
  height: 18px;
}

.fact h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
}

.fact p {
  margin: 0;
  white-space: pre-line;
}

.fact ul {
  margin: 0;
  padding-left: 18px;
}

.fact li + li {
  margin-top: 2px;
}

.fact .manuals {
  padding: 0;
  list-style: none;
}

.manuals a {
  font-weight: 600;
}

/* ---- equipment list ---- */

.catalog-group {
  margin-bottom: 28px;
}

.catalog-group h3 {
  margin: 0 0 12px;
  color: var(--brand-text);
  font-size: 15px;
}

.eq-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.eq-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--fg);
  text-decoration: none;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.eq-card:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgb(24 59 140 / 12%);
}

.eq-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.eq-card-top b {
  font-size: 16px;
}

/* ---- manage equipment ---- */

.manual-rows {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.manual-rows:empty {
  display: none;
}

.manual-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto;
  gap: 8px;
  align-items: center;
}

/* ---- dashboard ---- */

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.card-head h3 {
  margin: 0;
}

.card-head a {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list > li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.list > li:first-child {
  border-top: 0;
}

.list .grow {
  flex: 1;
  min-width: 0;
}

.list .grow b {
  display: block;
  font-weight: 600;
}

.list .grow span {
  color: var(--muted);
  font-size: 12.5px;
}

.list .go {
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.list .empty {
  color: var(--muted);
}

.date-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 52px;
  border-radius: var(--r);
  background: var(--brand-soft);
  color: var(--brand-text);
  line-height: 1.1;
  text-align: center;
}

.date-tile small {
  font-size: 11.5px;
  font-weight: 600;
}

.date-tile b {
  font-size: 18px;
}

/* ---- calendar pages ---- */

.cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 20px;
  align-items: start;
}

.cal-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cal-aside .panel {
  margin: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}

.page-head .toolbar {
  margin: 0;
}

.cal-main {
  min-width: 0;
}

.cal-nav {
  margin-bottom: 16px;
}

.cal-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.cal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.cal-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cal-title h2 {
  margin: 0 6px 0 0;
  font-size: 22px;
}

.cal-title .range {
  margin-right: 8px;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---- booking form ---- */

.booking .fixed-name {
  margin: 0 0 12px;
  font-weight: 700;
}

.booking .label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-soft);
  font-size: 13px;
  font-weight: 600;
}

.pick-count:not(:empty) {
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 12px;
  text-align: center;
}

.pick-list {
  display: grid;
  max-height: 232px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
}

.pick-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
}

.pick-list label:hover {
  background: var(--hover);
}

.pick-list label:has(input:checked) {
  background: var(--brand-soft);
  color: var(--brand-text);
  font-weight: 600;
}

.pick-list input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.range-fields .pair {
  grid-template-columns: minmax(0, 1.35fr) minmax(96px, 1fr);
}

.timeline {
  position: relative;
  /* clip, not hidden/auto: the page scrolls, so the hour header and scrollbar can stick to it. */
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* Corner + hour header stay at the top while the timeline scrolls down. */
.tl-top {
  position: sticky;
  top: var(--topbar-h);
  z-index: 5;
  display: grid;
  grid-template-columns: var(--label-w) minmax(0, 1fr);
  background: var(--surface);
}

.tl-body {
  display: grid;
  grid-template-columns: var(--label-w) minmax(0, 1fr);
}

.tl-hours-view {
  overflow: hidden;
}

/* The lanes scroll sideways without a scrollbar of their own; .tl-hbar is the visible one. */
.tl-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.tl-scroll::-webkit-scrollbar {
  display: none;
}

.tl-track {
  position: relative;
  width: var(--track-w);
}

.tl-hbar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  min-height: 12px;
  margin-left: var(--label-w);
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--surface);
}

.tl-hbar > div {
  width: var(--track-w);
  height: 1px;
}

.tl-corner,
.tl-label,
.tl-group {
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.tl-corner {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.tl-hours {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--hours), var(--hour-w));
  width: var(--track-w);
  height: 44px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tl-hours span {
  display: flex;
  align-items: center;
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--fg-soft);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tl-marker {
  position: absolute;
  bottom: -1px;
  width: 0;
  height: 0;
  margin-left: -6px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--now);
}

.tl-group {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.tl-group button {
  min-height: 30px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--brand-text);
  font-size: 13px;
  font-weight: 700;
}

.tl-group button:hover {
  background: var(--hover);
}

.tl-group button svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s;
}

.tl-group button[aria-expanded='false'] svg {
  transform: rotate(-90deg);
}

.tl-group-fill {
  height: 38px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.tl-label {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--row-h);
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.tl-label a,
.tl-label b {
  overflow: hidden;
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tl-label a:hover {
  color: var(--brand-text);
  text-decoration: underline;
}

.tl-label[data-locked='true'] a,
.tl-label[data-locked='true'] b {
  color: var(--muted);
}

.tl-lock {
  display: inline-flex;
  flex: none;
  color: var(--muted);
}

.tl-lock svg {
  width: 14px;
  height: 14px;
}

.tl-label[data-today='true'] b {
  color: var(--brand-text);
}

.tl-label[data-weekday='0'] b {
  color: var(--sun);
}

.tl-label[data-weekday='6'] b {
  color: var(--sat);
}

.tl-lane {
  position: relative;
  height: var(--row-h);
  border-bottom: 1px solid var(--line);
  background-image:
    repeating-linear-gradient(
      to right,
      var(--line) 0,
      var(--line) 1px,
      transparent 1px,
      transparent var(--hour-w)
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(var(--hour-w) / 2),
      var(--line-faint) calc(var(--hour-w) / 2),
      var(--line-faint) calc(var(--hour-w) / 2 + 1px),
      transparent calc(var(--hour-w) / 2 + 1px),
      transparent var(--hour-w)
    );
}

.tl-lane[data-reservable='true'] {
  cursor: copy;
}

.tl-lane[data-reservable='false'] {
  background-color: var(--surface-muted);
}

.tl-past {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background: var(--past);
  pointer-events: none;
}

.tl-now {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 2px;
  margin-left: -1px;
  background: var(--now);
  pointer-events: none;
}

.tl-empty {
  grid-column: 1 / -1;
  padding: 24px;
  color: var(--muted);
}

.ev {
  position: absolute;
  top: 6px;
  bottom: 6px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 3px 8px;
  border: 1px solid var(--ev-other-line);
  border-radius: 4px;
  background: var(--ev-other-bg);
  color: var(--ev-other-text);
  font-size: 12px;
  line-height: 1.3;
  cursor: default;
}

.ev .ev-title {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ev .ev-title svg {
  flex: none;
  width: 13px;
  height: 13px;
}

.ev[data-narrow='true'] {
  padding: 3px 5px;
}

.ev[data-narrow='true'] .ev-title svg {
  display: none;
}

/* Card that follows the pointer over a reservation block. */
.ev-hover {
  position: fixed;
  z-index: 70;
  max-width: 300px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow:
    0 12px 28px rgb(16 24 40 / 14%),
    0 2px 6px rgb(16 24 40 / 8%);
  color: var(--fg);
  font-size: 13px;
  pointer-events: none;
}

.ev-hover b {
  font-size: 14px;
}

.ev-hover dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 8px 0 0;
}

.ev-hover dt {
  color: var(--muted);
}

.ev-hover dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ev[data-variant='mine'] {
  border-color: var(--ev-mine-line);
  background: var(--ev-mine-bg);
  color: var(--ev-mine-text);
}

.ev[data-variant='pending'] {
  border-color: var(--ev-pending-line);
  border-style: dashed;
  background: var(--ev-pending-bg);
  color: var(--ev-pending-text);
}

.ev[data-variant='maint'] {
  border-color: var(--ev-maint-line);
  background: repeating-linear-gradient(
    135deg,
    var(--ev-maint-bg) 0,
    var(--ev-maint-bg) 6px,
    var(--ev-maint-stripe) 6px,
    var(--ev-maint-stripe) 12px
  );
  color: var(--ev-maint-text);
}

.ev[role='button'] {
  cursor: pointer;
}

.ev[role='button']:hover {
  box-shadow: var(--shadow-md);
}

/* mini month calendar */

.mini-cal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mini-cal header b {
  color: var(--brand-text);
  font-size: 15px;
}

.mini-cal .days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  text-align: center;
}

.mini-cal .dow {
  padding: 4px 0;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.mini-cal .day {
  min-height: 32px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-soft);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.mini-cal .day:hover {
  background: var(--hover);
}

.mini-cal .day[data-outside='true'] {
  color: var(--muted);
  opacity: 0.6;
}

.mini-cal .day[data-in-range='true'] {
  border-radius: 0;
  background: var(--brand-soft);
}

.mini-cal .day[data-today='true'] {
  color: var(--brand-text);
  font-weight: 800;
}

.mini-cal .day[aria-pressed='true'] {
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
}

/* legend with filters */

.legend-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend-bar li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  color: var(--fg-soft);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.swatch {
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid;
  border-radius: 4px;
}

.swatch[data-variant='mine'] {
  border-color: var(--ev-mine-line);
  background-color: var(--ev-mine-bg);
}

.swatch[data-variant='other'] {
  border-color: var(--ev-other-line);
  background-color: var(--ev-other-bg);
}

.swatch[data-variant='pending'] {
  border-color: var(--ev-pending-line);
  border-style: dashed;
  background-color: var(--ev-pending-bg);
}

.swatch[data-variant='maint'] {
  border-color: var(--ev-maint-line);
  background-color: var(--ev-maint-bg);
}

/* ---- users: edit form under the user's row ---- */

table.users tr.edit-row > td,
table.users tbody tr.edit-row:hover > td {
  padding: 16px 20px 20px;
  background: var(--surface-muted);
  white-space: normal;
}

.row-editor {
  display: grid;
  gap: 14px;
  max-width: 720px;
}

.row-editor h4 {
  margin: 0;
}

/* ---- settings: equipment list left, opened equipment right ---- */

.manage-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: start;
}

.manage-split > * {
  margin-top: 0;
}

@media (max-width: 1200px) {
  .manage-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- maintenance (equipment page, managers) ---- */

.maint-card {
  margin-top: 24px;
}

.maint-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 28px;
  align-items: start;
}

.maint-list .grow {
  display: grid;
  gap: 3px;
}

.maint-list .grow > span {
  color: var(--fg-soft);
  font-size: 13.5px;
}

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

.maint-form h4 {
  margin: 0;
}

@media (max-width: 900px) {
  .maint-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- my reservations ---- */

.res-list > li {
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 16px 0;
}

.res-list .grow {
  display: grid;
  gap: 3px;
}

.res-title {
  color: var(--fg);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.res-title a {
  color: inherit;
  text-decoration: none;
}

.res-title a:hover {
  color: var(--brand-text);
  text-decoration: underline;
}

.res-list .grow > span {
  color: var(--fg-soft);
  font-size: 13.5px;
}

.res-list .grow > .res-note {
  color: var(--warn-text);
}

/* Older reservations from the archive continue the Past list (Q-08). */
.res-list.older > li:first-child {
  border-top: 1px solid var(--line);
}

.res-more {
  display: flex;
  justify-content: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.res-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.res-side .row-actions {
  display: flex;
  gap: 6px;
  margin: 0;
}

.res-slot {
  flex: 1 0 100%;
}

.res-slot:empty {
  display: none;
}

.res-slot .panel {
  margin: 4px 0 0;
  background: var(--surface-muted);
  box-shadow: none;
}

.res-list.history > li {
  padding: 12px 0;
}

.res-list.history .date-tile {
  background: var(--surface-muted);
  color: var(--fg-soft);
}

.res-list.history li[data-status='CANCELLED'] .res-title,
.res-list.history li[data-status='REJECTED'] .res-title {
  color: var(--muted);
}

.res-slot .range-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 16px;
}

/* ---- login ---- */

.auth {
  width: min(440px, 100%);
  margin: 40px auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.auth .auth-logo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 24px;
}

.auth button[type='submit'] {
  width: 100%;
  min-height: 44px;
}

.auth .actions button {
  flex: 1;
}

/* ---- responsive ---- */

@media (max-width: 1240px) {
  .cal-layout,
  .res-columns,
  .cal-aside {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: start;
  }
}

@media (max-width: 900px) {
  .busy {
    left: 50%;
  }

  /* Stay above the bottom tab bar. */
  .tl-hbar {
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  }

  :root {
    --topbar-h: 64px;
  }

  body {
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  }

  .topbar {
    gap: 12px;
    padding: 0 16px;
  }

  .brand {
    gap: 12px;
  }

  .brand-logo {
    height: 40px;
  }

  .who {
    display: none;
  }

  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    display: none;
  }

  main {
    padding: 20px 16px 32px;
  }

  h2 {
    font-size: 20px;
  }

  .tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding: 6px 6px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  .tab-bar:empty {
    display: none;
  }

  .tab-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: var(--r);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
  }

  .tab-bar a svg {
    width: 22px;
    height: 22px;
  }

  .tab-bar a[aria-current='page'] {
    color: var(--brand-text);
  }

  .page-head .toolbar {
    width: 100%;
  }

  .kv {
    grid-template-columns: 1fr;
  }

  .auth {
    margin: 8px auto;
    padding: 22px;
  }
}

@media (max-width: 560px) {
  .cal-title {
    gap: 8px;
  }

  .cal-title h2 {
    margin-right: 2px;
    font-size: 18px;
  }

  .cal-title button {
    padding: 0 12px;
  }

  .info-card {
    flex-direction: column;
  }

  .eq-photo {
    width: 100%;
    max-width: 280px;
  }

  /* Badges and buttons move under the text so the reservation details keep the full width. */
  .res-side {
    flex: 1 0 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-left: 62px;
  }

  .res-list.history .res-side {
    padding-top: 0;
  }
}
