:root{
  color-scheme: light;
  --bg: #0b0e14;
  --bg2: #0f1320;
  --surface: rgba(255,255,255,.06);
  --surface2: rgba(255,255,255,.08);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --muted2: rgba(255,255,255,.54);
  --border: rgba(255,255,255,.12);
  --shadow: 0 18px 50px rgba(0,0,0,.38);
  --brand: #f3b436;
  --brand2: #ffdd8b;
  --ok: #2bd576;
  --warn: #f3b436;
  --danger: #ff5d5d;
  --ring: rgba(243,180,54,.35);
  --radius: 16px;
  --radius-sm: 12px;
  --space: 14px;
  --container: 1120px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(243,180,54,.28), transparent 55%),
    radial-gradient(900px 520px at 100% 0%, rgba(82,150,255,.18), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

a{color:inherit; text-decoration:none}
a:hover{opacity:.92}

img{max-width:100%; display:block}
button,input,select,textarea{font:inherit; color:inherit}
button{cursor:pointer}

.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 18px;
}

.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(10,12,18,.62);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--border);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.brand-logo{
  width:112px;
  height:112px;
  border-radius:22px;
  object-fit:cover;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.12);
}
.brand-name{
  font-weight:800;
  letter-spacing:-.02em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.nav{
  display:flex;
  align-items:center;
  gap:14px;
}
.nav a{
  color:var(--muted);
  font-weight:600;
  padding:8px 10px;
  border-radius:12px;
}
.nav a:hover{
  color:var(--text);
  background:rgba(255,255,255,.06);
}
.nav .btn, .nav .btn-secondary{
  color:var(--text);
  background:transparent;
}
.nav-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
}
.nav-toggle:focus-visible{outline:3px solid var(--ring); outline-offset:2px}
.nav-toggle svg{width:20px;height:20px}

.site-main{padding:18px 0 44px}

.site-footer{
  border-top:1px solid var(--border);
  background:rgba(0,0,0,.12);
}
.footer-inner{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
  padding:22px 0 14px;
}
.footer-brand{min-width:0}
.brand-mini{display:flex; align-items:center; gap:10px}
.footer-logo{width:112px;height:112px;border-radius:26px;object-fit:cover;border:1px solid rgba(255,255,255,.12)}
.footer-links{display:flex; gap:12px; flex-wrap:wrap; justify-content:flex-end}
.footer-links a{color:var(--muted); padding:6px 10px; border-radius:12px}
.footer-links a:hover{color:var(--text); background:rgba(255,255,255,.06)}
.footer-muted{color:var(--muted2)}
.footer-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 0 18px;
}

.card{
  border:1px solid var(--border);
  background:var(--surface);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
}
.card-pad{padding:16px}

.section-title{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin:12px 0 12px;
}
.section-title h2{
  margin:0;
  font-size:22px;
  letter-spacing:-.02em;
}

.muted{color:var(--muted)}
.mini{font-size:12px}

.right{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.grid{
  display:grid;
  gap:14px;
}
.grid-2{grid-template-columns:repeat(2, minmax(0, 1fr))}
.grid-3{grid-template-columns:repeat(3, minmax(0, 1fr))}
.grid-4{grid-template-columns:repeat(4, minmax(0, 1fr))}

.split{
  display:grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .9fr);
  gap:14px;
  align-items:start;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid rgba(243,180,54,.35);
  background:linear-gradient(180deg, rgba(243,180,54,.22), rgba(243,180,54,.12));
  color:var(--text);
  padding:10px 14px;
  border-radius:14px;
  font-weight:800;
  letter-spacing:-.01em;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{transform: translateY(-1px); border-color: rgba(243,180,54,.6)}
.btn:active{transform: translateY(0)}
.btn:disabled{opacity:.5; cursor:not-allowed; transform:none}

.btn-secondary{
  border-color: var(--border);
  background: rgba(255,255,255,.06);
  font-weight:700;
}
.btn-secondary:hover{border-color: rgba(255,255,255,.22)}

.btn-danger{
  border-color: rgba(255,93,93,.42);
  background: rgba(255,93,93,.12);
}
.btn-danger:hover{border-color: rgba(255,93,93,.7)}

.btn-sm{padding:7px 10px; border-radius:12px; font-weight:800}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 7px;
  margin-left:6px;
  font-size:12px;
  font-weight:800;
  border-radius:999px;
  border:1px solid rgba(243,180,54,.35);
  background: rgba(243,180,54,.14);
  color:var(--text);
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:6px 10px;
  font-size:12px;
  font-weight:800;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color:var(--text);
  white-space:nowrap;
}
.pill.stock-in{border-color: rgba(43,213,118,.35); background: rgba(43,213,118,.12)}
.pill.stock-out{border-color: rgba(255,93,93,.35); background: rgba(255,93,93,.12)}

