/* =====================================================================
   IPODS — base: cores, tipografia e peças que a loja e o painel dividem
   Paleta: branco + azul petróleo → azul fumaça → gelo, sempre em degradê.
   ===================================================================== */

:root {
  /* azuis, do mais fundo ao mais claro */
  --abismo:    #06222B;
  --petroleo-2:#0A3441;
  --petroleo:  #0E4A5C;
  --mar:       #1F6480;
  --fumaca:    #6F8FA6;
  --fumaca-2:  #9DB6C8;
  --gelo:      #CFE2EC;
  --gelo-2:    #E6F0F5;
  --nevoa:     #F3F7FA;
  --branco:    #FFFFFF;

  /* destaque frio: o "neon" da marca, usado com parcimônia */
  --brilho:    #7CD3F0;

  /* WhatsApp: a única cor fora do azul, pra ninguém confundir o botão */
  --zap:       #1FAE63;
  --zap-2:     #189A56;

  --texto:     #0B2530;
  --texto-2:   #4D6676;
  --texto-3:   #7F95A3;
  --linha:     #DCE6EC;
  --linha-2:   #EBF1F4;

  --ok:        #1D8C74;
  --ok-fundo:  #E3F4EF;
  --alerta:    #B7791F;
  --alerta-fundo:#FBF1E0;
  --perigo:    #C2413A;
  --perigo-fundo:#FBE9E7;

  --degrade:        linear-gradient(135deg, #06222B 0%, #0E4A5C 38%, #3F7189 68%, #9DB6C8 100%);
  --degrade-suave:  linear-gradient(135deg, #0E4A5C 0%, #4E7C95 55%, #A9C1D1 100%);
  --degrade-claro:  linear-gradient(160deg, #F5F9FB 0%, #E3EDF3 55%, #D2E3EC 100%);
  --degrade-texto:  linear-gradient(100deg, #0E4A5C 0%, #3F7189 45%, #7FA3BA 100%);

  --sombra-1: 0 1px 2px rgba(10, 52, 65, .06), 0 1px 1px rgba(10, 52, 65, .04);
  --sombra-2: 0 2px 4px rgba(10, 52, 65, .05), 0 14px 34px -14px rgba(10, 52, 65, .22);
  --sombra-3: 0 24px 60px -20px rgba(6, 34, 43, .38);

  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;
  --r-xl: 34px;

  --f-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --f-corpo: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.22, .8, .24, 1);
  --topo-seguro: env(safe-area-inset-top, 0px);
  --pe-seguro: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-corpo);
  font-size: 15px;
  line-height: 1.55;
  color: var(--texto);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.01em; }
p { margin: 0; }
::selection { background: var(--gelo); color: var(--petroleo-2); }

:focus-visible { outline: 2px solid var(--mar); outline-offset: 2px; border-radius: 6px; }

.display { font-family: var(--f-display); font-weight: 600; letter-spacing: -.02em; }
.grad-txt {
  background: var(--degrade-texto);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------------- logo ----------------
   O fantasma vem num fundo preto chapado. Em fundo escuro o "screen" some
   com o preto; em fundo claro ele mora dentro de um selo redondo escuro. */
/* o ícone já vem reduzido (assets/logo-icone.png): o navegador não precisa
   espremer a arte de 1254px, que era o que serrilhava */
.logo-selo {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover; background: transparent;
  box-shadow: 0 0 0 2px var(--branco), 0 0 0 3.5px var(--gelo);
  flex: none;
}
.marca {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: .04em;
}
.marca b { font-weight: 700; }
/* o nome da marca é a logo nova, em imagem já pintada: petróleo nos fundos
   claros, branca nos escuros. Imagem comum (e não máscara de CSS) porque o
   Chrome bloqueia máscara quando o site é aberto direto do arquivo. */
.marca-logo { display: block; height: 20px; width: auto; flex: none; }
.marca.claro .marca-logo { height: 26px; }
.marca i { font-style: normal; font-weight: 400; color: var(--fumaca); }

/* ---------------- botões ---------------- */
.btn {
  --bg: var(--petroleo); --fg: var(--branco);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: .92rem; letter-spacing: .01em;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, opacity .18s;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(14, 74, 92, .6); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-degrade { background: var(--degrade); background-size: 160% 160%; background-position: 0 0; }
.btn-degrade:hover { background-position: 60% 40%; }
.btn-claro { --bg: var(--gelo-2); --fg: var(--petroleo); }
.btn-claro:hover { --bg: var(--gelo); }
.btn-linha { --bg: transparent; --fg: var(--petroleo); box-shadow: inset 0 0 0 1.5px var(--linha); }
.btn-linha:hover { box-shadow: inset 0 0 0 1.5px var(--fumaca-2); }
.btn-branco { --bg: var(--branco); --fg: var(--petroleo-2); }
.btn-perigo { --bg: var(--perigo); --fg: #fff; }
/* tudo que leva pro WhatsApp é verde, em qualquer lugar */
.btn-zap { --bg: var(--zap); --fg: #fff; }
.btn-zap:hover { --bg: var(--zap-2); box-shadow: 0 10px 22px -12px rgba(31, 174, 99, .7); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .84rem; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn-bloco { width: 100%; }

/* botão redondo com seta, como os do modelo do painel */
.seta-btn {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--branco); color: var(--petroleo);
  box-shadow: inset 0 0 0 1.5px var(--linha);
  transition: transform .2s var(--ease), background .2s;
}
.seta-btn:hover { transform: rotate(-8deg) scale(1.05); }
.seta-btn svg { width: 18px; height: 18px; }
.seta-btn.escuro { background: var(--petroleo-2); color: var(--branco); box-shadow: none; }

.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------- formulários ---------------- */
.campo, .form-grid label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: .8rem; font-weight: 700; color: var(--texto-2);
  letter-spacing: .01em;
}
.campo small, .form-grid label small { font-weight: 500; color: var(--texto-3); }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),
select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1.5px solid var(--linha);
  border-radius: var(--r-s);
  background: var(--branco);
  font-size: .95rem; font-weight: 500; color: var(--texto);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--mar);
  box-shadow: 0 0 0 4px rgba(31, 100, 128, .12);
}
input::placeholder, textarea::placeholder { color: var(--texto-3); font-weight: 500; }
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E4A5C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--petroleo); margin: 0; }
input[type=color] { border: 1.5px solid var(--linha); border-radius: 10px; background: #fff; cursor: pointer; }

.linha-check { flex-direction: row !important; align-items: center; gap: 10px !important; font-weight: 600 !important; color: var(--texto) !important; cursor: pointer; }

.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px;
}
.form-grid h2 { grid-column: 1 / -1; font-family: var(--f-display); font-size: 1.3rem; font-weight: 600; margin-bottom: 4px; }
.form-grid .full, .form-grid .form-acoes { grid-column: 1 / -1; }
.form-acoes { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* chave liga/desliga */
.chave { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 700; font-size: .88rem; }
.chave input { position: absolute; opacity: 0; pointer-events: none; }
.chave-trilho {
  width: 46px; height: 28px; border-radius: 999px; background: var(--linha);
  position: relative; transition: background .2s; flex: none;
}
.chave-trilho::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(6, 34, 43, .25); transition: transform .25s var(--ease);
}
.chave input:checked + .chave-trilho { background: var(--petroleo); }
.chave input:checked + .chave-trilho::after { transform: translateX(18px); }
.chave input:focus-visible + .chave-trilho { outline: 2px solid var(--mar); outline-offset: 2px; }

