:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --border: #d8e1ec;
  --text: #163047;
  --muted: #61758a;
  --primary: #0e7490;
  --primary-dark: #155e75;
  --accent: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 18px 50px rgba(22, 48, 71, 0.08);
}

html {
  font-size: 14px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(14, 116, 144, 0.12), transparent 28%),
    linear-gradient(180deg, #f9fbff 0%, var(--bg) 100%);
  color: var(--text);
}

a {
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(216, 225, 236, 0.8);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
}

.brand-subtitle {
  margin-top: 8px;
  color: var(--muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 32px;
}

.sidebar-nav a {
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--muted);
  font-weight: 700;
  transition: all 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.12), rgba(245, 158, 11, 0.12));
  color: var(--text);
}

.sidebar-user {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.sidebar-user__name {
  font-weight: 800;
}

.sidebar-user__role {
  color: var(--muted);
  margin-top: 4px;
}

.content-area {
  padding: 28px;
}

.content-header {
  margin-bottom: 24px;
}

.content-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
}

.panel-card,
.stat-card,
.login-card,
.empty-state {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(216, 225, 236, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.panel-card,
.login-card,
.empty-state {
  padding: 24px;
}

.form-card {
  max-width: 980px;
}

.stat-card {
  padding: 22px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 12px;
}

.stat-card strong {
  font-size: 2rem;
  font-weight: 800;
}

.stat-card.compact strong {
  font-size: 1.5rem;
}

.stat-card.warning {
  border-color: rgba(245, 158, 11, 0.4);
}

.tour-card-link {
  display: block;
  color: inherit;
}

.tour-card-item,
.participant-item {
  padding: 16px;
  border-radius: 20px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.tour-card-item + .tour-card-item,
.participant-item + .participant-item,
.tour-card-link + .tour-card-link {
  margin-top: 12px;
}

.tour-card-item strong,
.participant-item strong {
  display: block;
}

.tour-card-item p,
.participant-item p {
  margin: 6px 0;
  color: var(--muted);
}

.tour-card-item span,
.participant-item span {
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.detail-grid span,
.detail-label {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.day-table th,
.day-table td {
  min-width: 88px;
  text-align: center;
  vertical-align: middle;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: min(100%, 520px);
}

.login-card h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-top: 10px;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.1);
  color: var(--primary-dark);
  font-weight: 700;
}

.demo-box {
  padding: 16px;
  background: var(--surface-muted);
  border: 1px dashed var(--border);
  border-radius: 20px;
}

.empty-state {
  max-width: 600px;
  margin: 80px auto;
  text-align: center;
}

.table > :not(caption) > * > * {
  padding: 1rem 0.85rem;
}

.report-page {
  display: grid;
  gap: 20px;
}

.report-actions {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}

.report-meta h2 {
  margin: 10px 0 6px;
  font-size: 1.9rem;
  font-weight: 800;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.report-table-shell {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(216, 225, 236, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.report-table-wrap {
  overflow: auto;
  max-width: 100%;
}

.report-table-wrap-standalone {
  height: 100vh;
  max-height: 100vh;
}

.report-sheet {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 2100px;
  width: max-content;
  background: #fff;
}

.report-sheet th,
.report-sheet td {
  border-right: 1px solid #c8d2df;
  border-bottom: 1px solid #c8d2df;
  padding: 8px 7px;
  vertical-align: middle;
  white-space: nowrap;
}

.report-sheet thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #eef3f8;
  color: #23364a;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  font-weight: 800;
}

.report-sheet .info-col {
  text-align: left;
}

.report-sheet .itinerary-col {
  min-width: 310px;
  max-width: 310px;
}

.report-sheet .code-col {
  min-width: 140px;
  max-width: 140px;
}

.report-sheet .pax-col {
  min-width: 90px;
  max-width: 90px;
  text-align: center;
}

.report-sheet .guide-col {
  min-width: 240px;
  max-width: 240px;
}

.report-sheet .day-number-col {
  min-width: 78px;
  text-align: center;
}

.report-sheet .sticky-col {
  position: sticky;
  z-index: 6;
  background: #fff;
}

.report-sheet thead .sticky-col {
  z-index: 10;
  background: #eef3f8;
}

.report-sheet .sticky-col-1 { left: 0; }
.report-sheet .sticky-col-2 { left: 310px; }
.report-sheet .sticky-col-3 { left: 450px; }
.report-sheet .sticky-col-4 { left: 540px; }

.report-info-cell {
  font-weight: 700;
  color: #10273a;
}

.report-itinerary-name {
  font-size: 0.95rem;
  line-height: 1.25;
}

.report-subtext {
  display: block;
  margin-top: 8px;
  color: #6b7c8f;
  font-size: 0.78rem;
  font-weight: 700;
}

.report-guide-name {
  font-size: 0.88rem;
  line-height: 1.3;
}

.report-day-cell {
  min-width: 78px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #fff;
  line-height: 1.15;
}

.report-day-cell.filled {
  background: #0f2a68;
  color: #fff;
}

.report-day-cell.empty {
  color: transparent;
}

.report-sheet-standalone {
  min-width: 2960px;
}

.report-sheet-standalone tbody tr:nth-child(even) .report-info-cell {
  background: #f9fbfd;
}

.report-sheet-standalone tbody tr:hover .report-info-cell,
.report-sheet-standalone tbody tr:hover .report-day-cell.empty {
  background: #f1f6fb;
}

.report-sheet-standalone tbody tr:hover .report-day-cell.filled {
  background: #16357c;
}

.report-standalone-body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
}

.report-viewport {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.report-mobile-list,
.report-mobile-days {
  display: grid;
  gap: 14px;
}

.report-mobile-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(216, 225, 236, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.report-mobile-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.report-mobile-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.report-mobile-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.report-mobile-days {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-mobile-day {
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  min-height: 74px;
}

.report-mobile-day span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.report-mobile-day strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #10273a;
}

.report-mobile-day.filled {
  background: #0f2a68;
  border-color: #0f2a68;
}

.report-mobile-day.filled span,
.report-mobile-day.filled strong {
  color: #fff;
}

.form-control,
.form-select {
  border-radius: 14px;
  border-color: var(--border);
  padding: 0.75rem 0.95rem;
}

.btn {
  border-radius: 14px;
  font-weight: 700;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

@media (max-width: 992px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 24px;
  }

  .content-area {
    padding: 20px;
  }

  .report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .content-header h1 {
    font-size: 1.6rem;
  }

  .report-summary-grid,
  .report-mobile-days {
    grid-template-columns: 1fr;
  }

  .report-mobile-header {
    flex-direction: column;
  }

  .report-table-wrap-standalone {
    height: 100vh;
  }

  .report-sheet-standalone {
    min-width: 2600px;
  }
}
