:root{
  --black:#090a0c;
  --ink:#151619;
  --paper:#f2f2ee;
  --surface:#fff;
  --muted:#6d6f73;
  --line:#deded8;
  --gold:#d7aa43;
  --gold-soft:#f5e8c5;
  --green:#17b866;
  --red:#bf3b31;
  --max:1240px;
  --shadow:0 24px 70px rgba(12,13,15,.10);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit}
button,a,input,select{transition:color .2s ease,background-color .2s ease,border-color .2s ease,transform .2s ease,box-shadow .2s ease}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid rgba(215,170,67,.5);outline-offset:3px}
[hidden]{display:none!important}

.topbar{background:var(--black);color:#fff;font-size:.78rem;letter-spacing:.04em}
.topbar-inner{display:flex;justify-content:space-between;gap:20px;max-width:var(--max);margin:auto;padding:9px 24px}
.topbar a:hover{color:#f2d58f}
.nav{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:13px max(24px,calc((100vw - var(--max))/2 + 24px));border-bottom:1px solid rgba(20,20,20,.08);background:rgba(255,255,255,.93);backdrop-filter:blur(18px)}
.brand{display:flex;align-items:center;gap:10px;font-size:1.24rem;font-weight:900;letter-spacing:.04em}
.brand img{width:46px;height:46px;border:1px solid rgba(0,0,0,.09);border-radius:50%;object-fit:cover;box-shadow:0 6px 20px rgba(0,0,0,.12)}
.nav-links{display:flex;gap:7px;overflow-x:auto;font-size:.77rem;font-weight:800;letter-spacing:.055em;white-space:nowrap;scrollbar-width:none}
.nav-links::-webkit-scrollbar{display:none}
.nav-links a{padding:11px 12px;border-radius:999px}
.nav-links a:hover{background:#f1eee7;color:#70500d}
.nav-links a.active{background:var(--black);color:#fff}

main{min-height:70vh}
.account-hero{position:relative;display:grid;grid-template-columns:1fr;align-items:end;overflow:hidden;max-width:none;min-height:430px;padding:72px max(24px,calc((100vw - var(--max))/2 + 24px));background:var(--black);color:#fff}
.account-hero::after{content:"PG";position:absolute;right:-.03em;bottom:-.22em;color:rgba(255,255,255,.026);font-size:330px;font-weight:950;letter-spacing:-.1em;line-height:1;pointer-events:none}
.account-hero>div{position:relative;z-index:1}
.eyebrow{display:flex;align-items:center;gap:10px;color:#f2d58f;font-size:.76rem;font-weight:900;letter-spacing:.18em}
.eyebrow i{width:8px;height:8px;border-radius:50%;background:var(--gold);box-shadow:0 0 0 7px rgba(215,170,67,.13)}
.account-hero h1{max-width:780px;margin:23px 0 24px;font-size:clamp(3.6rem,7vw,7rem);font-weight:950;letter-spacing:-.075em;line-height:.83}
.account-hero h1 em{color:var(--gold);font-family:Georgia,"Times New Roman",serif;font-weight:500}
.account-hero p{max-width:590px;margin:0;color:#c9c9c7;font-size:1.05rem;line-height:1.7}
.workspace{display:grid;grid-template-columns:minmax(280px,.72fr) minmax(0,1.28fr);gap:24px;max-width:var(--max);margin:0 auto;padding:50px 24px 84px}
.payment-result{grid-column:1/-1;padding:16px 19px;border:1px solid #a7dfbf;border-radius:16px;background:#eefaf3;color:#176a3d;font-size:.88rem;font-weight:800;line-height:1.5}
.payment-result.cancelled{border-color:#e3d09c;background:#fff8e7;color:#72540e}
.auth-card,.session-card,.data-section{border:1px solid var(--line);border-radius:24px;background:var(--surface);box-shadow:0 7px 24px rgba(0,0,0,.035)}
.auth-card,.session-card{align-self:start;grid-row:span 2;padding:28px;position:sticky;top:96px}
.card-heading{display:flex;align-items:flex-start;gap:14px}
.card-heading h2,.section-heading h2{margin:0;font-size:1.55rem;letter-spacing:-.04em}
.card-heading p{margin:5px 0 0;color:var(--muted);font-size:.9rem}
.step{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:12px;background:var(--gold-soft);color:#755616;font-size:.72rem;font-weight:900}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:26px 0 20px;padding:4px;border-radius:14px;background:#ecece7}
.auth-tab{min-height:43px;border:0;border-radius:11px;background:transparent;color:#747572;cursor:pointer;font-size:.72rem;font-weight:900;letter-spacing:.055em}
.auth-tab.active{background:var(--black);color:#fff;box-shadow:0 7px 18px rgba(0,0,0,.16)}
.auth-form{display:grid;gap:16px}
.auth-form label{display:grid;gap:7px;font-size:.78rem;font-weight:800}
.auth-form input{width:100%;min-height:49px;border:1px solid #d5d5cf;border-radius:12px;background:#fff;padding:12px 14px;color:var(--ink)}
.auth-form input:focus{border-color:var(--gold);box-shadow:0 0 0 4px rgba(215,170,67,.13)}
.primary-button,.outline-button,.order-button,.icon-button{border:0;cursor:pointer;font-weight:900;letter-spacing:.055em}
.primary-button{display:flex;align-items:center;justify-content:space-between;min-height:50px;margin-top:2px;padding:0 18px;border-radius:999px;background:var(--gold);color:#111;font-size:.76rem}
.primary-button:hover{transform:translateY(-2px);background:#e2b954;box-shadow:0 12px 28px rgba(215,170,67,.24)}
.primary-button:disabled,.order-button:disabled{cursor:not-allowed;opacity:.55;transform:none;box-shadow:none}
.form-note{margin:0;color:var(--muted);font-size:.76rem;line-height:1.55}
.message{margin-top:16px;padding:12px 14px;border:1px solid #d8d8d2;border-radius:12px;background:#f6f6f2;font-size:.82rem;line-height:1.5}
.message.success{border-color:#a7dfbf;background:#eefaf3;color:#176a3d}
.message.error{border-color:#e5b8b3;background:#fff2f0;color:#913028}
.session-top{display:flex;align-items:center;gap:14px}
.avatar{display:grid;place-items:center;width:54px;height:54px;flex:0 0 54px;border-radius:50%;background:var(--gold);color:#111;font-weight:950}
.session-card small{color:var(--green);font-size:.67rem;font-weight:900;letter-spacing:.12em}
.session-card h2{margin:4px 0 2px;font-size:1.45rem;letter-spacing:-.035em}
.session-card p{margin:0;color:var(--muted);font-size:.82rem;word-break:break-all}
.role-badge{display:inline-flex;margin-top:9px;padding:5px 9px;border-radius:999px;background:#ecece7;color:#555751;font-size:.58rem;font-weight:950;letter-spacing:.1em}
.role-badge.owner{background:var(--gold-soft);color:#73520c}
.outline-button{width:100%;min-height:46px;margin-top:24px;border:1px solid #d3d3cd;border-radius:999px;background:#fff;color:#111;font-size:.74rem}
.outline-button:hover{border-color:#111;background:#111;color:#fff}

.data-section{grid-column:2;padding:30px}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}
.section-heading>div{display:flex;align-items:center;gap:13px}
.section-copy{margin:12px 0 24px;color:var(--muted);font-size:.9rem}
.icon-button{display:grid;place-items:center;width:42px;height:42px;border:1px solid #d5d5cf;border-radius:50%;background:#fff;color:#111;font-size:1.35rem}
.icon-button:hover{transform:rotate(25deg);border-color:var(--gold);background:var(--gold-soft)}
.product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.db-product{display:flex;flex-direction:column;overflow:hidden;border:1px solid #dfdfda;border-radius:18px;background:#fff}
.db-product figure{position:relative;display:grid;place-items:center;aspect-ratio:1/1;margin:0;overflow:hidden;background:#f5f5f1}
.db-product figure img{width:100%;height:100%;padding:10px;object-fit:contain;transition:transform .45s ease}
.db-product:hover figure img{transform:scale(1.045)}
.db-product figure span{display:none;font-size:2.2rem}
.db-product figure.image-error img{display:none}
.db-product figure.image-error span{display:block}
.db-product-body{display:flex;flex:1;flex-direction:column;padding:15px}
.category{margin:0 0 5px;color:#777871;font-size:.65rem;font-weight:900;letter-spacing:.09em;text-transform:uppercase}
.db-product h3{min-height:39px;margin:0;font-size:.88rem;line-height:1.38}
.db-price{margin:9px 0 12px;font-size:1.13rem;font-weight:950}
.size-row{display:grid;grid-template-columns:1fr auto;align-items:end;gap:8px;margin-top:auto}
.size-row label{display:grid;gap:5px;color:var(--muted);font-size:.7rem}
.size-row select{min-height:40px;border:1px solid #d5d5cf;border-radius:10px;background:#fff;padding:7px 9px}
.order-button{min-height:40px;padding:0 13px;border-radius:999px;background:var(--black);color:#fff;font-size:.66rem;white-space:nowrap}
.order-button:hover{transform:translateY(-2px);background:var(--gold);color:#111}
.skeleton-card{height:335px;border-radius:18px;background:linear-gradient(100deg,#ededeb 25%,#f8f8f5 40%,#ededeb 58%);background-size:200% 100%;animation:shimmer 1.25s infinite}
@keyframes shimmer{to{background-position-x:-200%}}
.empty-state,.error-state{grid-column:1/-1;padding:34px 18px;border:1px dashed #cecec8;border-radius:16px;background:#f8f8f5;text-align:center;color:var(--muted);font-size:.88rem;line-height:1.55}
.error-state{border-color:#e0b3ae;background:#fff4f2;color:#8e322a}

.orders-list{display:grid;gap:10px}
.order-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;padding:15px;border:1px solid #dfdfda;border-radius:15px}
.order-number{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#efefe9;font-size:.74rem;font-weight:950}
.order-info strong{display:block;font-size:.88rem}
.order-info span{display:block;margin-top:4px;color:var(--muted);font-size:.75rem}
.order-status{padding:7px 10px;border-radius:999px;background:#fff2d3;color:#70520d;font-size:.63rem;font-weight:900;letter-spacing:.07em;text-transform:uppercase}
.order-status.status-preparando{background:#e8efff;color:#244e93}
.order-status.status-enviado{background:#e8f4ff;color:#175b85}
.order-status.status-entregado{background:#e5f8ed;color:#146c3e}
.order-status.status-cancelado{background:#ffebe8;color:#963429}

.shop-order-card{overflow:hidden;border:1px solid #dfdfda;border-radius:18px;background:#fff}
.shop-order-card>header,.shop-order-card>footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px}
.shop-order-card>header{background:#fafaf7;border-bottom:1px solid #e3e3dd}
.shop-order-card>header>div{display:grid;gap:5px}
.shop-order-card>header strong{font-size:.88rem}
.order-kicker{color:#80611b;font-size:.62rem;font-weight:950;letter-spacing:.1em}
.shop-order-card>footer{border-top:1px solid #e3e3dd;color:var(--muted);font-size:.76rem}
.shop-order-card>footer strong{color:var(--ink);font-size:.9rem}
.order-items{display:grid;padding:5px 18px}
.order-item-line{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #ecece7}
.order-item-line:last-child{border-bottom:0}
.order-item-line>div{display:grid;gap:4px}
.order-item-line strong{font-size:.8rem}
.order-item-line span{color:var(--muted);font-size:.7rem;line-height:1.45}
.order-item-line>b{font-size:.79rem;white-space:nowrap}
.muted-line{margin:0;padding:20px 18px;color:var(--muted);font-size:.78rem}
.customer-details{display:grid;gap:6px;padding:14px 18px;border-bottom:1px solid #ecece7;background:#fff;font-size:.72rem;line-height:1.45}
.customer-details span:last-child{word-break:break-word}
.status-control{display:grid;gap:4px;color:var(--muted);font-size:.62rem;font-weight:800}
.status-control select{min-height:35px;border:1px solid #d5d5cf;border-radius:10px;background:#fff;padding:6px 9px;font-size:.72rem;font-weight:800}
.skeleton-card.compact{height:112px}

.owner-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.owner-metrics article{display:grid;gap:8px;padding:18px;border:1px solid #dfdfda;border-radius:16px;background:linear-gradient(145deg,#fff,#f5f2ea)}
.owner-metrics span{color:var(--muted);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em}
.owner-metrics strong{font-size:1.5rem;letter-spacing:-.04em}
.sync-button,.save-stock-button{border:0;border-radius:999px;background:var(--black);color:#fff;cursor:pointer;font-size:.65rem;font-weight:900;letter-spacing:.06em}
.sync-button{min-height:40px;padding:0 16px}
.sync-button:hover,.save-stock-button:hover{background:var(--gold);color:#111;transform:translateY(-1px)}
.sync-button:disabled,.save-stock-button:disabled{cursor:wait;opacity:.6;transform:none}
.inventory-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:10px;margin-bottom:14px}
.inventory-toolbar input,.inventory-toolbar select{width:100%;min-height:46px;border:1px solid #d4d4ce;border-radius:13px;background:#fff;padding:10px 13px}
.inventory-toolbar input:focus,.inventory-toolbar select:focus{border-color:var(--gold);box-shadow:0 0 0 4px rgba(215,170,67,.13)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.inventory-message{margin:0 0 14px;padding:12px 14px;border:1px solid #b4dfc4;border-radius:12px;background:#eefaf3;color:#176a3d;font-size:.76rem;line-height:1.5}
.inventory-message.error{border-color:#e5b8b3;background:#fff2f0;color:#913028}
.inventory-list{display:grid;gap:12px}
.inventory-card{display:grid;grid-template-columns:minmax(200px,.9fr) minmax(260px,1.5fr) auto;align-items:center;gap:16px;padding:14px;border:1px solid #dfdfda;border-radius:16px;background:#fff}
.inventory-product{display:flex;align-items:center;gap:12px;min-width:0}
.inventory-product img{width:58px;height:58px;flex:0 0 58px;border-radius:11px;background:#f2f2ee;object-fit:contain}
.inventory-product img.image-error{visibility:hidden}
.inventory-product div{display:grid;gap:5px;min-width:0}
.inventory-product span{color:var(--muted);font-size:.6rem;font-weight:850;text-transform:uppercase;letter-spacing:.05em}
.inventory-product strong{overflow:hidden;font-size:.75rem;line-height:1.35;text-overflow:ellipsis}
.stock-grid{display:flex;flex-wrap:wrap;gap:7px}
.stock-grid label{display:grid;gap:4px;text-align:center;color:var(--muted);font-size:.58rem;font-weight:800}
.stock-grid input{width:54px;height:38px;border:1px solid #d6d6d0;border-radius:9px;padding:6px;text-align:center}
.stock-grid input:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(215,170,67,.13)}
.save-stock-button{min-height:39px;padding:0 14px;white-space:nowrap}

footer{background:var(--black);color:#fff;padding:36px 24px}
.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:30px;max-width:var(--max);margin:auto}
.footer-brand{display:flex;align-items:center;gap:12px}
.footer-brand img{width:50px;height:50px;border-radius:50%;object-fit:cover}
.footer-brand div{display:grid;gap:4px}
.footer-brand strong{font-size:.9rem;letter-spacing:.08em}
.footer-brand span{color:#8f9092;font-size:.75rem}
.footer-links{display:flex;gap:22px;color:#b8b9ba;font-size:.77rem}
.footer-links a:hover{color:#f2d58f}

.store-return-section{background:linear-gradient(135deg,#fff 0%,#f4eedf 100%)}
.store-return-button{display:flex;align-items:center;justify-content:space-between;max-width:330px;min-height:50px;margin-top:18px;padding:0 20px;border-radius:999px;background:#111;color:#fff;font-size:.78rem;font-weight:900;letter-spacing:.06em}
.store-return-button:hover{transform:translateY(-2px);background:var(--gold);color:#111;box-shadow:0 12px 28px rgba(0,0,0,.12)}

@media(max-width:980px){
  .nav{align-items:flex-start;flex-direction:column;gap:10px}
  .nav-links{width:100%}
  .account-hero{grid-template-columns:1fr;gap:40px;padding-top:60px;padding-bottom:60px}
  .workspace{grid-template-columns:1fr}
  .auth-card,.session-card{position:static;grid-row:auto}
  .data-section{grid-column:1}
  .inventory-card{grid-template-columns:1fr}
  .save-stock-button{justify-self:start}
}

@media(max-width:700px){
  .topbar-inner{justify-content:center}.topbar-inner span{display:none}
  .nav{padding:11px 16px}.brand{font-size:1.05rem}.brand img{width:42px;height:42px}
  .account-hero{min-height:390px;padding:54px 18px}.account-hero h1{font-size:clamp(3.1rem,15vw,5rem)}
  .workspace{padding:26px 10px 60px}
  .auth-card,.session-card,.data-section{padding:21px 16px;border-radius:18px}
  .product-grid{grid-template-columns:1fr 1fr;gap:8px}
  .db-product-body{padding:11px}.db-product h3{font-size:.78rem}.db-price{font-size:1rem}
  .size-row{grid-template-columns:1fr}.order-button{width:100%}
  .order-row{grid-template-columns:auto minmax(0,1fr)}.order-status{grid-column:2;justify-self:start}
  .owner-metrics{grid-template-columns:1fr}
  .inventory-toolbar{grid-template-columns:1fr}
  .shop-order-card>header{align-items:flex-start;flex-direction:column}
  .status-control{width:100%}.status-control select{width:100%}
  .order-item-line{align-items:flex-start;flex-direction:column;gap:6px}
  .section-heading:has(.sync-button){align-items:flex-start;flex-direction:column}
  .footer-inner{align-items:flex-start;flex-direction:column}.footer-links{flex-wrap:wrap}
}

@media(max-width:390px){
  .product-grid{grid-template-columns:1fr}
}

@media(prefers-reduced-motion:reduce){
  *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