/* controle segmentado em pílula (All / Year / Month / Week do modelo) */
.pilulas {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--nevoa); border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--linha-2);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.pilulas::-webkit-scrollbar { display: none; }
.pilula {
  min-height: 34px; padding: 0 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 700; color: var(--texto-2); white-space: nowrap;
  transition: background .2s, color .2s;
}
.pilula:hover { color: var(--petroleo); }
.pilula.is-on { background: var(--petroleo-2); color: #fff; }

/* ---------------- modal: folha que sobe (celular) / caixa ou gaveta ---------------- */
.modal-fundo {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(6, 34, 43, .42);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fundoEntra .25s var(--ease);
}
@keyframes fundoEntra { from { opacity: 0; } }
.modal {
  position: relative;
  width: min(640px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--branco);
  border-radius: var(--r-l);
  padding: 30px 28px 26px;
  box-shadow: var(--sombra-3);
  animation: modalEntra .35s var(--ease);
}
@keyframes modalEntra { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.modal-x {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--nevoa); color: var(--petroleo); font-size: 1.4rem; line-height: 1;
}
.modal-x:hover { background: var(--gelo-2); }

/* gaveta lateral: a ficha do produto no desktop */
.modal-fundo.gaveta { justify-content: flex-end; padding: 0; }
.modal-fundo.gaveta .modal {
  width: min(520px, 100%); height: 100dvh; max-height: none;
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  padding: 0;
  animation: gavetaEntra .4s var(--ease);
}
@keyframes gavetaEntra { from { transform: translateX(40px); opacity: 0; } }

.modal-sm { width: min(440px, 100%); }

@media (max-width: 720px) {
  .modal-fundo, .modal-fundo.gaveta { align-items: flex-end; padding: 0; }
  .modal, .modal-fundo.gaveta .modal {
    width: 100%; height: auto; max-height: 92dvh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding: 30px 20px calc(22px + var(--pe-seguro));
    animation: folhaSobe .38s var(--ease);
  }
  .modal-fundo.gaveta .modal { padding: 0; }
  .modal::before {
    content: ''; position: sticky; top: -18px; display: block;
    width: 44px; height: 5px; border-radius: 9px; background: var(--linha);
    margin: -16px auto 14px; z-index: 4;
  }
  .modal-fundo.gaveta .modal::before { position: absolute; top: 10px; left: 50%; margin: 0 0 0 -22px; background: rgba(255,255,255,.6); }
  /* o X fica preso no topo da folha: solto no conteúdo, ele subia junto
     com a rolagem e saía cortado por cima. A margem negativa embaixo
     devolve o espaço, então nada abaixo dele se mexe. */
  .modal-x {
    position: sticky; top: 12px; z-index: 5; flex: none;
    margin: -19px 0 -19px auto;
    box-shadow: 0 4px 14px -6px rgba(6, 34, 43, .35);
  }
  .modal-fundo.gaveta .modal-x { margin: 14px 14px -52px auto; }
}
@keyframes folhaSobe { from { transform: translateY(40%); opacity: .4; } }

/* confirmação no meio da tela */
.confirma { text-align: center; padding: 6px 4px 0; }
.confirma-ico {
  width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--perigo-fundo); color: var(--perigo);
}
.confirma-ico .ico { width: 26px; height: 26px; }
.confirma h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; margin-bottom: 8px; }
.confirma p { color: var(--texto-2); font-size: .92rem; }
.confirma p + p { margin-top: 8px; }
.confirma-btns { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.confirma-btns .btn { min-width: 130px; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(26px + var(--pe-seguro)); z-index: 120;
  transform: translateX(-50%);
  max-width: min(92vw, 460px);
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--petroleo-2); color: #fff;
  font-size: .9rem; font-weight: 600; text-align: center;
  box-shadow: var(--sombra-3);
  animation: toastEntra .35s var(--ease);
}
@keyframes toastEntra { from { opacity: 0; transform: translate(-50%, 14px); } }

