/* ═══════════════════════════════════════════════
   KINTRACE — Design System
   Palette: Deep Navy + Electric Teal + Danger Red
   Fonts: Outfit (display) + Plus Jakarta Sans (body)
═══════════════════════════════════════════════ */

:root {
  --bg:        #0A0E1A;
  --bg2:       #0F1525;
  --surface:   #141B2D;
  --surface2:  #1A2340;
  --border:    #1E2D45;
  --border2:   #243352;
  --teal:      #00D4AA;
  --teal-dim:  rgba(0,212,170,0.12);
  --teal-glow: rgba(0,212,170,0.25);
  --purple:    #7B68EE;
  --orange:    #FF9F43;
  --pink:      #FF6B9D;
  --danger:    #FF4757;
  --danger-dim:rgba(255,71,87,0.12);
  --warning:   #FFA502;
  --text:      #E8EDF5;
  --text2:     #8A9BB5;
  --text3:     #4A5A72;
  --font-d:    'Outfit', sans-serif;
  --font-b:    'Plus Jakarta Sans', sans-serif;
  --r-sm:      8px;
  --r-md:      12px;
  --r-lg:      18px;
  --r-xl:      24px;
  --r-full:    999px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── PAGE SYSTEM ── */
.page { display: none; }
.page.active { display: block; }

/* ══════════════════════════════════════════════
   LANDING — NAV
══════════════════════════════════════════════ */
.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-text {
  font-family: var(--font-d);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.btn-nav {
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid rgba(0,212,170,0.3);
  border-radius: var(--r-full);
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-nav:hover {
  background: rgba(0,212,170,0.2);
  border-color: var(--teal);
}

/* ══════════════════════════════════════════════
   LANDING — HERO
══════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 120px 48px 80px;
  position: relative;
  overflow: hidden;
  gap: 48px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30,45,69,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,45,69,0.4) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.glow-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,212,170,0.12) 0%, transparent 70%);
  top: -100px; left: -100px;
}
.glow-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(123,104,238,0.1) 0%, transparent 70%);
  bottom: -50px; right: 200px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  animation: fadeUp 0.8s ease both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid rgba(0,212,170,0.25);
  border-radius: var(--r-full);
  padding: 6px 14px;
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse-dot 2s infinite;
}

.hero-title {
  font-family: var(--font-d);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--teal) 0%, #00A8FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text2);
  margin-bottom: 36px;
  max-width: 460px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-b);
  font-size: 15px;
  font-weight: 700;
  color: #0A0E1A;
  background: var(--teal);
  border: none;
  border-radius: var(--r-full);
  padding: 14px 28px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}
.btn-primary:hover {
  background: #00EABB;
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(0,212,170,0.35);
}
.btn-primary.btn-large {
  font-size: 16px;
  padding: 16px 36px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-b);
  font-size: 15px;
  font-weight: 600;
  color: var(--text2);
  text-decoration: none;
  border: 1px solid var(--border2);
  border-radius: var(--r-full);
  padding: 14px 28px;
  transition: all 0.2s;
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border2);
  background: var(--surface);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.stat-label {
  font-size: 12px;
  color: var(--text3);
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border2);
}

/* Hero phone */
.hero-phone-wrap {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  animation: fadeUp 0.8s 0.2s ease both;
}

/* ══════════════════════════════════════════════
   PHONE FRAME (shared)
══════════════════════════════════════════════ */
.phone-frame {
  position: relative;
  background: #0D1220;
  border-radius: 44px;
  border: 2px solid var(--border2);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 40px 80px rgba(0,0,0,0.6),
    0 0 60px rgba(0,212,170,0.08);
  overflow: hidden;
}
.hero-phone {
  width: 240px;
  height: 480px;
}
.hero-phone .phone-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #0D1220;
  border-radius: 0 0 14px 14px;
  z-index: 10;
  border: 2px solid var(--border2);
  border-top: none;
}

/* Mini map (hero phone) */
.mini-map {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.mini-map-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(20,27,45,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,27,45,0.6) 1px, transparent 1px);
  background-size: 24px 24px;
  background-color: #0F1828;
}
.mini-bar {
  padding: 10px 14px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  border-top: 1px solid var(--border);
}
.mini-live {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Mini pins */
.mini-pin {
  position: absolute;
  transform: translate(-50%, -50%);
}
.pin-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-size: 11px;
  font-weight: 700;
  color: #0A0E1A;
  border: 2px solid rgba(255,255,255,0.2);
  position: relative;
  z-index: 2;
}
.pin-pulse {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  animation: pulse-ring 2.5s ease-out infinite;
  z-index: 1;
}

/* ══════════════════════════════════════════════
   LANDING — FEATURES
══════════════════════════════════════════════ */
.features-section {
  padding: 100px 48px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-label {
  font-family: var(--font-b);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--teal);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-d);
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 56px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  transition: all 0.25s;
}
.feature-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.feature-card--highlight {
  border-color: rgba(255,71,87,0.25);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(255,71,87,0.05) 100%);
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature-card h3 {
  font-family: var(--font-d);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.feature-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text2);
}

