:root {
  color-scheme: dark;
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  color: #f4f6fc;
  background: #0c101b;
  font-synthesis: none;
  --panel: #141b2b;
  --surface: #101626;
  --line: #2a354e;
  --muted: #aab6d0;
  --green: #adf288;
  --danger: #ffadad;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
.frame { width: min(100% - 48px, 1120px); margin-inline: auto; }
.top { background: #101624; border-bottom: 1px solid var(--line); }
.top-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand, .identity { display: flex; align-items: center; gap: .8rem; }
.brand { color: inherit; text-decoration: none; }
.brand strong, .brand small { display: block; line-height: 1.3; }
.brand small, .identity span { color: var(--muted); font-size: .875rem; }
.mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: .75rem;
  background: var(--green); color: #142013; font-weight: 900; font-size: 1.4rem; font-style: italic;
}
main { padding-block: 38px 60px; }
body[data-role="owner"] main { padding-top: 22px; }
.page-heading { margin: 0 0 1rem; font-size: clamp(1.35rem, 3vw, 1.9rem); letter-spacing: -.025em; }
.auth-panel { max-width: 31rem; }
.auth-panel form { margin-top: 0; }
.workspace-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.preview-controls { margin-block: 1rem; }
.preview-controls p { margin: .25rem 0 0; }
.sale-channel { margin: 0; color: var(--muted); font-size: .9rem; }
.payment-heading { margin: 0; font-size: clamp(1.2rem, 3vw, 1.6rem); letter-spacing: -.02em; }
.payment-link-actions { flex-wrap: nowrap; }
.tab-count, .status-chip, .slot-indicators li {
  border: 1px solid var(--line); border-radius: .55rem; padding: .18rem .48rem;
  font-size: .82rem; background: var(--surface);
}
.tab-count { min-width: 1.4rem; color: var(--green); }
.status-chip { flex: 0 0 auto; color: var(--muted); }
.status-chip[data-status="due"], .attention { color: #ffd18c; }
.status-chip[data-status="overdue"] { color: var(--danger); }
.slot-indicators {
  display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: .55rem 0 0; list-style: none;
}
.slot-indicators li[data-slot-status="free"] { color: var(--green); }
.slot-indicators li[data-slot-status="reserved"] { color: #ffd18c; }
.slot-indicators li[data-slot-status="sold"] { color: var(--muted); }
.subscription-task { display: grid; gap: .55rem; }
.task-actions { margin-top: 0; }
button.compact-button, a.compact-button { min-height: 40px; padding: .45rem .65rem; font-size: .88rem; }
dialog {
  width: min(30rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 1.4rem;
  background: var(--panel); color: inherit; border: 1px solid var(--line); border-radius: 1rem;
}
dialog::backdrop { background: #080d19c9; }
.intro {
  padding: clamp(1.35rem, 4.5vw, 2.8rem); margin-bottom: 1.3rem;
  background: radial-gradient(ellipse at 96% 0%, #263b4e, transparent 58%),
    linear-gradient(123deg, #202b43 0%, #182134 45%, #172131 100%);
  border: 1px solid #364661; border-radius: 1.25rem;
}
.intro h1 { max-width: 30ch; margin: 0; font-size: clamp(2.05rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -.045em; }
.intro p { max-width: 58ch; margin: .75rem 0 0; color: #ccd6e9; }
h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 1.35rem; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; }
p { line-height: 1.5; }
.section, .metric { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; }
.section { padding: clamp(1rem, 3vw, 1.55rem); margin-top: 1rem; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; padding: .35rem; border: 1px solid var(--line); background: var(--surface); border-radius: .85rem; width: fit-content; }
.tabs button { background: transparent; border-color: transparent; }
.tabs button[aria-pressed="true"] { background: #283650; color: white; border-color: #37496a; }
.stack { display: grid; gap: .95rem; margin-top: 1rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.metric { min-width: 0; padding: 1rem; }
.metric span { color: var(--muted); display: block; line-height: 1.3; }
.metric strong { display: block; margin-top: .45rem; font-size: clamp(1.15rem, 2.6vw, 1.65rem); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.muted, .hint { color: var(--muted); }
.hint { margin: .35rem 0 0; font-size: .9rem; }
.error { color: var(--danger); margin: 0; }
.success { color: var(--green); }
.row { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.toolbar .row, .row.actions { justify-content: flex-end; }
label { display: grid; gap: .45rem; min-width: 0; font-weight: 580; font-size: .9rem; }
label.check { display: flex; align-items: center; gap: .55rem; }
input, select, button, a.button { font: inherit; }
input:not([type="checkbox"]), select {
  width: 100%; min-width: 0; min-height: 46px; padding: .6rem .7rem; border-radius: .6rem;
  border: 1px solid #3a4865; background: var(--surface); color: inherit; font-size: 1rem;
}
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--green); }
select {
  appearance: none; padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23aab6d0' stroke-width='2' d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
  background-size: 18px; background-repeat: no-repeat; background-position: right .65rem center;
}
button, a.button {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  gap: .3rem; padding: .58rem .9rem; min-height: 44px; border-radius: .62rem;
  border: 1px solid #3a4865; background: #202b40; color: inherit; font-weight: 650;
  text-decoration: none; cursor: pointer;
}
button:hover, a.button:hover { filter: brightness(1.15); }
button:disabled { opacity: .55; cursor: wait; }
.primary, a.primary { background: var(--green); border-color: transparent; color: #17251a; }
.danger { color: var(--danger); }
.wide { width: 100%; }
:focus-visible { outline: 2px solid #ccffa7; outline-offset: 3px; }
.list { display: grid; gap: .55rem; padding: 0; list-style: none; margin: 0; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: .7rem; padding: .8rem; min-width: 0; }
.item p { margin: .35rem 0 0; overflow-wrap: anywhere; }
.delivery-message { display: grid; gap: .65rem; }
.delivery-text {
  width: 100%; min-width: 0; padding: .65rem .75rem; background: var(--panel); color: inherit;
  border: 1px solid var(--line); border-radius: .5rem; font: inherit; line-height: 1.45;
  overflow-wrap: anywhere; resize: vertical;
}
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .65rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .875rem; font-weight: 600; }
td { min-width: 80px; overflow-wrap: anywhere; }
.toast { position: fixed; inset: auto 1rem 1rem auto; max-width: min(28rem, calc(100% - 2rem)); padding: .85rem 1rem; background: #223548; border: 1px solid #476078; border-radius: .75rem; z-index: 2; }
@media (max-width: 750px) {
  .work-grid { grid-template-columns: 1fr; gap: 0; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 500px) {
  .frame { width: calc(100% - 24px); }
  .top-inner { min-height: 66px; }
  main { padding-top: 19px; }
  .grid { grid-template-columns: 1fr; }
  .identity span { display: none; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; }
}
