:root {
  --yellow: #FFD100;
  --yellow-dark: #E6BC00;
  --black: #1A1A1A;
  --black-soft: #2D2D2D;
  --gray-100: #F7F7F8;
  --gray-200: #ECECEF;
  --gray-500: #6B6B76;
  --white: #FFFFFF;
  --green: #22A06B;
  --red: #DE350B;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(26, 26, 26, 0.12);
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
img.app-logo,
.brand-logo,
.phone-app-icon,
.logo-strip-item img,
.app-icon-card img,
.step-logo:not(.combo),
.float-icon,
.footer-app-icons img {
  object-fit: cover;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: auto;
}
.brand-logo { width: 40px; height: 40px; border-radius: 10px; }
.container { width: min(1120px, 92vw); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}
.site-header.compact { position: relative; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
}
.brand-logo.sm { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a:not(.btn) { font-weight: 500; color: var(--gray-500); transition: color .2s; }
.nav a:not(.btn):hover { color: var(--black); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: .9rem; border-radius: 10px; }
.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-dark { background: var(--black); color: var(--yellow); }
.btn-dark:hover { box-shadow: 0 8px 24px rgba(26,26,26,.25); }
.btn-ghost { background: transparent; border-color: var(--gray-200); color: var(--black); }
.btn-ghost:hover { border-color: var(--black); }
.btn-block { width: 100%; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 96px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(255,209,0,.35), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(255,209,0,.2), transparent 50%),
    linear-gradient(180deg, #FFF9E0 0%, var(--white) 70%);
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.pill {
  display: inline-block;
  background: var(--yellow);
  color: var(--black);
  font-weight: 700;
  font-size: .85rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -0.03em;
}
.hero h1 em { font-style: normal; color: var(--black-soft); }
.lead { font-size: 1.15rem; color: var(--gray-500); max-width: 520px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero-trust {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.hero-trust strong { display: block; font-size: 1.2rem; }
.hero-trust span { font-size: .85rem; color: var(--gray-500); }

/* Phone mockups — logos oficiais */
.hero-visual { position: relative; min-height: 420px; }
.hero-phones { position: relative; width: 100%; max-width: 380px; margin: 0 auto; height: 400px; }
.phone-frame {
  position: absolute;
  width: 200px;
  background: var(--black);
  border-radius: 28px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.phone-parent { top: 0; right: 0; z-index: 2; animation: float 6s ease-in-out infinite; }
.phone-child { bottom: 0; left: 0; z-index: 1; animation: float 6s ease-in-out infinite 1s; }
.phone-notch {
  width: 60px; height: 6px;
  background: #333;
  border-radius: 999px;
  margin: 0 auto 8px;
}
.phone-screen {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
}
.phone-appbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--black);
  color: var(--yellow);
  font-weight: 700;
  font-size: .8rem;
  padding: 10px 12px;
}
.phone-appbar.yellow { background: var(--yellow); color: var(--black); }
.phone-app-icon { width: 24px; height: 24px; border-radius: 6px; }
.map-mock {
  height: 140px;
  background: linear-gradient(135deg, #3D4F5F, #1E2A36);
  position: relative;
}
.map-pin {
  position: absolute;
  width: 16px; height: 16px;
  background: var(--yellow);
  border: 3px solid var(--white);
  border-radius: 50%;
  top: 45%; left: 55%;
  box-shadow: 0 0 0 8px rgba(255,209,0,.3);
}
.map-zone {
  position: absolute;
  width: 70px; height: 70px;
  border: 2px dashed rgba(255,209,0,.6);
  border-radius: 50%;
  top: 30%; left: 38%;
}
.phone-alert {
  padding: 10px 12px;
  font-size: .75rem;
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
}
.phone-alert.success { background: #E3FCEF; color: var(--green); font-weight: 600; }
.safekid-body {
  padding: 16px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(180deg, #FFFBE6, var(--white));
}
.safekid-watermark {
  width: 72px;
  height: 72px;
  object-fit: contain;
  opacity: .35;
}
.outline-deco {
  width: min(280px, 80%);
  height: auto;
  max-height: 280px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  opacity: .12;
}
.child-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chip {
  background: var(--yellow);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .75rem;
}
.chip.dark { background: var(--black); color: var(--yellow); }

/* Logo strip */
.logo-strip {
  background: var(--black);
  padding: 28px 0;
}
.logo-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.logo-strip-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--white);
}
.logo-strip-item img { width: 56px; height: 56px; border-radius: 14px; }
.logo-strip-item strong { display: block; font-size: 1.1rem; }
.logo-strip-item span { font-size: .85rem; color: rgba(255,255,255,.65); }
.logo-strip-divider { width: 1px; height: 48px; background: rgba(255,255,255,.2); }

.section-yellow { background: var(--yellow); }
.lead.dark { color: var(--black-soft); }
.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.check-list { list-style: none; padding: 0; margin: 24px 0 0; }
.check-list li {
  padding: 10px 0 10px 28px;
  position: relative;
  font-weight: 500;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-weight: 800;
}
.security-cards { display: grid; gap: 16px; }
.security-card {
  background: rgba(255,255,255,.55);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid rgba(26,26,26,.08);
}
.security-card.dark { background: var(--black); color: var(--white); }
.security-card .big { font-size: 2rem; display: block; margin-bottom: 8px; }
.security-card h3 { margin: 0 0 8px; }
.security-card p { margin: 0; font-size: .95rem; opacity: .85; }

.step-logo {
  width: 48px; height: 48px;
  border-radius: 12px;
  margin-bottom: 12px;
  object-fit: cover;
}
.step-logo.combo {
  display: grid; place-items: center;
  background: var(--yellow);
  color: var(--black);
  font-size: 1.5rem;
  border-radius: 12px;
}

.testimonials { background: var(--gray-100); }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  margin: 0;
  border: 1px solid var(--gray-200);
  box-shadow: 0 4px 20px rgba(26,26,26,.04);
}
.testimonial p { margin: 0 0 16px; font-size: 1.05rem; font-style: italic; }
.testimonial footer { color: var(--gray-500); font-size: .85rem; font-style: normal; }

.faq-wrap { max-width: 720px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--white);
}
.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 12px 0 0; color: var(--gray-500); }

.apps-showcase {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.apps-icons-row {
  display: flex;
  gap: 20px;
  margin: 24px 0;
}
.app-icon-card {
  text-align: center;
  padding: 20px 16px;
  background: var(--gray-100);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.app-icon-card img {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  margin: 0 0 12px;
}
.app-icon-card strong { display: block; }
.app-icon-card span { font-size: .85rem; color: var(--gray-500); }
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.store-badge img { height: 52px; width: auto; transition: transform .15s; }
.store-badge:hover img { transform: scale(1.03); }
.store-note { font-size: .85rem; margin-bottom: 20px; }
.apps-showcase-visual {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
}
.apps-float-icons { position: absolute; inset: 0; }
.float-icon {
  position: absolute;
  width: 88px; height: 88px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.float-icon.a { top: 10%; right: 10%; animation: float 5s ease-in-out infinite; }
.float-icon.b { bottom: 10%; left: 10%; animation: float 5s ease-in-out infinite 1.2s; }

.cta-banner {
  background: var(--black);
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}
.cta-inner h2 { margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.cta-inner p { margin: 0 0 24px; color: rgba(255,255,255,.7); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0 32px;
  text-align: left;
}
.footer-grid h4 { margin: 0 0 12px; color: var(--yellow); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-grid a { display: block; color: rgba(255,255,255,.75); margin-bottom: 8px; font-size: .9rem; }
.footer-grid a:hover { color: var(--yellow); }
.footer-app-icons { display: flex; gap: 10px; margin-top: 16px; }
.footer-app-icons img { width: 40px; height: 40px; border-radius: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0 32px;
  text-align: center;
}
.footer-bottom .small { font-size: .75rem; margin-top: 8px; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Sections */
.section { padding: 88px 0; }
.section-dark { background: var(--black); color: var(--white); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0 0 12px; letter-spacing: -0.02em; }
.section-head p { color: var(--gray-500); margin: 0; font-size: 1.05rem; }
.section-dark .section-head p { color: rgba(255,255,255,.65); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid transparent;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.feature-card:hover {
  border-color: var(--yellow);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26,26,26,.08);
}
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.feature-card p { margin: 0; color: var(--gray-500); font-size: .95rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 28px;
}
.step-num {
  display: inline-flex;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: var(--yellow);
  color: var(--black);
  font-weight: 800;
  border-radius: 12px;
  margin-bottom: 16px;
}
.step h3 { margin: 0 0 8px; }
.step p { margin: 0; color: rgba(255,255,255,.7); font-size: .95rem; }

.apps-cta {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 40px;
  align-items: center;
  background: var(--gray-100);
  border-radius: 24px;
  padding: 48px;
  border: 1px solid var(--gray-200);
}
/* legacy apps-cta kept for compatibility */
.apps-list { padding-left: 18px; color: var(--gray-500); }
.apps-badges { display: flex; flex-direction: column; gap: 16px; }
.app-badge {
  padding: 24px;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 1.3rem;
  text-align: center;
}
.app-badge.parent { background: var(--black); color: var(--yellow); }
.app-badge.child { background: var(--yellow); color: var(--black); }
.app-badge small { font-weight: 500; font-size: .85rem; opacity: .8; }

/* Footer */
.site-footer {
  background: var(--black);
  color: rgba(255,255,255,.8);
}
.footer-inner { text-align: center; padding: 40px 0; }
.footer-inner .brand { justify-content: center; margin-bottom: 12px; color: var(--yellow); }
.site-footer a { color: var(--yellow); }
.muted { color: var(--gray-500); }

/* Auth */
.auth-page {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  padding: 40px 16px;
  background: linear-gradient(180deg, #FFF9E0, var(--white));
}
.auth-card {
  width: min(420px, 100%);
  background: var(--white);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.auth-card h1 { margin: 0 0 6px; font-size: 1.6rem; }
.form { display: grid; gap: 16px; margin-top: 24px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.form input {
  padding: 12px 14px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font: inherit;
  transition: border-color .15s;
}
.form input:focus { outline: none; border-color: var(--yellow); }
.auth-footer { text-align: center; margin-top: 20px; font-size: .9rem; color: var(--gray-500); }
.auth-footer a { color: var(--black); font-weight: 700; }

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: .9rem;
  margin-top: 16px;
}
.alert-error { background: #FFEBE6; color: var(--red); border: 1px solid #FFBDAD; }
.alert-success { background: #E3FCEF; color: var(--green); border: 1px solid #ABF5D1; }

/* Portal */
.portal { padding: 32px 0 64px; background: var(--gray-100); min-height: calc(100vh - 70px); }
.portal-header-inner { flex-wrap: wrap; gap: 12px; }
.portal-user { display: flex; align-items: center; gap: 12px; font-size: .95rem; }
.portal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}
.portal-nav a {
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--gray-500);
  transition: background .15s, color .15s;
}
.portal-nav a:hover { color: var(--black); background: var(--gray-100); }
.portal-nav a.active { color: var(--black); background: var(--yellow); }
.portal-nav-logout { color: var(--red) !important; }
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  background: var(--red);
  color: var(--white);
  font-size: .7rem;
  font-weight: 800;
  border-radius: 999px;
  vertical-align: middle;
}
.portal-page-title { margin: 0 0 4px; font-size: 1.4rem; }
.portal-flash { margin-bottom: 20px; }
.portal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.portal-dashboard {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 20px;
  align-items: start;
}
.portal-col { display: grid; gap: 20px; align-content: start; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--gray-200);
}
.stat-card.online { border-color: var(--yellow); background: #FFFBE6; }
.stat-value { display: block; font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .85rem; color: var(--gray-500); }
.portal-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--gray-200);
}
.panel-head h2 { margin: 0 0 4px; font-size: 1.2rem; }
.panel-head p { margin: 0 0 20px; }
.panel-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.panel-head-row .panel-head p { margin-bottom: 0; }
.panel-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.portal-map {
  width: 100%;
  height: 320px;
  border-radius: 14px;
  background: var(--gray-200);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  position: relative;
}
.portal-map-tall { height: min(60vh, 520px); }
.portal-map.leaflet-container,
.admin-map.leaflet-container {
  z-index: 1;
  font: inherit;
}
.map-error-banner {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1000;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .875rem;
  line-height: 1.45;
  box-shadow: 0 4px 16px rgba(26, 26, 26, 0.15);
  pointer-events: none;
}
.map-error-banner strong { display: block; margin-bottom: 2px; }
.map-banner-warning {
  background: #FFFBE6;
  border: 1px solid var(--yellow);
  color: var(--black);
}
.map-banner-error {
  background: #FFEBE6;
  border: 1px solid var(--red);
  color: var(--black);
}
.map-banner-info {
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--black);
}
.map-panel-full { margin-bottom: 20px; }
.map-footer {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.inline-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.inline-form input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font: inherit;
}
.children-list, .alerts-list { display: grid; gap: 12px; }
.child-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--gray-100);
  border-radius: 14px;
  flex-wrap: wrap;
  border: 2px solid transparent;
  transition: border-color .15s, box-shadow .15s;
}
.child-card.selectable { cursor: pointer; }
.child-card.selectable:hover { border-color: var(--gray-200); }
.child-card.selected { border-color: var(--yellow); background: #FFFBE6; box-shadow: 0 4px 16px rgba(255,209,0,.15); }
.child-card.compact { cursor: pointer; }
.child-main { display: flex; gap: 14px; align-items: center; }
.child-avatar {
  width: 48px; height: 48px;
  background: var(--yellow);
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.child-avatar.sm { width: 40px; height: 40px; font-size: 1rem; border-radius: 12px; }
.child-card h3 { margin: 0 0 4px; font-size: 1rem; }
.status.on { color: var(--green); font-weight: 600; font-size: .85rem; }
.status.off { color: var(--gray-500); font-size: .85rem; }
.pair-code {
  background: var(--black);
  color: var(--yellow);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: .08em;
}
.badge.ok { background: #E3FCEF; color: var(--green); padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: .85rem; }
.child-code { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.inline-action-form { display: inline; margin: 0; }
.zone-quick-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
  display: grid;
  gap: 12px;
}
.zone-quick-form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.zone-quick-form input[type="text"],
.zone-quick-form input[type="number"] {
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font: inherit;
}
.zone-quick-form.hidden { display: none; }
.form-actions { display: flex; gap: 10px; }
.alert-row {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--gray-100);
  align-items: flex-start;
}
.alert-row.unread { background: #FFFBE6; border: 1px solid var(--yellow); }
.alert-row.sos {
  background: #FFEBE6;
  border: 2px solid var(--red);
  animation: sos-pulse 2s ease-in-out infinite;
}
@keyframes sos-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(222, 53, 11, 0); }
  50% { box-shadow: 0 0 0 6px rgba(222, 53, 11, 0.12); }
}
.alert-body { flex: 1; min-width: 0; }
.alert-row p { margin: 4px 0 0; font-size: .9rem; }
.alert-icon { font-size: 1.4rem; flex-shrink: 0; }
.alert-actions { flex-shrink: 0; }
.sos-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--red);
  color: var(--white);
  font-size: .7rem;
  font-weight: 800;
  border-radius: 6px;
  vertical-align: middle;
}
.small { font-size: .8rem; }
.empty { color: var(--gray-500); text-align: center; padding: 24px; }
.zones-list { display: grid; gap: 10px; }
.zone-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--gray-100);
  border-radius: 12px;
}
.zone-row-full { align-items: flex-start; }
.zone-body { flex: 1; }
.zone-icon { font-size: 1.2rem; }
.zone-row p { margin: 2px 0 0; }
.timeline-list { display: grid; gap: 10px; }
.timeline-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}
.timeline-row:last-child { border-bottom: none; padding-bottom: 0; }
.timeline-icon { font-size: 1.1rem; }
.timeline-row p { margin: 2px 0 0; }
.aside-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--gray-200);
}
.apps-card { background: linear-gradient(180deg, #FFFBE6, var(--white)); border-color: var(--yellow); }
.aside-card h3 { margin: 0 0 8px; font-size: 1rem; }
.aside-card ul { margin: 12px 0 16px; padding-left: 18px; color: var(--gray-500); font-size: .9rem; }
.portal-zonas-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 20px;
  align-items: start;
}
.zone-create-form select {
  padding: 12px 14px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font: inherit;
  background: var(--white);
}
.btn.danger { color: var(--red); border-color: #FFBDAD; }
.btn.danger:hover { background: #FFEBE6; }
.link-sm { font-size: .8rem; font-weight: 600; color: var(--black-soft); }
.link-sm:hover { color: var(--yellow-dark); }
.portal-conta {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}
.account-dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px 20px;
  margin: 0 0 24px;
}
.account-dl dt { font-weight: 700; color: var(--gray-500); font-size: .9rem; }
.account-dl dd { margin: 0; font-weight: 600; }
.account-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.stat-mini {
  background: var(--gray-100);
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 90px;
  text-align: center;
}
.stat-mini .stat-value { font-size: 1.5rem; }
.stat-mini .stat-label { font-size: .75rem; }
.account-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.map-children-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.alerts-list-full .alert-row { padding: 16px; }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(20px); animation: reveal .7s ease forwards; }
.reveal.delay { animation-delay: .15s; }
.reveal.delay-1 { animation-delay: .1s; }
.reveal.delay-2 { animation-delay: .2s; }
.reveal.delay-3 { animation-delay: .3s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .apps-cta, .security-grid, .apps-showcase,
  .portal-dashboard, .portal-zonas-grid, .portal-conta { grid-template-columns: 1fr; }
  .features-grid, .steps, .portal-stats, .testimonial-grid { grid-template-columns: 1fr 1fr; }
  .hero-visual { min-height: 360px; margin-top: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .portal-nav { order: 3; width: 100%; justify-content: flex-start; }
  .portal-user { margin-left: auto; }
}
@media (max-width: 640px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 16px; border-bottom: 1px solid var(--gray-200); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .features-grid, .steps, .portal-stats, .testimonial-grid, .footer-grid { grid-template-columns: 1fr; }
  .child-card { flex-direction: column; align-items: flex-start; }
  .logo-strip-divider { display: none; }
  .store-badges { flex-direction: column; align-items: flex-start; }
  .portal-map { height: 240px; }
  .account-dl { grid-template-columns: 1fr; gap: 4px; }
  .account-dl dt { margin-top: 8px; }
}

/* ========== ADMIN PANEL (dark theme) ========== */
:root {
  --admin-bg: #0f1117;
  --admin-surface: #1a1d27;
  --admin-surface-2: #242836;
  --admin-border: #2e3345;
  --admin-text: #e8eaef;
  --admin-muted: #8b92a8;
  --admin-accent: #FFD100;
  --admin-accent-dim: #b89600;
  --admin-danger: #ff6b4a;
  --admin-success: #3dd68c;
}

body.admin-body {
  margin: 0;
  background: var(--admin-bg);
  color: var(--admin-text);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.admin-sidebar {
  background: var(--admin-surface);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-brand strong { display: block; font-size: .95rem; }
.admin-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 800;
  background: var(--admin-accent);
  color: var(--black);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .06em;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--admin-muted);
  font-weight: 600;
  font-size: .9rem;
  transition: background .15s, color .15s;
}

.admin-nav a:hover { background: var(--admin-surface-2); color: var(--admin-text); }
.admin-nav a.active { background: var(--admin-surface-2); color: var(--admin-accent); }

.nav-badge.danger { background: var(--admin-danger); color: #fff; }

.admin-sidebar-foot {
  padding-top: 16px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-user { font-size: .85rem; color: var(--admin-muted); }
.admin-logout { color: var(--admin-danger); font-weight: 600; font-size: .85rem; }

.admin-main {
  padding: 28px 32px 48px;
  max-width: 1400px;
}

.admin-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-page-head h1 { margin: 0 0 4px; font-size: 1.6rem; }
.admin-back { font-size: .85rem; color: var(--admin-muted); display: block; margin-bottom: 8px; }
.admin-back:hover { color: var(--admin-accent); }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 18px;
}

.admin-stat-card.highlight { border-color: var(--admin-accent-dim); }
.admin-stat-card.danger { border-color: var(--admin-danger); background: rgba(255,107,74,.08); }
.admin-stat-card .stat-value { color: var(--admin-text); font-size: 1.8rem; }
.admin-stat-card .stat-label { color: var(--admin-muted); }

.admin-panel {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 20px;
}

.admin-panel h2 { margin: 0 0 16px; font-size: 1.1rem; }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table th { color: var(--admin-muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-table tr:hover td { background: var(--admin-surface-2); }
.admin-table .row-inactive td { opacity: .55; }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--admin-surface-2);
  color: var(--admin-muted);
}

.pill.ok { background: rgba(61,214,140,.15); color: var(--admin-success); }
.pill.warn { background: rgba(255,209,0,.12); color: var(--admin-accent); }
.pill.bad { background: rgba(255,107,74,.15); color: var(--admin-danger); }
.pill.small { font-size: .7rem; }

.btn-admin {
  background: var(--admin-accent);
  color: var(--black);
  border: none;
  font-weight: 700;
}

.btn-admin:hover { background: var(--admin-accent-dim); color: var(--black); }
.btn-admin-ghost {
  background: transparent;
  border: 1px solid var(--admin-border);
  color: var(--admin-text);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
}

.btn-admin-ghost:hover { border-color: var(--admin-accent); color: var(--admin-accent); }
.btn-danger {
  background: transparent;
  border: 1px solid var(--admin-danger);
  color: var(--admin-danger);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger:hover { background: rgba(255,107,74,.12); }

.admin-search-inline,
.admin-search-large {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-search-inline input,
.admin-search-large input {
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-surface-2);
  color: var(--admin-text);
  font: inherit;
  min-width: 200px;
}

.admin-search-large { margin-bottom: 24px; }
.admin-search-large input { flex: 1; min-width: 0; }

.admin-config-dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 16px;
  margin: 0 0 16px;
}

.admin-config-dl.wide { grid-template-columns: 180px 1fr; }
.admin-config-dl dt { color: var(--admin-muted); font-size: .85rem; }
.admin-config-dl dd { margin: 0; }

.admin-code {
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 16px;
  font-size: .85rem;
  overflow-x: auto;
  color: var(--admin-muted);
}

.admin-map {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  background: var(--admin-surface-2);
  border: 1px solid var(--admin-border);
  position: relative;
  overflow: hidden;
}

.admin-alert-row {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--admin-surface-2);
  margin-bottom: 10px;
  align-items: flex-start;
}

.admin-alert-row.sos {
  background: rgba(255,107,74,.12);
  border: 1px solid var(--admin-danger);
  animation: sos-pulse 2s ease-in-out infinite;
}

.admin-alert-row.unread { border-left: 3px solid var(--admin-accent); }
.admin-alert-row p { margin: 4px 0 0; font-size: .9rem; color: var(--admin-muted); }

.admin-alerts-mini .admin-alert-row { margin-bottom: 8px; }
.admin-alerts-full .admin-alert-row { margin-bottom: 12px; }

.admin-child-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--admin-surface-2);
  border-radius: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.admin-child-card.inactive { opacity: .6; }
.admin-child-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.admin-delete-form {
  display: grid;
  gap: 12px;
  max-width: 400px;
}

.admin-delete-form input[type="text"] {
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-bg);
  color: var(--admin-text);
  font: inherit;
}

