/* =========================================================
   SafeCircle – visual theme (loaded after styles.css)
   Change the look here. The login photo is set in --login-photo.
   ========================================================= */

:root {
  --sc-bg: #050b09;
  --sc-surface: rgba(14, 28, 24, 0.78);
  --sc-surface-strong: rgba(10, 22, 19, 0.72);
  --sc-line: rgba(255, 255, 255, 0.09);
  --sc-line-strong: rgba(255, 255, 255, 0.16);
  --sc-text: #eef7f3;
  --sc-muted: #8fa69e;
  --sc-brand: #35d0a3;
  --sc-brand-deep: #2a9d8f;
  --sc-danger: #ff4758;
  /* Login/splash background. To use a real photo, put it in assets/ and change this line,
     e.g.  url("assets/login-bg.jpg")  */
  --login-photo: url("assets/login-bg.svg");
  --sc-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}

html, body {
  background: var(--sc-bg);
  color: var(--sc-text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Shared background screens (splash + login) ---------- */
.login-screen {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  isolation: isolate;
}

.login-bg {
  position: absolute;
  inset: -2%;
  z-index: -2;
  background: var(--login-photo) center / cover no-repeat;
  animation: sc-drift 26s ease-in-out infinite alternate;
  will-change: transform;
}

.login-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(5, 11, 9, 0.15) 0%, rgba(5, 11, 9, 0) 70%),
    linear-gradient(180deg, rgba(5, 11, 9, 0.05) 0%, rgba(5, 11, 9, 0.2) 45%, rgba(5, 11, 9, 0.88) 100%);
}

@keyframes sc-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.1) translate3d(0, -1.5%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .login-bg { animation: none; }
}

/* ---------- Splash ---------- */
#splash.login-screen {
  justify-content: center;
  align-items: center;
  background: var(--sc-bg);
}

#splash.login-screen .splash-content {
  position: relative;
  text-align: center;
  padding: 24px;
}

#splash.login-screen .logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  font-size: 44px;
  background: linear-gradient(145deg, rgba(53, 208, 163, 0.22), rgba(11, 33, 28, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 60px rgba(53, 208, 163, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

#splash.login-screen h1 {
  font-size: 34px;
  letter-spacing: -1px;
  color: #fff;
}

#splash.login-screen .loader {
  border-color: rgba(255, 255, 255, 0.14);
  border-top-color: var(--sc-brand);
}

/* ---------- Login ---------- */
#onboarding.login-screen {
  padding: 32px 20px;
  justify-content: center;
  align-items: center;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  padding: 30px 26px 24px;
  background: var(--sc-surface-strong);
  border: 1px solid var(--sc-line-strong);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}

.login-logo {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  font-size: 30px;
  border-radius: 20px;
  margin-bottom: 12px;
  background: linear-gradient(145deg, #1b4a40, #0b2520);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 40px rgba(53, 208, 163, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.login-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sc-brand);
}

.login-card h1 {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.6px;
  margin: 6px 0 6px;
  color: #fff;
  text-align: center;
}

.login-card .subtitle {
  text-align: center;
  color: var(--sc-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 22px;
}

.login-card .form-group {
  margin-bottom: 16px;
}

.login-card .form-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sc-muted);
}

.login-card .form-group input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 16px;
  color: var(--sc-text);
  background: rgba(3, 9, 7, 0.75);
  border: 1px solid var(--sc-line);
  border-radius: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card .form-group input::placeholder {
  color: #5f736c;
}

.login-card .form-group input:focus {
  outline: none;
  border-color: rgba(53, 208, 163, 0.6);
  box-shadow: 0 0 0 4px rgba(53, 208, 163, 0.12);
}

.login-card .form-group small {
  display: block;
  margin-top: 6px;
  line-height: 1.4;
}

.login-card .btn {
  height: 52px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 0;
  transition: transform 0.12s, filter 0.2s;
}

.login-card .btn:active {
  transform: scale(0.98);
}

.login-card #send-otp-btn,
.login-card #verify-otp-btn {
  background: linear-gradient(135deg, #35d0a3, #2a9d8f);
  color: #04110d;
  box-shadow: 0 12px 30px rgba(53, 208, 163, 0.28);
}