/* ---------------- fumaça ----------------
   Manchas borradas que derivam devagar: é a névoa do fantasma. */
.fumaca { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.fumaca i {
  position: absolute; border-radius: 50%;
  filter: blur(40px); opacity: .55;
  animation: deriva 18s ease-in-out infinite alternate;
}
.fumaca i:nth-child(1) { width: 60%; height: 70%; left: -10%; top: 10%; background: radial-gradient(circle, rgba(157,182,200,.9), transparent 70%); }
.fumaca i:nth-child(2) { width: 50%; height: 60%; right: -8%; top: -12%; background: radial-gradient(circle, rgba(124,211,240,.55), transparent 70%); animation-duration: 22s; animation-delay: -6s; }
.fumaca i:nth-child(3) { width: 55%; height: 55%; left: 30%; bottom: -25%; background: radial-gradient(circle, rgba(207,226,236,.8), transparent 70%); animation-duration: 26s; animation-delay: -11s; }
@keyframes deriva {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6%, -5%) scale(1.12); }
  100% { transform: translate(-5%, 4%) scale(.94); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* placeholder do pod quando não há foto */
.pod-ph { width: 100%; height: 100%; }

.vazio {
  padding: 28px 18px; text-align: center;
  color: var(--texto-3); font-size: .9rem; font-weight: 500;
}
.vazio b { color: var(--texto-2); }

/* ---------------- barra de rolagem ----------------
   Fina, arredondada, no degradê da marca e sem trilho: some quando não
   está sendo usada e não briga com o layout. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  border-radius: 999px; border: 3px solid transparent; background-clip: padding-box;
  background-image: linear-gradient(180deg, #6F8FA6, #1F6480);
}
::-webkit-scrollbar-thumb:hover { border-width: 2px; background-image: linear-gradient(180deg, #3F7189, #0A3441); }
::-webkit-scrollbar-corner { background: transparent; }
@supports (-moz-appearance: none) {
  html, * { scrollbar-width: thin; scrollbar-color: #3F7189 transparent; }
}
/* no celular não tem barra nenhuma: o dedo rola, a barra só ocuparia espaço */
@media (max-width: 760px) {
  html, * { scrollbar-width: none; }
  ::-webkit-scrollbar { display: none; width: 0; height: 0; }
}