.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--admin-muted); }

.danger-zone { border-color: rgba(255,107,74,.3); }

.admin-auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--admin-bg);
  padding: 24px;
}

body.admin-auth-body {
  margin: 0;
  background: var(--admin-bg);
  color: var(--admin-text);
  min-height: 100vh;
}

.admin-auth-card {
  width: min(420px, 100%);
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  padding: 32px;
}

.admin-auth-head { text-align: center; margin-bottom: 24px; }
.admin-auth-head h1 { margin: 12px 0 4px; }
.admin-auth-card .form label { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 600; font-size: .9rem; }
.admin-auth-card .form input {
  padding: 12px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: var(--admin-surface-2);
  color: var(--admin-text);
  font: inherit;
}

.admin-flash { margin-bottom: 16px; }

.admin-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.chart-box {
  background: var(--admin-surface-2);
  border: 1px dashed var(--admin-border);
  border-radius: 12px;
  padding: 40px 16px;
  text-align: center;
  color: var(--admin-muted);
  font-size: .85rem;
}

.admin-filter-tabs { display: flex; gap: 8px; }
.admin-filter-tabs a {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--admin-surface-2);
  color: var(--admin-muted);
  font-weight: 600;
  font-size: .85rem;
}

.admin-filter-tabs a.active { background: var(--admin-accent); color: var(--black); }

.admin-result-list { margin: 0; padding-left: 20px; color: var(--admin-muted); }
.admin-result-list li { margin-bottom: 8px; }
.admin-result-list .sos-text { color: var(--admin-danger); font-weight: 600; }

.admin-search-results { display: grid; gap: 16px; }

.admin-form textarea {
  padding: 12px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: var(--admin-surface-2);
  color: var(--admin-text);
  font: inherit;
  resize: vertical;
}

.admin-row-actions { display: flex; gap: 4px; white-space: nowrap; }

body.admin-body .muted { color: var(--admin-muted); }
body.admin-body code { background: var(--admin-surface-2); padding: 2px 6px; border-radius: 4px; font-size: .85em; }
body.admin-body a:not(.btn):hover { color: var(--admin-accent); }

@media (max-width: 900px) {
  body.admin-body { grid-template-columns: 1fr; }
  .admin-sidebar { height: auto; position: relative; }
  .admin-grid-2, .admin-chart-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 20px 16px; }
}
