:root {
  --bc-bg: #f5f7fb;
  --bc-surface: #ffffff;
  --bc-border: #dbe3ef;
  --bc-border-soft: #e9eef5;
  --bc-text: #172033;
  --bc-muted: #6c788c;
  --bc-primary: #16457a;
  --bc-primary-soft: #e7f0fb;
  --bc-success: #16845b;
  --bc-warning: #a96700;
  --bc-danger: #bd2f3a;
  --bc-info: #2367c8;
  --bc-sidebar: #0f2742;
  --bc-sidebar-muted: #92a8bd;
  --bc-shadow: 0 8px 24px rgba(15, 39, 66, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bc-bg);
  color: var(--bc-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1030;
  width: 280px;
  background: var(--bc-sidebar);
  color: #fff;
  overflow-y: auto;
  transition: transform 0.18s ease;
}

.sidebar-brand {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--bc-primary);
  font-weight: 800;
}

.brand-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.brand-subtitle {
  display: block;
  color: var(--bc-sidebar-muted);
  font-size: 12px;
}

.sidebar-section {
  margin: 18px 0 8px;
  padding: 0 18px;
  color: var(--bc-sidebar-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0 12px 18px;
}

.sidebar-link {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  padding: 9px 10px;
  border-radius: 8px;
  color: #dbe8f6;
  font-weight: 600;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-link .bi {
  width: 18px;
  text-align: center;
}

.sidebar-submenu {
  list-style: none;
  margin: 2px 0 8px 32px;
  padding: 0;
}

.sidebar-submenu a {
  display: block;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--bc-sidebar-muted);
  font-size: 13px;
}

.sidebar-submenu a:hover,
.sidebar-submenu a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.app-main {
  min-width: 0;
  width: 100%;
  margin-left: 280px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(245, 247, 251, 0.92);
  border-bottom: 1px solid var(--bc-border-soft);
  backdrop-filter: blur(12px);
}

.header-search {
  max-width: 430px;
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-wrap {
  padding: 22px 24px 42px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-title {
  margin: 0;
  color: var(--bc-text);
  font-size: 24px;
  font-weight: 800;
}

.page-subtitle {
  margin: 5px 0 0;
  color: var(--bc-muted);
}

.panel-card,
.stat-card,
.filter-card,
.form-card {
  background: var(--bc-surface);
  border: 1px solid var(--bc-border-soft);
  border-radius: 8px;
  box-shadow: var(--bc-shadow);
}

.panel-card {
  padding: 18px;
}

.stat-card {
  min-height: 112px;
  padding: 16px;
}

.stat-label {
  margin-bottom: 8px;
  color: var(--bc-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.stat-value {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
}

.stat-note {
  margin: 8px 0 0;
  color: var(--bc-muted);
  font-size: 12px;
}

.section-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
}

.section-subtitle {
  margin: -7px 0 14px;
  color: var(--bc-muted);
  font-size: 13px;
}

.filter-card {
  padding: 14px;
  margin-bottom: 16px;
}

.table-card {
  overflow: hidden;
  background: var(--bc-surface);
  border: 1px solid var(--bc-border-soft);
  border-radius: 8px;
  box-shadow: var(--bc-shadow);
}

.table-responsive {
  min-height: 1px;
}

.data-table {
  margin-bottom: 0;
  min-width: 980px;
  vertical-align: middle;
}

.data-table th {
  color: var(--bc-muted);
  background: #f8fafd;
  border-bottom-color: var(--bc-border);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  color: #26334a;
  border-bottom-color: var(--bc-border-soft);
}

.table-actions {
  white-space: nowrap;
}

.money-text {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.muted-small {
  color: var(--bc-muted);
  font-size: 12px;
}

.badge-soft-success,
.badge-soft-warning,
.badge-soft-danger,
.badge-soft-info,
.badge-soft-secondary,
.badge-soft-primary {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.badge-soft-success {
  color: #116b49;
  background: #e7f6ef;
  border-color: #c7ead9;
}

.badge-soft-warning {
  color: #8b5300;
  background: #fff4df;
  border-color: #ffe1a6;
}

.badge-soft-danger {
  color: #a3202c;
  background: #fdecee;
  border-color: #f9cfd5;
}

.badge-soft-info {
  color: #194f9a;
  background: #e8f1ff;
  border-color: #c9dcfb;
}

.badge-soft-secondary {
  color: #536178;
  background: #eef2f7;
  border-color: #dbe3ef;
}

.badge-soft-primary {
  color: var(--bc-primary);
  background: var(--bc-primary-soft);
  border-color: #cbdcf0;
}

.form-card {
  padding: 18px;
  margin-bottom: 18px;
}

.form-section-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
}

.pax-total-box {
  padding: 12px 0;
}

.required-mark {
  color: var(--bc-danger);
  font-weight: 800;
}

.field-help,
.field-error {
  margin-top: 5px;
  font-size: 12px;
}

.field-help {
  color: var(--bc-muted);
}

.field-error {
  display: none;
  color: var(--bc-danger);
}

.is-invalid + .field-error,
.is-invalid ~ .field-error {
  display: block;
}

.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--bc-muted);
}

.empty-state-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 8px;
  background: var(--bc-primary-soft);
  color: var(--bc-primary);
}

.timeline {
  position: relative;
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin: 5px auto 0;
  border-radius: 999px;
  background: var(--bc-primary);
}

.summary-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 10px;
}

.summary-item {
  padding: 12px;
  border: 1px solid var(--bc-border-soft);
  border-radius: 8px;
  background: #fff;
}

.summary-item span {
  display: block;
  color: var(--bc-muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-item strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.quick-entry-table input,
.quick-entry-table select {
  min-width: 120px;
}

.table-zone-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 14px;
}

.table-zone {
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--bc-border-soft);
  border-radius: 8px;
  background: #fff;
}

.reservation-chip {
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--bc-border-soft);
  border-left: 4px solid var(--bc-primary);
  border-radius: 8px;
  background: #f8fafd;
}

.toast-container {
  z-index: 1080;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1025;
  background: rgba(15, 32, 51, 0.45);
}

.loading-skeleton {
  min-height: 90px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef3f9, #f8fafc, #eef3f9);
  background-size: 180% 100%;
  animation: skeleton 1.2s infinite linear;
}

@keyframes skeleton {
  0% { background-position: 180% 0; }
  100% { background-position: -180% 0; }
}

@media (max-width: 1199.98px) {
  .summary-bar {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .table-zone-grid {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .app-main {
    margin-left: 0;
  }

  .app-header {
    padding: 12px 16px;
  }

  .content-wrap {
    padding: 18px 16px 32px;
  }
}

@media (max-width: 767.98px) {
  .page-header {
    display: block;
  }

  .page-header .btn,
  .page-header .btn-group {
    margin-top: 12px;
  }

  .header-search {
    display: none;
  }

  .summary-bar,
  .table-zone-grid {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 22px;
  }
}
