@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary: #05443b;
  --primary-light: #086b5e;
  --primary-dark: #032d27;
  --accent-gold: #d4af37;
  --accent-gold-hover: #b89628;
  --bg-main: #f4f7f6;
  --bg-surface: #ffffff;
  --bg-dark: #0b192c;
  --text-main: #102a27;
  --text-muted: #5c7370;
  --border-light: #e2ece9;
  --border-focus: #086b5e;
  --shadow-sm: 0 2px 8px rgba(5, 68, 59, 0.05);
  --shadow-md: 0 8px 24px rgba(5, 68, 59, 0.08);
  --shadow-lg: 0 16px 40px rgba(5, 68, 59, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Navigation Bar */
.navbar {
  background: var(--bg-dark);
  color: #fff;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.brand-logo img {
  height: 40px;
  width: auto;
  border-radius: 6px;
  object-fit: contain;
}

.brand-logo .logo-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-logo .logo-sub {
  font-size: 0.6rem;
  color: var(--accent-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  display: block;
}

.hamburger {
  display: none;
  background: none;
  border: 2px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-link {
  color: #a0aec0;
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.82rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-badge span {
  font-size: 0.8rem;
}

.role-pill {
  background: var(--accent-gold);
  color: var(--bg-dark);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Laptop: 1024px and below */
@media (max-width: 1100px) {
  .navbar {
    padding: 0.5rem 1rem;
  }
  .nav-link {
    font-size: 0.78rem;
    padding: 0.35rem 0.55rem;
  }
  .brand-logo .logo-title {
    font-size: 1.05rem;
  }
  .brand-logo img {
    height: 34px;
  }
  .nav-right .user-badge span:first-child {
    display: none;
  }
}

/* Tablet & Mobile */
@media (max-width: 860px) {
  .hamburger {
    display: block;
  }

  .navbar {
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 0.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    padding: 0.65rem 0.75rem;
    font-size: 0.88rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .nav-link.active {
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-right {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 0.25rem;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .currency-switcher {
    width: 100%;
  }

  .currency-switcher select {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0.5rem 0.75rem;
  }
  .brand-logo .logo-title {
    font-size: 0.95rem;
  }
  .brand-logo .logo-sub {
    font-size: 0.5rem;
  }
  .brand-logo img {
    height: 30px;
  }
  .nav-right .user-badge .role-pill {
    display: none;
  }
}

/* Layout Shell */
.app-container {
  max-width: 1200px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
}

.narrow-container {
  max-width: 480px;
  margin: 3rem auto;
}

/* Glass & Surface Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.25;
}

h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.3rem;
}

.muted { color: var(--text-muted); font-size: 0.92rem; }

/* Dashboard Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7faf9 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.metric-card.gold::before { background: var(--accent-gold); }

.metric-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.4rem 0;
}

.metric-sub {
  font-size: 0.8rem;
  color: var(--primary-light);
  font-weight: 600;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.data-table th {
  background: #edf4f2;
  color: var(--primary-dark);
  font-weight: 700;
  padding: 0.9rem 1rem;
  border-bottom: 2px solid var(--border-light);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background-color: #f8fcfa;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-ticketed, .badge-confirmed, .badge-active, .badge-paid {
  background: #e6f4f1;
  color: #056657;
}

.badge-pending {
  background: #fef4e5;
  color: #b47818;
}

.badge-cancelled {
  background: #fde8e8;
  color: #c53030;
}

/* Forms & Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text-main);
  transition: border-color 0.2s;
}

.form-control:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(8, 107, 94, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent-gold);
  color: var(--bg-dark);
}

.btn-accent:hover {
  background: var(--accent-gold-hover);
}

.btn-secondary {
  background: #e2ece9;
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #cbdcd7;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.alert-danger {
  background: #fde8e8;
  color: #9b2c2c;
  border-left: 4px solid #e53e3e;
}

.alert-success {
  background: #e6f4f1;
  color: #056657;
  border-left: 4px solid #086b5e;
}

/* E-Ticket / Boarding Pass View */
.ticket-wrapper {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin: 2rem 0;
}

.ticket-header {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-airline-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ticket-airline-brand h2 {
  color: var(--accent-gold);
  font-size: 1.4rem;
}

.ticket-body {
  padding: 2rem;
}

.flight-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f7faf9;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-light);
}

.airport-code {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
}

.airport-name {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.route-divider {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 2rem;
}

.route-line {
  width: 100%;
  height: 2px;
  background: var(--accent-gold);
  position: relative;
  margin: 0.5rem 0;
}

.route-line::after {
  content: '✈';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  color: var(--primary);
}

.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.ticket-field label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ticket-field val {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0.2rem;
}

.barcode-sim {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.barcode-lines {
  height: 48px;
  width: 240px;
  background: repeating-linear-gradient(90deg, #000, #000 3px, #fff 3px, #fff 7px);
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: auto;
  border-top: 1px solid var(--border-light);
}

@media print {
  .navbar, footer, .btn-no-print {
    display: none !important;
  }
  .app-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .ticket-wrapper {
    border: none;
    box-shadow: none;
  }
}

/* Responsive: App Container */
@media (max-width: 860px) {
  .app-container {
    margin: 1rem auto;
    padding: 0 0.75rem;
  }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  .metric-value { font-size: 1.6rem; }
  .card { padding: 1.25rem; }
  .ticket-header { flex-direction: column; gap: 1rem; text-align: center; padding: 1.25rem; }
  .ticket-body { padding: 1.25rem; }
  .flight-route { flex-direction: column; gap: 1rem; text-align: center; padding: 1rem; }
  .route-divider { margin: 0.5rem 0; }
  .airport-code { font-size: 1.8rem; }
  .ticket-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .barcode-sim { flex-direction: column; gap: 1rem; text-align: center; }
  .barcode-lines { width: 100%; max-width: 240px; }
}

@media (max-width: 480px) {
  .app-container { padding: 0 0.5rem; margin: 0.5rem auto; }
  .card { padding: 1rem; border-radius: var(--radius-sm); }
  h1 { font-size: 1.3rem; }
  .ticket-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .btn { padding: 0.6rem 1rem; font-size: 0.85rem; }
  .btn-sm { padding: 0.35rem 0.6rem; font-size: 0.75rem; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 0.6rem 0.5rem; }
}

/* Currency Switcher */
.currency-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.currency-switcher label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 700;
  white-space: nowrap;
}

.currency-switcher select {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-dark);
  color: #fff;
  border: 1px solid var(--accent-gold);
  cursor: pointer;
  width: auto;
}
