:root {
  color-scheme: light;
  --bg: #ecebea;
  --surface: #ffffff;
  --text: #171717;
  --muted: #696969;
  --border: #d7d5d2;
  --primary: #eb7305;
  --primary-dark: #c96000;
  --brand-red: #9d1630;
  --ink: #050505;
  --ink-soft: #202020;
  --orange-pale: #fff0df;
  --success: #147d4f;
  --danger: #b42318;
  --warning: #9a6700;
  --vip: #fff0d7;
  --normal: #f7f7f6;
  font-family: "Montserrat", "Arial Narrow", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { font-family: "Montserrat", "Arial Narrow", Arial, sans-serif; }
body {
  position: relative;
  margin: 0;
  background-color: #a96436;
  background-image: var(--custom-background-image), repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 58px), linear-gradient(115deg, #d28b4b, #8d4c2c 48%, #bd703d);
  background-size: var(--custom-background-size), auto, auto;
  background-position: var(--custom-background-position), 0 0, 0 0;
  background-repeat: var(--custom-background-repeat), repeat, repeat;
  background-attachment: var(--custom-background-attachment), fixed, fixed;
  color: var(--text);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .28;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(93, 45, 20, .5) calc(50% - 1px), rgba(93, 45, 20, .5) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 0 105px, rgba(93, 45, 20, .42) 106px 108px, transparent 109px),
    radial-gradient(ellipse at 8% 50%, transparent 0 170px, rgba(93, 45, 20, .38) 171px 173px, transparent 174px),
    radial-gradient(ellipse at 92% 50%, transparent 0 170px, rgba(93, 45, 20, .38) 171px 173px, transparent 174px),
    linear-gradient(90deg, transparent 14%, rgba(93, 45, 20, .35) 14% 14.2%, transparent 14.2% 85.8%, rgba(93, 45, 20, .35) 85.8% 86%, transparent 86%);
}
body.has-custom-background {
  background-image: var(--custom-background-image);
  background-size: var(--custom-background-size);
  background-position: var(--custom-background-position);
  background-repeat: var(--custom-background-repeat);
  background-attachment: var(--custom-background-attachment);
}
body.has-custom-background::before { display: none; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, .button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: max(.8rem, env(safe-area-inset-top)) max(1rem, calc((100vw - 1180px) / 2), env(safe-area-inset-right)) .8rem max(1rem, calc((100vw - 1180px) / 2), env(safe-area-inset-left));
  border-bottom: 4px solid var(--primary);
  background: var(--ink);
  color: white;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; color: white; font-weight: 800; letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 2.9rem; height: 2.9rem; object-fit: contain; }
