:root {
  --primary: #efd005;
  --black: #000000;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #dddddd;
  --gray-400: #bbbbbb;
  --gray-500: #999999;
  --gray-600: #666666;
  --gray-700: #333333;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #f59e0b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --max-width: 480px;
  --header-height: 56px;
  --bottom-nav-height: 64px;
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* =====================
   LAYOUT SHELL
   ===================== */
.app-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--black);
}

/* Header */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--black);
  border-bottom: 1px solid var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  max-width: var(--max-width);
  margin: 0 auto;
}

.app-header .logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

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

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.icon-btn:hover, .icon-btn:active {
  background: rgba(239, 208, 5, 0.15);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: calc(var(--header-height) + 16px) 16px calc(var(--bottom-nav-height) + 16px) 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* =====================
   BOTTOM NAVIGATION
   ===================== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: var(--black);
  border-top: 1px solid var(--gray-700);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  max-width: var(--max-width);
  margin: 0 auto;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 0;
  color: var(--gray-500);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  border: none;
  background: none;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--primary);
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
}

/* =====================
   SIDE DRAWER (Hamburger)
   ===================== */
.side-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.side-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.side-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 280px;
  height: 100vh;
  background: var(--gray-700);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.side-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--gray-600);
}

.drawer-header .drawer-logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}

.drawer-header .drawer-user {
  margin-top: 8px;
  font-size: 14px;
  color: var(--gray-400);
}

.drawer-nav {
  flex: 1;
  padding: 12px 0;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  color: var(--white);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.drawer-nav-item:hover,
.drawer-nav-item.active {
  background: rgba(239, 208, 5, 0.12);
  color: var(--primary);
}

.drawer-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-600);
  font-size: 12px;
  color: var(--gray-500);
  text-align: center;
}

/* =====================
   FORMS & INPUTS
   ===================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--gray-700);
  border: 1px solid var(--gray-600);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--gray-500);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(239, 208, 5, 0.15);
}

.form-select {
  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='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Phone input with country code */
.phone-input-group {
  display: flex;
  gap: 8px;
}

.phone-input-group .form-select {
  width: 100px;
  flex-shrink: 0;
}

/* =====================
   BUTTONS
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  width: 100%;
  font-family: inherit;
}

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

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

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(239, 208, 5, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-400);
  border: 1px solid var(--gray-600);
}

.btn-ghost:hover {
  background: var(--gray-700);
  color: var(--white);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* =====================
   CARDS
   ===================== */
.card {
  background: var(--gray-700);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--gray-600);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.card-subtitle {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* =====================
   AUTH PAGES
   ===================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  background: var(--black);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo h1 {
  font-size: 36px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -1px;
}

.auth-logo p {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 4px;
}

.auth-form {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--gray-500);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--gray-500);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-700);
}

/* =====================
   DASHBOARD
   ===================== */
.welcome-banner {
  background: linear-gradient(135deg, rgba(239, 208, 5, 0.15) 0%, rgba(239, 208, 5, 0.05) 100%);
  border: 1px solid rgba(239, 208, 5, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.welcome-banner h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.welcome-banner p {
  font-size: 14px;
  color: var(--gray-400);
}

/* Role Toggle */
.role-toggle {
  display: flex;
  background: var(--gray-700);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--gray-600);
}

.role-toggle-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-family: inherit;
}

.role-toggle-btn.active {
  background: var(--primary);
  color: var(--black);
}

/* Quick Actions Grid */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.quick-action-card {
  background: var(--gray-700);
  border: 1px solid var(--gray-600);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--white);
}

.quick-action-card:hover {
  border-color: var(--primary);
  background: rgba(239, 208, 5, 0.05);
}

.quick-action-card .icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(239, 208, 5, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

.quick-action-card .icon-circle svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.quick-action-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.quick-action-card p {
  font-size: 12px;
  color: var(--gray-500);
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-box {
  background: var(--gray-700);
  border: 1px solid var(--gray-600);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
}

.stat-box .stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.stat-box .stat-label {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}

.section-header a {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* Activity Feed */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-600);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(239, 208, 5, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.activity-content {
  flex: 1;
}

.activity-content p {
  font-size: 14px;
  color: var(--white);
  line-height: 1.4;
}

.activity-content .activity-time {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* =====================
   VERIFICATION BADGE
   ===================== */
.verification-banner {
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.verification-banner svg {
  width: 24px;
  height: 24px;
  color: var(--success);
  flex-shrink: 0;
}

.verification-banner p {
  font-size: 14px;
  color: var(--gray-300);
}

.verification-banner a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

/* =====================
   TRAVELER APPLICATION
   ===================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.status-badge.approved {
  background: rgba(22, 163, 74, 0.15);
  color: var(--success);
}

.status-badge.rejected {
  background: rgba(220, 38, 38, 0.15);
  color: var(--danger);
}

/* File Upload */
.file-upload {
  border: 2px dashed var(--gray-600);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.file-upload:hover {
  border-color: var(--primary);
}

.file-upload svg {
  width: 32px;
  height: 32px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.file-upload p {
  font-size: 14px;
  color: var(--gray-400);
}

.file-upload .file-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* =====================
   UTILITY
   ===================== */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* Page transition */
.page {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Desktop optimization */
@media (min-width: 768px) {
  :root {
    --max-width: 480px;
  }

  .app-shell {
    border-left: 1px solid var(--gray-700);
    border-right: 1px solid var(--gray-700);
  }

  .auth-page {
    padding: 40px;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-600);
  border-radius: 2px;
}

/* Ghana Mule splash screen */
.gm-splash {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .45s ease, visibility .45s ease;
}

.gm-splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gm-splash-loader {
  text-align: center;
  width: 100%;
  max-width: 360px;
  height: 360px;
  position: relative;
  overflow: hidden;
}

.gm-splash-title {
  color: var(--primary);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1px;
  margin-top: 10px;
  margin-bottom: 50px;
}

.gm-plane {
  position: absolute;
  top: 126px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 2;
}

.gm-plane img {
  width: 230px;
  max-width: 80%;
  animation: gmSpin 2.5s linear infinite;
}

.gm-earth-wrap {
  position: absolute;
  top: 142px;
  left: 0;
  width: 100%;
  z-index: 1;
}

.gm-earth {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(239,208,5,.35);
  background-image: url("../images/index/1w.gif");
  background-size: 340px;
  animation: gmEarth 12s infinite linear;
  box-shadow: 0 0 28px rgba(239,208,5,.15);
}

@keyframes gmSpin {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes gmEarth {
  0% {
    background-position-x: 0;
  }

  100% {
    background-position-x: -340px;
  }
}