@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,600;0,700;0,800;0,900&family=Manrope:wght@400;500;600;700;800&display=swap");

:root { --ink:#080808; --panel:#121213; --panel-soft:#1b1b1d; --line:rgba(255,255,255,.13); --text:#fffdf9; --muted:#aaa7a2; --orange:#ff671b; --orange-soft:rgba(255,103,27,.12); --max:1280px; }
* { box-sizing:border-box; }
body { min-height:100vh; margin:0; background:radial-gradient(circle at 78% 8%,rgba(255,103,27,.2),transparent 27rem),var(--ink); color:var(--text); font-family:Manrope,Arial,sans-serif; }
a { color:inherit; text-decoration:none; }
button,input { font:inherit; }
.account-header { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:16px clamp(20px,5vw,72px); border-bottom:1px solid var(--line); background:rgba(8,8,8,.86); backdrop-filter:blur(16px); }
.account-logo { display:block; width:clamp(250px,22vw,360px); height:92px; object-fit:contain; object-position:left center; }
.back-link { color:var(--muted); font-size:.75rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.back-link:hover { color:var(--orange); }
.account-shell { width:min(1120px,calc(100% - 40px)); min-height:calc(100vh - 111px); margin:0 auto; padding:clamp(56px,9vw,128px) 0; }
.account-grid { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(340px,.8fr); gap:clamp(36px,8vw,120px); align-items:center; }
.eyebrow { margin:0 0 14px; color:var(--orange); font-size:.71rem; font-weight:900; letter-spacing:.16em; text-transform:uppercase; }
h1,h2,h3 { margin:0; font-family:"Barlow Condensed",Impact,sans-serif; text-transform:uppercase; }
.account-title { max-width:620px; font-size:clamp(4rem,8vw,7.2rem); line-height:.78; letter-spacing:.008em; }
.account-title em { color:var(--orange); font-style:normal; }
.account-lead { max-width:530px; margin:26px 0 0; color:var(--muted); font-size:1rem; line-height:1.75; }
.account-points { display:grid; gap:14px; margin:36px 0 0; }
.account-point { display:flex; gap:13px; align-items:flex-start; color:#ddd9d2; font-size:.88rem; line-height:1.55; }
.account-point::before { content:"/"; color:var(--orange); font:900 1.4rem/1 "Barlow Condensed",sans-serif; }
.account-card { padding:clamp(24px,4vw,42px); border:1px solid var(--line); background:linear-gradient(145deg,rgba(31,31,33,.94),rgba(13,13,14,.96)); box-shadow:0 24px 80px rgba(0,0,0,.28); }
.card-overline { margin:0 0 10px; color:var(--muted); font-size:.66rem; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
.account-card h2 { font-size:2.6rem; line-height:.9; letter-spacing:.01em; }
.account-card > p { margin:14px 0 28px; color:var(--muted); font-size:.86rem; line-height:1.6; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.field { display:grid; gap:7px; }
.field.full { grid-column:1/-1; }
.field label { color:#d9d5cf; font-size:.68rem; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.field input { width:100%; min-height:48px; padding:0 13px; border:1px solid var(--line); outline:0; background:#0c0c0d; color:var(--text); transition:border-color .18s ease,box-shadow .18s ease; }
.field input::placeholder { color:#686662; }
.field input:focus { border-color:var(--orange); box-shadow:0 0 0 3px rgba(255,103,27,.12); }
.form-note { margin:15px 0 0; color:var(--muted); font-size:.72rem; line-height:1.55; }
.form-note a { color:#f7b38b; text-decoration:underline; text-underline-offset:3px; }
.form-action { display:inline-flex; width:100%; min-height:52px; align-items:center; justify-content:center; margin-top:24px; border:0; background:var(--orange); color:#251006; cursor:pointer; font-size:.77rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.form-action:hover { background:#ff7b38; }
.form-action:focus-visible,.admin-action:focus-visible,.icon-button:focus-visible { outline:2px solid #fff; outline-offset:3px; }
.form-switch { margin:20px 0 0; color:var(--muted); font-size:.8rem; text-align:center; }
.form-switch a { color:var(--text); font-weight:800; }
.form-message { display:none; margin-top:14px; padding:12px 13px; border:1px solid rgba(255,103,27,.35); background:var(--orange-soft); color:#ffd8c5; font-size:.76rem; line-height:1.5; }
.form-message.is-visible { display:block; }
.registration-shell { width:min(960px,calc(100% - 40px)); margin:0 auto; padding:clamp(54px,8vw,96px) 0 100px; }
.registration-head { display:flex; justify-content:space-between; gap:28px; align-items:end; margin-bottom:38px; }
.registration-head h1 { max-width:650px; font-size:clamp(3.8rem,7vw,6.6rem); line-height:.78; letter-spacing:.008em; }
.registration-head p { max-width:320px; margin:0; color:var(--muted); font-size:.84rem; line-height:1.6; }
.registration-card { padding:clamp(24px,4vw,44px); border:1px solid var(--line); background:#111112; }
.form-section { margin-top:35px; padding-top:27px; border-top:1px solid var(--line); }
.form-section:first-child { margin-top:0; padding-top:0; border-top:0; }
.form-section h2 { font-size:2rem; line-height:.9; }
.form-section > p { margin:9px 0 21px; color:var(--muted); font-size:.8rem; }
.dashboard { width:min(var(--max),calc(100% - 40px)); margin:0 auto; padding:34px 0 90px; }
.dashboard-top { display:flex; align-items:end; justify-content:space-between; gap:24px; margin:24px 0 34px; }
.dashboard-top h1 { font-size:clamp(3.2rem,6vw,5.4rem); line-height:.8; letter-spacing:.008em; }
.dashboard-top p { max-width:380px; margin:0; color:var(--muted); font-size:.82rem; line-height:1.6; }
.dashboard-nav { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px; }
.dashboard-nav a { padding:10px 12px; border:1px solid var(--line); color:var(--muted); font-size:.68rem; font-weight:900; letter-spacing:.09em; text-transform:uppercase; }
.dashboard-nav a.is-active,.dashboard-nav a:hover { border-color:var(--orange); background:var(--orange-soft); color:var(--text); }
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.metric { padding:20px; border:1px solid var(--line); background:#151516; }
.metric span { display:block; color:var(--muted); font-size:.65rem; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.metric strong { display:block; margin-top:8px; font:800 2.5rem/.8 "Barlow Condensed",sans-serif; letter-spacing:.006em; }
.metric strong.orange { color:var(--orange); }
.admin-panel { margin-top:18px; border:1px solid var(--line); background:#101011; }
.admin-panel-head { display:flex; justify-content:space-between; gap:20px; align-items:center; padding:21px; border-bottom:1px solid var(--line); }
.admin-panel-head h2 { font-size:2rem; line-height:.9; }
.admin-panel-head p { margin:6px 0 0; color:var(--muted); font-size:.76rem; }
.admin-panel-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; }
.admin-action { display:inline-flex; align-items:center; min-height:40px; padding:0 14px; border:1px solid var(--orange); background:var(--orange); color:#281104; cursor:pointer; font-size:.68rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.product-admin-list { display:grid; }
.admin-product { display:grid; grid-template-columns:68px minmax(160px,1.1fr) minmax(140px,.8fr) 90px 94px 40px; gap:16px; align-items:center; padding:14px 20px; border-bottom:1px solid var(--line); }
.admin-product:last-child { border-bottom:0; }
.admin-thumb { width:68px; height:58px; object-fit:contain; background:#080808; }
.admin-product h3 { font-size:1.4rem; line-height:.9; }
.admin-product p { margin:4px 0 0; color:var(--muted); font-size:.68rem; }
.admin-product input { width:100%; padding:10px; border:1px solid var(--line); background:#090909; color:var(--text); font-size:.77rem; }
.stock-pill { justify-self:start; padding:7px 9px; background:rgba(111,209,128,.12); color:#91e19e; font-size:.63rem; font-weight:900; letter-spacing:.06em; text-transform:uppercase; }
.stock-pill.low { background:rgba(255,103,27,.12); color:#ffac7f; }
.icon-button { width:36px; height:36px; border:1px solid var(--line); background:#19191a; color:var(--text); cursor:pointer; font-weight:900; }
.admin-empty { padding:28px 20px; border-top:1px solid var(--line); color:var(--muted); font-size:.78rem; line-height:1.6; }
.toast { position:fixed; z-index:20; right:20px; bottom:20px; max-width:330px; padding:14px 16px; border:1px solid rgba(255,103,27,.5); background:#19100c; color:#ffe5d6; box-shadow:0 16px 40px rgba(0,0,0,.38); font-size:.77rem; line-height:1.5; opacity:0; pointer-events:none; transform:translateY(10px); transition:.2s ease; }
.toast.is-visible { opacity:1; transform:translateY(0); }
@media(max-width:850px){.account-grid{grid-template-columns:1fr}.account-grid > :first-child{max-width:620px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-product{grid-template-columns:58px 1fr 90px 36px}.admin-product > :nth-child(3),.admin-product > :nth-child(5){display:none}.admin-thumb{width:58px;height:52px}.registration-head{display:block}.registration-head p{margin-top:22px}}
@media(max-width:560px){.account-header{padding:12px 16px}.account-logo{width:210px;height:68px}.account-shell,.registration-shell,.dashboard{width:min(100% - 28px,1280px)}.account-title{font-size:3.8rem}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.metrics{grid-template-columns:1fr 1fr}.dashboard-top{display:block}.dashboard-top p{margin-top:17px}.admin-panel-head{align-items:flex-start;flex-direction:column}.admin-product{grid-template-columns:52px 1fr 34px;gap:10px;padding:12px}.admin-product input{display:none}.admin-thumb{width:52px;height:46px}.admin-product h3{font-size:1.2rem}.account-card{padding:24px}.registration-card{padding:24px}}

/* Painel administrativo conectado ao Supabase */
.account-logo {
  width: clamp(270px, 24vw, 410px) !important;
  height: 108px !important;
  object-fit: contain !important;
  object-position: left center !important;
}
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 13px;
  border: 1px solid var(--line);
  outline: 0;
  background: #0c0c0d;
  color: var(--text);
  resize: vertical;
}
.field textarea:focus,
.field select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,103,27,.12);
}
.admin-editor {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 21px;
  border-bottom: 1px solid var(--line);
}
.admin-editor .field:nth-child(1),
.admin-editor .field:nth-child(2),
.admin-editor .field:nth-child(9),
.admin-editor .field:nth-child(10),
.admin-editor .field:nth-child(11) {
  grid-column: span 2;
}
.admin-empty {
  padding: 18px 21px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.table-wrap {
  overflow-x: auto;
}
.admin-panel table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.admin-panel th,
.admin-panel td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--muted);
  font-size: .82rem;
}
.admin-panel th {
  color: var(--text);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.admin-product {
  display: grid;
  grid-template-columns: 82px 1fr 120px 94px auto;
  align-items: center;
  gap: 14px;
  padding: 14px 21px;
  border-bottom: 1px solid var(--line);
}
.admin-thumb {
  width: 82px;
  height: 64px;
  object-fit: contain;
  background: #090909;
  border: 1px solid var(--line);
}
.admin-product h3 { margin: 0; font-size: 1.2rem; line-height: 1; }
.admin-product p { margin: 5px 0 0; color: var(--muted); font-size: .76rem; }
.admin-product input {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #0c0c0d;
  color: var(--text);
}
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 21px; }
.admin-actions .btn { min-height: 46px; }
@media(max-width:760px){
  .admin-editor { grid-template-columns: 1fr; }
  .admin-editor .field { grid-column: auto !important; }
  .admin-product { grid-template-columns: 66px 1fr; }
  .admin-product input,
  .admin-product .btn { grid-column: 1 / -1; }
  .account-logo { width: 240px !important; height: 82px !important; }
}

/* Correção final 20260722: logo maior sem inflar cabeçalho nas áreas de conta/admin */
.account-header {
  min-height: 92px !important;
  height: 92px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  align-items: center !important;
}

.account-logo {
  width: clamp(240px, 20vw, 330px) !important;
  height: 68px !important;
  object-fit: contain !important;
  object-position: left center !important;
}

.account-shell {
  min-height: calc(100vh - 92px) !important;
}

@media (max-width: 560px) {
  .account-header {
    min-height: 76px !important;
    height: auto !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .account-logo {
    width: 220px !important;
    height: 56px !important;
  }
}

[hidden] { display:none !important; }
.auth-helper { margin-top:10px; text-align:right; }
.form-link-button { padding:0; border:0; background:transparent; color:#f7b38b; cursor:pointer; font:inherit; font-weight:800; text-decoration:underline; text-underline-offset:3px; }
.form-link-button:hover { color:#fff; }
.form-link-button:focus-visible { outline:2px solid var(--orange); outline-offset:4px; }
.form-action:disabled { cursor:wait; opacity:.68; }
.form-message.is-error { border-color:rgba(255,94,94,.5); background:rgba(255,64,64,.1); color:#ffd0d0; }
/* Editor de produtos */
body.has-product-editor { overflow:hidden; }
.admin-product { grid-template-columns:82px minmax(180px,1fr) 130px 92px auto auto; }
.admin-product-copy { min-width:0; }
.admin-product-copy h3 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-quick-field { display:grid; gap:5px; }
.admin-quick-field span { color:var(--muted); font-size:.58rem; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.admin-product-buttons { display:flex; gap:8px; align-items:center; }
.admin-secondary-action { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:0 13px; border:1px solid rgba(255,103,27,.5); background:#16110f; color:#ffd7c1; cursor:pointer; font-size:.65rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.admin-secondary-action:hover { border-color:var(--orange); background:var(--orange-soft); color:#fff; }
.product-editor-overlay { position:fixed; z-index:100; inset:0; display:grid; place-items:center; padding:24px; background:rgba(0,0,0,.82); backdrop-filter:blur(8px); }
.product-editor-overlay[hidden] { display:none; }
.product-editor-dialog { width:min(1180px,100%); max-height:calc(100vh - 48px); overflow:auto; border:1px solid #3b302b; background:#0d0d0e; box-shadow:0 30px 90px rgba(0,0,0,.72); }
.product-editor-head { position:sticky; z-index:3; top:0; display:flex; justify-content:space-between; align-items:center; gap:20px; padding:22px 24px; border-bottom:1px solid var(--line); background:rgba(13,13,14,.97); }
.product-editor-head h2 { margin:3px 0 0; font-size:2.4rem; line-height:.9; }
.product-editor-close { width:42px; height:42px; border:1px solid var(--line); background:#171718; color:#fff; cursor:pointer; font-size:1.8rem; line-height:1; }
.product-editor-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr); }
.product-editor-fields { padding:24px; border-right:1px solid var(--line); }
.product-editor-fields .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.product-editor-media { padding:24px; background:#0a0a0b; }
.editor-media-head { display:flex; justify-content:space-between; align-items:start; gap:14px; margin-bottom:16px; }
.editor-media-head strong { display:block; font-size:.84rem; text-transform:uppercase; letter-spacing:.08em; }
.editor-media-head span,.editor-upload-field span { display:block; margin-top:5px; color:var(--muted); font-size:.68rem; line-height:1.45; }
.media-add-button { position:relative; flex:none; overflow:hidden; }
.media-add-button input { position:absolute; inset:0; opacity:0; cursor:pointer; }
.editor-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.editor-gallery-empty { grid-column:1/-1; display:grid; place-items:center; min-height:230px; padding:30px; border:1px dashed #42332b; color:var(--muted); text-align:center; }
.editor-gallery-empty strong { color:#fff; text-transform:uppercase; }
.editor-gallery-empty span { margin-top:5px; font-size:.72rem; }
.editor-image-card { min-width:0; border:1px solid var(--line); background:#121213; }
.editor-image-preview { position:relative; aspect-ratio:4/3; background:#050505; }
.editor-image-preview img { width:100%; height:100%; object-fit:contain; }
.editor-image-preview span { position:absolute; top:8px; left:8px; padding:5px 7px; background:var(--orange); color:#210d03; font-size:.56rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.editor-image-controls { display:grid; grid-template-columns:38px 38px 1fr; gap:5px; padding:7px; }
.editor-image-controls button { min-height:34px; border:1px solid var(--line); background:#1a1a1b; color:#fff; cursor:pointer; font-size:.62rem; font-weight:800; text-transform:uppercase; }
.editor-image-controls button:last-child { color:#ffb08a; }
.editor-image-controls button:disabled { opacity:.3; cursor:not-allowed; }
.editor-upload-field { display:grid; gap:8px; margin-top:18px; padding-top:18px; border-top:1px solid var(--line); }
.editor-upload-field label { font-size:.68rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.editor-upload-field input { width:100%; padding:10px; border:1px solid var(--line); background:#111; color:#ddd; }
.editor-check { display:flex; gap:9px; align-items:center; color:#ddd; font-size:.76rem; }
.editor-check input { accent-color:var(--orange); }
.product-editor-actions { position:sticky; z-index:3; bottom:0; display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:16px 24px; border-top:1px solid var(--line); background:rgba(13,13,14,.97); }
.product-editor-actions p { margin:0 auto 0 0; color:var(--muted); font-size:.72rem; }
.product-editor-actions button:disabled { opacity:.55; cursor:wait; }
@media(max-width:980px){.admin-product{grid-template-columns:70px 1fr 110px auto}.admin-product .stock-pill,.admin-product .admin-quick-field:nth-of-type(2){display:none}.product-editor-grid{grid-template-columns:1fr}.product-editor-fields{border-right:0;border-bottom:1px solid var(--line)}}
@media(max-width:650px){.product-editor-overlay{padding:0}.product-editor-dialog{max-height:100vh;height:100vh;border:0}.product-editor-head{padding:16px}.product-editor-head h2{font-size:1.8rem}.product-editor-fields,.product-editor-media{padding:16px}.product-editor-fields .form-grid{grid-template-columns:1fr}.product-editor-fields .field.full{grid-column:auto}.editor-gallery{grid-template-columns:1fr 1fr}.product-editor-actions{padding:12px 16px;flex-wrap:wrap}.product-editor-actions p{width:100%}.admin-product{grid-template-columns:58px 1fr auto;padding:12px}.admin-product .admin-quick-field{display:none}.admin-product-buttons .icon-button{display:none}.admin-thumb{width:58px;height:52px}}
/* Autenticação administrativa em duas etapas */
.mfa-box { display:grid; gap:16px; }
.mfa-box h3 { margin:0; color:#fff; font-size:1.35rem; }
.mfa-box p { margin:0; }
.mfa-label,.mfa-secret-label { color:#ff9a63 !important; font-size:.7rem; font-weight:900; letter-spacing:.09em; text-transform:uppercase; }
.mfa-qr { width:min(220px,100%); aspect-ratio:1; padding:10px; border:1px solid var(--orange); background:#fff; object-fit:contain; }
.mfa-secret { display:block; overflow-wrap:anywhere; padding:12px; border:1px solid var(--line); background:#080808; color:#fff; font-size:.8rem; line-height:1.5; user-select:all; }