.login-card #resend-otp-btn,
.login-card #back-to-email {
  height: 46px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sc-line);
  color: var(--sc-text);
}

.login-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 6px;
}

.login-points span {
  font-size: 12px;
  color: #c9dcd5;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--sc-line);
}

.login-foot {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--sc-muted);
}

#onboarding #otp-message {
  color: var(--sc-muted);
}

/* ---------- Main app: glass cards ---------- */
.header {
  background: rgba(7, 14, 12, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--sc-line);
}

.info-card,
.contacts-section,
.alerts-section,
.safety-overview {
  background: linear-gradient(145deg, rgba(20, 38, 33, 0.92), rgba(10, 20, 17, 0.92));
  border: 1px solid var(--sc-line);
  border-radius: 22px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.info-card h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.action-btn {
  transition: transform 0.12s, border-color 0.2s, background 0.2s;
}

.action-btn:hover {
  border-color: rgba(53, 208, 163, 0.25);
}

.action-btn .tool-emoji {
  font-size: 24px;
}

.hint {
  color: var(--sc-muted);
}

.status-banner {
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Keep the card-based look consistent on desktop */
@media (min-width: 700px) {
  .login-screen {
    min-height: calc(100vh - 36px);
  }
  #onboarding.login-screen {
    border-radius: 30px;
  }
}

/* ---------- Main screen backdrop ---------- */
#main {
  background:
    radial-gradient(110% 38% at 50% 0%, rgba(53, 208, 163, 0.12), rgba(53, 208, 163, 0) 70%),
    var(--sc-bg);
}

/* =========================================================
   Secondary screens: contacts, alerts, panels, modals
   ========================================================= */

/* Section headings */
.contacts-section h2,
.alerts-section h2,
.contacts-section .section-title,
.alerts-section .section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sc-muted);
}

/* Contact cards */
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--sc-line);
  border-radius: 18px;
  transition: border-color 0.2s, background 0.2s;
}

.contact-item:hover {
  border-color: rgba(53, 208, 163, 0.22);
  background: rgba(255, 255, 255, 0.045);
}

.contact-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 750;
  color: #04110d;
  background: linear-gradient(145deg, #5fe6bd, #2a9d8f);
  box-shadow: 0 8px 18px rgba(53, 208, 163, 0.18);
}

.contact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.contact-meta {
  font-size: 13px;
  color: var(--sc-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-delete {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 71, 88, 0.2);
  background: rgba(255, 71, 88, 0.08);
  font-size: 15px;
  cursor: pointer;
}

/* Alerts */
.alert-item {
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--sc-line);
  border-left: 3px solid var(--sc-danger);
  font-size: 14px;
  line-height: 1.45;
}

.alert-item.safe {
  border-left-color: var(--sc-brand);
}

.alert-time {
  margin-top: 4px;
  font-size: 12px;
  color: var(--sc-muted);
}

.empty-state {
  color: var(--sc-muted);
  text-align: center;
  padding: 18px 0;
  font-size: 14px;
}

/* Panels and modals */
.panel-header h2,
.modal-content h2 {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.4px;
  color: #fff;
}

.modal-content p.hint,
.modal-content p[style*="color:#888"] {
  line-height: 1.5;
}

.setting-item {
  padding: 14px 4px;
  border-bottom: 1px solid var(--sc-line);
}

.setting-item label {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sc-muted);
}

.setting-item p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--sc-text);
}

.setting-item .btn-sm {
  border-radius: 12px;
}

/* Upgrade / plans */
.plan-card {
  border-radius: 22px;
  border: 1px solid var(--sc-line);
  background: linear-gradient(145deg, rgba(20, 38, 33, 0.9), rgba(10, 20, 17, 0.9));
}

.plan-card .price {
  color: #fff;
  font-weight: 750;
}

.plan-card .price span {
  color: var(--sc-muted);
  font-size: 14px;
  font-weight: 500;
}

.plan-card[data-plan="family"] {
  border-color: rgba(53, 208, 163, 0.35);
  box-shadow: 0 0 0 1px rgba(53, 208, 163, 0.12), 0 20px 50px rgba(53, 208, 163, 0.08);
}

