/* Flash Transit Afrique Logistique — Professional Stylesheet */

:root {
  --bg: #0B1016;
  --panel: #121821;
  --panel-2: #171F2A;
  --line: #232D3A;
  --gold: #C9A227;
  --gold-glow: rgba(201, 162, 39, 0.15);
  --gold-dark: #8A6A22;
  --text: #EAEDF1;
  --muted: #8A97A6;
  --danger: #E85D5D;
  --success: #2FD3B8;
  --radius: 16px;
  --shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.45);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(1400px 700px at 50% -10%, #121B28 0%, var(--bg) 50%);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
  padding-bottom: 80px;
}

/* ---------- Navbar ---------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(11, 16, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk';
  font-weight: 700;
  color: #0B1016;
  font-size: 16px;
  box-shadow: 0 4px 12px var(--gold-glow);
}

.logo-name {
  font-family: 'Space Grotesk';
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.logo-name span {
  color: var(--gold);
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden { display: none !important; }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 32px;
  text-align: center;
}

.eyebrow {
  font-family: 'JetBrains Mono';
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: inline-block;
}

.hero h1 {
  font-family: 'Space Grotesk';
  font-size: 40px;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- Cards ---------- */
.tracker-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 24px;
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 18px;
}

.label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

input, select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-family: 'JetBrains Mono';
  outline: none;
  transition: var(--transition);
}

input::placeholder { color: #5A6572; font-family: 'Inter'; }

input:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ---------- Buttons ---------- */
.btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter';
}

.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: var(--gold);
  color: #0B1016;
}

.btn-primary:hover { opacity: 0.92; }

.btn-secondary {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-secondary:hover { border-color: var(--gold); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger {
  background: rgba(232, 93, 93, 0.1);
  border: 1px solid rgba(232, 93, 93, 0.3);
  color: var(--danger);
}

.btn-danger:hover { background: rgba(232, 93, 93, 0.2); }

.btn-sm { padding: 8px 14px; font-size: 13px; width: auto; }

/* ---------- Messages ---------- */
.msg {
  margin-top: 16px;
  font-size: 13.5px;
  padding: 12px 16px;
  border-radius: 10px;
  display: none;
}

.msg.show { display: block; }

.msg.error {
  background: rgba(232, 93, 93, 0.08);
  color: var(--danger);
  border: 1px solid rgba(232, 93, 93, 0.2);
}

.msg.ok {
  background: rgba(47, 211, 184, 0.08);
  color: var(--success);
  border: 1px solid rgba(47, 211, 184, 0.2);
}

/* ---------- Result ---------- */
.result-section { margin-top: 32px; }

.result-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.track-code {
  font-family: 'JetBrains Mono';
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.status-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(47, 211, 184, 0.1);
  color: var(--success);
  margin-left: auto;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  margin: 28px 0;
}

.timeline-line {
  position: absolute;
  left: 42px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--line);
  border-radius: 3px;
}

.timeline-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 52px;
}

.step-marker {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: 'JetBrains Mono';
  z-index: 2;
  transition: var(--transition);
}

.step-marker.done {
  border-color: var(--gold);
  background: var(--gold);
  color: #0B1016;
  box-shadow: 0 0 0 4px var(--gold-glow);
}

.step-marker.current {
  border-color: var(--success);
  background: var(--panel);
  box-shadow: 0 0 0 5px rgba(47, 211, 184, 0.2);
}

.step-label {
  font-family: 'JetBrains Mono';
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.step-time {
  font-family: 'JetBrains Mono';
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Details ---------- */
.details-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

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

.detail-label {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-value {
  font-size: 13.5px;
  font-weight: 600;
  text-align: right;
  max-width: 55%;
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  letter-spacing: 4px;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  margin-top: 70px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

/* ---------- Admin ---------- */
.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 0 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow);
}

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

.auth-header h1 {
  font-family: 'Space Grotesk';
  font-size: 28px;
  margin-bottom: 8px;
}

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

.page-header h1 {
  font-family: 'Space Grotesk';
  font-size: 24px;
  margin-bottom: 4px;
}

.section-title {
  font-family: 'Space Grotesk';
  font-size: 16px;
  font-weight: 700;
  margin: 30px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.row2 {
  display: flex;
  gap: 12px;
}

.row2 > * { flex: 1; }

.badge {
  font-family: 'JetBrains Mono';
  font-size: 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
}

.package-list { margin-top: 16px; }

.package-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.package-item:hover { border-color: var(--gold-dark); }

.pkg-info { flex: 1; }

.pkg-code {
  font-family: 'JetBrains Mono';
  font-size: 14px;
  font-weight: 600;
}

.pkg-status {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.pkg-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-chip {
  font-family: 'JetBrains Mono';
  font-size: 11px;
  background: var(--gold-glow);
  color: var(--gold);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--gold-dark);
}

.btn-edit {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}

.btn-edit:hover { color: var(--gold-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero h1 { font-size: 32px; }
  .tracker-card, .result-card, .form-card, .auth-card {
    padding: 24px;
  }
  .row2 { flex-direction: column; }
  .timeline-line { left: 36px; }
  .timeline-step { margin-left: 46px; }
  .navbar { padding: 14px 20px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}