/* HELLABASAS admin portal */
:root {
  --bg: #07080f;
  --cream: #f3efe6;
  --mute: rgba(243,239,230,0.62);
  --mute-2: rgba(243,239,230,0.42);
  --line: rgba(255,255,255,0.14);
  --panel: rgba(7,8,15,0.62);
  --panel-2: rgba(255,255,255,0.04);
  --ok: #b7e3c0;
  --bad: #f3b4b4;
  --sidebar: 228px;
  --topbar: 56px;
  --sans: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: var(--sans);
  background:
    radial-gradient(ellipse 90% 55% at 50% 115%, #161b30 0%, transparent 62%),
    radial-gradient(ellipse 50% 40% at 80% 10%, #10142a 0%, transparent 55%),
    var(--bg);
  color: var(--cream);
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
}
#sky { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hidden { display: none !important; }

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  background: var(--cream);
  color: #111;
  font-weight: 600;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
}
a { color: inherit; text-decoration: none; }
input[type="password"],
input[type="text"],
input[type="url"],
input[type="number"] {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: var(--cream);
  font: inherit;
}
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* —— 3D H (copied from shop) —— */
.logo-tile {
  width: 44px;
  height: 44px;
  margin: 0;
  flex-shrink: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  perspective: 220px;
}
.logo-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: logo-spin 7.5s linear infinite;
}
.logo-3d-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
}
.logo-3d-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none !important;
}
.logo-3d-back { transform: rotateY(180deg); }
@keyframes logo-spin { to { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .logo-3d { animation: none; }
}

/* —— Gate —— */
.gate-wrap {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 48px;
}
.gate-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}
.gate-brand .word {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.gate-brand .sep { color: var(--mute); font-weight: 500; letter-spacing: 0; }
.gate-brand .role {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mute);
}
.gate {
  width: min(100%, 360px);
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.gate input[type="password"] { margin-bottom: 12px; }
.err { color: var(--bad); font-size: 13px; min-height: 1.2em; margin: 8px 0 0; }

/* —— App chrome —— */
#app {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  grid-template-rows: var(--topbar) 1fr;
}
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--topbar);
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(7,8,15,0.35);
  backdrop-filter: blur(10px);
}
.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  color: var(--cream);
  border: 0;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
}
.menu-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.topbar .word {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.topbar .sep { color: var(--mute); }
.topbar .role {
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
}
.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(7,8,15,0.42);
  padding: 16px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--mute);
}
.sidebar a:hover { color: var(--cream); background: var(--panel-2); }
.sidebar a.is-on {
  color: var(--cream);
  background: rgba(243,239,230,0.1);
}
.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.42);
  z-index: 30;
}
.main {
  min-width: 0;
  padding: 22px 22px 72px;
}
.page { max-width: 1120px; }
.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}
.page-head h1 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}
.status { font-size: 12px; color: var(--mute); min-height: 1.2em; margin: 0 0 12px; }
.status.is-ok { color: var(--ok); }
.status.is-bad { color: var(--bad); }
.banner {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--mute);
}
.banner.is-bad { color: var(--bad); }

.panel, .empty-card, .pcard, .order, .stat, .note-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.empty-card, .note-card {
  padding: 18px 16px;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.55;
}
.empty-card p, .note-card p { margin: 0 0 8px; }
.empty-card p:last-child, .note-card p:last-child { margin: 0; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.stat { padding: 14px 16px; }
.stat .k {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 6px;
}
.stat .v {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}
.section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 8px 0 10px;
}
.list { display: flex; flex-direction: column; gap: 8px; }
.order {
  padding: 12px 14px;
  text-align: left;
  background: var(--panel);
  color: var(--cream);
  width: 100%;
  display: block;
}
.order:hover { background: rgba(255,255,255,0.06); }
.order .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.order .name { font-weight: 600; }
.order .meta, .order .note {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--mute);
}
.order pre, .usps {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.detail {
  display: grid;
  gap: 10px;
}
.kv {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  font-size: 14px;
  padding: 2px 0;
}
.kv .k { color: var(--mute); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding-top: 3px; }
.usps-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.usps-box .copy { margin-top: 10px; padding: 6px 11px; font-size: 12px; }
.back-link {
  display: inline-block;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--mute);
  font-weight: 600;
}
.back-link:hover { color: var(--cream); }

.product-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.pcard {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.pcard .phead { min-width: 0; }
.pcard .ptitle {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cream);
  line-height: 1.25;
}
.pcard .pid {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--mute);
  opacity: 0.75;
}
.pcard .fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pcard .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pcard .lab,
.settings-form .lab {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 4px;
}
.pcard .hide-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--mute);
}
.pcard .hide-row input { width: auto; }
.pcard .field-save { align-self: flex-start; padding: 7px 12px; font-size: 13px; }
.pcard .shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.shot {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shot h3 {
  font-size: 11px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}
.shot .thumb {
  aspect-ratio: 3 / 4;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shot .thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shot input[type="file"] { font-size: 12px; color: var(--mute); width: 100%; }
.shot .save { align-self: flex-start; padding: 7px 12px; font-size: 13px; }

.sku-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sku-table th, .sku-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}
.sku-table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}
.sku-table td:nth-child(2),
.sku-table td:nth-child(3),
.sku-table th:nth-child(2),
.sku-table th:nth-child(3) { text-align: right; }

.settings-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.settings-form button { align-self: flex-start; }


.page-head button { font-size: 13px; padding: 7px 12px; }
.add-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 0 0 16px;
  max-width: 560px;
}
.add-grid { display: flex; flex-direction: column; gap: 10px; }
.add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.add-panel .lab,
.pcard .extra-fields .lab {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 4px;
}
.add-panel .hide-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--mute);
}
.add-panel .hide-row input { width: auto; }
.seg {
  display: flex;
  gap: 6px;
}
.seg button {
  flex: 1;
  background: transparent;
  color: var(--mute);
  border: 1px solid var(--line);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 600;
}
.seg button.is-on {
  background: rgba(243,239,230,0.12);
  color: var(--cream);
  border-color: rgba(243,239,230,0.28);
}
.add-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.add-actions { display: flex; gap: 8px; }
.add-panel .status { margin: 0; }
.pcard .extra-fields { display: flex; flex-direction: column; gap: 8px; }

@media (min-width: 880px) {
  .product-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  #app {
    grid-template-columns: 1fr;
  }
  .menu-btn { display: inline-flex; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(100%, 280px);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    padding-top: 64px;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .scrim { display: block; }
  .stats { grid-template-columns: 1fr; }
  .main { padding: 18px 16px 64px; }
}