/* ══════════════════════════════════════════════
   LANDING — HOW IT WORKS
══════════════════════════════════════════════ */
.how-section {
  padding: 100px 48px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.how-section .section-title,
.how-section .section-label {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.how-section .section-title { margin-bottom: 56px; }

.steps {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.step {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step-num {
  font-family: var(--font-d);
  font-size: 48px;
  font-weight: 900;
  color: var(--border2);
  line-height: 1;
  letter-spacing: -2px;
}
.step-content h3 {
  font-family: var(--font-d);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.step-content p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text2);
}
.step-arrow {
  font-size: 24px;
  color: var(--border2);
  padding-top: 12px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   LANDING — CTA + FOOTER
══════════════════════════════════════════════ */
.cta-section {
  padding: 120px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(0,212,170,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section h2 {
  font-family: var(--font-d);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 16px;
  position: relative;
}
.cta-section p {
  font-size: 17px;
  color: var(--text2);
  margin-bottom: 40px;
  position: relative;
}

.landing-footer {
  padding: 32px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-d);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.landing-footer p {
  font-size: 13px;
  color: var(--text3);
}

/* ══════════════════════════════════════════════
   APP DEMO WRAPPER
══════════════════════════════════════════════ */
#app-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.app-demo-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 48px;
  width: 100%;
  max-width: 1100px;
  position: relative;
}

.back-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 50;
}
.back-btn:hover { color: var(--text); border-color: var(--border2); }

/* ══════════════════════════════════════════════
   APP PHONE FRAME
══════════════════════════════════════════════ */
.app-phone {
  width: 375px;
  height: 780px;
  flex-shrink: 0;
  position: relative;
}
.app-screen {
  position: absolute;
  inset: 0;
  border-radius: 42px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Status bar */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 8px;
  background: var(--bg);
  flex-shrink: 0;
  z-index: 10;
}
.status-time {
  font-family: var(--font-d);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}
.battery-icon {
  width: 22px; height: 11px;
  border: 1.5px solid white;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.battery-icon::after {
  content: '';
  position: absolute;
  right: -4px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 5px;
  background: white;
  border-radius: 0 2px 2px 0;
}
.battery-fill {
  height: 100%;
  background: white;
  border-radius: 1px;
}

/* ── SCREENS ── */
.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.screen.active { display: flex; }

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.screen-header h2 {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border2); }

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  scrollbar-width: none;
}
.screen-scroll::-webkit-scrollbar { display: none; }

/* ── MAP SCREEN ── */
.map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(10,14,26,0.9);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
  z-index: 5;
}
.map-header-left { display: flex; flex-direction: column; gap: 2px; }
.circle-badge {
  font-family: var(--font-d);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.member-count {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text2);
  font-weight: 500;
}
.ghost-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.ghost-btn:hover { color: var(--text); }
.ghost-btn.active {
  color: var(--purple);
  border-color: rgba(123,104,238,0.4);
  background: rgba(123,104,238,0.1);
}

/* Map canvas */
.map-canvas {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #0C1520;
  min-height: 0;
}
.map-tiles {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(20,35,55,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,35,55,0.5) 1px, transparent 1px);
  background-size: 32px 32px;
}
.map-roads {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.geofence {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px dashed;
  animation: geofence-pulse 3s ease-in-out infinite;
}

/* Map pins */
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.map-pin:hover { z-index: 20; }
.pin-bubble {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-size: 14px;
  font-weight: 800;
  color: #0A0E1A;
  border: 2.5px solid rgba(255,255,255,0.25);
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: transform 0.2s;
}
.map-pin:hover .pin-bubble { transform: scale(1.15); }
.pin-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid;
  animation: pulse-ring 2.5s ease-out infinite;
  z-index: 1;
}
.pin-info {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 8px 12px;
  white-space: nowrap;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 30;
}
.map-pin:hover .pin-info { display: flex; }
.pin-info strong {
  font-family: var(--font-d);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.pin-info span {
  font-size: 11px;
  color: var(--text2);
}
.pin-battery { font-size: 11px; color: var(--text2); }

.map-label {
  position: absolute;
  font-size: 10px;
  font-weight: 600;
  color: var(--text2);
  background: rgba(10,14,26,0.7);
  padding: 3px 7px;
  border-radius: var(--r-sm);
  pointer-events: none;
  white-space: nowrap;
}

.center-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}
.center-btn:hover { color: var(--teal); border-color: var(--teal); }

/* Member strip */
.member-strip {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.member-strip::-webkit-scrollbar { display: none; }
.member-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 6px 10px 6px 6px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.member-chip:hover, .member-chip.active {
  border-color: var(--border2);
  background: var(--surface2);
}
.chip-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-size: 11px;
  font-weight: 800;
  color: #0A0E1A;
}
.chip-info { display: flex; flex-direction: column; gap: 1px; }
.chip-name {
  font-family: var(--font-d);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}
.chip-loc { font-size: 10px; color: var(--text2); }
.chip-battery {
  font-size: 10px;
  font-weight: 600;
  color: var(--text2);
}
.battery-low { color: var(--danger) !important; }

/* SOS button */
.sos-btn {
  position: absolute;
  bottom: 90px;
  right: 16px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--danger);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255,71,87,0.5);
  transition: all 0.2s;
  z-index: 15;
  animation: sos-idle 3s ease-in-out infinite;
}
.sos-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(255,71,87,0.7);
}
.sos-label {
  font-family: var(--font-d);
  font-size: 13px;
  font-weight: 900;
  color: white;
  letter-spacing: 0.5px;
}

