:root {
  --bg: #f1f5f9;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
body {
  font-family: 'Red Hat Display', sans-serif;
  background: radial-gradient(circle at 20% 0%, #e8f0ff, transparent 35%), var(--bg);
  color: var(--text);
  line-height: 1.45;
}

.app-shell-grid { padding: 1rem; }
.mobile-topbar {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  padding: .7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1040;
}
.brand-mini { font-weight: 700; color: var(--text); }
#mobileMenu.offcanvas {
  background: linear-gradient(165deg, #0b2a5b 0%, #061b3f 100%);
  color: #dbeafe;
}
#mobileMenu.offcanvas,
#mobileMenu.offcanvas .offcanvas-header,
#mobileMenu.offcanvas .offcanvas-body {
  background: linear-gradient(165deg, #0b2a5b 0%, #061b3f 100%) !important;
}
#mobileMenu .offcanvas-header {
  border-bottom: 1px solid rgba(255,255,255,.12);
}
#mobileMenu .offcanvas-title { color: #ffffff; }
#mobileMenu .btn-close { filter: invert(1) grayscale(1) brightness(220%); }
#mobileMenu .menu-link.dark { color: #dbeafe !important; }
#mobileMenu .menu-link.dark:hover { color: #ffffff !important; }
#mobileMenu .offcanvas-body .btn-outline-danger {
  background: #ffffff;
  border-color: #ffffff;
  color: #b91c1c;
}

