:root {
  --ink: #0b0b0c;
  --surface: #131314;
  --surface-2: #1c1b1c;
  --surface-3: #252426;
  --surface-4: #353436;
  --gold: #d4af37;
  --gold-bright: #f2ca50;
  --gold-soft: #c6a052;
  --silver: #cbd5e1;
  --text: #f3f0eb;
  --muted: #b8b2a7;
  --line: rgba(212, 175, 55, 0.2);
  --line-silver: rgba(203, 213, 225, 0.12);
  --danger: #ff8d86;
  --success: #92d5ae;
  --serif: "Playfair Display", "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--surface);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--ink); }

.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.admin-shell { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--gold);
  color: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.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;
}

.eyebrow {
  display: inline-block;
  color: var(--gold-bright);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}
.brand { display: inline-flex; align-items: center; gap: 11px; min-height: 48px; }
.brand img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
.brand > span { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font: 500 1.42rem/1 var(--serif); letter-spacing: 0.14em; }
.brand small { margin-top: 5px; color: var(--gold); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.34em; text-transform: uppercase; }
.brand-static { pointer-events: none; }

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 19px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--gold); color: var(--ink); }
.button-primary:hover { background: var(--gold-bright); }
.button:disabled { cursor: not-allowed; opacity: 0.42; }
.button:disabled:hover { transform: none; }
.button-secondary { border-color: var(--gold-soft); background: transparent; color: var(--gold-bright); }
.button-secondary:hover, .button-ghost:hover { background: rgba(212, 175, 55, 0.09); }
.button-ghost { border-color: rgba(212, 175, 55, 0.5); background: rgba(11, 11, 12, 0.24); color: var(--text); }
.button-danger { border-color: var(--danger); background: rgba(255, 141, 134, 0.14); color: #ffd7d3; }
.button-danger:hover { background: rgba(255, 141, 134, 0.24); }
.button-disabled { cursor: default; border-color: var(--line-silver); background: var(--surface-3); color: var(--muted); }
.button-disabled:hover { transform: none; }
.button-small { min-height: 38px; padding: 8px 13px; font-size: 0.72rem; }
.button-full { width: 100%; }
.text-link { color: var(--gold-bright); font-size: 0.84rem; font-weight: 700; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }

/* Storefront */
.storefront { background: var(--ink); }
.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--line-silver);
  background: rgba(11, 11, 12, 0.88);
  backdrop-filter: blur(18px);
}
.header-inner { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 24px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--silver); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.site-nav a:hover { color: var(--gold-bright); }
.site-nav .nav-admin { padding: 9px 12px; border: 1px solid var(--line); border-radius: 3px; color: var(--gold-bright); }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--gold-bright);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero {
  position: relative;
  display: grid;
  min-height: 650px;
  margin-top: 30px;
  overflow: hidden;
  place-items: center start;
  border: 1px solid var(--line-silver);
  background: var(--surface-2);
}
.hero-image, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { object-fit: cover; }
.hero-shade { background: linear-gradient(90deg, rgba(7, 7, 8, 0.98) 0%, rgba(7, 7, 8, 0.82) 38%, rgba(7, 7, 8, 0.1) 73%), linear-gradient(0deg, rgba(7, 7, 8, 0.45), transparent 40%); }
.hero-copy { position: relative; z-index: 1; width: min(560px, 58%); padding: 68px; }
.hero h1 { margin: 16px 0 20px; font: 400 clamp(3.1rem, 6vw, 5.2rem)/0.98 var(--serif); letter-spacing: -0.035em; text-wrap: balance; }
.hero p { max-width: 470px; margin: 0; color: var(--silver); font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.catalog { padding-block: 110px 120px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 48px; }
.section-heading h2, .contact-band h2 { margin: 9px 0 0; font: 500 clamp(2.2rem, 4vw, 3.3rem)/1.08 var(--serif); }
.section-heading > p { max-width: 490px; margin: 0; color: var(--muted); }
.category-list { display: flex; flex-wrap: wrap; gap: 9px; margin: 36px 0 38px; }
.chip {
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid var(--line-silver);
  border-radius: 999px;
  color: var(--silver);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip:hover, .chip.is-active { border-color: var(--gold); background: rgba(212, 175, 55, 0.1); color: var(--gold-bright); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product-card { position: relative; overflow: hidden; border: 1px solid var(--line-silver); border-radius: 4px; background: var(--surface); transition: border-color 200ms ease, transform 200ms ease; }
.product-card:hover { transform: translateY(-4px); border-color: rgba(212, 175, 55, 0.4); }
.product-card-link { position: absolute; z-index: 1; inset: 0; }
.product-card .text-link, .product-card .button { position: relative; z-index: 2; }
.product-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.product-card:hover .product-media img { transform: scale(1.025); }
.product-card.is-sold-out .product-media img { filter: grayscale(0.42) brightness(0.7); }
.category-badge, .sold-out-badge { position: absolute; top: 14px; padding: 7px 10px; border-radius: 2px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.category-badge { left: 14px; border: 1px solid rgba(212, 175, 55, 0.34); background: rgba(11, 11, 12, 0.76); color: var(--gold-bright); backdrop-filter: blur(8px); }
.sold-out-badge { right: 14px; background: rgba(11, 11, 12, 0.86); color: var(--silver); }
.product-content { padding: 23px; }
.product-content h3 { margin: 0; font: 500 1.42rem/1.25 var(--serif); }
.product-description { min-height: 52px; margin: 12px 0 20px; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line-silver); }
.product-footer > strong { color: var(--gold-bright); font: 600 1.06rem/1.3 var(--sans); }
.product-footer .button { min-height: 34px; padding: 7px 10px; font-size: 0.64rem; }
.empty-state { padding: 72px 28px; border: 1px solid var(--line-silver); background: var(--surface); text-align: center; }
.empty-state.compact { padding-block: 48px; }
.empty-state h3 { margin: 9px 0; font: 500 1.8rem/1.2 var(--serif); }
.empty-state p { max-width: 530px; margin: 0 auto 24px; color: var(--muted); }
.empty-gem { color: var(--gold); font: 400 3rem/1 var(--serif); }

.contact-band { border-block: 1px solid var(--line); background: linear-gradient(120deg, rgba(212, 175, 55, 0.08), transparent 55%), var(--surface); }
.contact-grid { display: grid; grid-template-columns: 1.15fr 0.9fr auto; align-items: center; gap: 54px; padding-block: 70px; }
.contact-grid p { margin: 0; color: var(--muted); }
.site-footer { background: #080809; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.8fr 1fr; gap: 72px; padding-block: 74px 56px; }
.footer-grid h2 { margin: 0 0 18px; color: var(--gold-bright); font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; }
.footer-grid p { margin: 7px 0; color: var(--muted); font-size: 0.87rem; }
.footer-brand > p { max-width: 330px; margin-top: 20px; }
.footer-links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--silver); font-size: 0.88rem; }
.footer-links a:hover { color: var(--gold-bright); }
.pending-link { color: #77736b; font-size: 0.84rem; }
.privacy-note { max-width: 370px; padding-top: 8px; font-size: 0.75rem !important; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 20px; border-top: 1px solid var(--line-silver); color: #88847c; font-size: 0.74rem; }
.footer-bottom a:hover { color: var(--gold-bright); }
.creator-credit { color: var(--silver); text-align: center; }

/* Product details */
.product-detail-page { padding-block: 28px 90px; }
.product-detail-page > .back-link { margin: 0 0 26px; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr); overflow: hidden; border: 1px solid var(--line-silver); border-radius: 4px; background: var(--surface); box-shadow: var(--shadow); }
.product-detail-media { position: relative; min-height: 650px; overflow: hidden; background: var(--surface-2); }
.product-detail-media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-content { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 6vw, 72px); }
.product-detail-content h1 { margin: 12px 0 16px; font: 500 clamp(2.6rem, 5vw, 4.5rem)/1 var(--serif); letter-spacing: -0.025em; }
.product-detail-price { color: var(--gold-bright); font-size: 1.3rem; }
.product-detail-description { margin: 30px 0; padding-block: 25px; border-block: 1px solid var(--line-silver); color: var(--muted); }
.product-detail-description p { margin: 0 0 12px; }
.product-detail-description p:last-child { margin-bottom: 0; }
.detail-note { margin: 16px 0 0; color: var(--muted); font-size: 0.74rem; text-align: center; }

/* Admin shared */
.admin-page { min-height: 100vh; background: radial-gradient(circle at 85% -10%, rgba(212, 175, 55, 0.08), transparent 28%), var(--surface); }
.admin-header { border-bottom: 1px solid var(--line-silver); background: rgba(14, 14, 15, 0.92); backdrop-filter: blur(18px); }
.admin-header-inner { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 20px; }
.admin-utilities { display: flex; align-items: center; gap: 18px; }
.admin-utilities form { margin: 0; }
.admin-tabs { display: flex; gap: 5px; overflow-x: auto; padding-block: 0 11px; scrollbar-width: thin; }
.admin-tabs a { flex: 0 0 auto; padding: 8px 12px; border-radius: 3px; color: var(--muted); font-size: 0.73rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.admin-tabs a:hover, .admin-tabs a.is-active { background: rgba(212, 175, 55, 0.1); color: var(--gold-bright); }
.text-button { padding: 8px 2px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.text-button:hover { color: var(--gold-bright); }
.admin-main { padding-block: 55px 80px; }
.message-list { display: grid; gap: 8px; margin-bottom: 22px; }
.message { padding: 13px 16px; border: 1px solid rgba(146, 213, 174, 0.34); border-radius: 4px; background: rgba(146, 213, 174, 0.08); color: #caf0d9; font-size: 0.88rem; }
.admin-titlebar { display: flex; align-items: end; justify-content: space-between; gap: 32px; }
.admin-titlebar h1, .form-page-heading h1 { margin: 8px 0 4px; font: 500 clamp(2.5rem, 5vw, 4rem)/1.02 var(--serif); }
.admin-titlebar p, .form-page-heading p { margin: 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.stats-grid article { display: flex; min-height: 112px; flex-direction: column; justify-content: space-between; padding: 20px; border: 1px solid var(--line-silver); border-radius: 4px; background: var(--surface-2); }
.stats-grid span { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.stats-grid strong { color: var(--gold-bright); font: 500 2rem/1 var(--serif); }
.management-card { margin-top: 22px; padding: 25px; border: 1px solid var(--line-silver); border-radius: 4px; background: rgba(20, 20, 22, 0.88); }
.management-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.management-heading h2 { margin: 6px 0 0; font: 500 1.65rem/1.2 var(--serif); }
.result-count { color: var(--muted); font-size: 0.76rem; }
.filter-form { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(170px, 0.7fr) minmax(170px, 0.7fr) auto auto; align-items: center; gap: 9px; margin-top: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line-silver); }
.clear-filter { color: var(--muted); font-size: 0.75rem; font-weight: 700; text-align: center; }
.clear-filter:hover { color: var(--gold-bright); }
.field-control {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid rgba(203, 213, 225, 0.18);
  border-radius: 4px;
  background: #0f0f11;
  color: var(--text);
  font-size: 0.94rem;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field-control:hover { border-color: rgba(203, 213, 225, 0.32); }
.field-control:focus { border-color: var(--gold); outline: 0; box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12); }
textarea.field-control { resize: vertical; }
select.field-control { color-scheme: dark; }
.admin-product-list { display: grid; }
.admin-product { display: grid; grid-template-columns: 76px minmax(260px, 1fr) minmax(330px, auto); align-items: center; gap: 18px; padding-block: 18px; border-bottom: 1px solid var(--line-silver); }
.admin-product:last-child { border-bottom: 0; }
.admin-product-image { width: 76px; height: 76px; overflow: hidden; border-radius: 3px; background: var(--surface-3); }
.admin-product-image img { width: 100%; height: 100%; object-fit: cover; }
.admin-product-main { display: grid; grid-template-columns: minmax(220px, 1fr) 120px minmax(190px, auto); align-items: center; gap: 18px; }
.admin-product-title h3 { margin: 3px 0 0; font: 500 1.12rem/1.3 var(--serif); }
.admin-price { color: var(--gold-bright); font-size: 0.9rem; }
.status-row { display: flex; flex-wrap: wrap; gap: 6px; }
.status-pill { padding: 5px 8px; border: 1px solid var(--line-silver); border-radius: 999px; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.status-live { border-color: rgba(242, 202, 80, 0.34); color: var(--gold-bright); }
.status-muted { color: #908d87; }
.status-warn { border-color: rgba(255, 141, 134, 0.35); color: #ffb7b2; }
.status-stock { border-color: rgba(146, 213, 174, 0.3); color: var(--success); }
.admin-product-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 6px; }
.admin-product-actions form { margin: 0; }
.action-button, .icon-action { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 7px 9px; border: 1px solid var(--line-silver); border-radius: 3px; background: transparent; color: var(--silver); cursor: pointer; font-size: 0.68rem; font-weight: 700; }
.action-button:hover, .icon-action:hover { border-color: var(--gold-soft); color: var(--gold-bright); }
.icon-action.danger:hover { border-color: var(--danger); color: #ffb7b2; }

/* Login and forms */
.login-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, 1.15fr) minmax(420px, 0.85fr); }
.login-visual { position: relative; overflow: hidden; background: var(--ink); }
.login-visual > img { width: 100%; height: 100%; object-fit: cover; }
.login-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 8, 9, 0.9), transparent 60%); }
.login-visual-copy { position: absolute; z-index: 1; left: 56px; right: 56px; bottom: 50px; }
.login-visual-copy p { max-width: 560px; margin: 9px 0 0; font: 400 clamp(2rem, 4vw, 3.8rem)/1.08 var(--serif); }
.login-panel { display: grid; place-items: center; padding: 48px; }
.login-box { width: min(410px, 100%); }
.login-box > .brand { margin-bottom: 65px; }
.login-box h1 { margin: 12px 0 8px; font: 500 2.55rem/1.1 var(--serif); }
.muted { margin: 0; color: var(--muted); }
.stack-form { display: grid; gap: 18px; margin-top: 32px; }
.field-group { display: grid; gap: 7px; }
.field-group label { color: var(--gold-bright); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.field-group small { color: var(--muted); font-size: 0.75rem; }
.errorlist { margin: 0; padding: 0; color: #ffc3bf; font-size: 0.76rem; list-style: none; }
.form-alert { padding: 12px 14px; border: 1px solid rgba(255, 141, 134, 0.35); background: rgba(255, 141, 134, 0.08); color: #ffc3bf; font-size: 0.84rem; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 28px; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.back-link:hover { color: var(--gold-bright); }

.form-page { padding-block: 48px 80px; }
.form-page-heading { max-width: 760px; margin-bottom: 30px; }
.form-page-heading .back-link { margin: 0 0 30px; }
.form-page-heading > .eyebrow { display: block; }
.product-form { display: grid; gap: 16px; }
.form-card { padding: 28px; border: 1px solid var(--line-silver); border-radius: 4px; background: var(--surface-2); }
.card-heading { display: flex; align-items: start; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line-silver); }
.card-heading h2 { margin: 0; font: 500 1.36rem/1.25 var(--serif); }
.card-heading p { margin: 3px 0 0; color: var(--muted); font-size: 0.82rem; }
.step-number { color: var(--gold-bright); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: 24px; }
.field-wide { grid-column: 1 / -1; }
.image-upload-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); align-items: center; gap: 28px; padding-top: 24px; }
.image-preview { aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line-silver); border-radius: 3px; background: var(--ink); }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-control { display: grid; gap: 12px; color: var(--muted); font-size: 0.82rem; }
.upload-control p { margin: 0; }
.file-control { width: 100%; padding: 12px; border: 1px dashed rgba(212, 175, 55, 0.42); border-radius: 4px; background: rgba(212, 175, 55, 0.05); color: var(--silver); }
.file-control::file-selector-button { margin-right: 13px; padding: 9px 12px; border: 0; border-radius: 3px; background: var(--gold); color: var(--ink); cursor: pointer; font-weight: 700; }
.switch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 24px; }
.switch-row { display: flex; min-height: 92px; align-items: center; justify-content: space-between; gap: 20px; padding: 17px; border: 1px solid var(--line-silver); border-radius: 4px; cursor: pointer; }
.switch-row:hover { border-color: var(--line); }
.switch-row span { display: grid; gap: 3px; }
.switch-row strong { font-size: 0.9rem; }
.switch-row small { color: var(--muted); font-size: 0.75rem; }
.switch-control { width: 42px; height: 22px; accent-color: var(--gold); cursor: pointer; }
.form-actions { display: flex; justify-content: end; gap: 10px; padding-top: 8px; }

/* Cash, calculator and team */
.date-filter { display: flex; align-items: end; gap: 10px; margin-top: 28px; }
.date-filter .field-group { width: min(260px, 100%); }
.admin-two-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); align-items: start; gap: 18px; margin-top: 22px; }
.compact-form { margin-top: 0; padding-top: 24px; }
.report-form { display: grid; gap: 18px; padding-top: 24px; }
.amount-entry { color: var(--success) !important; }
.amount-exit { color: #ffb7b2 !important; }
.table-scroll { margin-top: 20px; overflow-x: auto; }
.admin-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 15px 12px; border-bottom: 1px solid var(--line-silver); text-align: left; vertical-align: middle; }
.admin-table th { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; }
.admin-table td { color: var(--silver); font-size: 0.82rem; }
.admin-table td:nth-last-child(-n + 2) { white-space: nowrap; }
.admin-table td small { display: block; max-width: 480px; margin-top: 3px; color: var(--muted); }
.admin-table form { margin: 0; }
.calculator-titlebar > div { max-width: 760px; }
.calculator-layout { display: grid; grid-template-columns: minmax(360px, 0.88fr) minmax(480px, 1.12fr); align-items: start; gap: 18px; margin-top: 30px; }
.calculator-panel { overflow: hidden; padding: 0; }
.calculator-card-heading { padding: 24px 26px; border-bottom: 0; background: linear-gradient(115deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.04)); }
.calculator-icon { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border-radius: 4px; background: var(--gold); color: var(--ink); font: 700 1.05rem/1 var(--serif); }
.calculator-panel .compact-form { padding: 26px; }
.calculator-products { margin-top: 0; padding: 0; overflow: hidden; }
.calculator-products > .management-heading { padding: 24px 25px 20px; border-bottom: 1px solid var(--line-silver); }
.calculator-results { margin-top: 18px; }
.no-top-padding { padding-top: 0; }
.live-total { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; border: 1px solid var(--line); background: rgba(212, 175, 55, 0.06); }
.live-total span, .quote-grand-total span { color: var(--muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.live-total strong, .quote-grand-total strong { color: var(--gold-bright); font: 500 1.45rem/1 var(--serif); }
.selected-price { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: -7px; color: var(--muted); font-size: 0.76rem; }
.selected-price strong { color: var(--silver); font-size: 0.8rem; }
.calculator-total { min-height: 118px; align-items: end; padding: 22px; background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.03)); }
.calculator-total > div { display: grid; gap: 8px; }
.calculator-total small { color: var(--muted); font-size: 0.74rem; }
.calculator-total > strong { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.calculator-hint { margin: -8px 0 0; color: var(--muted); font-size: 0.74rem; text-align: center; }
.product-register { padding: 20px 25px; border-bottom: 1px solid var(--line); background: rgba(212, 175, 55, 0.055); }
.product-register-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.product-register-heading > div { display: grid; }
.product-register-heading small { color: var(--muted); font-size: 0.75rem; }
.product-register-close { font-size: 0.65rem; }
.product-register-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(175px, 0.55fr) auto; align-items: end; gap: 10px; }
.product-register-form .field-group { align-self: start; }
.product-register-form .button { white-space: nowrap; }
.product-search { display: flex; align-items: center; gap: 10px; margin: 18px 18px 0; padding: 0 13px; border: 1px solid var(--line-silver); border-radius: 4px; background: #0f0f11; color: var(--gold-bright); }
.product-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12); }
.product-search input { width: 100%; min-height: 45px; padding: 10px 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.product-search input::placeholder { color: #85817a; }
.calculator-product-list { max-height: 490px; margin-top: 13px; overflow-y: auto; scrollbar-color: var(--surface-4) transparent; }
.calculator-product { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(110px, auto) auto; align-items: center; gap: 16px; padding: 17px 20px; border-top: 1px solid var(--line-silver); }
.calculator-product[hidden] { display: none; }
.calculator-product-name, .calculator-product-price { display: grid; }
.calculator-product-name strong { font: 500 1rem/1.35 var(--serif); }
.calculator-product-name small, .calculator-product-price small { color: var(--muted); font-size: 0.68rem; }
.calculator-product-price strong { color: var(--gold-bright); font-size: 0.9rem; }
.unit-pill { display: grid; min-width: 34px; height: 28px; place-items: center; border: 1px solid rgba(212, 175, 55, 0.2); border-radius: 999px; background: rgba(212, 175, 55, 0.08); color: var(--gold-bright); font-size: 0.7rem; font-weight: 800; }
.calculator-product-actions { display: flex; gap: 6px; }
.calculator-product-actions form { margin: 0; }
.product-search-empty { margin: 0; padding: 34px 24px; color: var(--muted); text-align: center; }
.calculator-empty { border: 0; background: transparent; }
.quote-list { display: grid; margin-top: 18px; }
.quote-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding-block: 17px; border-bottom: 1px solid var(--line-silver); }
.quote-item > div { display: grid; }
.quote-item small { color: var(--muted); }
.quote-item > strong { color: var(--gold-bright); white-space: nowrap; }
.quote-item form { margin: 0; }
.quote-grand-total { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding: 22px; border: 1px solid var(--gold-soft); background: rgba(212, 175, 55, 0.08); }
.admin-user-list { display: grid; margin-top: 18px; }
.admin-user { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding-block: 16px; border-bottom: 1px solid var(--line-silver); }
.admin-user:last-child { border-bottom: 0; }
.admin-user > div { display: grid; }
.admin-user small { color: var(--muted); }
.user-avatar { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(212, 175, 55, 0.08); color: var(--gold-bright); font: 500 1.25rem/1 var(--serif); }
.narrow-page { width: min(720px, calc(100% - 48px)); }
.field-help, .field-help ul { margin: 3px 0 0; color: var(--muted); font-size: 0.74rem; }
.field-help ul { padding-left: 18px; }

/* Friendly 404 */
.error-page { min-height: 100vh; background: radial-gradient(circle at 86% 10%, rgba(212, 175, 55, 0.1), transparent 28%), var(--ink); }
.error-layout { display: grid; min-height: 100vh; place-items: center; padding: 40px 24px; }
.error-card { display: grid; width: min(1040px, 100%); grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr); overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: var(--shadow); }
.error-visual { position: relative; min-height: 610px; overflow: hidden; background: var(--surface-2); }
.error-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 8, 9, 0.92), transparent 65%); }
.error-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 58% center; }
.error-visual > span { position: absolute; z-index: 1; right: 30px; bottom: 20px; color: rgba(242, 202, 80, 0.82); font: 500 clamp(5rem, 11vw, 8.5rem)/1 var(--serif); letter-spacing: -0.06em; }
.error-content { display: flex; flex-direction: column; justify-content: center; padding: clamp(38px, 7vw, 78px); }
.error-brand { width: max-content; margin-bottom: 62px; }
.error-content h1 { max-width: 500px; margin: 13px 0 18px; font: 500 clamp(2.8rem, 5.5vw, 4.6rem)/0.98 var(--serif); letter-spacing: -0.035em; text-wrap: balance; }
.error-content > p { max-width: 520px; margin: 0; color: var(--muted); }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.error-content > small { margin-top: 24px; color: #88847c; }

.confirm-layout { display: grid; min-height: calc(100vh - 73px); place-items: center; padding: 40px 24px; }
.confirm-card { width: min(530px, 100%); padding: 42px; border: 1px solid rgba(255, 141, 134, 0.25); border-radius: 4px; background: var(--surface-2); box-shadow: var(--shadow); text-align: center; }
.danger-mark { display: grid; width: 50px; height: 50px; margin: 0 auto 22px; place-items: center; border: 1px solid rgba(255, 141, 134, 0.55); border-radius: 50%; color: var(--danger); font: 600 1.6rem/1 var(--serif); }
.confirm-card h1 { margin: 12px 0; font: 500 2.2rem/1.1 var(--serif); }
.confirm-card p { margin: 0; color: var(--muted); }
.confirm-card p strong { color: var(--text); }
.confirm-actions { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }

@media (max-width: 1040px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid .button { justify-self: start; }
  .admin-product { grid-template-columns: 70px 1fr; }
  .admin-product-actions { grid-column: 2; justify-content: start; }
  .admin-product-main { grid-template-columns: 1fr 110px minmax(180px, auto); }
  .filter-form { grid-template-columns: 1fr 1fr 1fr auto; }
  .clear-filter { grid-column: 1 / -1; justify-self: start; }
  .product-detail { grid-template-columns: 1fr 0.9fr; }
  .product-detail-media { min-height: 560px; }
}

@media (max-width: 820px) {
  .shell, .admin-shell { width: min(100% - 30px, 700px); }
  .hero { min-height: 580px; margin-top: 16px; place-items: end start; }
  .hero-shade { background: linear-gradient(0deg, rgba(7, 7, 8, 0.97) 3%, rgba(7, 7, 8, 0.7) 58%, rgba(7, 7, 8, 0.08)); }
  .hero-copy { width: 100%; padding: 36px; }
  .hero h1 { max-width: 650px; font-size: clamp(2.8rem, 10vw, 4.4rem); }
  .section-heading { align-items: start; flex-direction: column; gap: 16px; }
  .catalog { padding-block: 78px 85px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 45px; }
  .footer-brand { grid-column: 1 / -1; }
  .login-layout { grid-template-columns: 1fr; }
  .login-visual { height: clamp(230px, 42vw, 320px); min-height: 0; }
  .login-visual > img { object-position: 62% 55%; }
  .login-visual-copy { left: 30px; right: 30px; bottom: 30px; }
  .login-panel { padding: 46px 24px; }
  .login-box > .brand { display: flex; width: max-content; margin: 0 auto 46px; }
  .filter-form { grid-template-columns: 1fr 1fr; }
  .filter-search { grid-column: 1 / -1; }
  .admin-product-main { grid-template-columns: 1fr auto; }
  .status-row { grid-column: 1 / -1; }
  .product-detail { grid-template-columns: 1fr; }
  .product-detail-media { min-height: auto; aspect-ratio: 4 / 3; }
  .product-detail-media img { object-position: center; }
  .admin-two-columns, .calculator-layout { grid-template-columns: 1fr; }
  .error-card { grid-template-columns: 1fr; }
  .error-visual { min-height: 260px; max-height: 340px; }
  .error-content { padding: 44px 36px 50px; }
  .error-brand { display: flex; margin: 0 auto 42px; }
}

@media (max-width: 620px) {
  .shell, .admin-shell { width: min(100% - 24px, 560px); }
  .site-header .brand img { width: 42px; height: 42px; }
  .header-inner { position: relative; min-height: 68px; }
  .site-header .header-inner > .brand { position: absolute; left: 50%; transform: translateX(-50%); }
  .menu-toggle { display: inline-flex; }
  .site-header .menu-toggle, .site-header .detail-header-link { margin-left: auto; }
  .site-nav {
    position: absolute;
    top: calc(100% - 1px);
    right: 0;
    display: none;
    width: min(270px, calc(100vw - 24px));
    align-items: stretch;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: rgba(14, 14, 15, 0.98);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: grid; }
  .site-nav a,
  .site-nav a:nth-child(2) { display: flex; min-height: 44px; align-items: center; padding: 10px 12px; font-size: 0.72rem; }
  .site-nav .nav-admin { padding: 10px 12px; }
  .hero { min-height: 540px; }
  .hero-copy { padding: 28px 22px; }
  .hero p { font-size: 0.96rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .product-grid { grid-template-columns: 1fr; }
  .product-description { min-height: auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; padding-block: 54px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; padding-block: 55px 42px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .admin-header-inner { min-height: 66px; flex-direction: column; gap: 10px; padding-block: 12px; }
  .admin-header-inner > .brand { margin-inline: auto; }
  .admin-header .brand small { display: none; }
  .admin-utilities { justify-content: center; gap: 14px; }
  .admin-utilities .button { min-height: 36px; padding: 7px 9px; font-size: 0.64rem; }
  .admin-tabs { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 12px; }
  .admin-tabs a { text-align: center; }
  .admin-titlebar { align-items: stretch; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid article { min-height: 85px; }
  .management-card { padding: 16px; }
  .calculator-panel, .calculator-products { padding: 0; }
  .calculator-panel .compact-form { padding: 22px 16px; }
  .calculator-card-heading, .calculator-products > .management-heading, .product-register { padding-inline: 16px; }
  .product-register-form { grid-template-columns: 1fr; }
  .product-register-form .button { width: 100%; }
  .calculator-product { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; padding-inline: 16px; }
  .calculator-product .unit-pill { justify-self: end; }
  .calculator-product-price { grid-row: 2; }
  .calculator-product-actions { grid-column: 2; grid-row: 2; }
  .calculator-total { align-items: start; flex-direction: column; }
  .filter-form { grid-template-columns: 1fr; }
  .filter-search { grid-column: auto; }
  .admin-product { grid-template-columns: 60px 1fr; gap: 12px; }
  .admin-product-image { width: 60px; height: 60px; }
  .admin-product-main { grid-template-columns: 1fr; gap: 8px; }
  .status-row { grid-column: auto; }
  .admin-product-actions { grid-column: 1 / -1; justify-content: start; }
  .admin-product-actions form { flex: 1 1 140px; }
  .action-button { width: 100%; }
  .form-card { padding: 20px 16px; }
  .image-upload-grid, .form-grid, .switch-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .image-preview { max-height: 270px; }
  .switch-row { min-height: 82px; }
  .form-actions, .confirm-actions { flex-direction: column-reverse; }
  .form-actions .button, .confirm-actions .button { width: 100%; }
  .confirm-card { padding: 32px 20px; }
  .date-filter { align-items: stretch; flex-direction: column; }
  .date-filter .field-group { width: 100%; }
  .date-filter .button { width: 100%; }
  .quote-item { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .quote-item form { grid-column: 1 / -1; }
  .quote-item .icon-action { width: 100%; }
  .narrow-page { width: min(100% - 24px, 560px); }
}

@media (max-width: 420px) {
  .login-visual { height: 190px; }
  .login-visual-copy { left: 22px; right: 22px; bottom: 20px; }
  .login-visual-copy p { font-size: 1.55rem; }
  .login-panel { padding: 34px 18px 42px; }
  .login-box > .brand { margin-bottom: 34px; }
  .detail-header-link { display: none; }
  .product-detail-content { padding: 30px 20px; }
  .management-heading { align-items: start; flex-direction: column; gap: 8px; }
  .error-layout { padding: 12px; }
  .error-visual { min-height: 210px; }
  .error-visual > span { right: 18px; bottom: 12px; }
  .error-content { padding: 34px 20px 38px; }
  .error-content h1 { font-size: 2.65rem; }
  .error-actions { align-items: stretch; flex-direction: column; }
  .error-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