/* ── CIRCLES SCREEN ── */
.circle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px;
  margin-bottom: 16px;
}
.active-circle {
  border-color: rgba(0,212,170,0.3);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(0,212,170,0.04) 100%);
}
.circle-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.circle-icon { font-size: 28px; }
.circle-card-info { flex: 1; }
.circle-card-info h3 {
  font-family: var(--font-d);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.circle-role {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-full);
}
.admin-role {
  background: rgba(0,212,170,0.12);
  color: var(--teal);
  border: 1px solid rgba(0,212,170,0.25);
}
.circle-card-live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
}
.circle-members-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.cm-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-size: 11px;
  font-weight: 800;
  color: #0A0E1A;
  border: 2px solid var(--bg);
  margin-left: -6px;
}
.cm-avatar:first-child { margin-left: 0; }
.cm-count {
  font-size: 12px;
  color: var(--text2);
  margin-left: 6px;
}
.circle-actions { display: flex; gap: 8px; }
.circle-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.circle-action-btn:hover { color: var(--text); border-color: var(--border2); }

.section-label-sm {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text3);
  margin: 16px 0 10px;
}

.member-list { display: flex; flex-direction: column; gap: 2px; }
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  transition: background 0.15s;
}
.member-row:hover { background: var(--surface); }
.mr-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-size: 13px;
  font-weight: 800;
  color: #0A0E1A;
  flex-shrink: 0;
}
.mr-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mr-name {
  font-family: var(--font-d);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.mr-status { font-size: 11px; color: var(--text2); }
.mr-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-full);
}
.admin-badge {
  background: rgba(0,212,170,0.1);
  color: var(--teal);
  border: 1px solid rgba(0,212,170,0.2);
}
.mr-battery { font-size: 12px; color: var(--text2); }
.low-battery { color: var(--danger) !important; }

