/* ==========================================================================
   NostalgiaTrack — Design system (Brand Kit "Música, Memória e Cultura Retrô")
   Mobile-first. Em telas largas o app vira um "aparelho" centralizado;
   o Painel dev usa layout largo.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Fontes (locais — funcionam offline)
   -------------------------------------------------------------------------- */
@font-face { font-family: "Merriweather"; font-weight: 700; font-display: swap; src: url("assets/fonts/merriweather-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Merriweather"; font-weight: 900; font-display: swap; src: url("assets/fonts/merriweather-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("assets/fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 500; font-display: swap; src: url("assets/fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("assets/fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("assets/fonts/montserrat-latin-700-normal.woff2") format("woff2"); }

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --indigo: #1B1F4B;  --indigo-700: #14173A;  --indigo-500: #2A2F66;  --indigo-100: #E4E5F0;
  --orange: #E36C2A;  --orange-600: #C9581B;  --orange-100: #FBE3D4;
  --green:  #0B8F58;  --green-600:  #087648;  --green-100:  #D5EEE2;
  --cream:  #F5E9D6;  --cream-50:   #FFFBF4;  --cream-200:  #EADBC2;
  --graphite: #333333; --graphite-60: #6B6458;
  --danger: #B3261E;  --danger-100: #F7DEDC;

  /* mídia e raridade (gráficos) */
  --m-vinil: var(--indigo); --m-k7: var(--orange); --m-vhs: #333;
  --r-comum: #B9AE9C; --r-incomum: var(--green); --r-raro: var(--orange); --r-lendario: var(--indigo);

  --font-title: "Merriweather", Georgia, serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 8px; --radius: 14px; --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(27,31,75,.08), 0 1px 1px rgba(27,31,75,.04);
  --shadow:    0 6px 18px -6px rgba(27,31,75,.22), 0 2px 4px rgba(27,31,75,.06);
  --shadow-lg: 0 18px 40px -12px rgba(27,31,75,.45);

  --app-max: 560px; --app-wide: 1180px;
  --appbar-h: 64px; --nav-h: 66px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter: 16px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  color: var(--graphite); background: var(--indigo-700);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
svg { width: 1.25em; height: 1.25em; flex: none; }
.leaflet-pane svg { width: auto; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--orange-600); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

@media (min-width: 600px) {
  body {
    background:
      radial-gradient(circle at 12% 8%, rgba(227,108,42,.18), transparent 40%),
      radial-gradient(circle at 88% 92%, rgba(11,143,88,.16), transparent 40%),
      var(--indigo-700);
    background-attachment: fixed;
  }
}

/* --------------------------------------------------------------------------
   3. Splash animada
   -------------------------------------------------------------------------- */
.splash {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, var(--indigo-500), var(--indigo) 55%, var(--indigo-700));
  transition: opacity .6s var(--ease), visibility .6s;
}
.splash.is-leaving { opacity: 0; visibility: hidden; }
.splash.is-leaving .splash__center { transform: scale(1.06); }
.splash__center { display: flex; flex-direction: column; align-items: center; transition: transform .6s var(--ease); z-index: 1; }

.splash__logo { width: 150px; height: auto; overflow: visible; }
.splash__pin { transform-origin: 100px 190px; animation: pinDrop .9s cubic-bezier(.3,1.5,.5,1) both; }
.splash__shadow { transform-origin: 100px 214px; animation: shadowIn .9s var(--ease) both; }
.splash__reel { animation: reel 1.1s linear .7s infinite; }
.splash__reel--l { transform-origin: 72px 96px; }
.splash__reel--r { transform-origin: 128px 96px; }
.splash__arch { transform-origin: 100px 70px; animation: archPop .5s var(--ease) .55s both; }

.splash__title {
  margin: 22px 0 6px; color: var(--cream);
  font-family: var(--font-title); font-weight: 900; font-size: 34px; letter-spacing: -.01em;
  animation: rise .6s var(--ease) .75s both;
}
.splash__tagline {
  display: flex; align-items: center; gap: 10px; margin: 0;
  color: var(--orange); font-size: 13px; font-weight: 600; letter-spacing: .04em;
  animation: rise .6s var(--ease) .95s both;
}
.splash__tagline span { width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.splash__progress { width: 140px; height: 4px; margin-top: 30px; border-radius: 4px; background: rgba(245,233,214,.12); overflow: hidden; animation: rise .4s var(--ease) 1.1s both; }
.splash__progress i { display: block; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--green)); animation: progress 1.2s ease-in-out 1.1s infinite; }

.splash__waves { position: absolute; left: -10%; right: -10%; bottom: -60px; height: 220px; }
.splash__wave { position: absolute; inset: 0; border-radius: 50% 50% 0 0; transform: translateY(100%) rotate(-5deg); animation: waveIn 1s var(--ease) both; }
.splash__wave--green  { background: var(--green);  animation-delay: .15s; }
.splash__wave--cream  { background: var(--cream);  top: 22px; animation-delay: .25s; }
.splash__wave--orange { background: var(--orange); top: 44px; animation-delay: .35s; }

@keyframes pinDrop  { 0% { transform: translateY(-140px) scale(.85); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes shadowIn { 0% { transform: scaleX(.2); opacity: 0; } 100% { transform: none; opacity: .55; } }
@keyframes archPop  { from { transform: scale(.6); } to { transform: none; } }
@keyframes reel     { to { transform: rotate(360deg); } }
@keyframes rise     { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes progress { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@keyframes waveIn   { to { transform: translateY(0) rotate(-5deg); } }

/* --------------------------------------------------------------------------
   4. Autenticação
   -------------------------------------------------------------------------- */
.auth { max-width: var(--app-max); min-height: 100dvh; margin: 0 auto; background: var(--cream); display: flex; flex-direction: column; }
.auth__hero {
  position: relative; overflow: hidden;
  padding: calc(40px + var(--safe-top)) 24px 86px; text-align: center; color: var(--cream);
  background: radial-gradient(circle at 50% 20%, var(--indigo-500), var(--indigo) 60%);
}
.auth__logo { margin: 0 auto 12px; border-radius: 18px; box-shadow: 0 12px 30px rgba(0,0,0,.35); animation: rise .5s var(--ease) both; }
.auth__brand { margin: 0; font-family: var(--font-title); font-weight: 900; font-size: 28px; }
.auth__tagline { margin: 4px 0 0; color: var(--orange); font-size: 12.5px; font-weight: 600; letter-spacing: .05em; }
.auth__waves { position: absolute; left: -10%; right: -10%; bottom: -24px; height: 70px; }
.auth__waves i { position: absolute; inset: 0; border-radius: 50% 50% 0 0; transform: rotate(-3deg); }
.auth__waves i:nth-child(1) { background: var(--green); }
.auth__waves i:nth-child(2) { background: var(--cream-50); top: 10px; opacity: .9; }
.auth__waves i:nth-child(3) { background: var(--orange); top: 18px; }

.auth__card {
  position: relative; z-index: 1;
  margin: -34px 16px 24px; padding: 26px 22px 22px;
  border-radius: var(--radius-lg); background: var(--cream-50); box-shadow: var(--shadow-lg);
}
.auth__card.is-entering { animation: rise .45s var(--ease) both; }
.auth__title { margin: 0; font-family: var(--font-title); font-size: 22px; color: var(--indigo); }
.auth__subtitle { margin: 4px 0 20px; color: var(--graphite-60); font-size: 13.5px; }
.auth__switch { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--graphite-60); }
.auth__switch a { font-weight: 700; text-decoration: none; }

/* --------------------------------------------------------------------------
   5. Shell do app
   -------------------------------------------------------------------------- */
.app {
  position: relative; max-width: var(--app-max); min-height: 100dvh; margin: 0 auto;
  background: var(--cream) radial-gradient(rgba(27,31,75,.035) 1px, transparent 1px) 0 0 / 14px 14px;
  transition: max-width .3s var(--ease);
}
body.is-wide .app { max-width: var(--app-wide); }
@media (min-width: 600px) { .app, .auth { box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 30px 80px rgba(0,0,0,.45); } }

.appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  height: calc(var(--appbar-h) + var(--safe-top)); padding: var(--safe-top) var(--gutter) 0;
  background: var(--indigo); color: var(--cream);
}
.appbar__brand { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.appbar__logo { border-radius: 9px; }
.appbar__name { display: block; font-family: var(--font-title); font-weight: 900; font-size: 17px; line-height: 1.15; }
.appbar__section { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar__stripe { position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; background: linear-gradient(var(--orange) 0 33%, var(--cream) 33% 50%, var(--green) 50%); }
.appbar__back { margin-left: -6px; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border: 0; border-radius: 50%; background: rgba(245,233,214,.1); color: var(--cream);
  transition: background .2s, transform .2s var(--ease);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: rgba(245,233,214,.2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn--dark { background: rgba(27,31,75,.07); color: var(--indigo); }
.icon-btn--dark:hover { background: rgba(27,31,75,.14); }
.icon-btn--accent { background: var(--orange); color: #fff; }
.icon-btn--accent:hover { background: var(--orange-600); }
.icon-btn--danger { background: var(--danger-100); color: var(--danger); }
.icon-btn--danger:hover { background: #F0C9C5; }
.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm svg { width: 17px; height: 17px; }

/* Avatar */
.avatar {
  --av: var(--orange);
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--av); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .02em;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}
.avatar--xs { width: 28px; height: 28px; font-size: 11px; }
.avatar--sm { width: 34px; height: 34px; font-size: 12.5px; }
.avatar--lg { width: 56px; height: 56px; font-size: 19px; }
.avatar--xl { width: 76px; height: 76px; font-size: 26px; box-shadow: 0 0 0 4px var(--cream-50), var(--shadow); }
.avatar-btn { display: block; flex: none; padding: 2px; border-radius: 50%; background: var(--orange); text-decoration: none; transition: transform .2s var(--ease); }
.avatar-btn .avatar { display: grid; box-shadow: 0 0 0 2px var(--indigo); }
.avatar-btn:active { transform: scale(.92); }

/* Views */
.views { padding: 22px var(--gutter) calc(var(--nav-h) + var(--safe-bottom) + 96px); }
.view { animation: viewIn .35s var(--ease); }
.view__head { margin-bottom: 16px; }
.view__title { margin: 0; font-family: var(--font-title); font-weight: 900; font-size: 25px; line-height: 1.2; color: var(--indigo); }
.view__subtitle { margin: 4px 0 0; font-size: 13.5px; color: var(--graphite-60); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; }
.section-head h2 { margin: 0; font-family: var(--font-title); font-size: 17px; color: var(--indigo); }
.section-head span { font-size: 12.5px; color: var(--graphite-60); font-weight: 600; }

/* --------------------------------------------------------------------------
   6. Indicadores
   -------------------------------------------------------------------------- */
.stats { display: flex; gap: 1px; margin-bottom: 16px; overflow: hidden; border-radius: var(--radius); background: rgba(245,233,214,.14); box-shadow: var(--shadow); }
.stat { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 12px 4px; background: var(--indigo); color: var(--cream); }
.stat__value { font-family: var(--font-title); font-weight: 900; font-size: 22px; line-height: 1.1; }
.stat:first-child .stat__value { color: var(--orange); }
.stat__label { margin-top: 2px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.stats--light { background: var(--cream-200); box-shadow: var(--shadow-sm); }
.stats--light .stat { background: var(--cream-50); color: var(--indigo); }

/* --------------------------------------------------------------------------
   7. Toolbar, busca, chips
   -------------------------------------------------------------------------- */
.toolbar { display: grid; gap: 12px; margin-bottom: 18px; }
.toolbar__row { display: flex; gap: 8px; }
.search {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; height: 46px; padding: 0 14px;
  border: 1px solid var(--cream-200); border-radius: 999px; background: var(--cream-50); box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(227,108,42,.18); }
.search svg { width: 18px; height: 18px; color: var(--graphite-60); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; }

.select-pill { position: relative; flex: none; }
.select-pill select {
  height: 46px; padding: 0 34px 0 14px; border: 1px solid var(--cream-200); border-radius: 999px;
  background: var(--cream-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%231B1F4B' stroke-width='2' stroke-linecap='round' d='M7 10l5 5 5-5'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
  appearance: none; font-size: 13px; font-weight: 600; color: var(--indigo); box-shadow: var(--shadow-sm);
}

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips--wrap { flex-wrap: wrap; }
.chips--scroll { margin: 14px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 34px; padding: 0 14px;
  border: 1px solid var(--cream-200); border-radius: 999px; background: var(--cream-50);
  font-size: 13px; font-weight: 600; color: var(--indigo); cursor: pointer; transition: all .2s var(--ease);
}
.chip svg { width: 15px; height: 15px; }
.chip:hover { border-color: var(--indigo); }
.chip.is-active { border-color: var(--indigo); background: var(--indigo); color: var(--cream); box-shadow: var(--shadow-sm); }
.chip--light { height: 32px; background: rgba(255,255,255,.92); border-color: transparent; box-shadow: var(--shadow-sm); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--orange)); }
.dot--vinil { --c: var(--m-vinil); } .dot--k7 { --c: var(--m-k7); } .dot--vhs { --c: var(--m-vhs); }

.link-btn { padding: 0; border: 0; background: none; color: var(--orange-600); font-size: 12.5px; font-weight: 700; cursor: pointer; }

/* --------------------------------------------------------------------------
   8. Capas, cards e grid
   -------------------------------------------------------------------------- */
.cover { position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 1; }
.cover > svg { width: 76%; height: auto; }
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover--vinil { background: linear-gradient(150deg, var(--indigo-500), var(--indigo)); }
.cover--k7    { background: linear-gradient(150deg, #F08A4E, var(--orange-600)); }
.cover--vhs   { background: linear-gradient(150deg, #3F3F3F, #1E1E1E); }
.cover--hero  { border-radius: var(--radius); aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.cover--hero > svg { width: 46%; }
.cover--thumb { width: 52px; border-radius: 10px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 520px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 340px) { .grid { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column; overflow: hidden; padding: 0; text-align: left;
  border: 1px solid rgba(27,31,75,.06); border-radius: var(--radius); background: var(--cream-50); box-shadow: var(--shadow);
  animation: cardIn .4s var(--ease) both; transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
button.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card__media { position: relative; }
.card__media::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--orange) 50%, var(--green) 50%); }
.card__type { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(245,233,214,.94); color: var(--indigo); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.card__body { display: flex; flex-direction: column; gap: 3px; flex: 1; width: 100%; padding: 12px 12px 14px; }
.card__title { margin: 0; font-family: var(--font-title); font-weight: 700; font-size: 14.5px; line-height: 1.3; color: var(--indigo); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { margin: 0; font-size: 12px; color: var(--graphite-60); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; }
.card__year { font-size: 12px; font-weight: 600; color: var(--graphite-60); }

.rarity { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.rarity::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rarity--comum    { background: #ECE6DC; color: var(--graphite-60); }
.rarity--incomum  { background: var(--green-100); color: var(--green-600); }
.rarity--raro     { background: var(--orange-100); color: var(--orange-600); }
.rarity--lendario { background: var(--indigo); color: var(--orange); }

.card--skeleton { animation: none; pointer-events: none; }
.card--skeleton .cover, .sk-line { background: linear-gradient(90deg, var(--cream-200) 25%, #F3E8D6 50%, var(--cream-200) 75%) 0 0 / 200% 100%; animation: shimmer 1.2s linear infinite; }
.sk-line { height: 10px; border-radius: 5px; margin-top: 6px; }
.sk-line--lg { height: 14px; width: 85%; } .sk-line--sm { width: 55%; }

/* --------------------------------------------------------------------------
   9. Estados, loading, badges
   -------------------------------------------------------------------------- */
.state { display: flex; flex-direction: column; align-items: center; padding: 34px 20px; border: 1.5px dashed var(--cream-200); border-radius: var(--radius-lg); background: var(--cream-50); text-align: center; }
.state__icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 12px; border-radius: 50%; background: var(--orange-100); color: var(--orange-600); }
.state__icon svg { width: 28px; height: 28px; }
.state--error .state__icon { background: var(--danger-100); color: var(--danger); }
.state__title { margin: 0 0 6px; font-family: var(--font-title); font-size: 18px; color: var(--indigo); }
.state__text { margin: 0 0 16px; font-size: 13.5px; color: var(--graphite-60); max-width: 320px; }
.state__text:last-child { margin-bottom: 0; }

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 30px 0; color: var(--graphite-60); font-size: 14px; font-weight: 500; }
.spinner { width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
.spinner--dark { border-color: var(--cream-200); border-top-color: var(--orange); width: 20px; height: 20px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; background: color-mix(in srgb, var(--c, var(--orange)) 14%, white); color: var(--c, var(--orange-600)); }
.badge svg { width: 13px; height: 13px; }
.badge--green  { --c: var(--green-600); }
.badge--orange { --c: var(--orange-600); }
.badge--indigo { --c: var(--indigo); }
.badge--danger { --c: var(--danger); }
.badge--soft   { --c: var(--graphite-60); }
.tag { padding: 3px 8px; border-radius: 6px; background: var(--indigo-100); color: var(--indigo); font-size: 11px; font-weight: 700; }

/* --------------------------------------------------------------------------
   10. Botões e FAB
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border: 0; border-radius: 12px;
  font-size: 14px; font-weight: 700; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: background .2s, transform .15s var(--ease), box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .65; cursor: progress; }
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 6px 14px -6px rgba(227,108,42,.7); }
.btn--primary:hover { background: var(--orange-600); }
.btn--success { background: var(--green); color: #fff; box-shadow: 0 6px 14px -6px rgba(11,143,88,.6); }
.btn--success:hover { background: var(--green-600); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #951F18; }
.btn--ghost { background: transparent; color: var(--indigo); box-shadow: inset 0 0 0 1.5px var(--cream-200); }
.btn--ghost:hover { background: rgba(27,31,75,.05); }
.btn--text-danger { background: none; color: var(--danger); height: 40px; }
.btn--text-danger:hover { background: var(--danger-100); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn--block { width: 100%; }

.fab {
  position: fixed; z-index: 25;
  right: max(var(--gutter), calc((100vw - var(--app-max)) / 2 + var(--gutter)));
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 18px);
  display: grid; place-items: center; width: 58px; height: 58px;
  border: 0; border-radius: 18px; background: var(--orange); color: #fff;
  box-shadow: 0 12px 24px -8px rgba(227,108,42,.8), 0 0 0 4px var(--cream);
  transition: transform .2s var(--ease), background .2s; animation: fabIn .35s var(--ease);
}
body.is-wide .fab { right: max(var(--gutter), calc((100vw - var(--app-wide)) / 2 + var(--gutter))); }
.fab svg { width: 26px; height: 26px; }
.fab:hover { background: var(--orange-600); }
.fab:active { transform: scale(.92); }

/* --------------------------------------------------------------------------
   11. Bottom navigation
   -------------------------------------------------------------------------- */
.bottom-nav {
  position: fixed; z-index: 30; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: var(--app-max);
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: var(--indigo); box-shadow: 0 -8px 24px -10px rgba(0,0,0,.35);
  transition: max-width .3s var(--ease);
}
body.is-wide .bottom-nav { max-width: var(--app-wide); }
.bottom-nav::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--orange) 50%, var(--green) 50%); }
.bottom-nav__item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: rgba(245,233,214,.6); font-size: 11px; font-weight: 600; text-decoration: none; transition: color .2s; }
.bottom-nav__item svg { width: 24px; height: 24px; transition: transform .25s var(--ease); }
.bottom-nav__item:hover { color: var(--cream); }
.bottom-nav__item.is-active { color: var(--orange); }
.bottom-nav__item.is-active svg { transform: translateY(-2px); }
.bottom-nav__item.is-active::after { content: ""; position: absolute; top: 3px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--cream); }

/* --------------------------------------------------------------------------
   12. Sheet e diálogo
   -------------------------------------------------------------------------- */
.sheet { position: fixed; inset: 0; z-index: 50; visibility: hidden; pointer-events: none; }
.sheet.is-open { visibility: visible; pointer-events: auto; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(20,23,58,.55); backdrop-filter: blur(2px); opacity: 0; transition: opacity .3s var(--ease); }
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet__panel {
  position: absolute; left: 50%; bottom: 0; width: 100%; max-width: var(--app-max); max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 20px calc(22px + var(--safe-bottom)); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--cream-50); box-shadow: var(--shadow-lg);
  transform: translate(-50%, 100%); transition: transform .35s var(--ease);
}
.sheet.is-open .sheet__panel { transform: translate(-50%, 0); }
.sheet__handle { width: 40px; height: 5px; margin: 4px auto 10px; border-radius: 3px; background: var(--cream-200); }
.sheet__header { position: sticky; top: -8px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -20px 14px; padding: 6px 20px; background: var(--cream-50); }
.sheet__title { margin: 0; font-family: var(--font-title); font-size: 20px; color: var(--indigo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dialog { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(20,23,58,.6); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.dialog.is-open { opacity: 1; visibility: visible; }
.dialog__box { width: 100%; max-width: 380px; padding: 24px 22px 20px; border-radius: var(--radius-lg); background: var(--cream-50); box-shadow: var(--shadow-lg); text-align: center; transform: scale(.94); transition: transform .25s var(--ease); }
.dialog.is-open .dialog__box { transform: none; }
.dialog__icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; background: var(--orange-100); color: var(--orange-600); }
.dialog__icon svg { width: 26px; height: 26px; }
.dialog__icon--danger { background: var(--danger-100); color: var(--danger); }
.dialog__title { margin: 0 0 6px; font-family: var(--font-title); font-size: 19px; color: var(--indigo); }
.dialog__text { color: var(--graphite-60); font-size: 14px; }
.dialog__text p { margin: 0 0 6px; }
.dialog__actions { display: flex; gap: 10px; margin-top: 18px; }
.dialog__actions .btn { flex: 1; }
.secret { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--indigo); }
.secret code { color: var(--orange); font-size: 17px; font-weight: 700; letter-spacing: .05em; }

/* --------------------------------------------------------------------------
   13. Formulários
   -------------------------------------------------------------------------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.form--stack { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field--full { grid-column: 1 / -1; }
.form--stack .field, .form--stack > * { grid-column: 1 / -1; }
.field__label { padding: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--indigo); }
.req { color: var(--orange); }
.field__input {
  width: 100%; min-height: 46px; padding: 11px 13px;
  border: 1.5px solid var(--cream-200); border-radius: 10px; background: #fff; font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
textarea.field__input { resize: vertical; min-height: 84px; }
select.field__input { appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%231B1F4B' stroke-width='2' stroke-linecap='round' d='M7 10l5 5 5-5'/%3E%3C/svg%3E") right 10px center / 18px no-repeat; }
.field__input:focus { outline: 0; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(227,108,42,.18); }
.field.has-error .field__input { border-color: var(--danger); }
.field__error { font-size: 12px; font-weight: 600; color: var(--danger); }
.field__error:empty { display: none; }
.field__hint { font-size: 12px; color: var(--graphite-60); }
.form__alert { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--danger-100); color: var(--danger); font-size: 13.5px; font-weight: 600; }
.form__actions { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 4px; }

.input-icon { position: relative; }
.input-icon > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--graphite-60); pointer-events: none; }
.input-icon .field__input { padding-left: 42px; }
.input-icon--plain .field__input { padding-left: 13px; }
.input-icon .field__input:has(+ .input-icon__toggle) { padding-right: 46px; }
.input-icon__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 8px; background: none; color: var(--graphite-60); }
.input-icon__toggle svg { width: 19px; height: 19px; }

.strength { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 4px; align-items: center; }
.strength i { height: 4px; border-radius: 2px; background: var(--cream-200); transition: background .2s; }
.strength span { min-width: 60px; text-align: right; font-size: 11.5px; font-weight: 700; color: var(--graphite-60); }
.strength[data-score="1"] i:nth-child(-n+1) { background: var(--danger); }
.strength[data-score="2"] i:nth-child(-n+2) { background: var(--orange); }
.strength[data-score="3"] i:nth-child(-n+3) { background: #7FB43A; }
.strength[data-score="4"] i { background: var(--green); }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--cream); }
.segmented--inline { display: inline-grid; margin-bottom: 14px; background: var(--cream-200); }
.segmented input, .chip-select input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: grid; place-items: center; height: 40px; padding: 0 14px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--graphite-60); cursor: pointer; transition: all .2s var(--ease); white-space: nowrap; }
.segmented input:checked + span { background: var(--indigo); color: var(--cream); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span, .chip-select input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 1px; }

.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-select span { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1.5px solid var(--cream-200); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; color: var(--indigo); cursor: pointer; transition: all .2s; }
.chip-select input:checked + span { border-color: var(--indigo); background: var(--indigo); color: var(--cream); }

/* Foto */
.photo-picker { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 9; background: var(--cream); }
.photo-picker__preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.photo-picker.has-photo .photo-picker__preview { display: block; }
.photo-picker__empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed var(--cream-200); border-radius: inherit; color: var(--indigo); cursor: pointer; transition: background .2s; }
.photo-picker__empty:hover { background: var(--cream-200); }
.photo-picker__empty svg { width: 30px; height: 30px; color: var(--orange); }
.photo-picker__empty span { font-weight: 700; font-size: 14px; }
.photo-picker__empty small { font-size: 12px; color: var(--graphite-60); }
.photo-picker.has-photo .photo-picker__empty { display: none; }
.photo-picker__actions { position: absolute; right: 10px; bottom: 10px; display: none; gap: 8px; }
.photo-picker.has-photo .photo-picker__actions { display: flex; }

/* --------------------------------------------------------------------------
   14. Detalhes e listas de informação
   -------------------------------------------------------------------------- */
.detail { display: grid; gap: 16px; }
.detail__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail__title { margin: 0; font-family: var(--font-title); font-size: 21px; line-height: 1.25; color: var(--indigo); }
.detail__sub { margin: 2px 0 0; color: var(--graphite-60); font-weight: 500; }
.detail__notes { margin: 0; padding: 12px 14px; border-left: 3px solid var(--orange); border-radius: 0 10px 10px 0; background: var(--cream); font-size: 14px; white-space: pre-line; }
.detail__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-list { display: grid; margin: 0; border-radius: var(--radius); background: #fff; box-shadow: inset 0 0 0 1px var(--cream-200); }
.info-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 14px; border-bottom: 1px solid var(--cream); }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: var(--graphite-60); font-size: 13px; }
.info-list dd { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--indigo); text-align: right; }

.panel { padding: 18px; border-radius: var(--radius-lg); background: var(--cream-50); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 14px; }
.panel__title { margin: 0 0 12px; font-family: var(--font-title); font-size: 16px; color: var(--indigo); }
.panel__title--spaced { margin-top: 20px; }
.panel__text { margin: 0 0 14px; font-size: 13.5px; color: var(--graphite-60); }

.banner { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 14px; border-radius: var(--radius); background: var(--orange-100); color: var(--orange-600); }
.banner > svg { width: 24px; height: 24px; }
.banner div { flex: 1; min-width: 0; }
.banner strong { display: block; color: var(--indigo); font-size: 14px; }
.banner p { margin: 0; font-size: 12.5px; color: var(--graphite-60); }

/* --------------------------------------------------------------------------
   15. Explorar (mapa)
   -------------------------------------------------------------------------- */
.map-card { position: relative; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--indigo-100); scroll-margin-top: calc(var(--appbar-h) + 16px); }
.map { height: min(48vh, 380px); z-index: 0; }
.map__fallback { display: grid; place-items: center; height: 100%; margin: 0; color: var(--graphite-60); }
.map-btn { position: absolute; z-index: 5; right: 12px; bottom: 12px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--cream-50); color: var(--indigo); box-shadow: var(--shadow); }
.map-btn svg { width: 22px; height: 22px; }
.map-btn:hover { background: #fff; }
.map-btn.is-on { background: var(--orange); color: #fff; }
.map-btn--sm { width: 38px; height: 38px; right: 10px; bottom: 10px; }
.leaflet-container { font-family: var(--font-body); background: var(--indigo-100); }
.leaflet-control-zoom a { color: var(--indigo) !important; }
.leaflet-control-attribution { font-size: 10px; background: rgba(255,251,244,.8) !important; }

.map-pin { position: relative; display: block; width: 30px; height: 40px; }
.map-pin::before { content: ""; position: absolute; left: 3px; top: 0; width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); transform-origin: center; background: var(--c); border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.35); top: 4px; }
.map-pin i { position: absolute; left: 11px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.me-dot { display: block; width: 20px; height: 20px; border-radius: 50%; background: #2F7DF6; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(47,125,246,.25); }

.place-list { display: grid; gap: 10px; }
.place-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: var(--radius); background: var(--cream-50); box-shadow: var(--shadow-sm); text-align: left; transition: transform .2s var(--ease), box-shadow .2s; }
.place-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.place-row__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: color-mix(in srgb, var(--c) 15%, white); color: var(--c); }
.place-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.place-row__body strong { color: var(--indigo); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-row__body small, .place-row__meta small { color: var(--graphite-60); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-row__meta { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.place-row__meta b { color: var(--green-600); font-size: 13px; }
.place-row__chev { width: 18px; height: 18px; color: var(--cream-200); }

.place-hero { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--c) 12%, white); }
.place-hero > svg { width: 38px; height: 38px; color: var(--c); }
.place-hero div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.place-hero__dist { color: var(--green-600); font-size: 13px; font-weight: 700; }

.picker-map { position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: inset 0 0 0 1.5px var(--cream-200); }
.picker-map__map { height: 220px; z-index: 0; }
.picker-map__hint { position: absolute; z-index: 5; left: 10px; top: 10px; padding: 6px 10px; border-radius: 8px; background: rgba(27,31,75,.88); color: var(--cream); font-size: 12px; font-weight: 600; pointer-events: none; }
.field.has-error .picker-map { box-shadow: inset 0 0 0 2px var(--danger); }

/* --------------------------------------------------------------------------
   16. Scan
   -------------------------------------------------------------------------- */
.scanner { position: relative; height: 270px; overflow: hidden; border-radius: var(--radius-lg); background: radial-gradient(circle at 50% 45%, var(--indigo-500), var(--indigo-700)); box-shadow: var(--shadow); }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.scanner.is-live video { opacity: 1; }
.scanner__corner { position: absolute; z-index: 2; width: 34px; height: 34px; border: 4px solid var(--orange); }
.scanner__corner--tl { top: 26px; left: 26px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.scanner__corner--tr { top: 26px; right: 26px; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.scanner__corner--bl { bottom: 26px; left: 26px; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.scanner__corner--br { bottom: 26px; right: 26px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.scanner__line { position: absolute; z-index: 2; left: 40px; right: 40px; height: 2px; background: var(--green); box-shadow: 0 0 12px 2px rgba(11,143,88,.8); animation: scan 2.4s ease-in-out infinite; }
.scanner--off .scanner__line { display: none; }
.scanner__idle { position: absolute; z-index: 3; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 30px; text-align: center; color: var(--cream); }
.scanner__idle > svg { width: 40px; height: 40px; color: rgba(245,233,214,.5); }
.scanner__idle p { margin: 0; max-width: 260px; font-size: 14px; opacity: .85; }
.scanner__tools { position: absolute; z-index: 4; right: 12px; top: 12px; display: flex; gap: 8px; }
.scanner__tools .map-btn { position: static; }

.manual { display: flex; gap: 8px; margin: 14px 0; }
.manual .btn { flex: none; }

.result-card { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius-lg); background: var(--cream-50); box-shadow: var(--shadow); animation: rise .35s var(--ease); }
.result-card--error { display: flex; align-items: center; color: var(--danger); }
.result-card--error p { margin: 0; }
.result-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.result-card__code { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--indigo); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.result-card__label, .result-card__owned, .result-card__empty { margin: 0; font-size: 13.5px; color: var(--graphite-60); }
.result-list { display: grid; gap: 8px; }
.result-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 1.5px solid var(--cream-200); border-radius: 12px; background: #fff; text-align: left; transition: border-color .2s; }
.result-row:hover { border-color: var(--orange); }
.result-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.result-row__body strong { color: var(--indigo); }
.result-row__body small { color: var(--graphite); font-size: 12.5px; }
.result-row__body em { color: var(--graphite-60); font-size: 11.5px; font-style: normal; }

/* --------------------------------------------------------------------------
   17. Comunidade
   -------------------------------------------------------------------------- */
.composer-trigger { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 16px; padding: 12px 14px; border: 0; border-radius: var(--radius); background: var(--cream-50); box-shadow: var(--shadow-sm); color: var(--graphite-60); font-size: 14px; text-align: left; }
.composer-trigger span:not(.avatar) { flex: 1; }
.composer-trigger > svg { color: var(--orange); }
.composer-head { display: flex; align-items: center; gap: 12px; }
.composer-head strong { display: block; color: var(--indigo); }
.composer-head small { color: var(--graphite-60); font-size: 12px; }
.composer-text { font-size: 16px; }

.feed { display: grid; gap: 14px; }
.post { overflow: hidden; border-radius: var(--radius-lg); background: var(--cream-50); box-shadow: var(--shadow); animation: cardIn .35s var(--ease) both; }
.post__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 0; }
.post__author { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.post__author strong { display: block; color: var(--indigo); font-size: 14.5px; }
.post__author small { display: block; color: var(--graphite-60); font-size: 12px; }
.post__text { margin: 12px 14px 0; font-size: 14.5px; white-space: pre-line; overflow-wrap: anywhere; }
.post__photo { width: 100%; max-height: 520px; margin-top: 12px; object-fit: cover; background: var(--cream); }
.post__item { display: flex; align-items: center; gap: 12px; margin: 12px 14px 0; padding: 10px; border-radius: 12px; background: var(--cream); }
.post__item > div:not(.cover) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post__item strong { color: var(--indigo); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post__item small { color: var(--graphite-60); font-size: 12px; }
.post__item--preview { margin: 8px 0 0; }
.post__actions { display: flex; gap: 4px; padding: 8px 8px 10px; }
.post__btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--graphite-60); font-weight: 700; font-size: 13.5px; transition: background .2s, color .2s; }
.post__btn:hover { background: var(--cream); }
.post__btn svg { width: 20px; height: 20px; }
.post__btn.is-liked { color: #D94040; }
.post__btn.is-liked svg { animation: pop .3s var(--ease); }
.comments { padding: 0 14px 14px; border-top: 1px solid var(--cream); }
.comment { display: flex; gap: 10px; padding-top: 12px; }
.comment__body { flex: 1; min-width: 0; }
.comment__body p { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.comment__body a { color: var(--indigo); font-weight: 700; text-decoration: none; }
.comment__body small { color: var(--graphite-60); font-size: 11.5px; }
.comment__body .link-btn { font-size: 11.5px; }
.comment-form { display: flex; gap: 8px; margin-top: 12px; }
.comment-form input { flex: 1; min-width: 0; height: 38px; padding: 0 14px; border: 1.5px solid var(--cream-200); border-radius: 999px; background: #fff; font-size: 14px; outline: 0; }
.comment-form input:focus { border-color: var(--orange); }

/* --------------------------------------------------------------------------
   18. Perfil
   -------------------------------------------------------------------------- */
.profile-hero { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.profile-hero__body { flex: 1; min-width: 0; }
.profile-hero__name .badge { font-family: var(--font-body); }
.profile-hero__name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 0; font-family: var(--font-title); font-size: 22px; color: var(--indigo); }
.profile-hero__user { margin: 2px 0 0; color: var(--graphite-60); font-weight: 600; font-size: 13.5px; }
.profile-hero__bio { margin: 8px 0 0; font-size: 14px; }
.profile-hero__since { margin: 6px 0 10px; color: var(--graphite-60); font-size: 12px; }

.media-bar { display: flex; height: 8px; gap: 2px; margin: -4px 0 8px; overflow: hidden; border-radius: 4px; }
.media-bar__seg--vinil { background: var(--m-vinil); } .media-bar__seg--k7 { background: var(--m-k7); } .media-bar__seg--vhs { background: var(--m-vhs); }
.media-legend { display: flex; gap: 14px; margin-bottom: 18px; color: var(--graphite-60); font-size: 12px; font-weight: 600; }
.media-legend span { display: inline-flex; align-items: center; gap: 6px; }

.menu-list { overflow: hidden; border-radius: var(--radius-lg); background: var(--cream-50); box-shadow: var(--shadow); }
.menu-list--flat { box-shadow: inset 0 0 0 1px var(--cream-200); border-radius: var(--radius); }
.menu-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--cream); background: none; text-align: left; text-decoration: none; color: var(--indigo); transition: background .2s; }
.menu-item:last-child { border-bottom: 0; }
.menu-item:hover { background: var(--cream); }
.menu-item > svg:first-child { width: 22px; height: 22px; color: var(--orange); }
.menu-item > svg:last-child:not(:first-child) { width: 18px; height: 18px; color: var(--cream-200); }
.menu-item span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu-item strong { font-size: 14.5px; }
.menu-item small { color: var(--graphite-60); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.menu-item--accent { background: var(--indigo); color: var(--cream); }
.menu-item--accent:hover { background: var(--indigo-500); }
.menu-item--accent small { color: rgba(245,233,214,.7); }
.menu-item--danger, .menu-item--danger > svg:first-child { color: var(--danger); }

.tabs { display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: 12px; background: var(--cream-200); }
.tab { flex: 1; height: 40px; border: 0; border-radius: 9px; background: none; color: var(--graphite-60); font-weight: 700; font-size: 14px; }
.tab span { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: rgba(27,31,75,.08); font-size: 12px; }
.tab.is-active { background: var(--cream-50); color: var(--indigo); box-shadow: var(--shadow-sm); }
.card--static { animation: none; }
.user-card { display: flex; align-items: center; gap: 14px; }
.user-card div { display: flex; flex-direction: column; }
.user-card strong { color: var(--indigo); font-size: 17px; }
.user-card small { color: var(--graphite-60); font-size: 13px; }

/* --------------------------------------------------------------------------
   19. Painel dev
   -------------------------------------------------------------------------- */
.dev-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dev-tabs { display: flex; gap: 6px; margin: 0 calc(var(--gutter) * -1) 18px; padding: 0 var(--gutter) 2px; overflow-x: auto; scrollbar-width: none; }
.dev-tabs::-webkit-scrollbar { display: none; }
.dev-tab { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 40px; padding: 0 14px; border: 1px solid var(--cream-200); border-radius: 10px; background: var(--cream-50); color: var(--indigo); font-weight: 700; font-size: 13.5px; transition: all .2s; }
.dev-tab svg { width: 18px; height: 18px; color: var(--orange); }
.dev-tab.is-active { background: var(--indigo); border-color: var(--indigo); color: var(--cream); }
.dev-body { animation: viewIn .3s var(--ease); }
.dev-cols { display: grid; gap: 14px; margin-top: 14px; }
.dev-cols .panel + .panel { margin-top: 0; }
@media (min-width: 860px) { .dev-cols { grid-template-columns: 1fr 1fr; } }
.dev-count { margin: 0 0 10px; color: var(--graphite-60); font-size: 13px; font-weight: 600; }

.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--radius); background: var(--cream-50); box-shadow: var(--shadow-sm); border-top: 3px solid var(--indigo); }
.kpi--green { border-top-color: var(--green); } .kpi--orange { border-top-color: var(--orange); } .kpi--danger { border-top-color: var(--danger); }
.kpi__icon svg { width: 20px; height: 20px; color: var(--graphite-60); }
.kpi__value { margin-top: 6px; font-family: var(--font-title); font-weight: 900; font-size: 28px; line-height: 1; color: var(--indigo); }
.kpi__label { color: var(--graphite-60); font-size: 12px; font-weight: 600; }

.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 170px; }
.bars__col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.bars__col i { display: block; width: 100%; min-height: 3px; border-radius: 4px 4px 0 0; background: linear-gradient(var(--orange), var(--orange-600)); transition: height .5s var(--ease); }
.bars__val { font-size: 10.5px; font-weight: 700; color: var(--indigo); min-height: 14px; }
.bars__lbl { font-size: 10px; color: var(--graphite-60); }
.hbar { display: grid; grid-template-columns: 76px 1fr 32px; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.hbar__label { font-weight: 600; color: var(--indigo); }
.hbar__track { height: 10px; border-radius: 5px; background: var(--cream); overflow: hidden; }
.hbar__track i { display: block; height: 100%; border-radius: inherit; transition: width .5s var(--ease); }
.hbar__val { text-align: right; font-weight: 700; color: var(--indigo); }

.dev-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.dev-toolbar .search { flex: 1 1 240px; }

.table { overflow: hidden; border-radius: var(--radius-lg); background: var(--cream-50); box-shadow: var(--shadow); }
.table__head { display: none; }
.table__row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--cream); background: none; text-align: left; font-size: 13px; color: var(--graphite); transition: background .2s; }
.table__row:last-child { border-bottom: 0; }
.table__row:hover { background: var(--cream); }
.table__row > span[data-label] { display: none; }
.table__row > span[data-label="Status"] { display: block; align-self: center; }
.table__user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.table__user > span:not(.avatar) { min-width: 0; display: flex; flex-direction: column; }
.table__user strong { color: var(--indigo); font-size: 14px; }
.table__user em { color: var(--graphite-60); font-style: normal; font-weight: 500; }
.table__user small { color: var(--graphite-60); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 860px) {
  .table__head, .table__row { display: grid; grid-template-columns: minmax(0, 2.6fr) 1fr 1fr .6fr 1.1fr; align-items: center; }
  .table__head { padding: 12px 16px; background: var(--indigo); color: var(--cream); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .table__row > span[data-label] { display: block; }
}

.mod-list { display: grid; gap: 8px; }
.mod-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--cream-50); box-shadow: var(--shadow-sm); }
.mod-row__thumb { display: grid; place-items: center; width: 46px; height: 46px; flex: none; overflow: hidden; border-radius: 10px; background: var(--cream); color: var(--orange); }
.mod-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mod-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mod-row__body strong { color: var(--indigo); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-row__body small { color: var(--graphite-60); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.log-list { display: grid; gap: 1px; margin-top: 14px; overflow: hidden; border-radius: var(--radius-lg); background: var(--cream-200); box-shadow: var(--shadow-sm); }
.log { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--cream-50); }
.log__type { flex: none; width: 122px; padding: 3px 8px; border-radius: 6px; background: var(--indigo-100); color: var(--indigo); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-align: center; }
.log__type--security { background: var(--danger-100); color: var(--danger); }
.log__type--auth { background: var(--green-100); color: var(--green-600); }
.log__type--admin { background: var(--indigo); color: var(--cream); }
.log__type--collection, .log__type--places, .log__type--community { background: var(--orange-100); color: var(--orange-600); }
.log__body { min-width: 0; }
.log__body p { margin: 0; font-size: 13.5px; }
.log__body small { color: var(--graphite-60); font-size: 12px; }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--cream); }
.check:last-child { border-bottom: 0; }
.check > svg { width: 22px; height: 22px; padding: 3px; border-radius: 50%; }
.check.is-ok > svg { background: var(--green-100); color: var(--green-600); }
.check.is-bad > svg { background: var(--danger-100); color: var(--danger); }
.check span { display: flex; flex-direction: column; }
.check strong { color: var(--indigo); font-size: 14px; }
.check small { color: var(--graphite-60); font-size: 12.5px; }

/* --------------------------------------------------------------------------
   20. Toast
   -------------------------------------------------------------------------- */
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(var(--nav-h) + var(--safe-bottom) + 90px);
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(min(100vw, var(--app-max)) - 32px);
  padding: 12px 16px; border-radius: 12px; background: var(--indigo); color: var(--cream);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast svg { width: 20px; height: 20px; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast--success svg { color: #5FD39C; }
.toast--error { background: var(--danger); color: #fff; }
#auth:not([hidden]) ~ .toast { bottom: calc(24px + var(--safe-bottom)); }

/* --------------------------------------------------------------------------
   21. Animações
   -------------------------------------------------------------------------- */
@keyframes viewIn  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cardIn  { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fabIn   { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes pop     { 50% { transform: scale(1.3); } }
@keyframes scan    { 0%, 100% { top: 40px; } 50% { top: calc(100% - 42px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
