/* ===== SafeCircle – Dark Theme ===== */
:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-elevated: #1c1c1c;
  --border: #2a2a2a;
  --text: #f0f0f0;
  --text-muted: #888;
  --accent: #e63946;          /* Strong red for SOS */
  --accent-dark: #c1121f;
  --success: #2a9d8f;
  --warning: #e9c46a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

#app {
  min-height: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ===== Screens ===== */
.screen {
  display: none;
  min-height: 100vh;
  flex-direction: column;
}

.screen.active {
  display: flex;
}

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

.splash-content {
  text-align: center;
}

.logo {
  font-size: 64px;
  margin-bottom: 16px;
}

#splash h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

#splash p {
  color: var(--text-muted);
  margin-top: 8px;
}

.loader {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 32px auto 0;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Onboarding ===== */
#onboarding {
  padding: 40px 24px;
  justify-content: center;
}

#onboarding h1 {
  font-size: 26px;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: white;
  width: 100%;
}

.btn-primary:active {
  background: var(--accent-dark);
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-danger {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn.full {
  width: 100%;
  margin-top: 24px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.icon-btn.small {
  font-size: 20px;
  background: var(--bg-elevated);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Header ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.status-dot.offline {
  background: var(--warning);
}

/* ===== Status Banner ===== */
.status-banner {
  background: var(--accent);
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
}

.status-banner.hidden {
  display: none;
}

.status-banner.safe {
  background: var(--success);
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  padding: 20px;
  padding-bottom: 90px;
  overflow-y: auto;
}

/* ===== SOS Section ===== */
.sos-section {
  text-align: center;
  margin-bottom: 28px;
}

.section-label {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.sos-button {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff4d5a, var(--accent-dark));
  border: 4px solid rgba(230, 57, 70, 0.4);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.5);
  transition: transform 0.15s, box-shadow 0.3s;
  user-select: none;
  -webkit-user-select: none;
}

.sos-button:active,
.sos-button.holding {
  transform: scale(0.95);
  box-shadow: 0 0 0 20px rgba(230, 57, 70, 0.25);
}

.sos-text {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 2px;
}

.sos-sub {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 4px;
}

.hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

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

.action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.action-btn:active {
  background: var(--bg-elevated);
}

.action-btn.safe-btn {
  border-color: rgba(42, 157, 143, 0.4);
}

.action-icon {
  font-size: 24px;
}

/* Matching line icons */
.ic {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.action-btn .ic { width: 28px; height: 28px; color: var(--text-muted); }
.action-btn.primary {
  background: rgba(42, 157, 143, 0.10);
  border-color: rgba(42, 157, 143, 0.45);
  font-weight: 600;
}
.action-btn.primary .ic { color: var(--success); }
.action-btn.wide {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: center;
  gap: 12px;
  padding: 14px 12px;
}
.action-btn.wide .ic { width: 24px; height: 24px; }

/* ===== Cards & Sections ===== */
.info-card,
.contacts-section,
.alerts-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.info-card h3,
.contacts-section h3,
.alerts-section h3 {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#last-location {
  font-size: 15px;
  word-break: break-all;
}

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

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

.section-header h3 {
  margin-bottom: 0;
}

/* ===== Contacts ===== */
.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-name {
  font-weight: 600;
}

.contact-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.contact-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

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

/* ===== Alerts ===== */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-item {
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-size: 13px;
  border-left: 3px solid var(--accent);
}

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

.alert-time {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 2px;
}

/* ===== Bottom Nav ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  z-index: 20;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  cursor: pointer;
  padding: 6px 16px;
}

.nav-btn.active {
  color: var(--accent);
}

.nav-btn .ic {
  width: 24px;
  height: 24px;
}

/* ===== Modals ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow);
}

.modal-content h2 {
  margin-bottom: 20px;
  font-size: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions .btn {
  flex: 1;
}

/* SOS Modal special */
.sos-modal-content {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sos-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  background: rgba(230, 57, 70, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 1.5s ease-out infinite;
  z-index: -1;
}

@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

.sos-modal-content h2 {
  color: var(--accent);
  font-size: 24px;
  letter-spacing: 1px;
}

.sos-details {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 16px 0;
  font-size: 13px;
  text-align: left;
  word-break: break-all;
}

/* ===== Settings Panel ===== */
.panel {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 50;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
}

.panel.hidden {
  display: none;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.panel-body {
  padding: 20px;
  flex: 1;
}

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

.setting-item label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.setting-item p {
  margin-top: 4px;
  font-size: 16px;
}

.version {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 40px;
  line-height: 1.5;
}

/* ===== Footer Branding ===== */
.app-footer {
  text-align: center;
  padding: 24px 16px 16px;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.85;
}

.app-footer strong {
  color: var(--text);
  font-weight: 600;
}

/* ===== Premium Plans ===== */
.plan-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.plan-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.plan-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.plan-card .price {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

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

.plan-card ul {
  list-style: none;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.plan-card ul li {
  padding: 4px 0;
}

.plan-card ul li::before {
  content: "✓ ";
  color: var(--success);
}

/* ===== Utilities ===== */
.hidden {
  display: none !important;
}



/* Responsive tweaks */
@media (max-width: 360px) {
  .sos-button {
    width: 160px;
    height: 160px;
  }
  .sos-text {
    font-size: 30px;
  }
}


/* ===== Family Circle ===== */
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; width: auto; margin: 0; }
.circle-card { background: var(--bg-elevated); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; }
.circle-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.circle-card-head strong { font-size: 16px; }
.circle-card-head small { color: var(--text-muted); }
.circle-paused { background: #3a2f12; color: var(--warning); padding: 8px 10px; border-radius: 8px; font-size: 13px; margin-bottom: 8px; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--border); }
.member-main { min-width: 0; }
.member-name { font-weight: 600; }
.member-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.member-sub a { color: var(--accent); text-decoration: none; }
.member-actions { display: flex; gap: 6px; flex-shrink: 0; }
.status-pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 20px; margin-top: 4px; background: #1a3a32; color: var(--success); }
.status-pill.trip { background: #16304a; color: #5aa9e6; }
.status-pill.checkin { background: #3a2f12; color: var(--warning); }
.status-pill.missed, .status-pill.sos { background: #3a1a1a; color: var(--accent); font-weight: 700; }
.status-pill.paused { background: #2a2a2a; color: var(--text-muted); }
.circle-footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.invite-box { background: var(--bg); border: 1px dashed var(--border); border-radius: 8px; padding: 10px; margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.invite-box code { font-size: 18px; letter-spacing: 2px; font-weight: 700; }
.sharing-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-top: 10px; }
.request-banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #3a2f12; color: var(--warning); padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; font-size: 14px; }
.link-btn { background: none; border: none; color: var(--text-muted); text-decoration: underline; font-size: 12px; cursor: pointer; padding: 4px; }
#circle-input { width: 100%; padding: 12px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 16px; }

/* ===== Push notification prompt ===== */
.push-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 16px; font-size: 14px; display: flex; flex-direction: column; gap: 10px; }
.push-card-actions { display: flex; align-items: center; gap: 10px; }

/* ===== Where are you? / I've arrived ===== */
.arrived-chips { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.arrived-chips .btn { padding: 12px 4px; font-size: 14px; }
.member-actions { flex-wrap: wrap; justify-content: flex-end; }
.request-banner { flex-wrap: wrap; }
.request-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Header: name, status line, bell ===== */
.user-line { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.header-status { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.header-status.alert { color: var(--warning); font-weight: 600; }
.bell-btn { position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.bell-btn .ic { width: 24px; height: 24px; }
.bell-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}


/* ================================================================
   SafeCircle 2.0 visual layer
   Keeps the existing functional DOM/IDs intact while upgrading
   hierarchy, depth, spacing and safety-state communication.
   ================================================================ */
:root {
  --bg: #07110f;
  --bg-2: #0a1714;
  --bg-card: rgba(17, 29, 26, .82);
  --bg-elevated: #14231f;
  --border: rgba(255,255,255,.08);
  --border-strong: rgba(79, 209, 174, .22);
  --text: #f4f8f6;
  --text-muted: #8ea39b;
  --accent: #ff4052;
  --accent-dark: #d92137;
  --success: #35d0a3;
  --success-soft: rgba(53,208,163,.12);
  --warning: #f4c86a;
  --radius: 22px;
  --radius-sm: 15px;
  --shadow: 0 18px 50px rgba(0,0,0,.28);
}

html, body { background: radial-gradient(circle at 50% -15%, #12352e 0, var(--bg) 38%, #050a09 100%); }
body { letter-spacing: -.01em; }
#app { max-width: 520px; }
.screen { min-height: 100svh; }

/* Splash */
#splash { background: radial-gradient(circle at 50% 40%, #123c32 0, #07110f 48%, #040706 100%); }
.splash-content .logo { width:82px;height:82px;margin:0 auto 18px;display:grid;place-items:center;border-radius:28px;background:linear-gradient(145deg,#183e35,#0b211c);box-shadow:0 20px 60px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08); }
#splash h1 { font-size:32px; letter-spacing:-1.2px; }
#splash p { color:#9ab2a9; }

/* Header */
.header { padding:16px 18px 14px; background:rgba(5,12,10,.78); backdrop-filter:blur(18px); border-bottom:1px solid rgba(255,255,255,.06); }
.user-line { gap:9px; }
.user-line::before { content:'S'; width:34px;height:34px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(145deg,#24584b,#102b24);color:#b9f3df;font-weight:800;font-size:13px;box-shadow:inset 0 1px 0 rgba(255,255,255,.08); }
.user-line #user-name { font-size:17px; }
.header-status { color:#7f9990; font-size:12px; margin-top:2px; }
.status-dot { width:9px;height:9px; box-shadow:0 0 0 4px rgba(53,208,163,.09); }
.bell-btn { width:42px;height:42px;border:1px solid var(--border);background:rgba(255,255,255,.035);border-radius:14px; }

.main-content { padding:18px 16px 104px; }
.eyebrow { display:block; color:#6f8980; font-size:10px; font-weight:800; letter-spacing:1.7px; text-transform:uppercase; margin-bottom:5px; }

/* Safety overview */
.safety-overview { padding:18px; border:1px solid rgba(53,208,163,.16); border-radius:24px; background:linear-gradient(145deg,rgba(22,52,44,.88),rgba(12,25,22,.88)); box-shadow:var(--shadow); margin-bottom:16px; overflow:hidden; position:relative; }
.safety-overview::after { content:''; position:absolute; width:150px;height:150px;right:-75px;top:-75px;border-radius:50%;background:rgba(53,208,163,.08); }
.safety-overview-top { display:flex;justify-content:space-between;gap:14px;align-items:center;position:relative;z-index:1; }
.safety-overview h2 { font-size:24px;letter-spacing:-.8px;margin:0 0 4px; }
.safety-overview p { color:#9ab2a9;font-size:13px; }
.safety-orb { width:54px;height:54px;flex:0 0 54px;border-radius:18px;display:grid;place-items:center;background:rgba(53,208,163,.12);border:1px solid rgba(53,208,163,.2);color:var(--success);font-size:24px;box-shadow:0 0 30px rgba(53,208,163,.08); }
.safety-metrics { display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:17px;position:relative;z-index:1; }
.safety-metric { min-width:0;padding:10px 9px;border-radius:14px;background:rgba(0,0,0,.16);border:1px solid rgba(255,255,255,.045); }
.safety-metric strong { display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.safety-metric small { color:#71877f;font-size:10px;margin-top:3px;display:block; }
.metric-dot { display:inline-block;width:6px;height:6px;border-radius:50%;margin-right:5px;background:var(--success);box-shadow:0 0 0 4px rgba(53,208,163,.08); }
.metric-dot.offline { background:var(--warning); }

/* Push */
.push-card { border:1px solid rgba(53,208,163,.15)!important;background:rgba(22,52,44,.65)!important;border-radius:18px!important;padding:13px 14px!important; }

/* SOS */
.sos-section { margin:8px 0 16px; padding:20px 12px 18px; border-radius:28px; background:linear-gradient(180deg,rgba(22,18,20,.78),rgba(11,16,14,.5)); border:1px solid rgba(255,255,255,.045); }
.sos-section .section-label { margin-bottom:14px; color:#8b9893; font-weight:700; }
.sos-button { width:194px;height:194px; background:radial-gradient(circle at 35% 28%,#ff6672 0,#ff3d50 35%,#c91d32 100%); border:7px solid rgba(255,93,107,.12); box-shadow:0 18px 55px rgba(255,47,67,.18), 0 0 0 12px rgba(255,64,82,.035), inset 0 2px 0 rgba(255,255,255,.2); }
.sos-button::before { content:'';position:absolute;width:215px;height:215px;border:1px solid rgba(255,75,91,.12);border-radius:50%;animation:sosRing 2.4s ease-out infinite; }
@keyframes sosRing { 0%{transform:scale(.92);opacity:.7} 70%{transform:scale(1.08);opacity:0} 100%{opacity:0} }
.sos-text { font-size:40px; }
.sos-sub { font-size:11px; }

.safety-tip { display:flex;gap:11px;align-items:center;padding:12px 14px;margin:0 2px 15px;border:1px solid rgba(255,255,255,.055);background:rgba(255,255,255,.025);border-radius:16px;color:#9cafaa; }
.safety-tip .tip-icon { color:var(--success);font-size:16px; }
.safety-tip strong { color:#e8f0ed;font-size:12px;display:block;margin-bottom:2px; }
.safety-tip span:last-child { display:block;font-size:11px; }

/* Actions */
.quick-actions { gap:10px;margin-bottom:17px; }
.action-btn { min-height:88px;padding:15px 12px;background:linear-gradient(145deg,rgba(20,34,30,.92),rgba(13,22,20,.92));border:1px solid rgba(255,255,255,.065);border-radius:19px;box-shadow:0 8px 24px rgba(0,0,0,.12); }
.action-btn .ic { color:#7fa79a; }
.action-btn span { font-size:12px;font-weight:650; }
.action-btn.primary { border-color:rgba(53,208,163,.15); }
.action-btn.primary .ic { color:var(--success); }
.action-btn.wide { min-height:62px;grid-column:1/-1;flex-direction:row;justify-content:center; }
.action-btn:active { transform:translateY(1px);background:#172923; }

/* Cards */
.info-card, .contacts-section, .alerts-section { background:linear-gradient(145deg,rgba(18,30,27,.9),rgba(10,18,16,.92));border:1px solid rgba(255,255,255,.055);border-radius:21px;box-shadow:0 12px 35px rgba(0,0,0,.15); }
.info-card { padding:17px; }
.info-card h3, .contacts-section h3, .alerts-section h3 { font-size:16px;letter-spacing:-.2px; }
.card-heading,.section-header { display:flex;align-items:center;justify-content:space-between;gap:12px; }
.card-heading h3 { margin:0; }
.live-pill,.section-badge { font-size:9px;font-weight:800;letter-spacing:1px;color:var(--success);padding:6px 8px;border-radius:999px;background:var(--success-soft);border:1px solid rgba(53,208,163,.14); }

.contacts-section { padding:17px;margin-top:15px; }
.alerts-section { padding:17px;margin-top:15px; }
.alert-item { background:rgba(255,255,255,.025)!important;border:1px solid rgba(255,255,255,.045)!important;border-radius:14px!important;padding:11px 12px!important;margin-top:8px; }
.empty-state { color:#687b74; }

/* Bottom nav */
.bottom-nav { height:82px;padding:9px 12px calc(9px + env(safe-area-inset-bottom));background:rgba(7,14,12,.94);backdrop-filter:blur(22px);border-top:1px solid rgba(255,255,255,.07); }
.nav-btn { border-radius:16px;color:#6f817b;gap:4px; }
.nav-btn.active { color:#dff9ef;background:rgba(53,208,163,.09); }
.nav-btn.active .ic { color:var(--success); }
.nav-btn span { font-size:10px;font-weight:650; }

/* Modals/panels */
.modal { background:rgba(0,0,0,.72);backdrop-filter:blur(8px); }
.modal-content,.panel-body { background:linear-gradient(145deg,#15251f,#0d1714)!important;border:1px solid rgba(255,255,255,.08)!important;box-shadow:0 24px 80px rgba(0,0,0,.55)!important;border-radius:25px!important; }
.modal-content { padding:22px!important; }
.form-group input,.form-group select { background:#0b1512;border-color:rgba(255,255,255,.09); }
.form-group input:focus,.form-group select:focus { border-color:rgba(53,208,163,.5);box-shadow:0 0 0 3px rgba(53,208,163,.08); }
.btn-primary { background:linear-gradient(135deg,#ff4758,#df263c);box-shadow:0 10px 24px rgba(255,64,82,.16); }
.btn-secondary { background:#172621;border-color:rgba(255,255,255,.08); }

/* Location history */
#history-list > * { border-color:rgba(255,255,255,.05)!important; }

@media (min-width: 700px) {
  #app { margin:18px auto;min-height:calc(100vh - 36px);border:1px solid rgba(255,255,255,.06);border-radius:30px;overflow:hidden;box-shadow:0 30px 100px rgba(0,0,0,.4); }
  .screen { min-height:calc(100vh - 36px); }
}

/* SafeCircle Community Alerts map */
#community-alerts-map .leaflet-popup-content-wrapper, #community-alerts-map .leaflet-popup-tip { background:#10201a; color:#f0f7f3; }
#community-alerts-map .leaflet-control-attribution { font-size:10px; }