.invite-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-top: 16px;
}
.invite-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.invite-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.invite-code {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: 2px;
}
.copy-btn {
  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid rgba(0,212,170,0.25);
  border-radius: var(--r-full);
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.copy-btn:hover { background: rgba(0,212,170,0.2); }
.invite-note {
  font-size: 11px;
  color: var(--text3);
}
.link-btn {
  background: none;
  border: none;
  color: var(--teal);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

/* ── ALERTS SCREEN ── */
.alert-count-badge {
  background: var(--danger);
  color: white;
  font-family: var(--font-d);
  font-size: 13px;
  font-weight: 800;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.alert-filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-btn {
  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn.active {
  color: var(--text);
  background: var(--surface2);
  border-color: var(--border2);
}
.filter-btn:hover { color: var(--text); }

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 8px;
  transition: all 0.2s;
}
.alert-item:hover { border-color: var(--border2); }
.alert-sos { border-left: 3px solid var(--danger); }
.alert-geofence { border-left: 3px solid var(--teal); }
.alert-battery { border-left: 3px solid var(--warning); }

.alert-icon-wrap {
  width: 34px; height: 34px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sos-icon { background: var(--danger-dim); color: var(--danger); }
.geo-icon { background: var(--teal-dim); color: var(--teal); }
.bat-icon { background: rgba(255,165,2,0.12); color: var(--warning); }

.alert-content { flex: 1; }
.alert-title {
  font-family: var(--font-d);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.alert-desc { font-size: 11px; color: var(--text2); margin-bottom: 3px; }
.alert-time { font-size: 10px; color: var(--text3); }

.resolve-btn {
  font-family: var(--font-b);
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.resolve-btn:hover { color: var(--teal); border-color: rgba(0,212,170,0.3); }
.resolve-btn.resolved {
  color: var(--teal);
  background: var(--teal-dim);
  border-color: rgba(0,212,170,0.2);
  cursor: default;
}

/* ── PROFILE SCREEN ── */
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal) 0%, #00A8FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-size: 28px;
  font-weight: 800;
  color: #0A0E1A;
  margin-bottom: 12px;
  box-shadow: 0 0 0 4px rgba(0,212,170,0.15);
}
.profile-name {
  font-family: var(--font-d);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}
.profile-email { font-size: 13px; color: var(--text2); margin-bottom: 20px; }
.profile-status-row {
  display: flex;
  gap: 32px;
}
.profile-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ps-num {
  font-family: var(--font-d);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.ps-label { font-size: 11px; color: var(--text2); }

.saved-locations { display: flex; flex-direction: column; gap: 4px; }
.saved-loc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: all 0.2s;
}
.saved-loc-item:hover { border-color: var(--border2); }
.sl-icon { font-size: 20px; }
.sl-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sl-name {
  font-family: var(--font-d);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.sl-addr { font-size: 11px; color: var(--text2); }
.sl-radius {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: var(--r-full);
}
.add-place-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px dashed rgba(0,212,170,0.3);
  border-radius: var(--r-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}
.add-place-btn:hover { background: rgba(0,212,170,0.15); }

/* ── SETTINGS SCREEN ── */
.settings-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.settings-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text3);
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row.clickable { cursor: pointer; transition: background 0.15s; }
.settings-row.clickable:hover { background: var(--surface2); }
.settings-row.danger-row:hover { background: rgba(255,71,87,0.05); }
.settings-row-info { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.settings-row-title {
  font-family: var(--font-d);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.settings-row-sub { font-size: 11px; color: var(--text2); line-height: 1.4; }
.danger-text { color: var(--danger) !important; }

/* Toggle */
.toggle {
  width: 44px; height: 24px;
  border-radius: var(--r-full);
  background: var(--surface2);
  border: 1px solid var(--border2);
  position: relative;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text3);
  transition: all 0.25s;
}
.toggle.active {
  background: var(--teal);
  border-color: var(--teal);
}
.toggle.active::after {
  left: calc(100% - 19px);
  background: #0A0E1A;
}

.signout-btn {
  width: 100%;
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 600;
  color: var(--danger);
  background: var(--danger-dim);
  border: 1px solid rgba(255,71,87,0.25);
  border-radius: var(--r-lg);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}
.signout-btn:hover { background: rgba(255,71,87,0.2); }

/* ── BOTTOM NAV ── */
.bottom-nav {
  display: flex;
  align-items: center;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 8px 0 16px;
  flex-shrink: 0;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 6px 4px;
  transition: color 0.2s;
  position: relative;
}
.nav-item span {
  font-family: var(--font-b);
  font-size: 10px;
  font-weight: 600;
}
.nav-item.active { color: var(--teal); }
.nav-item:hover { color: var(--text2); }
.nav-badge {
  position: absolute;
  top: 2px; right: 18px;
  background: var(--danger);
  color: white;
  font-family: var(--font-d);
  font-size: 9px;
  font-weight: 800;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════
   SIDE PANEL
══════════════════════════════════════════════ */
.side-panel {
  width: 280px;
  flex-shrink: 0;
  padding-top: 60px;
}
.side-panel-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-d);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.side-panel-title {
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.side-panel-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text2);
  margin-bottom: 28px;
}

.demo-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.demo-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text2);
}
.df-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border2);
  flex-shrink: 0;
  transition: background 0.3s;
}
.active-dot { background: var(--teal); box-shadow: 0 0 8px var(--teal); }