.tag{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.05);
  font-weight:700;
  color:var(--muted);
}
.tag input{accent-color: var(--brand)}

.link-muted{color:var(--muted2)}
.link-muted:hover{color:var(--text)}

.alert{
  border-radius:16px;
  padding:12px 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  box-shadow: var(--shadow);
}
.alert + .alert{margin-top:10px}
.alert-error{border-color: rgba(255,93,93,.36); background: rgba(255,93,93,.12)}
.alert-success{border-color: rgba(43,213,118,.32); background: rgba(43,213,118,.12)}

.hr{height:1px; background: var(--border); margin:12px 0}

.form-row{
  display:grid;
  gap:12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.field{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.field label{
  font-size:12px;
  font-weight:800;
  color:var(--muted);
  letter-spacing:.02em;
}
input, select, textarea{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.16);
  color:var(--text);
  outline:none;
}
textarea{min-height:120px; resize:vertical}
input:focus-visible, select:focus-visible, textarea:focus-visible{
  border-color: rgba(243,180,54,.5);
  box-shadow: 0 0 0 4px var(--ring);
}
select{appearance:none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px); background-size: 6px 6px, 6px 6px; background-repeat:no-repeat; padding-right:36px}

table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background: rgba(0,0,0,.08);
  display:block;
  overflow-x:auto;
}
thead, tbody{display:table; width:100%}
tr{display:table-row}
th, td{
  padding:12px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
  vertical-align:middle;
  text-align:left;
  white-space:nowrap;
}
th{
  font-size:12px;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:800;
  background: rgba(255,255,255,.04);
}
tbody tr:hover{background: rgba(255,255,255,.03)}
tbody tr:last-child td{border-bottom:none}

.product-card{display:flex; flex-direction:column; overflow:hidden}
.product-media{
  height:200px;
  background: rgba(0,0,0,.18);
  border-bottom:1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
}
.product-media img{max-height:100%; object-fit:contain; border-radius:14px}
.logo-fallback{opacity:.65; max-height:120px}
.logo-fallback-lg{max-height:220px}

.logo-splash{
  display:flex;
  justify-content:center;
  margin-bottom:10px;
}
.logo-splash-img{
  width:192px;
  height:192px;
  object-fit:contain;
}
.product-body{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px;
  flex:1;
}
.product-name{
  font-weight:900;
  letter-spacing:-.02em;
  margin-top:6px;
}
.product-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.price{
  font-size:18px;
  font-weight:900;
  letter-spacing:-.01em;
}

.admin-bar{
  position:sticky;
  top:68px;
  z-index:40;
  background: rgba(10,12,18,.62);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--border);
}
.admin-bar-inner{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 0;
  overflow:auto;
}
.admin-bar-inner::-webkit-scrollbar{height:8px}
.admin-bar-inner::-webkit-scrollbar-thumb{background: rgba(255,255,255,.12); border-radius:999px}

@media (max-width: 980px){
  .grid-4{grid-template-columns:repeat(2, minmax(0, 1fr))}
  .grid-3{grid-template-columns:repeat(2, minmax(0, 1fr))}
  .split{grid-template-columns:1fr}
}

@media (max-width: 720px){
  .footer-inner{flex-direction:column}
  .footer-links{justify-content:flex-start}
  .form-row{grid-template-columns:1fr}
  .nav-toggle{display:inline-flex}
  .nav{
    position:fixed;
    inset:64px 12px auto 12px;
    display:none;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    padding:12px;
    border-radius:18px;
    border:1px solid var(--border);
    background: rgba(10,12,18,.92);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 90px);
    overflow:auto;
  }
  .nav.is-open{display:flex}
  .nav a{padding:10px 12px}
  .brand-logo{width:96px;height:96px;border-radius:20px}
  .footer-logo{width:96px;height:96px;border-radius:22px}
}

@media (prefers-reduced-motion: reduce){
  .btn{transition:none}
}
