/* Orbis Table — base styles (Orbis blue #1786E8, orange accent #F26A1B, Poppins) */
:root {
  --primary: #1786E8;
  --primary-dark: #1272c8;
  --accent: #F26A1B;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Poppins', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3 { margin: 0 0 12px; }

.btn { display: inline-block; padding: 9px 18px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

input, select, textarea { width: 100%; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; background: #fff; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

/* Auth screens */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.auth-card { background: var(--card); border-radius: 14px; box-shadow: 0 4px 24px rgba(2,32,71,.08); padding: 36px; width: 100%; max-width: 400px; }
.auth-logo { height: 44px; margin-bottom: 16px; }
.auth-card h1 { font-size: 20px; }
.auth-card form button { margin-top: 20px; }
.auth-alt { text-align: center; color: var(--muted); margin-top: 16px; font-size: 13px; }

/* App shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 230px; background: #0b2540; color: #cbd5e1; padding: 20px 0; flex-shrink: 0; }
.sidebar .brand { padding: 0 20px 18px; }
.sidebar .brand img { height: 34px; }
.sidebar a.nav-item { display: block; padding: 10px 20px; color: #cbd5e1; font-weight: 500; }
.sidebar a.nav-item:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.sidebar a.nav-item.active { background: var(--primary); color: #fff; }
.main { flex: 1; padding: 24px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }

table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
table.data th, table.data td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
table.data th { background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-confirmed { background: #dbeafe; color: #1d4ed8; }
.badge-pending { background: #fef3c7; color: #b45309; }
.badge-seated { background: #dcfce7; color: #15803d; }
.badge-completed { background: #e2e8f0; color: #475569; }
.badge-cancelled, .badge-no_show { background: #fee2e2; color: #b91c1c; }

@media (max-width: 800px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; display: flex; overflow-x: auto; padding: 8px; }
  .sidebar a.nav-item { white-space: nowrap; }
}

/* ---- App additions (Orbis Table) ---- */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sidebar-foot { margin-top: 24px; padding: 0 20px; }
.sidebar-user { color: #94a3b8; font-size: 13px; margin-bottom: 8px; }
.sidebar-label { padding: 0 20px 8px; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; color: #64748b; }
.sidebar-dark { background: #071a2f; }

.row-actions { display: flex; gap: 10px; align-items: center; }
.inline-form { display: inline; }
.inline-form select { width: auto; display: inline-block; padding: 6px 8px; }
.quick-actions { white-space: nowrap; }
.quick-actions form { display: inline-block; }

.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat-num { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.form-grid label { margin-top: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.checkline { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 500; }
.checkline input { width: auto; }
.note-icon { cursor: help; }
.src { text-transform: capitalize; color: var(--muted); font-size: 13px; }

.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tab { padding: 8px 16px; border-radius: 8px 8px 0 0; background: #e2e8f0; color: var(--text); font-weight: 600; }
.tab.active { background: var(--primary); color: #fff; }
.tab:hover { text-decoration: none; }

.fp-legend { display: flex; gap: 18px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.fp-legend .dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 5px; }
.fp-legend .dot.free { background: #16a34a; }
.fp-legend .dot.booked { background: #f59e0b; }
.fp-legend .dot.seated { background: #2563eb; }

.floor-canvas { position: relative; min-height: 460px; background: #f8fafc; border: 1px dashed var(--border); border-radius: 8px; overflow: auto; }
.floor-canvas.editing { background: repeating-linear-gradient(0deg,#f1f5f9,#f1f5f9 19px,#e2e8f0 20px), repeating-linear-gradient(90deg,#f1f5f9,#f1f5f9 19px,#e2e8f0 20px); }
.fp-table { position: absolute; border-radius: 8px; border: 2px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; text-align: center; padding: 4px; user-select: none; }
.fp-table.round { border-radius: 50%; }
.fp-table .fp-name { font-weight: 700; }
.fp-table .fp-cap { font-size: 10px; opacity: .7; }
.fp-table .fp-guest { font-size: 10px; margin-top: 2px; }
.fp-free { background: #dcfce7; border-color: #16a34a; color: #14532d; }
.fp-booked { background: #fef3c7; border-color: #f59e0b; color: #7c2d12; }
.fp-seated { background: #dbeafe; border-color: #2563eb; color: #1e3a8a; }

code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: 12px; }

@media (max-width: 800px) {
  .stat-row { grid-template-columns: repeat(2,1fr); }
  .form-grid, .two-col { grid-template-columns: 1fr; }
}
