/* BigTickets Seating — shared app styles */
:root {
  --bt-bg: #0f1729;
  --bt-panel: #ffffff;
  --bt-ink: #1f2937;
  --bt-muted: #6b7280;
  --bt-border: #e5e7eb;
  --bt-accent: #0891b2;
  --bt-accent-ink: #ffffff;
  --bt-danger: #b91c1c;
  --bt-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--bt-ink);
  background: #f3f4f6;
}
button { font: inherit; cursor: pointer; }

/* Top navigation */
.bt-topbar {
  display: flex; align-items: center; gap: 24px;
  background: var(--bt-bg); color: #fff; padding: 0 20px; height: 54px;
}
.bt-topbar .bt-logo { font-weight: 800; letter-spacing: -.5px; font-size: 18px; }
.bt-topbar .bt-logo b { color: #38bdf8; }
.bt-nav { display: flex; gap: 4px; margin-left: 8px; }
.bt-nav a {
  color: #cbd5e1; text-decoration: none; padding: 8px 14px; border-radius: 6px; font-size: 14px;
}
.bt-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.bt-nav a.active { background: var(--bt-accent); color: #fff; }
.bt-topbar .bt-spacer { flex: 1; }
.bt-topbar .bt-event-pill {
  background: rgba(255,255,255,.1); padding: 6px 12px; border-radius: 999px; font-size: 13px; color: #e2e8f0;
}

/* Page chrome: sidebar shell + content area */
.bt-shell { display: grid; grid-template-columns: 220px 1fr; height: calc(100vh - 54px); }
.bt-sidebar {
  background: var(--bt-bg); color: #cbd5e1; padding: 14px 10px;
  display: flex; flex-direction: column; gap: 2px; overflow-y: auto;
}
.bt-side-section {
  font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  color: #64748b; padding: 10px 10px 4px;
}
.bt-sidebar a {
  color: #cbd5e1; text-decoration: none; padding: 9px 12px; border-radius: 6px; font-size: 14px;
}
.bt-sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.bt-sidebar a.active { background: var(--bt-accent); color: #fff; }
/* content cell fills its grid track; components manage their own scroll */
.bt-view { height: 100%; min-height: 0; overflow: hidden; }

/* ---- Library / list pages (Seating Charts, Events) ---- */
.cl-root { height: 100%; overflow: auto; padding: 24px; }
.cl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cl-head h1 { font-size: 20px; margin: 0; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.cl-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.cl-thumb { background: #eef2f7; border-bottom: 1px solid var(--bt-border); height: 130px; display: block; width: 100%; }
.cl-card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.cl-card-title { font-weight: 600; font-size: 15px; }
.cl-meta { font-size: 12px; color: var(--bt-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.cl-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.cl-actions .bt-btn { padding: 6px 10px; font-size: 13px; box-shadow: none; }
.cl-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #e2e8f0; color: #475569; text-transform: capitalize; }
.cl-badge.published { background: #dcfce7; color: #166534; }
.cl-badge.draft { background: #fef9c3; color: #854d0e; }
.cl-empty { color: var(--bt-muted); padding: 40px; text-align: center; }

/* Generic buttons */
.bt-btn {
  border: 1px solid var(--bt-border); background: #fff; color: var(--bt-ink);
  padding: 8px 14px; border-radius: 6px; font-size: 14px; box-shadow: var(--bt-shadow);
}
.bt-btn:hover { background: #f9fafb; }
.bt-btn.primary { background: var(--bt-accent); color: #fff; border-color: transparent; }
.bt-btn.primary:hover { filter: brightness(1.05); }
.bt-btn.danger { color: var(--bt-danger); border-color: #fca5a5; }
.bt-btn.active { background: var(--bt-accent); color: #fff; border-color: transparent; }
.bt-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Layout helpers */
.bt-row { display: flex; gap: 8px; align-items: center; }
.bt-col { display: flex; flex-direction: column; }
.bt-panel {
  background: var(--bt-panel); border: 1px solid var(--bt-border);
  border-radius: 8px; box-shadow: var(--bt-shadow);
}
.bt-muted { color: var(--bt-muted); }
.bt-tag { display:inline-block; width:12px; height:12px; border-radius:3px; vertical-align:middle; }

/* ---- Chart Builder ---- */
.cb-root { display: flex; flex-direction: column; height: 100%; }
.cb-header {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: #fff; border-bottom: 1px solid var(--bt-border); flex: none;
}
.cb-header .cb-name-input {
  flex: 0 1 300px; min-width: 120px; padding: 8px 12px;
  border: 1px solid var(--bt-border); border-radius: 6px; font-size: 14px; font-weight: 600;
}
.cb-header .cb-grow { flex: 1; }
.cb-body { display: grid; grid-template-columns: 60px 1fr 260px; flex: 1; min-height: 0; }
.cb-toolbar {
  background: #111827; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0;
}
.cb-tool {
  width: 50px; height: 50px; border-radius: 10px; border: none; background: transparent; color: #94a3b8;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 9px; letter-spacing: .2px; transition: background .12s, color .12s;
}
.cb-tool svg { width: 20px; height: 20px; }
.cb-tool:hover { background: #1f2937; color: #fff; }
.cb-tool.active { background: var(--bt-accent); color: #fff; }
.cb-toolsep { width: 28px; height: 1px; background: #334155; margin: 4px 0; }
.cb-canvas-wrap { position: relative; background: #eef2f7; overflow: hidden; }
.cb-canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.cb-zoom {
  position: absolute; bottom: 12px; left: 12px; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--bt-border); border-radius: 8px; overflow: hidden; box-shadow: var(--bt-shadow);
}
.cb-zoom button { width: 34px; height: 32px; border: none; background: #fff; font-size: 15px; color: var(--bt-ink); border-bottom: 1px solid var(--bt-border); }
.cb-zoom button:last-child { border-bottom: none; }
.cb-zoom button:hover { background: #f1f5f9; }
.cb-hint {
  position:absolute; bottom:12px; right:12px; max-width: 60%; background:rgba(17,24,39,.85); color:#fff;
  padding:6px 10px; border-radius:6px; font-size:12px; line-height:1.4;
}
.cb-side { background: #fff; border-left: 1px solid var(--bt-border); display: flex; flex-direction: column; overflow-y: auto; }
.cb-side h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--bt-muted); padding: 14px 14px 6px; }
.cb-side .cb-section { padding: 8px 14px; border-bottom: 1px solid var(--bt-border); }
.cb-cat {
  display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 6px; cursor: pointer;
}
.cb-cat:hover { background: #f3f4f6; }
.cb-cat.active { background: #ecfeff; outline: 1px solid var(--bt-accent); }
.cb-cat .swatch { width: 16px; height: 16px; border-radius: 4px; flex: none; }
.cb-cat .name { flex: 1; font-size: 14px; }
.cb-cat .price { font-size: 13px; color: var(--bt-muted); }
.cb-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.cb-field label { font-size: 12px; color: var(--bt-muted); }
.cb-field input, .cb-field select {
  padding: 7px 9px; border: 1px solid var(--bt-border); border-radius: 6px; font-size: 14px;
}
.cb-stat { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }

/* ---- Seat Selector ---- */
.ss-root { display: grid; grid-template-columns: 1fr 330px; height: 100%; }
.ss-map { position: relative; background: #fff; overflow: hidden; }
.ss-map canvas { display: block; }
.ss-zoom {
  position: absolute; bottom: 12px; left: 12px; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--bt-border); border-radius: 8px; overflow: hidden; box-shadow: var(--bt-shadow);
}
.ss-zoom button { width: 34px; height: 32px; border: none; background: #fff; font-size: 15px; color: var(--bt-ink); border-bottom: 1px solid var(--bt-border); }
.ss-zoom button:last-child { border-bottom: none; }
.ss-zoom button:hover { background: #f1f5f9; }
.ss-tabs { display: flex; border-bottom: 1px solid var(--bt-border); }
.ss-tab { flex: 1; padding: 13px; text-align: center; background: none; border: none; font-size: 14px; color: var(--bt-muted); border-bottom: 2px solid transparent; }
.ss-tab:hover { color: var(--bt-ink); }
.ss-tab.active { color: var(--bt-ink); font-weight: 600; border-bottom-color: var(--bt-accent); }
.ss-find { padding: 16px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--bt-border); }
.ss-side { background: #fff; border-left: 1px solid var(--bt-border); display: flex; flex-direction: column; }
.ss-side .ss-head { padding: 16px; border-bottom: 1px solid var(--bt-border); }
.ss-side .ss-head h2 { font-size: 18px; }
.ss-legend { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--bt-border); }
.ss-legend .item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--bt-muted); }
.ss-cart { flex: 1; overflow: auto; padding: 12px 16px; }
.ss-cart-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--bt-border); font-size: 14px; }
.ss-cart-item button { border: none; background: none; color: var(--bt-danger); }
.ss-foot { padding: 16px; border-top: 1px solid var(--bt-border); }
.ss-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
/* Step 2: customer details */
.ss-details { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ss-details .cb-field input { width: 100%; box-sizing: border-box; }
.ss-summary { background: #f8fafc; border: 1px solid var(--bt-border); border-radius: 8px; padding: 12px; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.ss-summary-h { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--bt-muted); margin-bottom: 4px; }
.ss-err { color: var(--bt-danger); font-size: 13px; }
.ss-tooltip {
  position: absolute; pointer-events: none; background: #111827; color: #fff; font-size: 12px;
  padding: 6px 9px; border-radius: 6px; transform: translate(-50%, -130%); white-space: nowrap; z-index: 5;
}
.ss-cta { width: 100%; padding: 14px; font-size: 16px; }

/* ---- Admin Dashboard ---- */
.ad-root { height: 100%; overflow: auto; padding: 24px; }
.ad-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.ad-card { padding: 18px; }
.ad-card .k { font-size: 13px; color: var(--bt-muted); }
.ad-card .v { font-size: 28px; font-weight: 800; margin-top: 4px; }
.ad-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
table.ad-table { width: 100%; border-collapse: collapse; }
table.ad-table th, table.ad-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--bt-border); font-size: 14px; }
table.ad-table th { color: var(--bt-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.ad-section-title { font-size: 16px; font-weight: 700; margin: 8px 4px 12px; }
.bt-empty { padding: 40px; text-align: center; color: var(--bt-muted); }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .ad-grid { grid-template-columns: repeat(2, 1fr); }
  .ad-two { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .bt-nav a { padding: 8px 9px; font-size: 13px; }
  .bt-topbar .bt-event-pill { display: none; }
  /* collapse sidebar to a horizontal strip on small screens */
  .bt-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .bt-sidebar { flex-direction: row; align-items: center; gap: 4px; padding: 6px 10px; overflow-x: auto; }
  .bt-sidebar .bt-side-section { display: none; }
}
/* Customer seat selector: stack map above panel on phones */
@media (max-width: 640px) {
  .ss-root { grid-template-columns: 1fr; grid-template-rows: 48vh 1fr; }
  .ss-side { border-left: none; border-top: 1px solid var(--bt-border); }
}
