/* Floor table cards — dense, full-width, high-contrast status */

.vf-zone.vf-zone-map {
  width: 100%;
  max-width: none;
  padding: 0.5rem 0.65rem 0.7rem !important;
}

.ft-stage {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)) !important;
  justify-content: stretch !important;
  align-content: start !important;
  align-items: stretch !important;
  gap: 0.75rem !important;
  padding: 0.65rem 0.45rem 0.75rem !important;
  width: 100% !important;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse at 30% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 48%),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--text) 3%, transparent) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--text) 3%, transparent) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-alt) 40%, var(--card)), var(--card));
  border-radius: 0.85rem;
}

.ft-card {
  width: 100%;
  min-width: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--card);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  box-shadow: 0 8px 20px color-mix(in srgb, #000 12%, transparent);
}

.ft-card.is-inactive { opacity: .55; filter: grayscale(.35); }
.ft-card.is-pulse { animation: ftPulse 1.8s ease infinite; }
@keyframes ftPulse {
  0%, 100% { box-shadow: 0 8px 20px color-mix(in srgb, #000 12%, transparent); }
  50% { box-shadow: 0 10px 24px color-mix(in srgb, #000 16%, transparent), 0 0 0 3px rgba(245,158,11,.22); }
}

/* Use DIV not button styles — avoids global button resets wiping child backgrounds */
.app-shell .ft-card-body,
.ft-card-body {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.55rem 0.5rem;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  text-align: center;
  color: var(--text) !important;
  background:
    radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 45%),
    var(--card) !important;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ft-card-body:active { transform: scale(.99); }
.ft-card-body:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.ft-accent {
  display: block;
  width: 100%;
  height: 0.3rem;
  border-radius: 999px;
  background-color: #22c55e;
}
.ft-card.status-1 .ft-accent { background-color: #f59e0b; }
.ft-card.status-2 .ft-accent { background-color: #3b82f6; }
.ft-card.status-3 .ft-accent { background-color: #a8a29e; }
.ft-card.is-ready .ft-accent { background-color: #10b981; }
.ft-card.is-await .ft-accent { background-color: #ef4444; }

.ft-hall {
  min-height: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ft-hall-chip {
  max-width: 95%;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text);
  background-color: color-mix(in srgb, var(--text) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ft-hall-chip.is-empty { visibility: hidden; }

.ft-scene {
  position: relative;
  width: 100%;
  height: 5.5rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ft-scene-svg {
  width: min(100%, 13rem);
  height: 5.5rem;
  display: block;
  overflow: visible;
}
.ft-cap-label {
  fill: #fffef8;
  font-size: 13px;
  font-weight: 900;
  font-family: inherit;
  paint-order: stroke fill;
  stroke: rgba(40, 20, 8, .55);
  stroke-width: 3px;
}
.ft-more {
  position: absolute;
  inset-inline-end: 0.15rem;
  top: 0;
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--text);
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  border-radius: 999px;
  padding: 0.05rem 0.35rem;
}
.ft-leg { fill: #3f2a1a; }
.ft-seat { fill: #64748b; }
.ft-back { fill: #475569; }
.ft-guest { fill: #fde68a; stroke: #b45309; stroke-width: 1.1; }
.ft-scene.status-0 .ft-chair.is-free .ft-seat { fill: #86efac; }
.ft-scene.status-0 .ft-chair.is-free .ft-back { fill: #16a34a; }
.ft-scene.status-1 .ft-chair.is-free .ft-seat { fill: #fde68a; }
.ft-scene.status-1 .ft-chair.is-free .ft-back { fill: #d97706; }
.ft-scene.status-1 .ft-chair.is-taken .ft-seat { fill: #fb923c; }
.ft-scene.status-1 .ft-chair.is-taken .ft-back { fill: #c2410c; }
.ft-scene.status-2 .ft-chair.is-free .ft-seat { fill: #bfdbfe; }
.ft-scene.status-2 .ft-chair.is-free .ft-back { fill: #2563eb; }
.ft-scene.status-2 .ft-chair.is-taken .ft-seat { fill: #60a5fa; }
.ft-scene.status-2 .ft-chair.is-taken .ft-back { fill: #1d4ed8; }
.ft-scene.status-3 .ft-chair.is-free .ft-seat { fill: #d6d3d1; }
.ft-scene.status-3 .ft-chair.is-free .ft-back { fill: #78716c; }

.ft-ids {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
}
.ft-code {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--text) !important;
}
.ft-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text) !important;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Status — solid colors, max specificity vs button/theme resets */
.app-shell .ft-card .ft-status,
.ft-status {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 1.65rem;
  height: 1.65rem;
  padding: 0 0.5rem;
  border-radius: 0.55rem;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
  border: 1px solid transparent;
  box-sizing: border-box;
}
.app-shell .ft-card .ft-status.st-free,
.ft-status.st-free {
  background-color: #16a34a !important;
  background-image: none !important;
  border-color: #15803d !important;
}
.app-shell .ft-card .ft-status.st-busy,
.ft-status.st-busy {
  background-color: #ea580c !important;
  background-image: none !important;
  border-color: #c2410c !important;
}
.app-shell .ft-card .ft-status.st-reserved,
.ft-status.st-reserved {
  background-color: #2563eb !important;
  background-image: none !important;
  border-color: #1d4ed8 !important;
}
.app-shell .ft-card .ft-status.st-dirty,
.ft-status.st-dirty {
  background-color: #57534e !important;
  background-image: none !important;
  border-color: #44403c !important;
}

.ft-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  min-height: 1.35rem;
}
.ft-seats {
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--text) !important;
  background-color: color-mix(in srgb, var(--text) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  white-space: nowrap;
}
.ft-chip {
  padding: 0.14rem 0.4rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 900;
  white-space: nowrap;
  border: 1px solid transparent;
  color: var(--text) !important;
  background-color: color-mix(in srgb, var(--accent) 18%, transparent);
}
.ft-chip.phase-2 { background-color: #fef3c7; color: #92400e !important; border-color: #fcd34d; }
.ft-chip.phase-3 { background-color: #d1fae5; color: #065f46 !important; border-color: #6ee7b7; }
.ft-chip.phase-4 { background-color: #fee2e2; color: #991b1b !important; border-color: #fca5a5; }
.ft-chip.unpaid { background-color: #fee2e2; color: #991b1b !important; border-color: #fca5a5; }
.ft-chip.paid { background-color: #dcfce7; color: #166534 !important; border-color: #86efac; }
.ft-chip.await { background-color: #ffedd5; color: #9a3412 !important; border-color: #fdba74; }
body.theme-obsidian .ft-chip.phase-2 { background-color: color-mix(in srgb, #f59e0b 28%, transparent); color: #fde68a !important; border-color: #d97706; }
body.theme-obsidian .ft-chip.phase-3 { background-color: color-mix(in srgb, #10b981 28%, transparent); color: #a7f3d0 !important; border-color: #059669; }
body.theme-obsidian .ft-chip.phase-4,
body.theme-obsidian .ft-chip.unpaid { background-color: color-mix(in srgb, #ef4444 30%, transparent); color: #fecaca !important; border-color: #dc2626; }
body.theme-obsidian .ft-chip.paid { background-color: color-mix(in srgb, #22c55e 28%, transparent); color: #bbf7d0 !important; border-color: #16a34a; }
body.theme-obsidian .ft-chip.await { background-color: color-mix(in srgb, #f97316 28%, transparent); color: #fed7aa !important; border-color: #ea580c; }

.ft-order {
  width: 100%;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text) !important;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
  min-height: 1rem;
}
.ft-hint {
  width: 100%;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text) !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
  min-height: 1rem;
  margin-bottom: 0.1rem;
}
.ft-hint.is-blank {
  display: none;
}
.ft-card.status-0 .ft-hint { color: #15803d !important; }
.ft-card.status-1 .ft-hint { color: #c2410c !important; }
.ft-card.status-2 .ft-hint { color: #1d4ed8 !important; }
body.theme-obsidian .ft-card.status-0 .ft-hint { color: #86efac !important; }
body.theme-obsidian .ft-card.status-1 .ft-hint { color: #fdba74 !important; }
body.theme-obsidian .ft-card.status-2 .ft-hint { color: #93c5fd !important; }

.ft-dock {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.28rem;
  padding: 0.4rem 0.45rem 0.45rem;
  background-color: color-mix(in srgb, var(--bg-alt) 80%, var(--card));
  border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  flex-shrink: 0;
  margin-top: auto;
}
.ft-btn {
  width: 100%;
  height: 2.15rem;
  border-radius: 0.55rem;
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  background-color: color-mix(in srgb, var(--text) 5%, var(--card));
  color: var(--text) !important;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}
.ft-btn:hover:not(:disabled):not(.is-off) {
  background-color: color-mix(in srgb, var(--accent) 16%, var(--card));
}
.ft-btn.is-off,
.ft-btn:disabled {
  opacity: .3;
  cursor: default;
  filter: grayscale(.4);
}
.ft-btn.call:not(.is-off):not(:disabled) {
  background-color: color-mix(in srgb, #10b981 26%, var(--card));
  border-color: color-mix(in srgb, #059669 40%, transparent);
}
.ft-btn.pay:not(.is-off):not(:disabled) {
  background-color: color-mix(in srgb, #f97316 26%, var(--card));
  border-color: color-mix(in srgb, #ea580c 40%, transparent);
}
.ft-menu { position: relative; width: 100%; height: 2.15rem; }
.ft-menu > summary {
  list-style: none;
  width: 100%;
  height: 2.15rem;
}
.ft-menu > summary::-webkit-details-marker { display: none; }
.ft-menu-list {
  position: absolute;
  z-index: 40;
  bottom: calc(100% + 0.3rem);
  inset-inline: 0;
  min-width: 8.5rem;
  padding: 0.4rem;
  border-radius: 0.65rem;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.ft-menu-list button {
  border: 0;
  background: transparent;
  text-align: start;
  padding: 0.4rem 0.5rem;
  border-radius: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.ft-menu-list button:hover {
  background-color: color-mix(in srgb, var(--accent) 14%, transparent);
}

body.theme-obsidian .ft-card {
  background: linear-gradient(180deg, rgba(28,28,42,.98), rgba(14,14,24,.98));
  border-color: rgba(255,255,255,.12);
}
body.theme-obsidian .ft-card-body {
  background: transparent !important;
}
body.theme-obsidian .ft-dock {
  background-color: rgba(8,8,16,.92);
}
body.theme-obsidian .ft-btn {
  background-color: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  color: #f8fafc !important;
}
body.theme-obsidian .ft-open-orders {
  background: color-mix(in srgb, #38bdf8 14%, var(--card, #14141f));
  border-color: color-mix(in srgb, #38bdf8 32%, transparent);
}
body.theme-obsidian .ft-open-orders-label { color: #7dd3fc !important; }
body.theme-obsidian .ft-check-chip {
  background: color-mix(in srgb, #0f172a 50%, #0c4a6e) !important;
  border-color: color-mix(in srgb, #38bdf8 40%, transparent) !important;
  color: #f1f5f9 !important;
}
body.theme-obsidian .ft-check-chip-main,
body.theme-obsidian .ft-check-chip-no,
body.theme-obsidian .ft-check-chip-total { color: #f8fafc !important; }
body.theme-obsidian .ft-check-chip-kind {
  color: #e0f2fe !important;
  background: color-mix(in srgb, #38bdf8 22%, transparent) !important;
}
body.theme-obsidian .ft-check-chip-meta { color: #cbd5e1 !important; }
body.theme-obsidian .ft-check-chip-go { color: #7dd3fc !important; }
body.theme-obsidian .ft-check-chip.has-notes.sev-1 {
  background: color-mix(in srgb, #f59e0b 18%, #0f172a) !important;
  border-inline-start-color: #fbbf24 !important;
}
body.theme-obsidian .ft-check-chip.has-notes.sev-2 {
  background: color-mix(in srgb, #ef4444 20%, #0f172a) !important;
  border-inline-start-color: #f87171 !important;
}
body.theme-obsidian .ft-check-note {
  background: color-mix(in srgb, #1e293b 80%, transparent) !important;
  color: #e2e8f0 !important;
}
body.theme-obsidian .ft-check-note.sev-1 .ft-check-note-tag,
body.theme-obsidian .ft-check-note.sev-1 .ft-check-note-body { color: #fcd34d !important; }
body.theme-obsidian .ft-check-note.sev-2 .ft-check-note-tag,
body.theme-obsidian .ft-check-note.sev-2 .ft-check-note-body { color: #fca5a5 !important; }

/* —— Dining table stage (no CSS rotateX squash) —— */
.dt-stage {
  position: relative;
  width: 100%;
  min-height: 9.5rem;
  display: grid;
  place-items: center;
  touch-action: none;
  user-select: none;
  margin: 0.15rem 0 0.25rem;
  padding: 0.35rem 0.2rem 0.15rem;
  border-radius: 14px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 58%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg-alt) 35%, transparent), transparent);
}
.dt-stage.is-hero {
  min-height: 100%;
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.dt-stage.is-hero .dt-svg {
  width: 100%;
  height: 100%;
  min-height: 22rem;
  max-height: none;
}
.dt-stage.is-live { cursor: grab; }
.dt-stage.is-drag { cursor: grabbing; }
.dt-svg {
  width: 100%;
  height: 9.2rem;
  display: block;
  overflow: visible;
}
.dt-stage.is-hero .dt-svg {
  width: 100%;
  height: min(48vh, 26rem);
  max-height: 520px;
}
.dt-label {
  fill: #fffaf0;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  paint-order: stroke fill;
  stroke: rgba(40, 18, 6, .5);
  stroke-width: 3.5px;
  pointer-events: none;
}
.dt-stage.is-hero .dt-label { font-size: 22px; stroke-width: 5px; }
.dt-num {
  fill: rgba(255,255,255,.95);
  font-size: 8px;
  font-weight: 800;
  pointer-events: none;
}
.dt-chair-shadow { fill: rgba(0,0,0,.22); }
.dt-leg { fill: #3a2414; }
.dt-cushion { fill: #64748b; transition: fill .15s ease; }
.dt-backrest { fill: #475569; transition: fill .15s ease; }
.dt-guest { fill: #fde68a; stroke: #b45309; stroke-width: 1.2; }
.dt-chair { cursor: pointer; }
.dt-chair:hover .dt-cushion { filter: brightness(1.08); }
.dt-chair.is-on .dt-cushion {
  fill: #38bdf8 !important;
  stroke: #e0f2fe;
  stroke-width: 1.8;
}
.dt-chair.is-on .dt-backrest { fill: #0284c7 !important; }
.dt-stage.status-0 .dt-chair.is-free .dt-cushion { fill: #86efac; }
.dt-stage.status-0 .dt-chair.is-free .dt-backrest { fill: #16a34a; }
.dt-stage.status-1 .dt-chair.is-free .dt-cushion { fill: #fde68a; }
.dt-stage.status-1 .dt-chair.is-free .dt-backrest { fill: #d97706; }
.dt-stage.status-1 .dt-chair.is-taken .dt-cushion { fill: #fb923c; }
.dt-stage.status-1 .dt-chair.is-taken .dt-backrest { fill: #c2410c; }
.dt-stage.status-2 .dt-chair.is-free .dt-cushion { fill: #93c5fd; }
.dt-stage.status-2 .dt-chair.is-free .dt-backrest { fill: #2563eb; }
.dt-stage.status-2 .dt-chair.is-taken .dt-cushion { fill: #60a5fa; }
.dt-stage.status-2 .dt-chair.is-taken .dt-backrest { fill: #1d4ed8; }
.dt-stage.status-3 .dt-chair.is-free .dt-cushion { fill: #d6d3d1; }
.dt-stage.status-3 .dt-chair.is-free .dt-backrest { fill: #78716c; }
.dt-tools {
  position: absolute;
  inset-inline-end: 0.35rem;
  top: 0.35rem;
  display: flex;
  gap: 0.25rem;
  z-index: 2;
}
.dt-tool {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  background: color-mix(in srgb, var(--card) 92%, #fff);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.dt-stage.is-hero .dt-tool {
  background: color-mix(in srgb, var(--card) 92%, var(--accent));
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 14%, transparent);
}
body.theme-obsidian .dt-stage.is-hero .dt-tool {
  background: rgba(255,255,255,.1);
  color: #f8fafc;
  border-color: rgba(255,255,255,.18);
}
.dt-tool.is-accent {
  background: color-mix(in srgb, var(--accent) 22%, var(--card));
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.dt-extra {
  position: absolute;
  inset-inline-start: 0.35rem;
  top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text);
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
}

.vr-focus-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(6, 8, 16, 0.72);
  backdrop-filter: blur(8px);
}
.vr-focus-panel {
  position: fixed; z-index: 81;
  inset-inline: max(0.6rem, calc(50% - 26rem));
  top: 4.5vh;
  bottom: 4.5vh;
  max-width: 52rem;
  width: calc(100% - 1.2rem);
  margin-inline: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,.45);
  background: var(--card);
}
.vr-focus-panel .vf-modal-close {
  position: absolute;
  inset-inline-end: 0.65rem;
  top: 0.65rem;
  z-index: 3;
}
.vr-focus-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.65rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid color-mix(in srgb, var(--bg-alt) 80%, transparent);
  background: color-mix(in srgb, var(--bg-alt) 40%, var(--card));
  flex-shrink: 0;
}
.vr-focus-head h3 { margin: 0 0 0.15rem; font-size: 1.12rem; font-weight: 750; }
.vr-focus-head .muted { margin: 0; font-size: 0.8rem; }
.vr-focus-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  background: #12151c;
}
.vr-focus-actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  justify-content: flex-end;
  border-top: 1px solid color-mix(in srgb, var(--bg-alt) 80%, transparent);
  flex-shrink: 0;
  background: color-mix(in srgb, var(--bg-alt) 28%, var(--card));
}

@media (max-width: 900px) {
  .ft-stage { grid-template-columns: repeat(auto-fill, minmax(12.75rem, 1fr)) !important; }
}
@media (max-width: 600px) {
  .ft-stage { grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)) !important; }
  .dt-stage { min-height: 8.2rem; }
  .dt-svg { height: 7.8rem; }
}
