:root {
  --bg: #050505;
  --panel: #101010;
  --panel2: #181818;
  --line: #353535;
  --text: #fff;
  --muted: #b8b8b8;
  --orange: #ff5a0a;
  --orange2: #ff7a24;
  --gold: var(--orange);
  --gold2: var(--orange2);
  --red: #ff6269;
  --green: #55d294;
  --blue: #6eb4ff;
  --shadow: 0 24px 70px #000c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -8%, #ff5a0a24 0, transparent 32%),
    linear-gradient(145deg, #050505, #0c0c0c 58%, #050505);
}
button, input, select, textarea { font: inherit; }
button, input, select, textarea {
  padding: 10px 12px;
  color: var(--text);
  background: #0a0a0a;
  border: 1px solid var(--line);
  border-radius: 10px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid #ff5a0a55;
  outline-offset: 1px;
  border-color: var(--orange);
}
button { cursor: pointer; font-weight: 750; }
button:hover { border-color: var(--orange); }
button:disabled { cursor: not-allowed; opacity: .55; }
.primary, .file-button { color: #090909; background: var(--orange); border-color: var(--orange); }
.primary:hover, .file-button:hover { background: var(--orange2); }
.danger { color: #ffd6d8; border-color: #8a393f; }
.muted { color: var(--muted); }
.mini { font-size: .78rem; }
.eyebrow {
  margin: 0 0 4px;
  color: var(--orange);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: min(480px, 100%);
  padding: 38px;
  background: #090909e8;
  border: 1px solid #ff5a0a55;
  border-radius: 24px;
  box-shadow: var(--shadow), 0 0 60px #ff5a0a12;
  backdrop-filter: blur(18px);
}
.auth-card h1 { margin: .4rem 0; font-size: 2rem; }
.brand-logo {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 9px 22px #000b) drop-shadow(0 0 15px #ff5a0a20);
}
.auth-logo { width: min(390px, 100%); height: auto; margin: -8px auto 18px; }
.compact-logo { width: 210px; max-height: 62px; }
.stack { display: grid; gap: 14px; }
.stack.compact { gap: 8px; }
label { display: grid; gap: 6px; color: #f1f1f1; font-size: .86rem; font-weight: 700; }
.notice {
  padding: 12px 14px;
  color: #fff1e8;
  background: #2b1308;
  border: 1px solid #a34a1f;
  border-radius: 10px;
}
.notice.error { color: #ffc5c8; background: #2b151a; border-color: #7a3a42; }
.notice.success { color: #bcf3d2; background: #11291e; border-color: #2f6b50; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(16px, 3vw, 42px);
  background: #050505ed;
  border-bottom: 1px solid #ff5a0a44;
  backdrop-filter: blur(16px);
}
.brand-lockup { display: flex; align-items: center; gap: 16px; }
.brand-lockup strong { color: #fff; }
.brand-lockup span { display: block; color: var(--muted); font-size: .75rem; }
.top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  color: #f2f2f2;
  font-size: .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.badge.online { color: #aaf0c9; border-color: #2e7553; }
.badge.pending { color: #ffb184; border-color: #a94b1f; }
.badge.offline { color: #ffc2c5; border-color: #753a41; }
.security-block {
  max-width: 760px;
  margin: 80px auto;
  padding: 28px;
  background: #1a0d07;
  border: 1px solid var(--orange);
  border-radius: 18px;
}
.security-block h2 { margin-top: 0; }
.workspace { width: min(1500px, 100%); margin: auto; padding: 24px clamp(14px, 3vw, 36px) 70px; }
.panel {
  background: linear-gradient(180deg, #141414, #0b0b0b);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 40px #0007;
}
.event-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr auto;
  align-items: end;
  gap: 24px;
  padding: 18px 22px;
}
.event-toolbar select { width: 100%; font-weight: 800; }
.event-title h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.3rem); }
.event-title p { margin: .4rem 0 0; }
.event-actions { display: flex; justify-content: flex-end; }
.event-actions .danger { white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.metric { padding: 16px 18px; background: #111; border: 1px solid var(--line); border-radius: 15px; }
.metric span { display: block; color: var(--muted); font-size: .78rem; }
.metric strong { display: block; margin-top: 4px; color: #fff; font-size: 1.65rem; }
.metric:nth-child(2) strong, .metric:nth-child(4) strong { color: var(--orange); }
.management-panel { margin-bottom: 16px; padding: 18px; }
.management-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.management-summary article { padding: 12px; background: #090909; border: 1px solid var(--line); border-radius: 12px; }
.management-summary span { display: block; color: var(--muted); font-size: .75rem; }
.management-summary strong { display: block; margin-top: 4px; font-size: 1.15rem; }
.staff-list { display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.staff-list article { display: flex; justify-content: space-between; gap: 12px; padding: 10px; background: #090909; border: 1px solid var(--line); border-radius: 10px; }
.content-grid { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.flyer-panel, .tables-panel, .reservations-panel { padding: 18px; }
.panel-heading { margin-bottom: 14px; }
.panel-heading h2 { margin: 0; }
.split-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.flyer-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  margin-bottom: 12px;
  overflow: hidden;
  background: #050505;
  border: 1px dashed #5b5b5b;
  border-radius: 14px;
}
.flyer-frame img { width: 100%; height: 100%; object-fit: contain; }
.file-button { display: flex; justify-content: center; padding: 10px 12px; font-weight: 800; border-radius: 10px; cursor: pointer; }
.file-button input { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: .7rem; }
.legend span { display: flex; align-items: center; gap: 5px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.dot.available { background: var(--green); }
.dot.reserved { background: var(--blue); }
.dot.hold { background: var(--orange); }
.dot.locked { background: var(--red); }
.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  max-height: 580px;
  padding-right: 4px;
  overflow: auto;
}
.table-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 88px;
  text-align: left;
  background: #090909;
}
.table-card strong { font-size: 1.05rem; }
.table-card span { color: var(--muted); font-size: .72rem; }
.table-card.available { border-color: #2d6649; }
.table-card.hold { border-color: #d35a1f; }
.table-card.reserved, .table-card.checkin, .table-card.complete { border-color: #315c8a; }
.table-card.blocked, .table-card.cancelled { opacity: .58; }
.table-card.locked { box-shadow: inset 0 0 0 2px #9a414a; }
.map-panel { margin-top: 16px; padding: 18px; }
.compact-file { width: auto; min-width: 116px; align-items: center; }
.reservation-map {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background-color: #070707;
  background-image:
    linear-gradient(#ffffff0a 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0a 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, #ff5a0a12, transparent 52%);
  background-size: 34px 34px, 34px 34px, 100% 100%;
  border: 1px solid #464646;
  border-radius: 16px;
}
.reservation-map.editing { border-color: var(--orange); box-shadow: inset 0 0 0 1px #ff5a0a55, 0 0 28px #ff5a0a12; }
.reservation-map > img {
  position: absolute;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  opacity: .88;
}
.map-nodes { position: absolute; z-index: 2; inset: 0; }
.map-node {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 58px;
  min-height: 48px;
  padding: 7px 9px;
  color: #fff;
  background: #090909ed;
  border: 2px solid #555;
  border-radius: 13px;
  box-shadow: 0 8px 18px #000b;
  transform-origin: center;
  touch-action: none;
  user-select: none;
}
.map-node strong { font-size: .82rem; line-height: 1; }
.map-node small { margin-top: 3px; color: #c7c7c7; font-size: .58rem; }
.map-node.available { border-color: #3d9669; }
.map-node.hold { border-color: var(--orange); }
.map-node.reserved, .map-node.checkin, .map-node.complete { border-color: var(--blue); }
.map-node.blocked, .map-node.cancelled { opacity: .58; }
.map-node.selected { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 8px 25px #ff5a0a88; }
.editing .map-node { cursor: grab; }
.editing .map-node:active { cursor: grabbing; }
.map-empty {
  position: absolute;
  z-index: 1;
  top: 16px;
  left: 50%;
  width: min(560px, calc(100% - 32px));
  margin: 0;
  padding: 10px 14px;
  text-align: center;
  background: #050505d9;
  border: 1px dashed #555;
  border-radius: 10px;
  transform: translateX(-50%);
}
.map-table-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 12px 0;
  padding: 10px 12px;
  background: #1d0d05;
  border: 1px solid #9b4119;
  border-radius: 12px;
}
.map-table-tools[hidden] { display: none; }
.map-note { margin: 10px 2px 0; }
.reservations-panel { margin-top: 16px; }
.operations-panel { margin-top: 16px; padding: 18px; }
.operations-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.operations-tabs button[aria-selected="true"] { color: #090909; background: var(--orange); border-color: var(--orange); }
.operations-pane { padding-top: 6px; }
.operations-form { grid-template-columns: repeat(3, minmax(130px, 1fr)); align-items: end; margin-bottom: 16px; }
.operations-form .wide-field { grid-column: span 2; }
.operations-list { display: grid; gap: 8px; margin-top: 12px; }
.operations-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  background: #090909;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.operations-list article p { margin: 0; line-height: 1.45; }
.operations-list article .button-row { justify-content: flex-end; }
.operations-list .priority-high, .operations-list .priority-critical { border-color: #8a393f; }
.readiness-list { display: grid; gap: 9px; }
.readiness-row { display: grid; grid-template-columns: minmax(170px, .8fr) 1fr auto; align-items: center; gap: 10px; padding: 11px; background: #090909; border: 1px solid var(--line); border-radius: 11px; }
.readiness-row label { display: flex; align-items: center; gap: 8px; }
.readiness-row input[type="checkbox"] { width: auto; }
.compact-list article { padding: 8px 10px; }
.report-note { margin-top: 14px; padding: 12px; background: #090909; border-left: 3px solid var(--orange); border-radius: 8px; }
.operation-actions { display: flex; align-items: center; gap: 8px; }
.reservations-panel input[type="search"] { min-width: min(380px, 100%); }
.table-wrap { overflow: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 11px 10px; font-size: .82rem; text-align: left; border-bottom: 1px solid var(--line); }
th { color: #ddd; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.status-pill { display: inline-flex; padding: 5px 8px; font-size: .68rem; border: 1px solid var(--line); border-radius: 999px; }
.empty-row { padding: 28px; color: var(--muted); text-align: center; }
dialog {
  width: min(760px, calc(100% - 24px));
  max-height: 92vh;
  padding: 0;
  color: var(--text);
  background: #0b0b0b;
  border: 1px solid #ff5a0a66;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
dialog::backdrop { background: #000d; backdrop-filter: blur(4px); }
.dialog-card { max-height: 92vh; padding: 22px; overflow: auto; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; }
.dialog-heading h2 { margin: 0; }
.icon-button { width: 40px; height: 40px; padding: 0; font-size: 1.6rem; border-radius: 50%; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.form-grid.three { grid-template-columns: 1fr 1fr 1.2fr; }
textarea { resize: vertical; }
.subpanel { margin-top: 16px; padding: 16px; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; }
.subpanel h3 { margin-top: 0; }
.payment-summary { padding: 12px; color: #fff; background: #090909; border-left: 3px solid var(--orange); border-radius: 8px; }
.receipt-field { margin-top: 12px; padding: 12px; background: #0c0c0c; border: 1px dashed #5b5b5b; border-radius: 10px; }
.payment-history { display: grid; gap: 8px; margin-top: 14px; }
.payment-history article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; background: #0a0a0a; border: 1px solid var(--line); border-radius: 9px; }
.payment-history article p { margin: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.confirmation-card { width: min(520px, 100%); }
.confirmation-actions { justify-content: flex-end; margin-top: 18px; }
.confirmation-card label { margin-top: 16px; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.check input { width: auto; }
.spinner { animation: pulse 1.2s infinite; }
.mfa-enrollment {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  align-items: center;
  gap: 20px;
  margin: 18px 0;
}
.mfa-enrollment img { width: 100%; padding: 10px; background: #fff; border-radius: 14px; }
.mfa-secret {
  display: block;
  max-width: 100%;
  padding: 10px;
  overflow-wrap: anywhere;
  color: var(--orange2);
  background: #050505;
  border: 1px solid var(--line);
  border-radius: 8px;
  user-select: all;
}
.mfa-verify { display: flex; align-items: end; gap: 10px; margin-top: 18px; }
.mfa-verify label { flex: 1; }
.mfa-verify input { font-size: 1.1rem; letter-spacing: .25em; }
@keyframes pulse { 50% { opacity: .45; } }
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .flyer-panel { display: grid; grid-template-columns: 180px 1fr; gap: 14px; }
  .flyer-panel .panel-heading { grid-column: 1 / -1; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .management-summary { grid-template-columns: repeat(2, 1fr); }
  .operations-form { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}
@media (max-width: 640px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .compact-logo { width: 160px; }
  .top-actions { justify-content: flex-start; }
  .top-actions .badge { display: none; }
  .workspace { padding-top: 14px; }
  .event-toolbar { grid-template-columns: 1fr; }
  .event-actions { justify-content: stretch; }
  .event-actions .danger { width: 100%; }
  .metrics { gap: 8px; }
  .metric { padding: 12px; }
  .metric strong { font-size: 1.25rem; }
  .flyer-panel { display: block; }
  .flyer-frame { max-width: 220px; }
  .split-heading { align-items: stretch; flex-direction: column; }
  .reservations-panel input[type="search"] { width: 100%; min-width: 100%; }
  .operation-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .operations-form { grid-template-columns: 1fr; }
  .operations-form .wide-field { grid-column: auto; }
  .operations-list article { align-items: stretch; flex-direction: column; }
  .operations-list article .button-row { justify-content: flex-start; }
  .readiness-row { grid-template-columns: 1fr; }
  .tables-grid { grid-template-columns: repeat(2, 1fr); }
  .reservation-map { min-height: 480px; }
  .map-node { min-width: 50px; min-height: 44px; padding: 6px; }
  .mfa-enrollment { grid-template-columns: 1fr; }
  .mfa-enrollment img { max-width: 240px; }
  .mfa-verify { align-items: stretch; flex-direction: column; }
}