.brand-copy { display: grid; line-height: .83; }
.brand-copy strong { font-size: 1.3rem; letter-spacing: .08em; }
.brand-copy small { margin-top: .25rem; color: var(--primary); font-size: .55rem; letter-spacing: .35em; }
.brand-service { margin-left: .45rem; padding-left: .7rem; border-left: 1px solid #555; color: #c9c9c9; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }
.brand-service span + span::before { content: " "; }
.topbar nav { display: flex; align-items: center; gap: 1rem; }
.topbar nav a { color: #f2f2f2; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.topbar nav a[aria-current="page"] { color: var(--primary); }
.nav-label-short { display: none; }
.logout-button svg { display: none; width: 1.3rem; height: 1.3rem; fill: currentColor; }
.page { position: relative; z-index: 1; width: min(1180px, calc(100% - 2rem)); margin: 2.5rem auto 4rem; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; padding-left: .9rem; border-left: 6px solid var(--brand-red); }
.page-heading .eyebrow { color: white; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.05; font-family: "Montserrat", "Arial Narrow", Arial, sans-serif; font-weight: 900; text-transform: uppercase; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; margin-top: 1rem; }
.eyebrow { margin: 0 0 .3rem; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .14em; font-size: .68rem; font-weight: 900; }
.season-eyebrow { color: white; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

.panel, .game-card, .auth-card, .empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .07);
}
.panel { padding: 1.25rem; margin-bottom: 1.25rem; }
.panel-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.auth-card { width: min(420px, 100%); margin: 8vh auto; padding: 2rem; }
.empty-state { padding: 2rem; text-align: center; }
.bulk-panel { margin-bottom: 1.5rem; }
.panel-summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; list-style: none; cursor: pointer; }
.panel-summary::-webkit-details-marker { display: none; }
.panel-summary > :first-child { min-width: 0; }
.panel-summary-actions { display: inline-flex; align-items: center; gap: .8rem; flex: 0 0 auto; }
.panel-summary .game-chevron { flex: 0 0 auto; color: var(--ink); }
.bulk-panel details[open] > .panel-summary .game-chevron,
.my-reservations[open] > .panel-summary .game-chevron { transform: rotate(225deg); }
.stack { display: grid; gap: .9rem; }
.compact { gap: .65rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; align-items: end; }
label { display: grid; gap: .3rem; color: var(--muted); font-size: .85rem; font-weight: 650; }
input, select {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .65rem .7rem;
  background: white;
  color: var(--text);
}
input:focus, select:focus { outline: 3px solid rgba(239, 125, 0, .2); border-color: var(--primary); }
button, .button {
  border: 0;
  border-radius: 3px;
  padding: .62rem .78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  text-decoration: none;
}
button:hover, .button:hover { text-decoration: none; filter: brightness(.97); }
.primary { color: var(--ink); background: var(--primary); font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.primary:hover { background: var(--primary-dark); }
.secondary { color: var(--text); background: #e9e8e6; font-weight: 750; }
.danger-button { color: white; background: var(--danger); }
.link-button { padding: 0; color: #f2f2f2; background: transparent; }
.inline-form { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.flash { border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.flash.success { color: #075e3b; background: #e6f6ee; border-color: #a9dec4; }
.flash.error { color: #8d1d13; background: #fff0ee; border-color: #f4b9b2; }
.flash.info { color: #194a73; background: #e9f3fc; border-color: #b7d5ef; }
.stat { display: grid; text-align: right; }
.stat strong { font-size: 1.8rem; }
.stat span { color: var(--muted); font-size: .8rem; }

.game-list { display: grid; gap: 1.2rem; }
.game-card { overflow: hidden; border-top: 5px solid var(--ink); }
.game-card > summary { list-style: none; cursor: pointer; }
.game-card > summary::-webkit-details-marker { display: none; }
.game-card:not([open]) .game-header { border-bottom: 0; }
.game-chevron {
  width: .75rem;
  height: .75rem;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg);
  transition: transform .18s ease;
  color: white;
}
.game-card[open] .game-chevron { transform: rotate(225deg); }
.game-edit-desktop svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.game-edit-mobile, .game-admin-actions { display: none; }
.other-games { margin-top: 1.2rem; }
.other-games > summary { cursor: pointer; }
.other-games > .game-list { margin-top: 1rem; }
.my-reservation-list { display: grid; gap: .6rem; margin-top: 1rem; }
.my-reservation-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .6rem; border-top: 1px solid var(--border); }
.my-reservation-row.vip { border-left: 3px solid var(--primary); background: var(--vip); }
.my-reservation-link { display: grid; justify-items: start; min-width: 0; padding: .35rem 0; background: transparent; color: var(--text); text-align: left; }
.my-reservation-link span { color: var(--muted); font-size: .82rem; }
.my-reservation-qr { width: 2.75rem; height: 2.75rem; }
.muted-card { opacity: .72; }
.game-header { padding: 1.1rem 1.25rem; display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); background: linear-gradient(105deg, #fff 0 72%, var(--ink) 72%); }
.game-time { margin: 0; color: var(--muted); }
.game-state { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; text-align: right; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: .22rem .55rem; font-size: .72rem; font-weight: 750; white-space: nowrap; }
.success { color: #075e3b; background: #dff5e9; }
.danger { color: #8d1d13; background: #ffe3df; }
.warning { color: #795100; background: #fff1bd; }
.vip-badge { color: #633300; background: #ffbd69; }
.normal-badge { color: #3e5368; background: #e9eef3; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ticket-cell { display: flex; flex-direction: column; padding: 1rem; background: var(--normal); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ticket-cell.vip { background: var(--vip); border-top: 3px solid var(--primary); }
.ticket-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ticket-meta { min-height: 2.4em; margin: .45rem 0 .8rem; color: var(--muted); font-size: .8rem; }
.reserve-form { display: grid; flex: 1; gap: .45rem; }
.reserve-form > button { margin-top: auto; }
.reservation { display: grid; flex: 1; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; gap: .35rem .75rem; align-items: start; }
.reservation-summary { display: grid; gap: .25rem; min-width: 0; }
.reservation-summary-centered { align-self: center; padding-left: 1.5rem; }
.reservation-summary-enhanced { padding-left: 1.5rem; font-size: 1.55rem; line-height: 1.15; }
.reservation-summary-enhanced .small { font-size: 1.05rem; }
.reservation-name-large { font-size: 2.45rem; line-height: 1; }
.reservation-name { overflow-wrap: anywhere; }
.reservation-qr { display: flex; align-items: center; justify-content: center; }
.reservation-actions { grid-column: 1 / -1; grid-row: 3; display: grid; justify-items: center; gap: .55rem; margin-top: .25rem; }
.reservation-actions form { width: 100%; }
.reservation-cancel-button { width: 100%; }
.reserve-form > button,
.reservation-cancel-button { min-height: 2.65rem; }
.reserve-form > button,
.reservation-cancel-button { width: 100%; }
.qr-button { min-width: 132px; }
.qr-symbol, .qr-placeholder { display: inline-grid; place-items: center; font-size: 1.35rem; font-weight: 900; line-height: 1; }
.qr-placeholder-button { width: 3.7rem; height: 3.7rem; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: white; }
.qr-placeholder-button:hover { filter: brightness(.97); }
.qr-placeholder { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; opacity: .85; }
.check-row { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: .45rem; color: var(--text); font-weight: 500; }
.check-row input { width: auto; }
.bulk-games { display: grid; gap: .35rem; max-height: 260px; overflow: auto; padding: .7rem; border: 1px solid var(--border); border-radius: 8px; }
.bulk-selection-actions { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.bulk-selection-actions button:disabled { cursor: not-allowed; opacity: .55; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
th, td { padding: .75rem .5rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.card-table thead th { border-bottom: 0; padding-bottom: .55rem; }
.card-row td {
  background: #fff;
  border-top: 1px solid #c8d4df;
  border-bottom: 0;
  vertical-align: middle;
}
.vip-card-row td { background: #fff8df; }
.normal-card-row td { background: #f5f8fb; }
.archived-card-row td {
  background: #f1f3f5;
  color: #697581;
}
.archived-card-row strong { color: #4b5560; }
.archived-badge {
  color: #586572;
  background: #dfe5ea;
}
.card-row td:first-child { border-left: 1px solid #c8d4df; border-radius: 12px 0 0 0; padding-left: .9rem; }
.card-row td:last-child { border-right: 1px solid #c8d4df; border-radius: 0 12px 0 0; padding-right: .9rem; text-align: right; }
.card-row td:last-child .inline-form { justify-content: flex-end; }
.card-details-row td {
  background: #eef3f7;
  border-left: 1px solid #c8d4df;
  border-right: 1px solid #c8d4df;
  border-bottom: 1px solid #c8d4df;
  border-top: 1px dashed #c8d4df;
  border-radius: 0 0 12px 12px;
}
.archived-details-row td {
  background: #e6eaee;
}
.archived-details-row .card-edit-form,
.archived-details-row .qr-upload-form {
  background: rgba(255, 255, 255, .55);
}
.card-spacer td {
  height: 1.5rem;
  padding: 0;
  border: 0;
  background: var(--surface);
}
.card-row strong { font-size: .98rem; }
.card-edit-form,
.qr-upload-form { background: rgba(255, 255, 255, .72); padding: .65rem; border-radius: 8px; }
.card-edit-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .45rem;
  align-items: center;
  margin-bottom: .7rem;
}
.card-edit-form input,
.card-edit-form select,
.card-edit-form button { align-self: center; }
.card-filter-form { margin: .8rem 0 1rem; }
.card-filter-form label { display: inline; }
.qr-upload-form {
  flex: 1 1 700px;
  width: auto;
  align-items: center;
}
.qr-management-row { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.qr-delete-form { margin-top: 0; }
.qr-admin-preview { display: inline-flex; width: 3.7rem; height: 3.7rem; padding: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: white; }
.qr-admin-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.qr-upload-form .file-label {
  display: flex;
  align-items: center;
  gap: .55rem;
  white-space: nowrap;
}
.new-card-section {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: #fbfcfd;
}
.new-card-section h3 { margin-top: 0; }
.new-card-section .form-grid { margin-top: 1rem; }
.new-card-section .primary { white-space: nowrap; font-size: .78rem; letter-spacing: 0; }
.user-create-section {
  margin: .9rem 0 1.5rem;
  padding: 1.25rem;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: #fbfcfd;
}
.user-create-section h3,
.user-list-section h3 { margin-top: 0; }
.user-create-section .form-grid { margin-top: 1rem; }
.user-list-section {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.user-edit-form input { min-width: 145px; }
.user-edit-form select { width: 95px; min-width: 95px; }
.user-table { table-layout: fixed; }
.user-table th:nth-child(1) { width: 16%; }
.user-table th:nth-child(2) { width: 10%; }
.user-table th:nth-child(3) { width: 74%; }
.user-table td { vertical-align: middle; }
.user-actions-cell {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  white-space: nowrap;
}
.user-edit-form,
.user-password-form,
.user-status-form,
.user-delete-form {
  flex: 0 0 auto;
  align-items: center;
  max-width: 100%;
}
.user-edit-form { order: 1; }
.user-password-form { order: 2; }
.user-status-form { order: 3; }
.user-delete-form { order: 4; }
.user-password-form input { width: 145px; }
.icon-button {
  width: 2.35rem;
  height: 2.35rem;
  padding: .5rem;
}
.icon-button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}
.user-edit-form input:disabled,
.user-edit-form select:disabled {
  color: var(--text);
  background: #eef2f6;
  cursor: not-allowed;
}
.file-label input { max-width: 210px; }
.list { display: grid; gap: .6rem; }
.compact-list { margin-top: 1rem; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.conflict-row { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem; border: 1px solid #f1d681; border-radius: 10px; background: #fffaf0; }
.conflict-row > div:first-child { display: grid; gap: .25rem; }
.conflict-values { font-size: .82rem; }
.conflict-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.override-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-top: .9rem; }
.override-form { display: grid; gap: .45rem; padding: .8rem; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfd; }
.game-edit-button { margin-top: 0; }
.game-dialog { width: min(900px, calc(100% - 2rem)); max-height: min(90vh, 760px); padding: 1.25rem; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(16, 42, 67, .25); color: var(--text); }
.qr-dialog { width: min(480px, calc(100% - 2rem)); padding: 1.25rem; border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); color: var(--text); }
.qr-dialog .qr-display { margin: 0 auto 1rem; }
.qr-dialog [data-qr-description]:empty { display: none; }
.game-dialog::backdrop { background: rgba(16, 42, 67, .42); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.dialog-header h2 { margin-bottom: 0; }
.game-edit-form { margin-bottom: 0; }
.game-edit-form > .primary { grid-column: 1 / -1; justify-self: end; width: max-content; white-space: nowrap; font-size: .82rem; }
.game-dialog .override-grid { max-height: 42vh; overflow-y: auto; padding: .2rem; }

.refresh-notice {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: .8rem;
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: .6rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
  transform: translateX(-50%);
}

.qr-page { text-align: center; }
.back-link { display: inline-block; margin-bottom: 1rem; }
.qr-display { width: min(600px, 100%); margin: 1.5rem auto; padding: 1.25rem; background: white; border: 1px solid var(--border); border-radius: 16px; }
.qr-display img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.payload { display: block; max-width: 100%; overflow: auto; margin-top: .75rem; padding: .75rem; background: #eef2f6; text-align: left; }

@media (max-width: 720px) {
  body { background-attachment: scroll; }
  body.has-custom-background { background-image: none; }
  body.has-custom-background::before {
    display: block;
    opacity: 1;
    background-image: var(--custom-background-image);
    background-size: var(--custom-background-size);
    background-position: var(--custom-background-position);
    background-repeat: var(--custom-background-repeat);
  }
  .topbar { align-items: center; gap: .45rem; }
  .brand { gap: .4rem; min-width: 0; }
  .brand { min-height: 2.75rem; }
  .brand-logo { width: 2.5rem; height: 2.5rem; }
  .brand-copy { display: none; }
  .brand-service { display: grid; margin-left: .15rem; padding-left: 0; border-left: 0; color: #e9e9e9; font-size: .62rem; font-weight: 850; line-height: 1.05; letter-spacing: 0; }
  .brand-service span + span::before { content: none; }
  .topbar nav { gap: .25rem; margin-left: auto; }
  .topbar nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .3rem .35rem; font-size: .67rem; letter-spacing: 0; }
  .nav-label-long, .logout-label { display: none; }
  .nav-label-short { display: inline; }
  .logout-button { width: 2.75rem; height: 2.75rem; min-width: 2.75rem; padding: .45rem; }
  .logout-button svg { display: block; }
  .page { width: min(100% - 1.25rem, 1180px); margin-top: 1.25rem; margin-bottom: max(3rem, env(safe-area-inset-bottom)); }
  .page-heading, .game-header, .conflict-row, .panel-heading-row { align-items: flex-start; flex-direction: column; }
  .game-header { position: relative; padding: 1rem; background: white; }
  .game-state { position: absolute; top: 1rem; right: 1rem; justify-content: flex-start; text-align: left; }
  .game-state .badge { display: none; }
  .game-card > summary { min-height: 7.25rem; }
  .game-chevron { color: var(--ink); }
  .game-edit-desktop { display: none; }
  .game-admin-actions { display: flex; justify-content: stretch; padding: .75rem 1rem 1rem; background: var(--normal); }
  .game-edit-mobile { display: inline-flex; }
  .game-admin-actions .button { width: 100%; }
  .game-edit-form > .primary { justify-self: stretch; width: 100%; white-space: normal; }
  .card-grid { grid-template-columns: 1fr; }
  .ticket-cell { border-right: 0; }
  button, .button, input, select { min-height: 2.75rem; }
  .qr-upload-form { align-items: stretch; flex-direction: column; }
  .user-list-section .table-wrap { overflow: visible; }
  .user-table, .user-table tbody { display: block; width: 100%; }
  .user-table thead { display: none; }
  .user-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem .75rem;
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfd;
  }
  .user-table tr + tr { margin-top: .8rem; }
  .user-table td { min-width: 0; padding: 0; border: 0; }
  .user-table td:nth-child(1) { align-self: center; }
  .user-table td:nth-child(2) { align-self: center; justify-self: end; }
  .user-actions-cell {
    grid-column: 1 / -1;
    display: grid;
    gap: .65rem;
    width: 100%;
    padding-top: .75rem !important;
    border-top: 1px solid var(--border) !important;
    white-space: normal;
  }
  .user-edit-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem;
    width: 100%;
  }
  .user-edit-form input[name="name"] { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .user-edit-form select { width: 100%; min-width: 0; }
  .user-edit-button { min-width: 7rem; }
  .user-password-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem;
    width: 100%;
  }
  .user-password-form input { width: 100%; min-width: 0; }
  .user-status-form { display: block; width: 100%; }
  .user-status-form button { width: 100%; }
  .user-delete-form { justify-self: end; }
  .card-table, .card-table tbody { display: block; }
  .card-table thead { display: none; }
  .card-table .card-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; padding: .7rem; border: 1px solid #c8d4df; border-radius: 8px 8px 0 0; }
  .card-table .card-row td { display: flex; align-items: center; padding: .35rem; border: 0; background: transparent; }
  .card-table .card-row td:nth-child(4) { grid-column: 1 / -1; color: var(--muted); }
  .card-table .card-row td:nth-child(5) { grid-column: 1; }
  .card-table .card-row td:nth-child(6) { grid-column: 2; }
  .card-table .card-row td:nth-child(7) { grid-column: 3; }
  .card-table .card-details-row { display: block; }
  .card-table .card-details-row > td { display: block; border-radius: 0 0 8px 8px; }
  .card-table .card-spacer { display: block; height: 1rem; }
  .card-table .card-spacer td { display: none; }
  .card-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-edit-form button { grid-column: 1 / -1; }
  .new-card-section, .user-create-section { padding: 1rem; }
}
