/* WildTrack — shared design tokens */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@500;600;700;800&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand */
  --rh-forest: #2D6A4F;
  --rh-forest-deep: #1B4332;
  --rh-accent: #52B788;
  --rh-light: #D8F3DC;
  --rh-charcoal: #1B1B1B;

  /* Semantic */
  --rh-amber: #E9C46A;
  --rh-amber-soft: #FFF3CD;
  --rh-amber-text: #856404;
  --rh-red: #C0392B;
  --rh-red-soft: #FDEDEC;
  --rh-blue-soft: #E8F4FD;
  --rh-blue-text: #0C5B8A;

  /* Neutrals */
  --rh-white: #FFFFFF;
  --rh-grey-50: #FAFAFA;
  --rh-grey-100: #F5F5F5;
  --rh-grey-200: #EAEAEA;
  --rh-grey-300: #D0D0D0;
  --rh-grey-400: #B0B0B0;
  --rh-grey-500: #6C757D;
  --rh-grey-600: #4A4A4A;
  --rh-grey-700: #2A2A2A;

  /* Dark mode */
  --rh-dark-bg: #0F1F18;
  --rh-dark-surface: #1A2F22;
  --rh-dark-border: #2A4A38;
  --rh-dark-muted: #8BAF96;

  /* Map */
  --rh-map-bg: #1A2332;
  --rh-map-line: #2C3A52;
  --rh-map-ridge: #3A4A66;

  /* Fonts */
  --rh-display: 'Syne', system-ui, sans-serif;
  --rh-body: 'DM Sans', system-ui, sans-serif;
  --rh-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--rh-body);
  color: var(--rh-charcoal);
  background: var(--rh-grey-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-display { font-family: var(--rh-display); }
.font-mono { font-family: var(--rh-mono); }

/* Page chrome — reused on every section file */
.rh-page-header {
  background: var(--rh-charcoal);
  color: white;
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #000;
}
.rh-page-header .rh-eyebrow {
  font-family: var(--rh-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--rh-accent);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.rh-page-header h1 {
  font-family: var(--rh-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 0;
}
.rh-page-header .rh-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  font-family: var(--rh-body);
  font-size: 13px;
}
.rh-page-header .rh-nav a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  transition: 0.15s;
}
.rh-page-header .rh-nav a:hover {
  color: white;
  background: rgba(255,255,255,0.06);
}
.rh-page-header .rh-nav a.active {
  color: white;
  background: var(--rh-forest);
}

.rh-section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--rh-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rh-grey-500);
}
.rh-section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--rh-grey-300);
}

.rh-divider {
  height: 1px;
  background: var(--rh-grey-200);
  margin: 64px 0;
}

/* Phone frame */
.rh-phone {
  width: 390px;
  height: 844px;
  background: white;
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 0 11px #111, 0 0 0 12px #2a2a2a, 0 30px 60px -20px rgba(0,0,0,0.35);
  flex: 0 0 auto;
}
.rh-phone.notch::before {
  content: '';
  position: absolute;
  top: 11px; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 32px;
  background: #000;
  border-radius: 999px;
  z-index: 100;
}
.rh-phone .rh-status {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px 0;
  font-family: var(--rh-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--rh-charcoal);
  z-index: 50;
  pointer-events: none;
}
.rh-phone.dark .rh-status { color: white; }
.rh-phone .rh-status .rh-status-right {
  display: flex; align-items: center; gap: 6px;
}
.rh-phone-label {
  display: flex; flex-direction: column; gap: 4px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.rh-phone-label .lbl {
  font-family: var(--rh-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rh-grey-500);
}
.rh-phone-label .name {
  font-family: var(--rh-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--rh-charcoal);
}

/* Phone — content area below status bar */
.rh-screen {
  position: absolute;
  inset: 54px 0 0 0;
  background: white;
  overflow: hidden;
}
.rh-screen.dark { background: var(--rh-dark-bg); color: white; }

/* Generic */
.rh-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--rh-body);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: 0.15s;
  text-decoration: none;
}
.rh-btn-primary { background: var(--rh-forest); color: white; }
.rh-btn-primary:hover { background: var(--rh-forest-deep); }
.rh-btn-secondary { background: transparent; color: var(--rh-forest); border-color: var(--rh-forest); }
.rh-btn-secondary:hover { background: var(--rh-light); }
.rh-btn-danger { background: var(--rh-red); color: white; }
.rh-btn-disabled { background: var(--rh-grey-100); color: var(--rh-grey-400); cursor: not-allowed; }

.rh-badge {
  display: inline-flex; align-items: center;
  font-family: var(--rh-body);
  font-weight: 500;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.01em;
}
.rh-badge-active { background: var(--rh-light); color: var(--rh-forest); }
.rh-badge-pending { background: var(--rh-amber-soft); color: var(--rh-amber-text); }
.rh-badge-processing { background: var(--rh-blue-soft); color: var(--rh-blue-text); }
.rh-badge-emergency { background: var(--rh-red-soft); color: var(--rh-red); }
.rh-badge-archived { background: #F0F0F0; color: var(--rh-grey-500); }

.rh-card {
  background: white;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  padding: 16px;
}
.rh-card-dark {
  background: var(--rh-dark-surface);
  border: 1px solid var(--rh-dark-border);
  border-radius: 12px;
  padding: 16px;
  color: white;
}

/* Pulse animation */
@keyframes rh-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0; }
}
.rh-pulse-ring {
  position: absolute;
  border-radius: 50%;
  animation: rh-pulse 2s ease-out infinite;
}

@keyframes rh-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.rh-blink { animation: rh-blink 1.4s ease-in-out infinite; }

/* Scrollbar — minimal */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D0D0D0; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #B0B0B0; }
