/* Loja Andrews Academy — tema claro. Marca: #b478ff / #50c8ff (gradiente), tinta #17102e.
   Tema escuro anterior guardado em /root/stlshop-backups/shop.dark.css */
:root {
  color-scheme: light;
  --bg: #faf8ff; --bg-soft: #f1ecfb; --card: #fff; --border: #e4def3;
  --border-strong: #c9bfe6; --field: #8a7cb8; --text: #17102e; --text-2: #3a3157; --muted: #574d7a; --dim: #6a6189;
  --purple: #7038d6; --cyan: #0a6fa3; --ok: #136c34; --warn: #a44a06; --err: #b91c1c;
  --grad: linear-gradient(135deg, #b478ff 0%, #50c8ff 100%);
  --grad-ink: linear-gradient(135deg, #7038d6 0%, #0a6fa3 100%);
  --shadow: 0 1px 2px rgba(23,16,46,.05), 0 10px 28px -14px rgba(23,16,46,.18);
}
::selection { background: rgba(180,120,255,.32); color: var(--text); }
input[type=checkbox], input[type=radio] { accent-color: var(--purple); }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 Inter, system-ui, -apple-system, sans-serif; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--cyan); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; letter-spacing: -.02em; margin: 0 0 12px; line-height: 1.1; }
h1 { font-size: clamp(26px, 4vw, 38px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(900px 500px at 85% -10%, rgba(180,120,255,.18), transparent 60%),
              radial-gradient(800px 500px at -5% 70%, rgba(80,200,255,.10), transparent 60%); }
header, main, footer { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 28px; padding-bottom: 56px; }

/* header */
.top { border-bottom: 1px solid var(--border); background: rgba(250,248,255,.86); backdrop-filter: blur(12px); position: sticky; top: 0; }
.top-in { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.brand img { width: 34px; height: 34px; object-fit: contain; background: #0a0717; border-radius: 9px; padding: 4px; }
.brand em { font-style: normal; background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.top nav a:hover { color: var(--text); }
.cart-link b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--grad); color: #0a0717; font-size: 12px; }
.switch { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; color: var(--dim); }
.switch a { padding: 4px 9px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.switch a.on { border-color: var(--purple); color: var(--purple); background: rgba(112,56,214,.10); }

/* hero */
.hero { text-align: center; max-width: 720px; margin: 28px auto 44px; }
.hero h1 { font-size: clamp(32px, 5.5vw, 52px); margin: 16px 0 14px; }
.hero p { color: var(--muted); font-size: 17px; margin: 0; }
.eyebrow { display: inline-block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border-strong); padding: 6px 14px; border-radius: 99px; }
.grad { background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* grid de produtos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); border-color: rgba(112,56,214,.45); box-shadow: 0 2px 4px rgba(23,16,46,.06), 0 18px 36px -16px rgba(112,56,214,.35); }
.thumb { aspect-ratio: 4/3; background: var(--bg-soft); display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.ph { font-family: Fraunces, serif; font-size: 28px; color: var(--dim); letter-spacing: .1em; }
.ph.big { font-size: 56px; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--muted); font-size: 14px; margin: 0 0 12px; flex: 1; }
.meta { font-size: 12.5px; color: var(--dim); margin-bottom: 14px; }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.price { font-weight: 700; font-size: 18px; white-space: nowrap; }
.price.big { font-size: 26px; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: 600 14.5px Inter, sans-serif; color: #0a0717; background: var(--grad); padding: 12px 22px; border-radius: 99px; transition: transform .15s, box-shadow .15s; }
.btn:hover { color: #0a0717; transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgba(180,120,255,.7); }
.btn.sm { padding: 8px 16px; font-size: 13.5px; }
.btn.wide { width: 100%; padding: 15px; font-size: 16px; }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--border-strong); }
.btn.ghost:hover { color: var(--text); box-shadow: none; background: var(--bg-soft); }
.btn.danger, .linkbtn.danger { background: transparent; color: var(--err); border: 1px solid rgba(185,28,28,.4); }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; padding: 0; }
.linkbtn.danger { border: 0; }
form.inline { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }

/* produto */
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.product-media { border-radius: 20px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-soft); aspect-ratio: 4/3; display: grid; place-items: center; position: sticky; top: 90px; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.back { display: inline-block; color: var(--dim); font-size: 14px; margin-bottom: 14px; }
.lead { color: var(--muted); font-size: 17px; }
.price-row { margin: 18px 0; }
.desc { color: var(--text-2); margin: 26px 0; }
.desc p { margin: 0 0 12px; }
.files-h { font-family: Inter, sans-serif; font-size: 15px; margin-top: 24px; }
.files { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--border); border-radius: 12px; }
.files li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 14px; flex-wrap: wrap; }
.files li:first-child { border-top: 0; }
.files li > span:first-child { word-break: break-all; }

