/* ============================================================
   Travel Agency SaaS — Premium Travel Professional Theme
   Navy · Teal · White · restrained Gold
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Sans:wght@500;600;700&display=swap');

:root {
  /* Brand — clean solids, no gradients */
  --navy: #0B3D5C;
  --navy-dark: #072A40;
  --navy-light: #16507A;
  --teal: #0FA8A0;
  --teal-dark: #0C857E;
  --teal-light: #18C4BB;
  --gold: #E5A01D;
  --gold-soft: #F0BC4A;
  --coral: #F07167;
  --coral-soft: #F7A399;
  --sky: #2F8FE0;
  --sky-soft: #D4E9FA;
  --sand: #FFF6E8;

  /* Surfaces */
  --bg-page: #F2F8F7;
  --bg-white: #FFFFFF;
  --bg-muted: #E3F0EE;
  --bg-tint: #D5F0ED;

  /* Text */
  --text-main: #1A2B3C;
  --text-secondary: #5A6F80;
  --text-muted: #8AA0B0;
  --text-on-dark: #FFFFFF;
  --text-on-teal: #FFFFFF;

  /* Borders & shadows */
  --border: #D0E0E2;
  --border-strong: #B5CBCF;
  --shadow-sm: 0 1px 2px rgba(15, 39, 64, 0.05);
  --shadow: 0 2px 8px rgba(15, 39, 64, 0.07);
  --shadow-md: 0 8px 24px rgba(15, 39, 64, 0.1);

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 76px;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;

  /* Status */
  --success: #2F855A;
  --success-bg: #E6F4EC;
  --warning: #C05621;
  --warning-bg: #FEF3E8;
  --danger: #C53030;
  --danger-bg: #FEECEC;
  --info: #2B6CB0;
  --info-bg: #EBF4FF;

  /* Typography */
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Instrument Sans', 'DM Sans', sans-serif;
  --fs-page: 1.5rem;      /* 24px */
  --fs-section: 1.125rem; /* 18px */
  --fs-body: 0.9375rem;   /* 15px */
  --fs-table: 0.875rem;   /* 14px */
  --fs-label: 0.8125rem;  /* 13px */
  --fs-xs: 0.75rem;       /* 12px */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--text-main);
  background: var(--bg-page);
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--teal-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.h-page, .page-title {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.h-page { font-size: var(--fs-page); font-weight: 600; }
.h-section { font-size: var(--fs-section); font-weight: 600; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-navy { color: var(--navy) !important; }
.text-teal { color: var(--teal) !important; }
.text-gold { color: var(--gold) !important; }

.label {
  display: block;
  font-size: var(--fs-label);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-family: var(--font);
  font-size: var(--fs-table);
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--teal);
  color: var(--text-on-teal);
  border-color: var(--teal);
  box-shadow: 0 1px 2px rgba(11, 61, 92, 0.08);
}

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

.btn-navy {
  background: var(--navy);
  color: var(--text-on-dark);
  border-color: var(--navy);
}

.btn-navy:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: var(--text-on-dark);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong);
  color: var(--navy);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--bg-muted);
  color: var(--navy);
}

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

.btn-gold:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
  color: var(--navy);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: var(--fs-label);
}

.btn-lg {
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 1.125rem;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-family: var(--font);
  font-size: var(--fs-table);
  color: var(--text-main);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 140, 140, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control.is-invalid {
  border-color: var(--danger);
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

.form-error {
  font-size: var(--fs-xs);
  color: var(--danger);
  margin-top: 0.3rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-table);
  color: var(--text-secondary);
}

.form-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--teal);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-page);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ---------- Stat cards ---------- */
.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--teal);
}

.stat-card.accent-navy::before { background: var(--navy); }
.stat-card.accent-gold::before { background: var(--gold); }
.stat-card.accent-coral::before { background: var(--coral); }
.stat-card.accent-sky::before { background: var(--sky); }

.stat-card .stat-label {
  font-size: var(--fs-label);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.stat-card .stat-meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card .stat-icon.teal {
  background: rgba(22, 140, 140, 0.1);
  color: var(--teal);
}

.stat-card .stat-icon.navy {
  background: rgba(21, 48, 75, 0.08);
  color: var(--navy);
}

.stat-card .stat-icon.gold {
  background: rgba(215, 168, 75, 0.15);
  color: var(--gold);
}

.stat-card .stat-icon.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  border-radius: 4px;
  line-height: 1.4;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-navy { background: rgba(21, 48, 75, 0.08); color: var(--navy); }
.badge-teal { background: rgba(22, 140, 140, 0.12); color: var(--teal-dark); }
.badge-gold { background: rgba(215, 168, 75, 0.18); color: #8B6914; }
.badge-muted { background: var(--bg-muted); color: var(--text-secondary); }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-table);
}

.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: rgba(22, 140, 140, 0.03);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- Alerts ---------- */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-table);
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.alert-success { background: var(--success-bg); color: var(--success); border-color: #C6E6D3; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: #F5D9B8; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: #F5C6C6; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #C5DCF5; }

/* ---------- Utilities ---------- */
.d-flex { display: flex; }
.d-none { display: none; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.w-100 { width: 100%; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ---------- Grid helpers ---------- */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.625rem;
}

.col {
  flex: 1 1 0;
  padding: 0 0.625rem;
  min-width: 0;
}

.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 0.625rem; }
.col-6 { flex: 0 0 50%; max-width: 50%; padding: 0 0.625rem; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 0.625rem; }
.col-3 { flex: 0 0 25%; max-width: 25%; padding: 0 0.625rem; }

.g-row {
  display: grid;
  gap: 1.25rem;
}

.g-stats {
  grid-template-columns: repeat(4, 1fr);
}

.g-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1200px) {
  .g-stats { grid-template-columns: repeat(2, 1fr); }
  .col-3 { flex: 0 0 50%; max-width: 50%; }
}

@media (max-width: 768px) {
  .g-stats,
  .g-2 { grid-template-columns: 1fr; }
  .col-6,
  .col-4,
  .col-3 { flex: 0 0 100%; max-width: 100%; }
}