.billing-switch button {
  border-radius: 14px;
  font-size: 14px;
}

/* SOS modal: make the emergency state unmistakable */
#sos-modal .modal-content {
  border-color: rgba(255, 71, 88, 0.35) !important;
  box-shadow: 0 0 70px rgba(255, 71, 88, 0.22), 0 24px 80px rgba(0, 0, 0, 0.6) !important;
}

#sos-modal h2 {
  animation: sc-pulse-text 1.6s ease-in-out infinite;
}

@keyframes sc-pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  #sos-modal h2 { animation: none; }
}

#sos-modal h2 {
  color: var(--sc-danger);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* =========================================================
   Home screen: livelier design (v14)
   ========================================================= */

:root {
  --sc-muted: #a9bfb8;            /* higher contrast secondary text */
  --sc-brand-glow: rgba(53, 208, 163, 0.28);
}

/* Photo band behind the top of the home screen */
#main {
  position: relative;
  isolation: isolate;
}

#main::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 340px;
  z-index: -1;
  background: var(--login-photo) center / cover no-repeat;
  filter: saturate(1.15) brightness(0.75);
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
  pointer-events: none;
}

#main::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(90% 40% at 50% 0%, rgba(53, 208, 163, 0.16), transparent 70%);
  pointer-events: none;
}

.header {
  background: linear-gradient(180deg, rgba(5, 11, 9, 0.98) 0%, rgba(5, 11, 9, 0.94) 80%, rgba(5, 11, 9, 0.6) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: none;
}

.header .user-line span:first-child {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.4px;
}

.header-status {
  color: #d4e8e1;
  font-size: 14px;
}

/* Safety status card: brighter and more alive */
.safety-overview {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(53, 208, 163, 0.28), transparent 60%),
    linear-gradient(145deg, #15564b 0%, #0c2e27 55%, #0a211c 100%) !important;
  border: 1px solid rgba(120, 255, 214, 0.22) !important;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35), 0 0 60px rgba(53, 208, 163, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

.safety-overview .safety-overview-top span,
.safety-overview .eyebrow {
  color: #bff5e1 !important;
}

.safety-overview h2,
.safety-overview .status-title {
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

/* Emergency area: red warmth behind the SOS button */
.sos-section,
.sos-card,
.emergency-card {
  background:
    radial-gradient(70% 55% at 50% 40%, rgba(255, 71, 88, 0.22), transparent 70%),
    linear-gradient(180deg, #1a0d10 0%, #0c0a0b 100%) !important;
  border: 1px solid rgba(255, 71, 88, 0.2) !important;
  box-shadow: 0 22px 60px rgba(255, 71, 88, 0.12) !important;
}

/* Stronger SOS ring */
.sos-button {
  box-shadow: 0 0 0 10px rgba(255, 71, 88, 0.08), 0 0 80px rgba(255, 71, 88, 0.45),
              inset 0 2px 0 rgba(255, 255, 255, 0.25) !important;
}

/* Tool tiles: each tool gets its own colour */
#tools-card {
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(124, 92, 255, 0.10), transparent 60%),
    linear-gradient(160deg, rgba(20, 36, 44, 0.95), rgba(10, 18, 22, 0.95)) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#tools-card h3 {
  font-size: 13px !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cfe0da !important;
}

#tools-card .action-btn {
  --tile-a: #35d0a3;
  --tile-b: #137a62;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px !important;
  min-height: 112px;
  gap: 8px;
}

#tools-card .action-btn span:not(.tool-emoji) {
  font-size: 13.5px;
  font-weight: 700;
  color: #f2f8f5;
}

#tools-card .action-btn .tool-emoji {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 24px;
  background: radial-gradient(circle at 30% 25%, var(--tile-a), var(--tile-b));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#tools-card .action-btn.active-tool {
  border-color: var(--tile-a) !important;
  box-shadow: 0 0 0 1px var(--tile-a), 0 0 26px rgba(255, 255, 255, 0.08);
}

