:root {
  --bg: #050705;
  --bg-2: #0b120c;
  --panel: #0f1711;
  --line: rgba(61, 220, 132, 0.18);
  --text: #e8f5ec;
  --muted: #8fa896;
  --green: #3ddc84;
  --green-2: #a4c639;
  --green-dark: #1f8f52;
  --danger: #ff5c6c;
  --ok: #3ddc84;
  --warn: #f0c14b;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Orbitron", sans-serif;
  --font-body: "Manrope", sans-serif;
  --header-h: 78px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(61, 220, 132, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(164, 198, 57, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  line-height: 1.55;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(61, 220, 132, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 220, 132, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  opacity: 0.45;
}

.site-header,
.site-main,
.site-footer,
.flash-wrap {
  position: relative;
  z-index: 1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 3rem);
  backdrop-filter: blur(16px);
  background: rgba(5, 7, 5, 0.78);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background:
    linear-gradient(145deg, var(--green), var(--green-2));
  box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.12), 0 10px 30px rgba(61, 220, 132, 0.25);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px 10px 10px;
  border: 2px solid #041007;
  border-radius: 4px 4px 8px 8px;
  border-top: 0;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  color: var(--green);
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.site-nav a:hover { color: var(--green); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--green);
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #041007;
  box-shadow: 0 12px 30px rgba(61, 220, 132, 0.28);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(61, 220, 132, 0.06);
  color: var(--green);
}

.btn-danger {
  background: rgba(255, 92, 108, 0.15);
  border-color: rgba(255, 92, 108, 0.35);
  color: #ffb3bb;
}

.btn-block { width: 100%; }

.flash-wrap {
  padding: 1rem clamp(1rem, 4vw, 3rem) 0;
  display: grid;
  gap: 0.6rem;
}

.flash {
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 17, 0.9);
  font-weight: 600;
}

.flash-error { border-color: rgba(255, 92, 108, 0.4); color: #ffb3bb; }
.flash-success { border-color: rgba(61, 220, 132, 0.45); color: var(--green); }
.flash-info { border-color: rgba(164, 198, 57, 0.4); color: var(--green-2); }

.site-main { min-height: calc(100vh - var(--header-h) - 120px); }

/* HERO FULL VIEWPORT */
.hero-fullscreen {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 5rem);
}

.hero-fullscreen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(5, 7, 5, 0.92) 18%, rgba(5, 7, 5, 0.55) 55%, rgba(5, 7, 5, 0.35)),
    url("../img/hero-android.svg") center/cover no-repeat;
  z-index: 0;
  animation: heroPulse 10s ease-in-out infinite alternate;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  animation: riseIn 0.9s ease both;
}

.hero-content .brand-text {
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 1.05;
  display: block;
  margin-bottom: 1rem;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  color: #f4fff8;
}

.hero-content p {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 42ch;
  margin-bottom: 1.75rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

@keyframes heroPulse {
  from { transform: scale(1); filter: saturate(1); }
  to { transform: scale(1.04); filter: saturate(1.15); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.section {
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--green);
  letter-spacing: 0.03em;
}

.section-head p { color: var(--muted); max-width: 42ch; }

/* VITRINE */
.showcase {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.showcase-item {
  grid-column: span 4;
  position: relative;
  min-height: 420px;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #080c09;
  isolation: isolate;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  animation: riseIn 0.8s ease both;
}

.showcase-item:nth-child(2) { animation-delay: 0.08s; }
.showcase-item:nth-child(3) { animation-delay: 0.16s; }

.showcase-item:hover {
  transform: translateY(-8px);
  border-color: rgba(61, 220, 132, 0.55);
  box-shadow: 0 24px 50px rgba(61, 220, 132, 0.12);
}

.showcase-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform 0.6s ease;
}

.showcase-item:hover img { transform: scale(1.06); }

.showcase-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 25%, rgba(4, 8, 5, 0.92) 78%);
}

.showcase-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1.4rem;
  display: grid;
  gap: 0.55rem;
}

.showcase-body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.showcase-body p {
  color: var(--muted);
  font-size: 0.92rem;
}

.price {
  font-family: var(--font-display);
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 700;
}

.meta-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--green-2);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* AUTH / FORMS */
.auth-shell,
.panel-shell {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-card,
.panel-card {
  width: min(480px, 100%);
  background: rgba(15, 23, 17, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.panel-card.wide { width: min(1100px, 100%); }

.auth-card h1,
.panel-card h1 {
  font-family: var(--font-display);
  color: var(--green);
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.auth-card .lead,
.panel-card .lead {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.form-grid { display: grid; gap: 1rem; }

.form-grid.two {
  grid-template-columns: 1fr 1fr;
}

label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
}

input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #08100a;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea { min-height: 120px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.15);
}

.help { color: var(--muted); font-size: 0.85rem; font-weight: 500; }

/* DASHBOARD */
.dash {
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 3rem) 3rem;
}

.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.dash-top h1 {
  font-family: var(--font-display);
  color: var(--green);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.dash-top p { color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat {
  background: rgba(15, 23, 17, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  color: var(--green);
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}

.stat span { color: var(--muted); font-size: 0.9rem; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 17, 0.85);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th, td {
  text-align: left;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(61, 220, 132, 0.08);
  vertical-align: middle;
}

th {
  color: var(--green-2);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-paid { background: rgba(61, 220, 132, 0.15); color: var(--green); }
.badge-pending { background: rgba(240, 193, 75, 0.15); color: var(--warn); }
.badge-failed, .badge-cancelled, .badge-refunded {
  background: rgba(255, 92, 108, 0.15); color: #ffb3bb;
}

.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  min-height: calc(100vh - var(--header-h));
  align-items: stretch;
}

.product-media {
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 480px;
  position: relative;
  background: #080c09;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.product-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 0.5rem 0;
}

.product-info h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  color: var(--green);
}

.product-info .desc {
  color: var(--muted);
  white-space: pre-wrap;
}

.checkout-box {
  margin-top: 0.5rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(15, 23, 17, 0.9);
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--header-h));
}

.admin-side {
  border-right: 1px solid var(--line);
  background: rgba(8, 12, 9, 0.9);
  padding: 1.5rem 1rem;
  display: grid;
  align-content: start;
  gap: 0.4rem;
}

.admin-side a {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
}

.admin-side a:hover,
.admin-side a.active {
  background: rgba(61, 220, 132, 0.1);
  color: var(--green);
}

.admin-content { padding: 1.5rem clamp(1rem, 3vw, 2rem); }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
}

.pix-box {
  margin-top: 1.25rem;
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}

.pix-qr {
  width: min(260px, 100%);
  aspect-ratio: 1;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.pix-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pix-panel textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  text-align: left;
}

.gateway-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.2rem;
  background: rgba(8, 16, 10, 0.55);
  display: grid;
  gap: 0.85rem;
}

.delivery-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.15rem;
  background: rgba(8, 16, 10, 0.65);
}

.delivery-box legend {
  padding: 0 0.4rem;
  color: var(--green);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem clamp(1rem, 4vw, 3rem);
  background: rgba(5, 7, 5, 0.85);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-inner p { color: var(--muted); margin-top: 0.4rem; max-width: 40ch; }

.footer-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  align-items: center;
}

.footer-meta a:hover { color: var(--green); }

@media (max-width: 1100px) {
  .showcase-item { grid-column: span 6; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; }
  .product-media { min-height: 320px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(5, 7, 5, 0.96);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 0.9rem 1rem;
    border-radius: 10px;
  }
  .showcase-item { grid-column: span 12; min-height: 360px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
  }
  .form-grid.two { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
