/* Locali identity: ink, paper and paths. Shared palette: docs/brand/locali.md. */
:root {
  --locali-ink: #073e43; --locali-green: #168b78; --locali-mint: #cdefe0;
  --locali-paper: #fff9f0; --locali-coral: #ff826c; --locali-muted: #526c69;
  font-family: 'Nunito', ui-sans-serif, system-ui, sans-serif;
  color: var(--locali-ink); background: var(--locali-paper);
}
a { color: var(--locali-ink); }
:focus-visible { outline-color: var(--locali-green); }
.brand { color: var(--locali-ink); font-weight: 800; }
.brand::before { content: none; }
.brand em { font-style: normal; color: #b84635; }
.brand .line-icon { width: 30px; height: 30px; margin-right: 8px; }
.line-icon { width: 24px; height: 24px; flex: none; vertical-align: middle; }
.account-link { display: flex; align-items: center; gap: 7px; color: var(--locali-ink); border-color: #c9dcd5; }
.muted, .loader { color: var(--locali-muted); }
.title { font-weight: 800; letter-spacing: -.8px; }
.card, .map-sheet { border-color: #dde6de; border-radius: 22px; box-shadow: 0 6px 20px #073e4308; }
.pet-icon, .profile-icon { color: var(--locali-ink); background: var(--locali-mint); border-radius: 20px; }
.pet-icon .line-icon { width: 34px; height: 34px; }
.button, .login-screen .button { background: var(--locali-ink); border-radius: 24px; font-weight: 800; transition: background .16s, transform .16s; }
.button:hover, .login-screen .button:hover { background: #10585b; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button.secondary { background: transparent; border: 1px solid #91b6ad; color: var(--locali-ink); }
.button.secondary:hover { background: #e9f6ee; }
.field { color: var(--locali-ink); border-color: #a6beb7; border-radius: 14px; }
.field::placeholder { color: #647873; }
.pill { color: #075447; background: var(--locali-mint); }
.pill.warn { background: #ffebcd; color: #775015; }
.nav { background: #fffdf9; border-color: #d8e4da; box-shadow: 0 -4px 20px #073e4307; }
.nav a { color: var(--locali-muted); }
.nav a.active { color: var(--locali-ink); background: var(--locali-mint); }
.nav .line-icon { display: block; margin: 0 auto 3px; }
.stat { color: var(--locali-muted); background: #e4f4eb; border: 1px solid #d4e7da; border-radius: 20px; }
.stat:nth-child(2) { background: #fff0d8; border-color: #f2dfbf; }
.stat:nth-child(4) { background: #fce7df; border-color: #f1d7ce; }
.stat strong { color: var(--locali-ink); font-variant-numeric: tabular-nums; }
.bar i { background: var(--locali-green); border-radius: 7px 7px 0 0; }
.bar { color: var(--locali-muted); }
.bars { gap: 5px; }
.notice { background: #e4f4eb; color: #315c51; }
.error { background: #ffe6df; color: #8c3027; }
.timeline { border-left: 2px dashed #168b78; }
.map { background: #e3ecdf; border: 1px solid #d8e4da; }
.map-sheet::before { content: ''; display: block; width: 34px; height: 4px; margin: -10px auto 18px; border-radius: 4px; background: #c6d8d0; }
.login-screen { background: var(--locali-paper); min-height: 580px; padding-top: calc(64px + env(safe-area-inset-top)); }
.login-screen .login-brand { color: var(--locali-ink); top: calc(18px + env(safe-area-inset-top)); left: 24px; font-size: 28px; }
.login-screen .login-art { background: var(--locali-paper) url('/locali-companions.webp') center / contain no-repeat; min-height: 100px; }
.login-screen .login-art::after { content: none; }
.login-screen .login { margin: 0; background: var(--locali-paper); padding-top: 14px; }
.login-screen .title { color: var(--locali-ink); font-weight: 800; }
.login-label { color: var(--locali-ink); }
.login-screen .forgot-link { color: var(--locali-ink); }
.login-screen .button:disabled { background: #466c6b; color: #fff; }
.password-toggle { color: var(--locali-muted); }
.login-preview { background: #e6ede3; color: #52645c; }
.login-screen.login-mfa .login-art { min-height: 60px; }
@media (max-height: 680px) { .login-screen { padding-top: calc(54px + env(safe-area-inset-top)); } .login-screen .login { padding-top: 8px; } }
@media (max-height: 500px) { .login-screen { min-height: 0; padding-top: 0; } }
@media (min-width: 760px) and (min-height: 501px) {
  .login-screen { max-width: 1100px; padding-top: 0; gap: 24px; }
  .login-screen .login-art { background-size: contain; min-height: 0; }
  .login-screen .login { padding: 40px 32px; }
  .login-screen .login-brand { top: 32px; left: 32px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }


/* Route-specific continuity: every LocaliPet destination uses the same
 * surface, type and interaction vocabulary. The map itself remains owned
 * by the mapping provider and is never replaced with a decorative drawing. */
.shell[data-locali-route] {
  color: var(--locali-ink);
}
.shell[data-locali-route] .top {
  border-bottom: 1px dashed #d5e6db;
  margin-bottom: 12px;
}
.shell[data-locali-route] .title {
  margin-top: 18px;
  font-weight: 800;
  max-width: 19ch;
}
.shell[data-locali-route] .section-title {
  color: var(--locali-ink);
  font-weight: 800;
}
.shell[data-locali-route] .card {
  background: #fffdfa;
  border-color: #d9e7dc;
  box-shadow: 0 7px 22px rgb(7 62 67 / 0.055);
}
.shell[data-locali-route] .pet-card {
  min-height: 106px;
  gap: 15px;
  border-radius: 22px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.shell[data-locali-route] .pet-card:hover {
  border-color: #86cbb5;
  box-shadow: 0 9px 28px rgb(7 62 67 / 0.12);
}
.shell[data-locali-route] .pet-card:focus-visible {
  outline: 3px solid #168b78;
  outline-offset: 3px;
}
.shell[data-locali-route] .pet-copy strong {
  font-weight: 800;
  color: var(--locali-ink);
}
.shell[data-locali-route] .card-arrow {
  color: var(--locali-green);
}
.shell[data-locali-route] .button {
  min-height: 48px;
  border-radius: 999px;
  font-weight: 800;
}
.shell[data-locali-route] .button.secondary {
  background: #eff8f1;
  border: 1px solid #8bbeb0;
  color: var(--locali-ink);
}
.shell[data-locali-route] .field:focus-visible,
.shell[data-locali-route] .account-link:focus-visible,
.nav a:focus-visible {
  outline: 3px solid #168b78;
  outline-offset: 3px;
}
.shell[data-locali-route] .notice {
  border: 1px solid #cce4d3;
  border-radius: 18px;
  line-height: 1.5;
}
.shell[data-locali-route] .error {
  border: 1px solid #f1c7bc;
  border-radius: 18px;
}
/* Pets — welcoming intro that does not replace unavailable data with samples. */
.shell[data-locali-route="pets"] .intro-notice {
  background: #e9f7eb;
  border-style: dashed;
  padding: 17px 18px;
}
.shell[data-locali-route="pets"] .pet-icon {
  background: linear-gradient(145deg, #cdefe0, #e8f7e8);
  border: 1px solid #b6decd;
}
/* Painel — communications, not a fabricated live tracking signal. */
.shell[data-locali-route="painel"] .stats {
  gap: 12px;
}
.shell[data-locali-route="painel"] .stat {
  background: #e8f6ec;
  border: 1px solid #d3e7d9;
  border-radius: 21px;
}
.shell[data-locali-route="painel"] .stat:nth-child(2) {
  background: #fff1db;
  border-color: #f1dfc5;
}
.shell[data-locali-route="painel"] .stat:nth-child(4) {
  background: #fcece5;
  border-color: #f0dcd3;
}
.shell[data-locali-route="painel"] .stat strong {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.shell[data-locali-route="painel"] .chart-card {
  border-radius: 22px;
  overflow: visible;
}
.shell[data-locali-route="painel"] .bars {
  border-color: #d5e5dd;
}
.shell[data-locali-route="painel"] .bar i {
  background: linear-gradient(#48b49d, #168b78);
}
/* Map and lost-pet search — readability around the real, interactive map. */
.shell[data-locali-route="mapa"] .map,
.shell[data-locali-route="busca"] .map {
  border: 1px solid #cbded3;
  border-radius: 23px;
  background: #e4eee4;
  isolation: isolate;
}
.shell[data-locali-route="mapa"] .map-sheet {
  border-color: #d3e7db;
  background: #fffdfa;
}
.shell[data-locali-route="mapa"] .map-sheet h2 {
  font-weight: 800;
}
.shell[data-locali-route="busca"] .timeline {
  border-left: 2px dashed var(--locali-green);
}
.shell[data-locali-route="busca"] .notice {
  color: #7b3d31;
  background: #ffede5;
  border-color: #f1d1c5;
}
/* Protection and account — friendly but transparent security controls. */
.shell[data-locali-route="protecao"] .card,
.shell[data-locali-route="configuracoes"] .card,
.shell[data-locali-route="busca"] .card {
  padding: clamp(16px, 4vw, 22px);
}
.shell[data-locali-route="protecao"] .card strong,
.shell[data-locali-route="configuracoes"] .card strong {
  color: var(--locali-ink);
  font-weight: 800;
}
.shell[data-locali-route="configuracoes"] .profile-card {
  background: #e9f7ee;
  border-color: #cee8d9;
}
.shell[data-locali-route="configuracoes"] .access-card {
  border-style: dashed;
}
.nav a {
  border-radius: 16px;
  transition: background-color .15s ease, color .15s ease;
}
.nav a.active {
  background: #cdefe0;
  color: #073e43;
}
.nav a[aria-current="page"] .line-icon {
  stroke-width: 2;
}
@media (max-width: 420px) {
  .shell[data-locali-route] .title { max-width: none; }
  .shell[data-locali-route] .card { padding: 15px; }
  .shell[data-locali-route="painel"] .stat { padding: 12px; }
  .shell[data-locali-route] .pet-card { gap: 10px; }
  .shell[data-locali-route] .pet-icon { width: 54px; height: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .shell[data-locali-route] .pet-card,
  .nav a { transition: none; }
  .shell[data-locali-route] .pet-card:hover { transform: none; }
}
@media (forced-colors: active) {
  .shell[data-locali-route] .card,
  .shell[data-locali-route] .notice,
  .shell[data-locali-route] .stat { border: 1px solid CanvasText; }
}

/* Isolated, clearly labeled visual walkthrough on preview only.
   No GPS map tiles, QR token, account session, or network access. */
.login-screen .demo-entry {
  display: flex;
  margin-top: 14px;
  border: 1.5px solid #168b78;
  border-radius: 999px;
  color: #073e43;
  background: #e1f5e9;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}
.login-screen .demo-entry:hover,
.login-screen .demo-entry:focus-visible {
  background: #cdefe0;
  color: #073e43;
}
.login-screen .demo-entry-note {
  display: block;
  margin: 9px 0 0;
  color: #526c69;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 22px;
  padding: 12px 15px;
  border: 1px dashed #91b6ad;
  border-radius: 15px;
  color: #073e43;
  background: #e8f5ea;
  font-size: 12px;
  line-height: 1.4;
}
.demo-banner strong { font-size: 12px; }
.demo-exit {
  padding: 6px 10px;
  border: 1px solid #91b6ad;
  border-radius: 999px;
  background: #fffdf9;
  color: #073e43;
  font-size: 12px;
  font-weight: 800;
}
.demo-exit:hover { background: #cdefe0; }
.demo-pet-card .pet-icon { font-size: 30px; }
.demo-pet-card .pet-copy small { display: block; }
.demo-map {
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  min-height: 310px;
  overflow: hidden;
  background:
    linear-gradient(44deg, transparent 44%, #ffffffaa 45%, #ffffffaa 50%, transparent 51%),
    linear-gradient(-36deg, transparent 37%, #ffffffbb 38%, #ffffffbb 43%, transparent 44%),
    repeating-linear-gradient(0deg, transparent 0 56px, #cee2d6 57px 59px, transparent 60px 90px),
    #e3efe4;
}
.demo-map__road {
  position: absolute;
  width: 70%;
  height: 52%;
  border: 5px dashed #168b78;
  border-left: 0;
  border-top: 0;
  border-radius: 40%;
  transform: rotate(-12deg);
  opacity: .65;
}
.demo-map__marker {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 5px solid #fffdf9;
  border-radius: 50%;
  background: #cdefe0;
  box-shadow: 0 8px 23px #073e4330;
  font-size: 30px;
}
.demo-map__caption {
  position: absolute;
  bottom: 14px;
  left: 50%;
  z-index: 2;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 8px 12px;
  border-radius: 999px;
  transform: translateX(-50%);
  color: #073e43;
  background: #fffdf9ed;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.demo-protection-card { text-align: center; }
.demo-shield {
  display: inline-grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 14px;
  border-radius: 21px;
  color: #073e43;
  background: #cdefe0;
}
.demo-shield .line-icon { width: 40px; height: 40px; }
.demo-protection-card .pill { margin-top: 10px; }
@media (max-width: 380px) {
  .demo-banner { padding: 10px; }
  .demo-map__marker { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-pet-card, .demo-exit, .login-screen .demo-entry { transition: none; }
}


/* Locali PWA 2026 — unified iOS-inspired glass navigation.
   The frosted surface is navigational chrome, not an imitation of map data.
   Never modify Google Maps tiles, geolocation, operational positions, or auth. */
:root {
  --locali-glass-surface: rgb(253 255 250 / .54);
  --locali-glass-border: rgb(255 255 255 / .78);
  --locali-glass-shadow: 0 10px 36px rgb(7 62 67 / .14), inset 0 1px 0 rgb(255 255 255 / .76);
  --locali-glass-active: rgb(205 239 224 / .78);
}

/* Mobile PWA: floating pill, five working destinations, reduced icons. */
@media (max-width: 899px) {
  .shell {
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }
  .nav {
    position: fixed;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: 3px;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    height: 66px;
    max-width: 580px;
    margin-inline: auto;
    padding: 5px 6px;
    transform: none;
    border: 1px solid var(--locali-glass-border);
    border-radius: 999px;
    background: var(--locali-glass-surface);
    box-shadow: var(--locali-glass-shadow);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    isolation: isolate;
  }
  .nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 54px;
    padding: 5px 1px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #365c5b;
    font-size: 10px;
    line-height: 1.1;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
  }
  .nav a .line-icon {
    display: block;
    width: 21px;
    height: 21px;
    margin: 0;
    stroke-width: 1.85;
  }
  .nav a strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -.015em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav a.active,
  .nav a[aria-current="page"] {
    background: var(--locali-glass-active);
    border-color: rgb(255 255 255 / .65);
    color: #073e43;
    box-shadow: 0 2px 9px rgb(7 62 67 / .07), inset 0 1px rgb(255 255 255 / .7);
  }
  .nav a:focus-visible {
    outline: 3px solid #168b78;
    outline-offset: 2px;
  }
  .shell[data-locali-route="mapa"] .map {
    height: max(430px, calc(100dvh - 265px));
    max-height: 760px;
    min-height: 0;
  }
  .shell[data-locali-route="mapa"] .map-sheet {
    z-index: 2;
  }
  .shell[data-locali-route="mapa"] .title + .muted {
    max-width: 38ch;
  }
  .shell[data-locali-route="mapa"],
  .shell[data-locali-route="busca"] {
    background: linear-gradient(160deg, #fff9f0, #eff8f0 92%);
  }
}

/* The web version uses the same menu links in a sidebar.
   Companion artwork appears only at the top header, never repeated in nav. */
@media (min-width: 900px) {
  body:has(.shell) {
    background: linear-gradient(125deg, #f5faf4, #fff9f0 60%);
  }
  .shell {
    box-sizing: border-box;
    width: 100%;
    max-width: 1420px;
    padding: 22px 30px 55px 266px;
  }
  .shell .top {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 132px;
    margin-bottom: 22px;
    padding: 14px 210px 14px 28px;
    overflow: hidden;
    border: 1px solid #deeee5;
    border-radius: 27px;
    background:
      radial-gradient(circle at 82% 6%, rgb(255 210 143 / .45), transparent 23%),
      linear-gradient(110deg, #fffdf8 35%, #e7f7ec);
    box-shadow: 0 9px 30px rgb(7 62 67 / .065);
    isolation: isolate;
  }
  .shell .top::before {
    position: absolute;
    z-index: -1;
    right: 0;
    bottom: 0;
    left: 0;
    height: 38px;
    content: "";
    background: linear-gradient(0deg, #cdefe0 0%, #e8f6ed 48%, transparent 100%);
    pointer-events: none;
  }
  .shell .top::after {
    position: absolute;
    right: 12px;
    bottom: -6px;
    width: 195px;
    height: 127px;
    content: "";
    background: url('/locali-companions.webp') center center / contain no-repeat;
    pointer-events: none;
  }
  .shell .top .brand {
    position: relative;
    z-index: 1;
    font-size: clamp(22px, 2.3vw, 29px);
  }
  .shell .top .account-link {
    position: relative;
    z-index: 1;
    margin-left: auto;
    white-space: nowrap;
    border-radius: 999px;
  }
  .nav {
    position: fixed;
    z-index: 15;
    top: 34px;
    bottom: auto;
    left: max(20px, calc((100vw - 1420px) / 2 + 25px));
    right: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    width: 208px;
    height: auto;
    padding: 14px 12px;
    transform: none;
    border: 1px solid #d8e7dc;
    border-radius: 23px;
    background: #fffdf9e8;
    box-shadow: 0 12px 38px rgb(7 62 67 / .08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .nav::before {
    content: "LocaliPet";
    display: block;
    padding: 10px 14px 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid #dfebe4;
    color: #073e43;
    font-family: Nunito, ui-sans-serif, sans-serif;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -.05em;
  }
  .nav a {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    flex: none;
    max-width: none;
    width: 100%;
    min-height: 48px;
    padding: 9px 12px;
    border: 0;
    border-radius: 14px;
    color: #345c59;
    font-size: 13px;
    text-align: left;
  }
  .nav a .line-icon {
    flex: none;
    width: 21px;
    height: 21px;
    margin: 0;
    stroke-width: 1.85;
  }
  .nav a strong { font-size: 13px; }
  .nav a.active, .nav a[aria-current="page"] {
    color: #fff;
    background: #073e43;
    box-shadow: 0 5px 14px rgb(7 62 67 / .14);
  }
  .nav a:focus-visible { outline: 3px solid #168b78; outline-offset: 2px; }
  .shell[data-locali-route="mapa"] .map,
  .shell[data-locali-route="busca"] .map {
    height: clamp(510px, 66vh, 830px);
    min-height: 450px;
  }
  .shell .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .shell .stat { min-width: 0; }
  .shell .chart-card,
  .shell .card { max-width: 1100px; }
  .shell .map-sheet {
    max-width: 620px;
    margin: -26px auto 24px;
  }
}
@media (min-width: 900px) and (max-width: 1090px) {
  .shell { padding-right: 18px; padding-left: 232px; }
  .nav { width: 192px; left: 16px; }
  .shell .top { padding-left: 20px; padding-right: 146px; }
  .shell .top::after { width: 142px; }
}

/* Design-only fictional map: recognizable landmarks, not real map tiles. */
.demo-map { background-color: #dfefe3; }
.demo-map__poi {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 70px;
  min-height: 38px;
  padding: 6px 11px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: rgb(255 253 248 / .9);
  box-shadow: 0 5px 16px rgb(7 62 67 / .12);
  color: #073e43;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.demo-map__poi--home { top: 18%; left: 12%; background: #cdefe0; }
.demo-map__poi--park { bottom: 25%; left: 8%; background: #cdefe0; }
.demo-map__poi--alert { top: 48%; right: 6%; background: #ffe8df; color: #963d33; }
.demo-map__marker { position: absolute; top: 40%; left: 44%; }
.demo-map__road { z-index: 1; }
.demo-map__caption { z-index: 3; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  @media (max-width: 899px) { .nav { background: #f6faf4f2; } }
}
@media (prefers-reduced-transparency: reduce) {
  .nav {
    background: #f7faf5 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}
@media (prefers-contrast: more) {
  .nav { border-color: #285450; }
  .nav a.active { outline: 2px solid #073e43; }
}
@media (prefers-reduced-motion: reduce) {
  .nav a { transition: none; }
}
@media print {
  .nav { display: none !important; }
  .shell { padding: 0 !important; }
}