.live-status {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.ls-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-d);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.ls-feed { display: flex; flex-direction: column; gap: 8px; }
.ls-item {
  font-size: 12px;
  color: var(--text2);
  padding: 8px 10px;
  background: var(--surface2);
  border-radius: var(--r-sm);
  border-left: 2px solid var(--teal);
  animation: slideIn 0.4s ease;
}

/* ══════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 28px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  animation: modalIn 0.25s ease;
}
.modal h3 {
  font-family: var(--font-d);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.modal p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 20px;
}
.modal-actions {
  display: flex;
  gap: 10px;
}
.modal-btn {
  flex: 1;
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
  color: var(--text2);
  background: var(--surface2);
}
.modal-btn:hover { color: var(--text); border-color: var(--border2); }
.modal-btn.primary {
  background: var(--teal);
  color: #0A0E1A;
  border-color: var(--teal);
  font-weight: 700;
}
.modal-btn.primary:hover { background: #00EABB; }
.modal-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-family: var(--font-b);
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s;
}
.modal-input:focus { border-color: var(--teal); }
.modal-input::placeholder { color: var(--text3); }

/* SOS Overlay */
.sos-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,71,87,0.15);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}
.sos-overlay.active { display: flex; }
.sos-overlay-content {
  text-align: center;
  position: relative;
  padding: 48px 32px;
}
.sos-pulse-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 2px solid var(--danger);
  animation: sos-ring 1.5s ease-out infinite;
}
.sos-pulse-ring.delay1 { animation-delay: 0.75s; }
.sos-icon-big { font-size: 64px; margin-bottom: 20px; position: relative; }
.sos-overlay-content h2 {
  font-family: var(--font-d);
  font-size: 28px;
  font-weight: 900;
  color: var(--danger);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  position: relative;
}
.sos-overlay-content p {
  font-size: 15px;
  color: var(--text2);
  margin-bottom: 28px;
  line-height: 1.6;
  position: relative;
}

/* ══════════════════════════════════════════════
   SHARED COMPONENTS
══════════════════════════════════════════════ */
.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse-dot 2s infinite;
}

/* ══════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.85); }
}
@keyframes pulse-ring {
  0%   { opacity: 0.8; transform: translate(-50%, -50%) scale(0.8); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(1.6); }
}
@keyframes geofence-pulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 0.2; }
}
@keyframes sos-idle {
  0%, 100% { box-shadow: 0 4px 20px rgba(255,71,87,0.5); }
  50%       { box-shadow: 0 4px 32px rgba(255,71,87,0.8); }
}
@keyframes sos-ring {
  0%   { opacity: 0.8; transform: translate(-50%, -50%) scale(0.5); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(1.5); }
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pinFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50%       { transform: translate(-50%, -50%) translateY(-4px); }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero { flex-direction: column; text-align: center; padding: 100px 32px 60px; }
  .hero-content { max-width: 100%; }
  .hero-subtitle { max-width: 100%; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { gap: 12px; }
  .step-arrow { display: none; }
  .app-demo-wrap { flex-direction: column; align-items: center; }
  .side-panel { width: 100%; max-width: 375px; padding-top: 0; }
  .landing-nav { padding: 16px 24px; }
}
@media (max-width: 640px) {
  .hero { padding: 90px 20px 48px; }
  .features-section, .how-section, .cta-section { padding: 60px 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .landing-footer { flex-direction: column; gap: 12px; text-align: center; }
  .app-phone { width: 340px; height: 700px; }
  .nav-links a { display: none; }
}