.desktop-sidebar .sidebar-card {
  background: linear-gradient(165deg, #0b2a5b 0%, #061b3f 100%);
  border-radius: 16px;
  padding: 1rem;
  height: calc(100vh - 2rem);
  position: sticky;
  top: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.desktop-sidebar .sidebar-card .menu-stack {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: .2rem;
  direction: rtl;
  scrollbar-width: thin;
  scrollbar-color: #4169e1 #0a2a58;
  -ms-overflow-style: auto;
}
.desktop-sidebar .sidebar-card .menu-stack > * {
  direction: ltr;
}
.desktop-sidebar .sidebar-card .menu-stack::-webkit-scrollbar {
  width: 2mm;
}
.desktop-sidebar .sidebar-card .menu-stack::-webkit-scrollbar-track {
  background: #0a2a58;
  border-radius: 999px;
}
.desktop-sidebar .sidebar-card .menu-stack::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #5a7dff 0%, #4169e1 100%);
  border-radius: 999px;
}
.brand-main { color: #fff; font-weight: 800; letter-spacing: .4px; }

.menu-stack { display: grid; gap: .45rem; }
.menu-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem .8rem;
  border-radius: .75rem;
  text-decoration: none;
  transition: all .18s ease;
}
.menu-link.dark { color: #dbeafe; }
.menu-link.dark:hover { background: rgba(59,130,246,.25); color: #fff; transform: translateX(2px); }
.menu-link.active { background: linear-gradient(90deg, var(--primary), #3b82f6); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }

.app-page-content { padding: 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.card .card-body { padding: 1.05rem 1.1rem; }
.card h3, .card h4, .card h5 { margin-bottom: .45rem; font-weight: 700; }

.btn {
  border-radius: .7rem;
  font-weight: 600;
  border: 1px solid transparent;
  padding: .55rem .9rem;
  transition: all .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(90deg, var(--primary), var(--primary-2)); border-color: transparent; }
.btn-success { background: linear-gradient(90deg, #16a34a, #15803d); border-color: transparent; }
.btn-outline-secondary { border-color: #cbd5e1; color: #334155; background: #fff; }
.btn-outline-danger { border-color: #fecaca; color: var(--danger); background: #fff; }

.form-label { font-weight: 600; font-size: .9rem; color: #334155; margin-bottom: .35rem; }
.form-control, .form-select {
  border-radius: .65rem;
  border: 1px solid #cbd5e1;
  padding: .58rem .72rem;
  background: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: #93c5fd;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.table { margin-bottom: 0; border-collapse: separate; border-spacing: 0; }
.table thead th {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.table td, .table th { padding: .78rem .65rem; border-bottom: 1px solid #eef2f7; }
.table-striped tbody tr:nth-child(odd) { background: #fcfdff; }
.table tbody tr:hover { background: #f8fbff; }

.hotel-row-card, .transport-row-card {
  background: #f8fafc;
  border: 1px solid #dbe7f5;
  border-radius: .85rem;
  padding: .85rem;
  margin-bottom: .75rem;
}

.badge {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.badge-paid { background: #dcfce7; color: #166534; }
.badge-unpaid { background: #fee2e2; color: #991b1b; }

@media (max-width: 991.98px) {
  .desktop-sidebar { display: none !important; }
  .app-shell-grid { padding: .75rem; }
  .card .card-body { padding: .9rem; }
}

.menu-badge {
  margin-left: auto;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.action-menu { position: relative; display: inline-block; }
.action-menu summary { list-style: none; cursor: pointer; }
.action-menu summary::-webkit-details-marker { display: none; }
.action-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + .35rem);
  min-width: 9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .65rem;
  box-shadow: var(--shadow);
  padding: .35rem;
  z-index: 20;
}
.action-menu-list a {
  display: block;
  padding: .45rem .6rem;
  color: var(--text);
  text-decoration: none;
  border-radius: .45rem;
}
.action-menu-list a:hover { background: #f1f5f9; }

.dashboard-card { position: relative; overflow: visible; }
.dashboard-card .card-body { padding-right: 3.25rem; }
.card-open-link {
  position: absolute;
  right: 1rem;
  top: .85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
}
.card-open-link:hover { background: #dbeafe; color: var(--primary-2); }
.card-dot-nav {
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  font-weight: 800;
  line-height: 1;
  cursor: help;
}
.card-dot-nav:hover { color: var(--primary); border-color: #bfdbfe; background: #f8fbff; }

.hotel-name-wrap { position: relative; }
.hotel-suggestions {
  position: absolute;
  left: .5rem;
  right: .5rem;
  top: calc(100% - .25rem);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .55rem;
  box-shadow: var(--shadow);
  z-index: 30;
  overflow: hidden;
}
.hotel-suggestions:empty { display: none; }
.hotel-suggestions button {
  display: block;
  width: 100%;
  padding: .45rem .6rem;
  border: 0;
  background: #fff;
  text-align: left;
}
.hotel-suggestions button:hover { background: #f1f5f9; }
.hotel-image-box {
  min-height: 2.55rem;
  border: 1px dashed #94a3b8;
  border-radius: .65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: #f8fafc;
  font-size: .85rem;
}
.hotel-image-preview {
  display: block;
  max-width: 100%;
  max-height: 90px;
  margin-top: .4rem;
  border-radius: .5rem;
  border: 1px solid var(--line);
}

.tour-hero {
  min-height: 125px;
  background: linear-gradient(135deg, #063b58 0%, #031f34 62%, #062b43 100%);
  color: #fff;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: -26px;
  overflow: hidden;
}
.tour-hero:after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 45%;
  height: 100%;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,.05));
  pointer-events: none;
}
.tour-hero h2 { font-weight: 800; margin: 0; position: relative; z-index: 1; font-size: 2rem; }
.tour-back {
  position: absolute;
  left: 1.25rem;
  color: #fff;
  font-size: 2rem;
  text-decoration: none;
  z-index: 2;
}
.tour-detail-card {
  background: #fff;
  border: 1px solid #efe7df;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
  padding: 1.35rem 1.45rem;
  margin: 0 1rem 1.05rem;
  position: relative;
}
.tour-detail-card h4, .tour-detail-card h5 {
  color: #083a5b;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.tour-detail-card h4 > i {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: #063b58;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex: 0 0 auto;
}
.tour-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}
.tour-info-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #e8e2db; }
.tour-info-grid > div {
  padding: .85rem 1rem;
  border-bottom: 1px solid #e8e2db;
}
.tour-info-grid > div:nth-child(even) { border-left: 1px solid #e8e2db; }
.tour-info-grid.compact > div:nth-child(even) { border-left: 0; }
.tour-info-grid.compact > div { border-right: 1px solid #e8e2db; }
.tour-info-grid.compact > div:nth-child(4n) { border-right: 0; }
.tour-info-grid span {
  display: block;
  color: var(--muted);
  font-size: .85rem;
}
.tour-info-grid strong { font-size: 1rem; }
.tour-info-grid .wide { grid-column: 1 / -1; }
.hotel-detail-item {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 1.15rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid #e8e2db;
}
.hotel-detail-item:last-child { border-bottom: 0; }
.hotel-thumb img, .hotel-thumb-empty {
  width: 250px;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.hotel-detail-body h5 {
  margin-bottom: .75rem;
  color: #083a5b;
  font-size: 1.2rem;
}
.voucher-link {
  display: inline-flex;
  margin-top: .8rem;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}
.voucher-link:hover { color: var(--primary-2); text-decoration: underline; }
@media (max-width: 767.98px) {
  .tour-info-grid, .tour-info-grid.compact { grid-template-columns: 1fr; }
  .tour-info-grid > div,
  .tour-info-grid > div:nth-child(even),
  .tour-info-grid.compact > div {
    border-left: 0;
    border-right: 0;
  }
  .hotel-detail-item { grid-template-columns: 1fr; }
  .hotel-thumb img, .hotel-thumb-empty { width: 100%; }
}