#tools-card #siren-btn      { --tile-a: #ff6b7a; --tile-b: #b3121f; }
#tools-card #fakecall-btn   { --tile-a: #b49cff; --tile-b: #5b3fd1; }
#tools-card #shake-btn      { --tile-a: #ffc56b; --tile-b: #c96a05; }
#tools-card #numbers-btn    { --tile-a: #7fd6ff; --tile-b: #1a6fa3; }
#tools-card #walk-btn       { --tile-a: #6cf0b8; --tile-b: #0f7a52; }
#tools-card #help-btn       { --tile-a: #ff9ccf; --tile-b: #a3316a; }
#tools-card #route-btn      { --tile-a: #ffe07a; --tile-b: #a57a06; }

#tools-card .hint {
  color: #b7ccc5 !important;
  font-size: 13px;
  line-height: 1.55;
}

/* Other cards: a little more depth and separation */
.info-card,
.contacts-section,
.alerts-section {
  background: linear-gradient(160deg, rgba(22, 40, 46, 0.95), rgba(10, 18, 22, 0.95)) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Contacts: colourful avatars */
.contact-avatar {
  background: linear-gradient(145deg, #7fe8c7, #1e8f77) !important;
}
.contact-item:nth-child(3n+2) .contact-avatar {
  background: linear-gradient(145deg, #a9c4ff, #3b5bdb) !important;
}
.contact-item:nth-child(3n+3) .contact-avatar {
  background: linear-gradient(145deg, #ffc9a1, #d9622b) !important;
}

/* Bottom navigation: clearer active tab */
.bottom-nav {
  background: linear-gradient(180deg, rgba(10, 20, 18, 0.92), rgba(5, 10, 9, 0.98)) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
}

.nav-btn {
  color: #8fa8a0 !important;
}

.nav-btn.active {
  color: #ffffff !important;
  background: linear-gradient(160deg, rgba(53, 208, 163, 0.28), rgba(53, 208, 163, 0.06)) !important;
  box-shadow: 0 0 22px rgba(53, 208, 163, 0.25);
}

.nav-btn.active .ic {
  color: #6cf0b8 !important;
}

/* Quick action buttons: clearer labels */
.action-btn:not(#tools-card .action-btn) span {
  color: #eef7f3;
}

/* =========================================================
   Scrolling fixes: long panels and modals must reach every button
   ========================================================= */

/* Settings panel: the body scrolls, so the buttons at the bottom can be reached */
.panel {
  overflow: hidden;
}

.panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
}

/* Modals: if the content is taller than the screen, the modal scrolls */
.modal {
  padding: 16px;
  overflow-y: auto;
}

.modal-content {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Keep the last items of the home screen clear of the bottom navigation */
.main-content {
  padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important;
}

/* =========================================================
   Home screen v15: greeting, colour tiles, contact strip,
   map-style location card, switch toggles
   ========================================================= */

/* Greeting above the name */
.header { flex-wrap: wrap; }
.greeting {
  order: -1;
  width: 100%;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: #8fe6c6;
}

/* Quick actions: large colour tiles */
.quick-actions .action-btn {
  --tile-a: #35d0a3;
  --tile-b: #137a62;
  min-height: 104px;
  border-radius: 22px !important;
  background:
    radial-gradient(120% 90% at 0% 0%, var(--tile-a) 0%, transparent 62%),
    linear-gradient(160deg, var(--tile-b), #0a1714) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
.quick-actions .action-btn svg { color: #ffffff; }
.quick-actions .action-btn span {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}
#safe-btn       { --tile-a: #6cf0b8; --tile-b: #0f7a52; }
#arrived-btn    { --tile-a: #7fd6ff; --tile-b: #1a5f8f; }
#call-family-btn{ --tile-a: #ff8a95; --tile-b: #a3121f; }
#share-loc-btn  { --tile-a: #ffe07a; --tile-b: #8a6206; }
#checkin-btn    { --tile-a: #c9b6ff; --tile-b: #4b2fb0; }
#trip-btn.wide  { --tile-a: #7ff2e6; --tile-b: #0d6b68; min-height: 70px; }

/* Contact strip: quick call avatars */
.contact-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 4px 14px;
  margin: 4px 0 6px;
  scrollbar-width: none;
}
.contact-strip::-webkit-scrollbar { display: none; }

.cs-item {
  flex: 0 0 auto;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.cs-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: #04110d;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.cs-tone-0 .cs-avatar { background: linear-gradient(145deg, #7fe8c7, #1e8f77); }
.cs-tone-1 .cs-avatar { background: linear-gradient(145deg, #a9c4ff, #3b5bdb); color: #fff; }
.cs-tone-2 .cs-avatar { background: linear-gradient(145deg, #ffc9a1, #d9622b); }
.cs-add .cs-avatar {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px dashed rgba(143, 230, 198, 0.55);
  color: #8fe6c6;
  box-shadow: none;
  font-size: 28px;
  font-weight: 400;
}
.cs-name {
  font-size: 12.5px;
  font-weight: 650;
  color: #e6f2ed;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Last known location: map-style card */
#location-card {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(120, 255, 214, 0.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(120, 255, 214, 0.05) 0 1px, transparent 1px 28px),
    radial-gradient(120% 90% at 100% 0%, rgba(53, 208, 163, 0.22), transparent 60%),
    linear-gradient(160deg, #0f2a25, #08130f) !important;
  border: 1px solid rgba(120, 255, 214, 0.18) !important;
}
#location-card #last-location {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}
#location-card .time { color: #9fd9c4; }

/* Family Circle: a little more depth */
.circle-section {
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(124, 92, 255, 0.12), transparent 60%),
    linear-gradient(160deg, rgba(22, 40, 46, 0.95), rgba(10, 18, 22, 0.95)) !important;
}

/* Switch control for Audio evidence */
#settings-panel #evidence-toggle-btn {
  position: relative;
  width: 56px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  font-size: 0;
  background: #2b3d39;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  margin-top: 10px;
}
#settings-panel #evidence-toggle-btn::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}
#settings-panel #evidence-toggle-btn.on {
  background: linear-gradient(90deg, #35d0a3, #2a9d8f);
}
#settings-panel #evidence-toggle-btn.on::after {
  transform: translateX(24px);
}
#settings-panel #evidence-toggle-btn:focus-visible {
  outline: 2px solid #8fe6c6;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  #settings-panel #evidence-toggle-btn::after { transition: none; }
}


/* =========================================================
   Community alerts
   ========================================================= */
.comm-list { display: flex; flex-direction: column; gap: 10px; }
.comm-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.comm-buttons .btn { flex: 1 1 auto; }
.comm-item {
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sc-line);
  border-left: 4px solid #7a8f89;
}
.comm-item.sev-low { border-left-color: #7fb6ff; }
.comm-item.sev-medium { border-left-color: #ffc56b; }
.comm-item.sev-high { border-left-color: #ff8a4c; }
.comm-item.sev-critical { border-left-color: #ff4758; }
.comm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.comm-meta { margin: 4px 0 0; font-size: 12.5px; color: var(--sc-muted); line-height: 1.45; }
.comm-desc { margin: 8px 0 0; font-size: 14px; color: #e6f2ed; line-height: 1.5; }
.comm-advice { margin: 8px 0 0; font-size: 12.5px; color: #ffc56b; }
.comm-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.comm-actions .btn-sm { padding: 7px 10px; font-size: 12.5px; }
.comm-badge {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.comm-badge.verified { background: rgba(53, 208, 163, 0.16); color: #6cf0b8; border: 1px solid rgba(53, 208, 163, 0.4); }
.comm-badge.unverified { background: rgba(255, 255, 255, 0.06); color: #c7d6d0; border: 1px solid var(--sc-line-strong); }
.comm-badge.pending { background: rgba(255, 197, 107, 0.14); color: #ffd58f; border: 1px solid rgba(255, 197, 107, 0.4); }
.comm-badge.police { background: rgba(127, 182, 255, 0.14); color: #a9ccff; border: 1px solid rgba(127, 182, 255, 0.4); }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #e6f2ed; margin: 10px 0; line-height: 1.45; }
.check-row input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
#reviewer-card { border: 1px solid rgba(255, 197, 107, 0.3) !important; }
#community-card { border: 1px solid rgba(127, 182, 255, 0.25) !important; }
