/* ==========================================================
   BAIXADA INFINITY
   Escuro, limpo e direto. Azul #0f96ff só em pontos de clique.
   Movimento com "spring": aceleração e desaceleração naturais.
   ========================================================== */
:root {
    --primary-color: #0f96ff;
    --bg: #050505;
    --panel: #111116;
    --line: rgba(255, 255, 255, 0.11);
    --line-strong: rgba(255, 255, 255, 0.2);
    --font-display: 'Anton', 'Oswald', Impact, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* fallback para navegadores sem linear() */
    --spring: cubic-bezier(0.22, 1.15, 0.36, 1);
    --spring-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Molas reais (linear()): leve overshoot e assentamento suave */
@supports (transition-timing-function: linear(0, 1)) {
    :root {
        --spring: linear(0, 0.351, 0.629, 0.825, 0.948, 1.015, 1.044, 1.05, 1.044, 1.034, 1.023, 1.014, 1.007, 1.003, 1, 0.999, 0.999, 1);
        --spring-soft: linear(0, 0.055, 0.173, 0.31, 0.442, 0.559, 0.657, 0.737, 0.801, 0.85, 0.888, 0.917, 0.939, 0.955, 0.967, 0.976, 0.983, 0.991, 0.995, 0.998, 1);
    }
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body { background-color: var(--bg); }

.font-display {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.01em;
    font-weight: 400;
}

::selection { background: var(--primary-color); color: #000; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #27272a; }
::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

/* ==========================================================
   BOTÕES
   Preenchimento branco que "corre" da esquerda no hover,
   scale sutil e resposta ao clique.
   ========================================================== */
.btn-primary {
    background-color: var(--primary-color);
    background-image: linear-gradient(#fff, #fff);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
    color: #000;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: background-size 0.55s var(--spring-soft), transform 0.35s var(--spring);
}

.btn-primary:hover:not(:disabled) { background-size: 100% 100%; transform: scale(1.025); }
.btn-primary:active:not(:disabled) { transform: scale(0.97); transition-duration: 0.12s; }
.btn-primary:disabled { cursor: not-allowed; }

.btn-secondary {
    background-color: transparent;
    background-image: linear-gradient(#fff, #fff);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
    color: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background-size 0.55s var(--spring-soft), color 0.3s ease, transform 0.35s var(--spring);
}

.btn-secondary:hover { background-size: 100% 100%; color: #000; }
.btn-secondary:active { transform: scale(0.97); }

.btn-light {
    background: #fff;
    color: #000;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: transform 0.35s var(--spring), background-color 0.2s ease;
}

.btn-light:hover { background: #e4e4e7; transform: scale(1.025); }
.btn-light:active { transform: scale(0.97); }

/* Abas de categoria */
#tabs-container button {
    border-radius: 2px;
    background-color: transparent;
    border: 1px solid var(--line);
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    font-size: 0.72rem;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.35s var(--spring);
}

#tabs-container button:hover { border-color: var(--line-strong); color: #fff; }
#tabs-container button:active { transform: scale(0.96); }

.tab-active {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}

/* ==========================================================
   HEADER: transparente sobre o banner, sólido ao rolar
   ========================================================== */
.site-header {
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color 0.35s ease, border-color 0.35s ease;
}

.site-header.is-scrolled {
    background: rgba(5, 5, 5, 0.96);
    border-bottom-color: var(--line);
}

.nav-link { position: relative; }
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 1px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--spring-soft);
}
.nav-link:hover::after { transform: scaleX(1); }

/* ==========================================================
   BANNER (topo imersivo)
   ========================================================== */
.banner-grid {
    background-color: transparent;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
}

.watermark {
    font-family: var(--font-display);
    text-transform: uppercase;
    line-height: 0.8;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.06);
    user-select: none;
    pointer-events: none;
}

/* Painéis e cards: sólidos, borda de baixa opacidade */
.bento, .panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 2px;
    transition: border-color 0.3s ease;
}

.bento:hover { border-color: var(--line-strong); }

/* Passos do launcher */
.step-dot {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    border: 1px solid var(--line-strong);
    color: #fff;
    border-radius: 2px;
}

/* ==========================================================
   CARDS DA VITRINE: cascata ao rolar
   ========================================================== */
.reveal-card {
    opacity: 0;
    transform: translateY(32px) scale(0.98);
    transition: opacity 0.5s ease, transform 0.9s var(--spring);
}

.reveal-card.in-view { opacity: 1; transform: none; }

.product-card { transition: border-color 0.3s ease, transform 0.5s var(--spring); }
.product-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.product-card .product-img { transition: transform 0.9s var(--spring-soft); }
.product-card:hover .product-img { transform: scale(1.06); }

/* ==========================================================
   ANIMAÇÕES
   ========================================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn {
    from { opacity: 0; transform: translateY(18px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-fade-in { animation: fadeIn 0.8s ease-out forwards; }
.animate-slide-down { animation: slideDown 0.6s var(--spring) forwards; }
.animate-slide-up { animation: slideUp 0.9s var(--spring) forwards; }

/* Modais (checkout, PIX, detalhes, alertas): entram com mola */
.animate-fade-in-up { animation: popIn 0.65s var(--spring) both; }
.overlay-in { animation: fadeIn 0.35s ease-out both; }

/* Carrinho lateral */
.drawer-panel { transition: transform 0.7s var(--spring-soft); will-change: transform; }
.drawer-overlay { transition: opacity 0.45s ease; }

/* Scroll reveal genérico */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.9s var(--spring);
}

.reveal-on-scroll.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .reveal-on-scroll, .reveal-card { opacity: 1; transform: none; }
    html, body { scroll-behavior: auto; }
}

