/* ── Reset & base ─────────────────────────────────────────────── */
.bida-wrap *, .bida-wrap *::before, .bida-wrap *::after { box-sizing: border-box; }
.bida-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1a1a1a; max-width: 900px; margin: 0 auto; padding: 16px; }

/* ── Header ──────────────────────────────────────────────────── */
.bida-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.bida-logo { font-size: 20px; font-weight: 700; color: #1a1a1a; margin: 0; }
.bida-logo span { color: #2563eb; font-weight: 400; }

/* ── Tabs ────────────────────────────────────────────────────── */
.bida-tabs { display: flex; gap: 4px; border-bottom: 2px solid #e5e7eb; margin-bottom: 20px; flex-wrap: wrap; }
.bida-tab { background: none; border: none; padding: 10px 16px; cursor: pointer; font-size: 14px; color: #6b7280; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s; }
.bida-tab:hover { color: #2563eb; }
.bida-tab.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }
.bida-tab-content { display: none; }
.bida-tab-content.active { display: block; }

/* ── Buttons ─────────────────────────────────────────────────── */
.bida-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; font-weight: 600; background: #2563eb; color: #fff; transition: background .15s; white-space: nowrap; }
.bida-btn:hover { background: #1d4ed8; }
.bida-btn--sm { padding: 6px 12px; font-size: 13px; }
.bida-btn--outline { background: transparent; border: 1.5px solid #2563eb; color: #2563eb; }
.bida-btn--outline:hover { background: #eff6ff; }
.bida-btn--success { background: #16a34a; }
.bida-btn--success:hover { background: #15803d; }
.bida-btn--danger { background: #dc2626; }
.bida-btn--danger:hover { background: #b91c1c; }
.bida-btn--ghost { background: #f3f4f6; color: #374151; }
.bida-btn--ghost:hover { background: #e5e7eb; }
.bida-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Form card ───────────────────────────────────────────────── */
.bida-form-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.bida-form-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 14px; }
.bida-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bida-row input { flex: 1; min-width: 160px; padding: 9px 12px; border: 1.5px solid #d1d5db; border-radius: 8px; font-size: 14px; color: #1a1a1a; }
.bida-row input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.bida-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.bida-form-grid input { padding: 9px 12px; border: 1.5px solid #d1d5db; border-radius: 8px; font-size: 14px; }
.bida-form-grid input:focus { outline: none; border-color: #2563eb; }

/* ── Tables grid ─────────────────────────────────────────────── */
.bida-tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.bida-table-card { background: #fff; border: 2px solid #e5e7eb; border-radius: 12px; padding: 16px; cursor: pointer; transition: all .2s; }
.bida-table-card:hover { border-color: #2563eb; box-shadow: 0 4px 12px rgba(37,99,235,.1); }
.bida-table-card.occupied { background: #fef2f2; border-color: #fca5a5; }
.bida-table-card.occupied:hover { border-color: #dc2626; }
.bida-table-card .tc-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.bida-table-card .tc-type { font-size: 12px; color: #6b7280; text-transform: capitalize; }
.bida-table-card .tc-price { font-size: 13px; color: #374151; margin: 6px 0; }
.bida-table-card .tc-status { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.tc-status.available { background: #dcfce7; color: #15803d; }
.tc-status.occupied  { background: #fee2e2; color: #dc2626; }
.bida-table-card .tc-elapsed { font-size: 12px; color: #6b7280; margin-top: 4px; }
.bida-table-card .tc-guest { font-size: 13px; font-weight: 600; color: #1a1a1a; margin-top: 6px; }

/* ── Account badge ───────────────────────────────────────────── */
.bida-account-badge { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.bida-account-badge span { font-size: 14px; }
.bida-tier { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.bida-tier-standard, .bida-tier[data-tier="standard"] { background: #f3f4f6; color: #374151; }
.bida-tier[data-tier="vip"], .tier-vip { background: #fef9c3; color: #854d0e; }
.bida-tier[data-tier="pro"], .tier-pro { background: #ede9fe; color: #5b21b6; }

/* ── Result block ────────────────────────────────────────────── */
.bida-result { background: #f9fafb; border-radius: 10px; padding: 14px; margin-top: 12px; }
.bida-result table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bida-result td { padding: 6px 4px; }
.bida-result td:first-child { color: #6b7280; width: 140px; }

/* ── Modal ───────────────────────────────────────────────────── */
.bida-modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.bida-modal-box { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.bida-modal-box h3 { font-size: 18px; font-weight: 700; margin: 0 0 16px; }
.bida-modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
.bida-meta { font-size: 13px; color: #6b7280; margin-bottom: 12px; }

/* ── Bill ────────────────────────────────────────────────────── */
.bida-bill { font-size: 14px; }
.bida-bill-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #e5e7eb; }
.bida-bill-row:last-child { border-bottom: none; }
.bida-bill-row.total { font-size: 16px; font-weight: 700; color: #dc2626; border-top: 2px solid #1a1a1a; border-bottom: none; padding-top: 12px; }
.bida-bill-row.points { color: #16a34a; }

/* ── Toast ───────────────────────────────────────────────────── */
.bida-toast { position: fixed; bottom: 24px; right: 24px; background: #1a1a1a; color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; z-index: 99999; max-width: 320px; animation: bida-slide-in .2s ease; }
.bida-toast.success { background: #15803d; }
.bida-toast.error   { background: #dc2626; }
@keyframes bida-slide-in { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Loading ─────────────────────────────────────────────────── */
.bida-loading { color: #6b7280; font-size: 14px; padding: 20px 0; }

/* ── Customer panel ──────────────────────────────────────────── */
.bida-customer .bida-form-card { max-width: 520px; margin: 0 auto; }
.bida-center { text-align: center; }
.bida-center h2 { font-size: 22px; margin-bottom: 8px; }
.bida-row--center { justify-content: center; }
.bida-history-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 14px; text-align: left; }
.bida-history-table th { background: #f3f4f6; padding: 8px 10px; font-weight: 600; }
.bida-history-table td { padding: 7px 10px; border-bottom: 1px solid #e5e7eb; }
.bida-balance-box { background: #eff6ff; border-radius: 12px; padding: 16px; margin: 16px 0 0; text-align: center; }
.bida-balance-box .bal-label { font-size: 13px; color: #6b7280; }
.bida-balance-box .bal-value { font-size: 32px; font-weight: 800; color: #2563eb; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .bida-tables-grid { grid-template-columns: repeat(2, 1fr); }
  .bida-modal-box { padding: 16px; }
  .bida-row { flex-direction: column; }
  .bida-row input { min-width: unset; width: 100%; }
  .bida-btn { width: 100%; justify-content: center; }
}
@media print {
  .bida-modal-actions, .bida-tabs, .bida-header, .bida-tables-grid, #tab-lookup, #tab-topup, #tab-new-account { display: none !important; }
  .bida-modal { position: static; background: none; }
  .bida-modal-box { box-shadow: none; max-width: 100%; }
}
