/* ===== Open House Booking — shared + admin styles ===== */
:root {
  --ohb-primary: #1565c0;
  --ohb-primary-dark: #0d47a1;
  --ohb-sky: #e3f2fd;
  --ohb-sky-2: #bbdefb;
  --ohb-accent: #29b6f6;
  --st-available: #22c55e;
  --st-mine: #0ea5e9;
  --st-held: #f59e0b;
  --st-pending: #facc15;
  --st-booked: #ef4444;
  --st-confirmed: #8b5cf6;
  --st-closed: #c3c8d0;
  --st-current: #2563eb;
  --bs-font-sans-serif: "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-primary: #1565c0;
  --bs-primary-rgb: 21, 101, 192;
  --bs-link-color: #1565c0;
  --bs-link-color-rgb: 21, 101, 192;
}

body {
  font-family: var(--bs-font-sans-serif);
}

.btn-primary {
  --bs-btn-bg: #1565c0;
  --bs-btn-border-color: #1565c0;
  --bs-btn-hover-bg: #0d47a1;
  --bs-btn-hover-border-color: #0d47a1;
  --bs-btn-active-bg: #0b3d91;
}

.btn-outline-primary {
  --bs-btn-color: #1565c0;
  --bs-btn-border-color: #1565c0;
  --bs-btn-hover-bg: #1565c0;
  --bs-btn-hover-border-color: #1565c0;
}

.text-primary {
  color: #1565c0 !important
}

.bg-primary {
  background-color: #1565c0 !important
}

.text-purple {
  color: #7c3aed !important
}

.bg-purple {
  background: #7c3aed !important;
  color: #fff
}

.x-small {
  font-size: .72rem
}

.badge-st-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d
}

.badge-st-booked {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5
}

.badge-st-confirmed {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd
}

.badge-st-cancelled {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1
}

.text-bg-purple {
  background: #7c3aed;
  color: #fff
}

/* shared components */
.info-row {
  display: flex;
  gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px dashed #e2e8f0
}

.info-row:last-child {
  border-bottom: 0
}

.info-row .k {
  color: #64748b;
  min-width: 120px
}

.info-row .v {
  font-weight: 500
}

.qr-box {
  background: #fff;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  display: inline-block
}

.qr-box canvas,
.qr-box img {
  display: block;
  width: 180px !important;
  height: 180px !important
}

.seat-chip {
  display: inline-block;
  background: #ede9fe;
  color: #5b21b6;
  border-radius: 8px;
  padding: 2px 9px;
  margin: 2px;
  font-weight: 600;
  font-size: .85rem
}

/* admin */
.admin-body .app-sidebar {
  background: linear-gradient(180deg, #0d47a1 0%, #0b3270 100%) !important
}

.admin-body .sidebar-brand {
  border-bottom: 1px solid rgba(255, 255, 255, .12)
}

.admin-body .brand-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #1565c0;
  margin-right: .5rem
}

.admin-body .sidebar-menu .nav-link.active {
  background: rgba(255, 255, 255, .16) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 #4fc3f7
}

.admin-body .sidebar-menu .nav-header {
  color: rgba(255, 255, 255, .55);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase
}

.admin-body .app-content-header {
  padding-top: 1rem
}

.page-title {
  font-weight: 600;
  color: #0d2b5c;
  font-size: 1.35rem
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1565c0, #29b6f6);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600
}

.card {
  border: 0;
  box-shadow: 0 1px 3px rgba(15, 40, 90, .08), 0 4px 16px rgba(15, 40, 90, .04);
  border-radius: 14px
}

.card-header {
  background: transparent;
  border-bottom: 1px solid #eef2f7;
  font-weight: 600
}

.card-header .card-title {
  font-weight: 600;
  font-size: 1rem
}

.stat-card {
  border-radius: 16px;
  padding: 1rem 1.1rem;
  position: relative;
  overflow: hidden;
  background: #fff;
  height: 100%
}

.stat-card .stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  color: #0d2b5c
}

.stat-card .stat-label {
  color: #64748b;
  font-size: .85rem
}

.ic-blue {
  background: #e3f2fd;
  color: #1565c0
}

.ic-green {
  background: #dcfce7;
  color: #15803d
}

.ic-red {
  background: #fee2e2;
  color: #dc2626
}

.ic-yellow {
  background: #fef9c3;
  color: #a16207
}

.ic-purple {
  background: #ede9fe;
  color: #7c3aed
}

.ic-gray {
  background: #f1f5f9;
  color: #475569
}

.ic-cyan {
  background: #cffafe;
  color: #0e7490
}

.table thead th {
  background: #f5f8fc;
  color: #334155;
  font-weight: 600;
  font-size: .85rem;
  white-space: nowrap
}

.table td {
  vertical-align: middle
}

.notif-menu {
  width: 340px;
  max-width: 92vw
}

.notif-list {
  max-height: 380px;
  overflow: auto
}

.notif-item {
  white-space: normal;
  border-bottom: 1px solid #f1f5f9;
  padding: .6rem .9rem
}

.notif-item.unread {
  background: #f0f7ff
}

.filter-bar .form-control,
.filter-bar .form-select {
  min-width: 140px
}

.form-label {
  font-weight: 500;
  font-size: .9rem
}

.required:after {
  content: " *";
  color: #dc3545
}

.cover-thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: #e3f2fd
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  margin-right: 4px;
  vertical-align: -1px
}

.timeline-sm {
  border-left: 2px solid #dbe5f1;
  margin-left: .4rem;
  padding-left: 1rem
}

.timeline-sm .tl-item {
  position: relative;
  padding-bottom: .85rem
}

.timeline-sm .tl-item:before {
  content: "";
  position: absolute;
  left: -1.42rem;
  top: .3rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1565c0;
  box-shadow: 0 0 0 3px #e3f2fd
}

.nav-pills .nav-link.active {
  background: #1565c0
}

@media print {

  .app-header,
  .app-sidebar,
  .app-footer,
  .no-print,
  .app-content-header {
    display: none !important
  }

  .app-main {
    margin: 0 !important
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd
  }

  body {
    background: #fff !important
  }
}
/* QR เข้างานที่ยังไม่เปิดใช้ (รอชำระเงิน/รอยืนยัน) */
.entry-qr-locked {
  width: 200px;
  min-height: 200px;
  margin: 0 auto;
  border: 2px dashed currentColor;
  border-radius: 16px;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafcff;
}

.entry-qr-locked .lock-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entry-qr-locked .lock-icon i {
  color: #fff;
  font-size: 1.4rem
}