/* ==========================================================
   ATMOSFERA: ambient light + grain (muito sutis)
   Luz difusa em azul primário no topo e no fundo da página,
   mais uma textura de ruído leve por cima de tudo.
   ========================================================== */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 75% 42% at 50% -6%, rgba(15, 150, 255, 0.16), transparent 70%),
        radial-gradient(ellipse 65% 38% at 50% 106%, rgba(15, 150, 255, 0.11), transparent 70%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.045;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================
   PAINEL ADMIN
   Prioridade: legibilidade e densidade de dados.
   ========================================================== */
.admin-shell { background: transparent; }

.admin-sidebar {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 2px;
}

.nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #a1a1aa;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-btn:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }

.nav-btn.is-active { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-btn.is-active::before {
    content: "";
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 2px;
    background: var(--primary-color);
}

.nav-btn i { flex-shrink: 0; }

.kpi-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #71717a;
}

.kpi-value {
    font-family: var(--font-display);
    font-size: 2.1rem;
    line-height: 1;
    color: #fff;
    letter-spacing: 0.01em;
}

/* Campos de formulário */
.field {
    width: 100%;
    background: #000;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    color: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field::placeholder { color: #52525b; }
.field:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(15, 150, 255, 0.15); }

/* Tabelas: cabeçalho fixo, linhas densas, hover sutil */
.table-wrap {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 2px;
    max-height: calc(100vh - 300px);
    overflow: auto;
}

.data-table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; }

.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #0e0e11;
    padding: 0.75rem 1rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #71717a;
    border-bottom: 1px solid var(--line-strong);
    white-space: nowrap;
}

.data-table tbody td { border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.data-table tbody tr { transition: background-color 0.15s ease; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.data-table tbody tr:last-child td { border-bottom: 0; }

/* Badges de status */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.6rem;
    border-radius: 2px;
    border: 1px solid transparent;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge::before { content: ""; width: 6px; height: 6px; border-radius: 9999px; background: currentColor; }
.badge-approved { color: #4ade80; background: rgba(34, 197, 94, 0.14); border-color: rgba(74, 222, 128, 0.4); }
.badge-pending  { color: #fbbf24; background: rgba(245, 158, 11, 0.14); border-color: rgba(251, 191, 36, 0.4); }
.badge-pending::before { animation: pulseDot 1.6s ease-in-out infinite; }
.badge-delivered { color: #38bdf8; background: rgba(14, 165, 233, 0.14); border-color: rgba(56, 189, 248, 0.4); }
.badge-rejected { color: #f87171; background: rgba(239, 68, 68, 0.12); border-color: rgba(248, 113, 113, 0.35); }
.badge-neutral  { color: #a1a1aa; background: rgba(255, 255, 255, 0.05); border-color: var(--line-strong); }
.badge-neutral::before { display: none; }

@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.feed-item { animation: slideUp 0.5s var(--spring) both; }
