:root {
  color-scheme: dark;
  --bg: #101812;
  --sidebar: #0c140f;
  --panel: #17221a;
  --input: #121b15;
  --border: #2d3b30;
  --text: #f2f0e7;
  --muted: #acb8ad;
  --subtle: #b9c6ba;
  --green: #c5e5a7;
  --green-dark: #192714;
  --gold: #eac080;
  --red: #ffb9a6;
  --serif: Georgia, "Times New Roman", serif;
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--text); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
.table-scroll:focus-visible, main:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
[tabindex="-1"]:focus { outline: none; }
.skip {
  position: fixed;
  z-index: 10;
  inset: 12px auto auto 12px;
  color: var(--green-dark);
  background: var(--green);
  padding: 8px 12px;
  border-radius: 5px;
  transform: translateY(-150%);
}
.skip:focus { transform: translateY(0); color: var(--green-dark); }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.15; }
.starting { padding: 2rem; color: var(--muted); }

.button {
  min-height: 42px;
  padding: 9px 15px;
  display: inline-flex;
  gap: 9px;
  justify-content: center;
  align-items: center;
  background: #1b2920;
  border: 1px solid #394b3e;
  border-radius: 8px;
  color: var(--text);
  font-size: .87rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}
.button:hover { background: #293c2d; color: var(--text); }
.button.primary { color: var(--green-dark); background: var(--green); border-color: var(--green); }
.button.primary:hover { color: var(--green-dark); background: #d6f3bb; }
.button.danger { color: #271610; background: var(--red); border-color: var(--red); }
.button.danger:hover { background: #ffccbe; color: #271610; }
.button:disabled { opacity: .45; cursor: default; }
.button.small { min-height: 35px; padding: 6px 11px; font-size: .81rem; }
.button.text-button { border-color: transparent; background: transparent; color: var(--subtle); }
.button.text-button:hover { background: #223127; color: var(--text); }
.button.danger-text, .negative { color: var(--red); }
.positive { color: var(--green); }
.gold { color: var(--gold); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }

.shell { min-height: 100dvh; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  height: 100dvh;
  top: 0;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 28px 17px 21px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); white-space: nowrap; }
.brand > span:last-child { font: 600 1.36rem/1.05 var(--serif); letter-spacing: -.035em; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  border: 1px solid #50654d;
  border-radius: 11px;
  color: var(--green);
  font: 1.6rem/1 var(--serif);
  background: #213122;
}
.sidebar > .brand { margin: 0 7px 41px; align-self: flex-start; }
.navigation { display: grid; gap: 6px; }
.navigation a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .93rem;
  font-weight: 580;
  color: var(--subtle);
}
.nav-icon { width: 22px; color: #a9bbab; font: 1.12rem/1 var(--serif); text-align: center; }
.navigation a:hover { color: var(--text); background: #1b2920; }
.navigation a[aria-current="page"] { color: var(--green); background: #1f3022; border-color: #344a37; }
.navigation a[aria-current="page"] .nav-icon { color: var(--green); }
.sidebar-account {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 16px 5px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.sidebar-account > div { min-width: 0; }
.sidebar-account strong, .sidebar-account small { display: block; overflow: hidden; text-overflow: ellipsis; }
.sidebar-account strong { font-size: .86rem; }
.sidebar-account small { color: var(--muted); font-size: .76rem; }
.avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  color: var(--green);
  background: #263b2a;
  font-size: .81rem;
  font-weight: 750;
}
.topbar {
  min-height: 65px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 0 clamp(20px, 4vw, 55px);
}
.section-name { font-size: .85rem; font-weight: 600; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 3px; }
.mobile-brand { display: none; }
.content { width: min(100%, 1410px); margin: 0 auto; padding: 34px clamp(20px, 4vw, 55px) 46px; }
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 23px;
}
.page-heading h1 { font: 500 clamp(2.3rem, 4vw, 3.05rem)/1.06 var(--serif); letter-spacing: -.045em; }
.page-heading p, .panel-head p { color: var(--muted); margin-top: 6px; }
.page-heading > .actions { padding-bottom: 2px; }
.back { display: inline-block; margin-bottom: 13px; font-size: .85rem; }

.hero {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  background: #182d20;
  border: 1px solid #42563d;
  border-radius: 16px;
  margin-bottom: 19px;
  overflow: hidden;
}
.hero-inner { align-self: center; padding: 29px clamp(22px, 4vw, 49px); }
.hero-photo { position: relative; border-left: 1px solid #42563d; }
.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 52%;
}
.hero .eyebrow {
  color: var(--gold);
  font-size: .76rem;
  font-weight: 740;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero h2 { font: 500 clamp(2.3rem, 4.3vw, 3.8rem)/1.02 var(--serif); letter-spacing: -.05em; margin: 7px 0 10px; }
.hero p { color: #e1eadb; }
.hero .button { margin-top: 20px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 19px; }
.metric {
  min-height: 116px;
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: start;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel);
}
.metric > span { color: var(--subtle); font-size: .82rem; font-weight: 650; }
.metric strong { font: 500 clamp(1.55rem, 3vw, 2.23rem)/1.25 var(--serif); letter-spacing: -.035em; overflow-wrap: anywhere; }
.metric small { font-size: .78rem; color: var(--muted); }

.panel { min-width: 0; margin: 0 0 17px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 13px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--border);
}
.panel-head h2, .shepesh h2, .dialog-head h2 { font: 500 1.42rem/1.18 var(--serif); letter-spacing: -.02em; }
.panel-head p { font-size: .83rem; }
.panel-message { color: var(--muted); padding: 18px 19px; }
.empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  padding: 25px 15px;
  min-height: 142px;
  text-align: center;
}
.empty-mark { font: 1.4rem/1 var(--serif); color: var(--green); }
.empty strong { font-weight: 650; }
.empty p { color: var(--muted); font-size: .85rem; }
.empty .button { margin-top: 7px; }
.night-extras { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 15px; align-items: start; }
.table-scroll { overflow-x: auto; border-radius: 0 0 12px 12px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
td, th { padding: 11px 13px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td:first-child, th:first-child { padding-left: 19px; }
td:last-child, th:last-child { padding-right: 19px; }
thead th { background: #152018; font-size: .78rem; color: var(--subtle); font-weight: 600; }
tbody th, tbody td { font-size: .88rem; }
tbody th { font-weight: 640; white-space: normal; overflow-wrap: anywhere; }
tbody tr:last-child > * { border-bottom: 0; }
.row-actions { white-space: normal; }
.row-actions .button { margin: 2px 3px 2px 0; white-space: nowrap; }
.person { display: flex; align-items: center; gap: 9px; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  padding: 3px 9px;
  border-radius: 100px;
  color: var(--subtle);
  background: #28332a;
  font-size: .74rem;
  font-weight: 650;
}
.status.live { color: var(--green); background: #2a4030; }
.status.live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.seat-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cash-estimate { color: var(--muted); }
.night-close {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 19px;
  border-top: 1px solid var(--border);
}
.night-close p { font-size: .88rem; }
.night-close small { color: var(--muted); }
.buyin-scroll.table-scroll { max-block-size: 168px; overflow: auto; }
.buyin-scroll table { border-collapse: separate; border-spacing: 0; }
.buyin-scroll thead th { position: sticky; top: 0; z-index: 1; }
.buyin-scroll :is(td, th) { padding-block: 5px; }
.buyin-scroll time { color: var(--subtle); overflow-wrap: anywhere; }
.buyin-scroll .button.small { min-height: 30px; }
.opening-label { display: block; color: var(--muted); font-size: .69rem; }
.shepesh {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  padding: 16px 19px;
  border: 1px solid #665238;
  border-radius: 11px;
  background: #252419;
  margin-bottom: 17px;
}
.shepesh h2 { color: var(--gold); }
.shepesh p { margin-top: 4px; color: #d9cdb8; font-size: .87rem; }
.shepesh-icon { font: 2rem var(--serif); color: var(--gold); }
.shepesh > .actions { margin-left: auto; }
.notice {
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #6b5436;
  border-radius: 9px;
  background: #292519;
  color: #f0d3a4;
  font-size: .9rem;
}
.included-nights { padding: 12px 19px; margin: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.included-nights li a {
  display: inline-flex;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: .8rem;
}
.included-nights span { color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 19px; }
.filters .field { min-width: 135px; }
.filters .form-error { flex-basis: 100%; }
.form-stack { display: grid; gap: 14px; }
.settings-form { max-width: 740px; padding: 19px; }
.field-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; min-width: 0; gap: 5px; }
.field > span { font-size: .86rem; font-weight: 650; }
.field > small { font-size: .76rem; color: var(--muted); }
.field input, .field select {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 8px 11px;
  color: var(--text);
  background: var(--input);
  border: 1px solid #48584a;
  border-radius: 7px;
  font-size: 1rem;
}
.check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: .9rem; }
.check input { height: 17px; width: 17px; flex-shrink: 0; margin: 3px 0 0; accent-color: var(--green); }
.form-error { color: var(--red); font-size: .85rem; }
.form-error:empty { display: none; }

dialog {
  border: 1px solid #495a49;
  border-radius: 13px;
  background: var(--panel);
  color: var(--text);
  width: min(515px, calc(100% - 28px));
  max-height: 92dvh;
  padding: 20px;
  box-shadow: 0 18px 65px #07130c7d;
}
dialog::backdrop { background: #080d0bc4; backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-head h2 { overflow-wrap: anywhere; }
.dialog-note { color: var(--muted); font-size: .89rem; }
.dialog-actions { justify-content: flex-end; padding-top: 3px; }
.icon-button {
  flex: 0 0 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
}
.icon-button:hover { background: #2a3b2d; }
#toast {
  position: fixed;
  z-index: 5;
  inset: auto clamp(14px, 3vw, 32px) 20px auto;
  max-width: min(450px, calc(100vw - 28px));
  background: #26382a;
  border: 1px solid #557552;
  border-radius: 9px;
  padding: 10px 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
#toast.visible { opacity: 1; }

.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.login-photo {
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 48px);
  background: radial-gradient(ellipse at center, #253527, #101a13 75%);
  border-right: 1px solid #3b4e3c;
}
.login-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100svh - 2 * clamp(18px, 3vw, 48px));
  object-fit: contain;
  border: 1px solid #42563d;
  border-radius: 14px;
}
.login-panel { display: grid; align-content: center; gap: 30px; width: min(100%, 510px); margin: 0 auto; padding: 36px 52px; }
.login-content h1 { font: 500 clamp(2.55rem, 4vw, 3.5rem)/1.03 var(--serif); letter-spacing: -.055em; }
.login-content > p { color: var(--muted); margin: 8px 0 23px; }
.login-content button[type="submit"] { justify-content: space-between; margin-top: 4px; }

@media (max-width: 1050px) {
  .hero { min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .hero-photo { aspect-ratio: 2 / 1; border-left: 0; border-top: 1px solid #42563d; }
}
@media (max-width: 1000px) {
  .night-extras { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 820px) {
  .shell { display: block; }
  .sidebar {
    position: fixed;
    z-index: 4;
    inset: auto 0 0;
    height: auto;
    border: 0;
    border-top: 1px solid var(--border);
    padding: 6px 13px max(6px, env(safe-area-inset-bottom));
  }
  .sidebar > .brand, .sidebar-account, .section-name { display: none; }
  .navigation { display: flex; justify-content: space-around; }
  .navigation a { flex: 1; flex-direction: column; max-width: 126px; gap: 4px; padding: 4px; min-height: 48px; font-size: .73rem; }
  .topbar { min-height: 59px; }
  .mobile-brand { display: block; }
  .mobile-brand .brand-mark { width: 33px; height: 33px; border-radius: 9px; font-size: 1.37rem; }
  .mobile-brand .brand > span:last-child { font-size: 1.24rem; }
  .content { padding-bottom: 90px; }
  #toast { bottom: 70px; }
  .login-panel { padding-inline: 28px; }
}
@media (max-width: 600px) {
  .topbar { padding: 0 13px; }
  .topbar-actions .button { padding: 7px; font-size: .8rem; }
  .mobile-brand .brand { gap: 7px; }
  .navigation { gap: 2px; }
  .navigation a { min-width: 0; padding-inline: 2px; text-align: center; }
  .content { padding: 23px 13px 88px; }
  .page-heading { margin-bottom: 16px; }
  .page-heading p { font-size: .9rem; }
  .hero-inner { padding: 22px 18px; }
  .hero h2 { font-size: clamp(2.25rem, 10vw, 3rem); max-width: 16ch; }
  .hero p { font-size: .86rem; }
  .metrics { gap: 6px; }
  .metric { padding: 9px; min-height: 100px; border-radius: 8px; }
  .metric > span, .metric small { font-size: .72rem; }
  .metric strong { font-size: 1.53rem; }
  .panel-head { padding: 13px; }
  .table-scroll { overflow: visible; }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 11px; padding: 12px 13px; border-bottom: 1px solid var(--border); }
  tbody tr:last-child { border-bottom: 0; }
  tbody td, tbody th, tbody td:last-child, tbody th:first-child { border: 0; padding: 0; white-space: normal; overflow-wrap: anywhere; }
  tbody th { grid-column: 1 / -1; }
  tbody td:has(.button):last-child { grid-column: 1 / -1; }
  tbody td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; color: var(--muted); font-size: .73rem; font-weight: 600; }
  tbody td:has(.button):last-child:not(.row-actions)::before, tbody td.row-actions::before { display: none; }
  .seats-table td:last-child { grid-column: 1 / -1; }
  .seats-table tbody td:last-child[data-label]::before { display: block; }
  .seat-cell { gap: 5px 7px; }
  .night-close { padding: 12px 13px; }
  .buyin-scroll thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .buyin-scroll tbody tr { display: table-row; }
  .buyin-scroll :is(tbody td, tbody th, thead th) {
    padding: 6px;
    white-space: normal;
    border-bottom: 1px solid var(--border);
    font-size: .78rem;
  }
  .buyin-scroll tbody td[data-label]::before { display: none; }
  .filters { column-gap: 8px; }
  .filters .field { min-width: min(130px, 100%); flex: 1; }
  .filters .button { min-height: 43px; }
  .field input, .field select { font-size: 16px; }
  .login { display: flex; flex-direction: column; }
  .login-photo { padding: 0; border: 0; border-bottom: 1px solid var(--border); }
  .login-photo img {
    aspect-ratio: 9 / 5;
    max-height: none;
    object-fit: cover;
    object-position: center 52%;
    border: 0;
    border-radius: 0;
  }
  .login-panel { padding: 24px 20px 35px; gap: 22px; }
}
@media (max-width: 360px) {
  .sidebar { padding-inline: 6px; }
  .navigation a { padding-inline: 0; white-space: nowrap; }
  .topbar { gap: 8px; }
  .topbar-actions .button { white-space: nowrap; }
  .field-grid { grid-template-columns: 1fr; }
  .metric strong { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  #toast { transition: none; }
}