/* painéis */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 28px; margin-bottom: 22px; box-shadow: var(--shadow); }
.panel.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }
.notice, .alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; }
.notice { background: rgba(22,163,74,.10); border: 1px solid rgba(22,163,74,.35); color: #14532d; }
.alert { background: rgba(217,119,6,.12); border: 1px solid rgba(217,119,6,.4); color: #78350f; }
.alert-text { color: var(--warn); }
.badge { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; margin: 8px auto 18px; }
.badge.ok { background: rgba(22,163,74,.14); color: var(--ok); }
.badge.wait { background: rgba(14,165,233,.14); color: var(--cyan); }
.badge.err { background: rgba(220,38,38,.12); color: var(--err); }
.prose p { color: var(--text-2); }

/* carrinho */
.lines { list-style: none; padding: 0; margin: 18px 0; }
.lines li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.mini { width: 64px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--bg-soft); display: grid; place-items: center; flex: none; }
.mini img { width: 100%; height: 100%; object-fit: cover; }
.mini .ph { font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.total-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 22px; }
.pay { margin-bottom: 14px; }

/* formulários */
.stack { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.stack .btn { align-self: flex-start; }
.stack .btn.wide { align-self: stretch; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--muted); }
input[type=email], input[type=password], input[type=text], input[type=search], input[type=number], input:not([type]), select, textarea {
  font: 15px Inter, sans-serif; color: var(--text); background: #fff; border: 1px solid var(--field); border-radius: 10px; padding: 11px 13px; width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(112,56,214,.55); outline-offset: 1px; }
input.invalid { border-color: var(--err); }
input[type=file] { color: var(--muted); font-size: 14px; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.checks { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.checks legend { color: var(--muted); font-size: 13.5px; padding: 0 6px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cols.three { grid-template-columns: repeat(3, 1fr); }
select option { background: var(--bg-soft); }

/* biblioteca */
.order { border: 1px solid var(--border); border-radius: 14px; margin: 18px 0; overflow: hidden; }
.order-h { display: flex; justify-content: space-between; padding: 12px 18px; background: var(--bg-soft); font-size: 14px; font-weight: 600; }
.lib-item { display: flex; gap: 16px; padding: 18px; border-top: 1px solid var(--border); }
.lib-item h3 { font-size: 17px; }

/* admin */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input { width: 240px; }
.filters select { width: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat b { font-size: 24px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; padding: 10px; border-bottom: 1px solid var(--border-strong); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table td a { color: var(--cyan); }
.mini-cell img { width: 52px; height: 39px; object-fit: cover; border-radius: 6px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: rgba(23,16,46,.06); color: var(--muted); white-space: nowrap; }
.pill.paid, .pill.manual { background: rgba(22,163,74,.14); color: var(--ok); }
.pill.awaiting_payment, .pill.pending { background: rgba(14,165,233,.14); color: var(--cyan); }
.pill.refunded, .pill.disputed, .pill.failed { background: rgba(220,38,38,.12); color: var(--err); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 14px; margin: 0 0 20px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; word-break: break-all; }
.kv a { color: var(--cyan); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cover-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.cover-prev { width: 220px; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }

/* rodapé */
.foot { border-top: 1px solid var(--border); padding: 22px 0; font-size: 13px; color: var(--dim); }
.foot-in { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.foot a:hover { color: var(--text); }

@media (max-width: 820px) {
  .product { grid-template-columns: 1fr; gap: 24px; }
  .product-media { position: static; }
  .cols, .cols.three { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .top nav { margin-left: 0; gap: 12px; }
  .filters input { width: 100%; }
}
.check.consent { align-items: flex-start; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.check.consent input { margin-top: 3px; flex: none; }
.check.consent a { color: var(--cyan); text-decoration: underline; }
