/* ==========================================================
   Lumi shop admin — same material palette as the storefront,
   with a few functional colours for status and errors.
   ========================================================== */
:root {
  --ivory: #EEEDE6;
  --paper: #F8F7F2;
  --card: #FCFBF8;
  --putty: #DCDAD0;
  --line: rgba(46, 37, 32, .1);
  --taupe: #A69A8A;
  --taupe-ink: #6B6053;
  --terra: #A8634C;
  --terra-deep: #8B4D3A;
  --terra-tint: #EBD6CB;
  --oak: #9B7E62;
  --oak-deep: #6E5641;
  --ink: #2E2520;
  --ok: #3F6B4B;
  --ok-tint: #DFEADB;
  --warn: #9A5B12;
  --warn-tint: #F4E4CC;
  --danger: #A3352A;
  --danger-tint: #F6DFDA;

  --grad-terra: linear-gradient(135deg, #B26D55 0%, var(--terra-deep) 60%, #7A4231 100%);
  --shadow-sm: 0 1px 2px rgba(46, 37, 32, .05), 0 2px 8px -4px rgba(46, 37, 32, .1);
  --shadow-md: 0 2px 4px rgba(46, 37, 32, .04), 0 16px 36px -18px rgba(46, 37, 32, .35);
  --shadow-lg: 0 4px 10px rgba(46, 37, 32, .06), 0 36px 72px -28px rgba(46, 37, 32, .5);
  --radius: 18px;
  --radius-sm: 12px;
  --display: "Geologica", "Avenir Next", system-ui, sans-serif;
  --font: "Onest", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --sidebar: 260px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--ivory); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
code, .mono { font-family: var(--mono); font-size: .86em; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
::selection { background: var(--terra-tint); }
:focus-visible { outline: 2.5px solid var(--terra-deep); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
.muted { color: var(--taupe-ink); }
.nowrap { white-space: nowrap; }
.warn { color: var(--warn); font-weight: 600; }
.link { color: var(--terra-deep); font-weight: 600; text-decoration: none; font-size: 14px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--terra-deep); margin-bottom: 4px; }
.stack { display: grid; gap: 18px; }
.stack-lg { display: grid; gap: 20px; }
/* short forms (settings, users, account): cards side by side across the full width */
.form-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; align-items: start; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .3s var(--ease), transform .15s;
}
.btn:active { transform: scale(.97); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--grad-terra); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 18px -10px rgba(139, 77, 58, .9); }
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 12px 24px -10px rgba(139, 77, 58, 1); }
.btn-primary:disabled { background: var(--taupe); box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: rgba(255, 255, 255, .55); border-color: var(--line); }
.btn-ghost:hover { background: #fff; border-color: rgba(46, 37, 32, .22); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8C2B22; }
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { background: var(--danger-tint); border-color: rgba(163, 53, 42, .3); }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: 13.5px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; flex: none;
  border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--taupe-ink);
  transition: background-color .2s, color .2s;
}
.icon-btn:hover { background: rgba(46, 37, 32, .07); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; background: none; }
.icon-btn.danger:hover { background: var(--danger-tint); color: var(--danger); }
.icon-sm { width: 30px; height: 30px; }
.icon-sm .icon { width: 16px; height: 16px; }
.row-actions { display: flex; gap: 2px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { display: contents; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 0% 0%, rgba(168, 99, 76, .28), transparent 60%), var(--ink);
  color: #D9D3C8; padding: 18px 14px; overflow-y: auto; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--grad-terra); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 14px -6px rgba(139, 77, 58, .9); flex: none; }
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: grid; line-height: 1.1; }
.brand-text b { font-family: var(--display); font-size: 1.4rem; font-weight: 600; letter-spacing: -.05em; color: #fff; }
.brand-text small { font-size: 12px; color: #A79F92; }
.sidebar-close { display: none; margin-left: auto; color: #D9D3C8; }
.nav { display: grid; gap: 2px; }
.nav-label { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8F877B; padding: 16px 12px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; font-weight: 500;
  transition: background-color .2s, color .2s;
}
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link.is-active { background: var(--grad-terra); color: #fff; box-shadow: 0 8px 18px -10px rgba(168, 99, 76, 1); }
.sidebar-foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; gap: 4px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-foot form { display: contents; }
.sidebar-foot .icon-btn { color: #B9B1A5; }
.sidebar-foot .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.user-chip { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; text-decoration: none; }
.user-chip:hover, .user-chip.is-active { background: rgba(255, 255, 255, .07); }
.user-meta { display: grid; min-width: 0; line-height: 1.25; }
.user-meta b { color: #fff; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: #A79F92; font-size: 12px; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; background: linear-gradient(140deg, var(--oak), var(--terra-deep)); font-size: 14px; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 40px;
  background: rgba(238, 237, 230, .82); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.burger { display: none; }
.topbar-title { font-family: var(--display); font-weight: 500; font-size: 17px; letter-spacing: -.02em; display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ET · EN · RU switch (top bar and sign-in page) */
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(46, 37, 32, .06); }
.lang-switch button {
  border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .06em; line-height: 1;
  padding: 7px 10px; border-radius: 999px; color: var(--taupe-ink); cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); cursor: default; }
.lang-switch button:focus-visible { outline: 2.5px solid var(--terra-deep); outline-offset: 1px; }
.page { width: 100%; padding: 32px 40px 120px; }
.page:focus { outline: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.15rem); }
.page-sub { color: var(--taupe-ink); margin-top: 6px; max-width: 70ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.page-actions form { display: contents; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--taupe-ink); margin-bottom: 6px; }
.crumbs a { text-decoration: none; font-weight: 500; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .icon { width: 14px; height: 14px; }
.title-with-pill { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.title-with-pill .pill { font-family: var(--font); letter-spacing: 0; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.card-head .card-title { margin-bottom: 0; }
.card-title { font-size: 17px; letter-spacing: -.02em; margin-bottom: 16px; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; margin: 22px -22px -22px; padding: 14px 22px; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: rgba(238, 237, 230, .45); font-size: 14px; }
.table-card { padding: 0; overflow: hidden; }

/* ---------- notices + toasts ---------- */
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 14.5px; border: 1px solid transparent; }
.notice .icon { margin-top: 1px; }
.notice ul { padding-left: 18px; margin-top: 4px; }
.notice a { color: inherit; }
.notice-error { background: var(--danger-tint); color: #7E271F; border-color: rgba(163, 53, 42, .2); }
.notice-success { background: var(--ok-tint); color: var(--ok); }
.notice-info { background: #EAE7DE; color: var(--taupe-ink); }
.error-summary:focus { outline: 2px solid var(--danger); }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; gap: 10px; width: min(420px, calc(100% - 32px)); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 16px;
  background: var(--ink); color: var(--paper); box-shadow: var(--shadow-lg); font-size: 14.5px; font-weight: 500;
  animation: toastIn .5s var(--ease-out) both;
}
.toast > span { flex: 1; }
.toast .icon:first-child { color: #9DD0A9; }
.toast-error { background: #6E2019; }
.toast-error .icon:first-child { color: #F6BDB2; }
.toast-close { border: 0; background: none; padding: 4px; border-radius: 8px; cursor: pointer; color: inherit; opacity: .7; display: grid; }
.toast-close:hover { opacity: 1; background: rgba(255, 255, 255, .1); }
.toast.is-leaving { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field > .segmented { justify-self: start; }
.card > .field + .field, .card > fieldset + fieldset, .card > fieldset + .field, .card > .field + fieldset { margin-top: 20px; }
legend.label { padding: 0; margin-bottom: 8px; }
.label { font-weight: 600; font-size: 14px; }
.label .req, .label .opt { font-weight: 500; font-size: 12px; color: var(--taupe-ink); margin-left: 4px; }
.label .req { color: var(--terra-deep); }
.hint { font-size: 13px; color: var(--taupe-ink); line-height: 1.45; }
.field-error { font-size: 13px; font-weight: 500; color: var(--danger); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--putty); border-radius: var(--radius-sm);
  background: #fff; font-size: 15px; transition: border-color .2s, box-shadow .2s;
}
.input::placeholder, .textarea::placeholder { color: #A39A8E; }
.input:hover, .select:hover, .textarea:hover { border-color: #C9C5B8; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 4px rgba(168, 99, 76, .16); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(163, 53, 42, .1); }
.input-lg { font-size: 17px; min-height: 50px; font-weight: 500; }
.input-sm { min-height: 34px; padding: 6px 10px; font-size: 13.5px; border-radius: 9px; }
.textarea { resize: vertical; line-height: 1.5; }
.select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6053' stroke-width='2'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") right 12px center / 16px no-repeat;
}
.select-sm { min-height: 34px; padding: 4px 34px 4px 12px; font-size: 13.5px; border-radius: 9px; }
.input-affix { position: relative; }
.input-affix .input { padding-right: 42px; }
.affix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--taupe-ink); font-weight: 600; pointer-events: none; }
.affix-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; border-radius: 9px; display: grid; place-items: center; color: var(--taupe-ink); cursor: pointer; }
.affix-btn:hover { background: rgba(46, 37, 32, .06); color: var(--ink); }
.input-short { max-width: 200px; }
.char-count { font-size: 12px; color: var(--taupe-ink); text-align: right; margin-top: -2px; }
.char-count.is-near { color: var(--warn); }
.check { width: 18px; height: 18px; accent-color: var(--terra-deep); cursor: pointer; }
.check-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 6px 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 42px; height: 24px; flex: none; border-radius: 999px; background: var(--putty); transition: background-color .25s; margin-top: 1px; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(46, 37, 32, .3); transition: transform .3s var(--ease-out); }
.switch input:checked + .switch-track { background: var(--terra-deep); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2.5px solid var(--terra-deep); outline-offset: 2px; }
.switch > span:last-child { display: grid; line-height: 1.35; }
.switch b { font-weight: 600; font-size: 14.5px; }
.switch small { color: var(--taupe-ink); font-size: 13px; }
.switch-list { display: grid; gap: 4px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.segmented { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(46, 37, 32, .06); gap: 2px; flex-wrap: wrap; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: block; padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--taupe-ink); transition: background-color .2s, color .2s, box-shadow .2s; }
.segmented label:hover span { color: var(--ink); }
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { outline: 2.5px solid var(--terra-deep); outline-offset: 1px; }

.radio-cards { display: grid; gap: 10px; margin-bottom: 14px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--putty); border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .2s, background-color .2s; }
.radio-card input { accent-color: var(--terra-deep); margin-top: 3px; }
.radio-card span { display: grid; }
.radio-card small { color: var(--taupe-ink); font-size: 13px; }
.radio-card:has(input:checked) { border-color: var(--terra-deep); background: #FBF3EE; }
fieldset:disabled .radio-card, fieldset:disabled .switch { opacity: .55; cursor: not-allowed; }

.color-field { display: flex; gap: 8px; align-items: center; }
.color-field input[type="color"], .palette-item input[type="color"] {
  appearance: none; -webkit-appearance: none; width: 44px; height: 44px; flex: none; padding: 0; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: none;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 9px; }
input[type="color"]::-moz-color-swatch { border: 0; border-radius: 9px; }
.color-field .input { max-width: 130px; font-family: var(--mono); text-transform: uppercase; }

.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { outline: 2.5px solid var(--terra-deep); outline-offset: 2px; }
.file-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 10px; }

/* tabs */
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 18px; background: rgba(46, 37, 32, .05); border-radius: 14px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; font-weight: 500; color: var(--taupe-ink); white-space: nowrap; transition: background-color .2s, color .2s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.tab-code { font-weight: 700; font-size: 12px; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; background: rgba(46, 37, 32, .07); }
.tab[aria-selected="true"] .tab-code { background: var(--terra-tint); color: var(--terra-deep); }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--taupe); }
.tab-dot.is-error { background: var(--danger); }
.tab-panel { animation: fadeUp .35s var(--ease-out); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

/* form layout */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 26%, 440px); gap: 20px; align-items: start; }
.form-main, .form-side { display: grid; gap: 20px; min-width: 0; }
.form-side .card { display: grid; gap: 14px; }
.form-side .card-title { margin-bottom: 0; }
.save-bar {
  position: fixed; left: calc(var(--sidebar) + 24px); right: 24px; bottom: 20px; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 20px;
  background: var(--ink); color: var(--paper); border-radius: 999px; box-shadow: var(--shadow-lg);
  transform: translateY(calc(100% + 40px)); transition: transform .5s var(--ease-out); max-width: 760px; margin: 0 auto;
}
.is-dirty .save-bar { transform: none; }
.save-state { font-weight: 500; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.is-dirty .save-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #E9A88F; }

/* ---------- toolbar + tables ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.search { position: relative; flex: 1 1 260px; display: block; }
.search > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--taupe-ink); pointer-events: none; width: 18px; height: 18px; }
.search .input { padding-left: 40px; border-radius: 999px; }
.select-wrap .select { border-radius: 999px; min-width: 196px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--taupe-ink); padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(238, 237, 230, .5); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:hover { background: rgba(235, 214, 203, .22); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .num s { display: block; font-size: 12.5px; }
.col-check { width: 44px; }
.col-actions { width: 1%; white-space: nowrap; }
.col-actions .row-actions { flex-wrap: nowrap; }
.table tbody tr:has(.check:checked) { background: rgba(235, 214, 203, .4); }
.cell-product { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 220px; }
.cell-product b { display: block; font-weight: 600; }
.cell-product small { color: var(--taupe-ink); font-size: 13px; }
.cell-product:hover b { color: var(--terra-deep); }
.thumb { width: 48px; height: 48px; flex: none; border-radius: 12px; overflow: hidden; display: grid; place-items: center; color: var(--taupe-ink); box-shadow: inset 0 0 0 1px var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; background: var(--terra-tint); border-bottom: 1px solid rgba(139, 77, 58, .15); font-size: 14px; animation: fadeUp .3s var(--ease-out); }
.bulk-bar .select { background-color: #fff; width: auto; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-active { background: var(--ok-tint); color: var(--ok); }
.pill-draft { background: #EAE6DC; color: var(--taupe-ink); }
.pill-archived { background: rgba(46, 37, 32, .08); color: var(--ink); }
.pill-admin { background: var(--terra-tint); color: var(--terra-deep); }
.pill-editor { background: #E6E1D6; color: var(--oak-deep); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; font-size: 14px; }

/* ---------- empty states ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 24px; }
.empty h2 { font-size: 20px; }
.empty .btn { margin-top: 8px; }
.empty-sm { padding: 28px 16px; }
.empty-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, #fff, var(--terra-tint)); color: var(--terra-deep); }
.empty-icon .icon { width: 26px; height: 26px; }

/* ---------- dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  position: relative; overflow: hidden; display: grid; gap: 2px; padding: 20px; border-radius: var(--radius); text-decoration: none;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .4s var(--ease-out), box-shadow .3s;
}
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(235, 214, 203, .9), transparent 70%); }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--grad-terra); margin-bottom: 10px; position: relative; z-index: 1; }
.stat:nth-child(2) .stat-icon { background: linear-gradient(135deg, var(--taupe), var(--oak-deep)); }
.stat:nth-child(3) .stat-icon { background: linear-gradient(135deg, var(--oak), var(--oak-deep)); }
.stat:nth-child(4) .stat-icon { background: linear-gradient(135deg, #4A3B33, var(--ink)); }
.stat-num { font-family: var(--display); font-size: 2.1rem; font-weight: 400; letter-spacing: -.05em; line-height: 1.1; }
.stat-label { color: var(--taupe-ink); font-size: 14px; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.todo { list-style: none; display: grid; gap: 4px; }
.todo a { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 -10px; border-radius: 12px; text-decoration: none; transition: background-color .2s; }
.todo a:hover { background: rgba(235, 214, 203, .35); }
.todo a > span:nth-child(2) { flex: 1; }
.todo .chev { color: var(--taupe); }
.todo-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #EFEBE2; color: var(--oak-deep); flex: none; }
.todo-icon.is-warn { background: var(--warn-tint); color: var(--warn); }
.todo-icon .icon { width: 18px; height: 18px; }
.mini-list { list-style: none; display: grid; gap: 2px; }
.mini-list a { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 12px; text-decoration: none; transition: background-color .2s; }
.mini-list a:hover { background: rgba(235, 214, 203, .35); }
.mini-list .thumb { width: 42px; height: 42px; border-radius: 10px; }
.mini-main { flex: 1; min-width: 0; display: grid; }
.mini-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-main small { color: var(--taupe-ink); font-size: 13px; }
.kv { margin: 0; display: grid; }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.kv dt { color: var(--taupe-ink); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.quick-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(46, 37, 32, .05); text-decoration: none; font-weight: 500; font-size: 14px; transition: background-color .2s; }
.quick-link:hover { background: var(--terra-tint); }
.quick-link .icon { width: 17px; height: 17px; }
.timeline { list-style: none; display: grid; gap: 12px; }
.timeline li { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: baseline; font-size: 14px; }
.timeline time { font-size: 12.5px; white-space: nowrap; }
.tl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--taupe); margin-right: 6px; }
.tl-create, .tl-upload, .tl-duplicate { background: #6C9B76; }
.tl-update, .tl-status { background: var(--terra); }
.tl-delete { background: var(--danger); }
.tl-sign_in, .tl-sign_out { background: var(--putty); }
.timeline .tl-dot { margin: 0; }

/* ---------- images ---------- */
.images-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 14px; }
.images-grid:empty { display: none; }
.image-tile { position: relative; display: grid; gap: 8px; padding: 8px; border-radius: 16px; background: #fff; border: 1px solid var(--line); cursor: grab; transition: box-shadow .3s, transform .3s var(--ease-out), opacity .2s; }
.image-tile:hover { box-shadow: var(--shadow-md); }
.image-tile.is-dragging { opacity: .4; }
.image-tile.is-over { transform: scale(1.03); box-shadow: 0 0 0 2px var(--terra); }
.image-tile.is-new { animation: tileIn .5s var(--ease-out); }
@keyframes tileIn { from { opacity: 0; transform: scale(.9); } }
.image-frame { aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.primary-badge { position: absolute; top: 14px; left: 14px; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600; display: none; }
.image-tile:first-child .primary-badge { display: block; }
.image-tile:first-child { border-color: rgba(139, 77, 58, .4); box-shadow: 0 0 0 1px rgba(139, 77, 58, .25); }
.tile-tools { position: absolute; top: 12px; right: 12px; display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: rgba(252, 251, 248, .92); box-shadow: var(--shadow-sm); opacity: 0; transition: opacity .2s; }
.image-tile:hover .tile-tools, .image-tile:focus-within .tile-tools { opacity: 1; }
.tile-tools .icon-btn { width: 30px; height: 30px; border-radius: 8px; }
.tile-tools .icon { width: 16px; height: 16px; }
.image-tile.is-busy { opacity: .5; pointer-events: none; }
.dropzone {
  position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 28px 20px; border-radius: 16px; cursor: pointer;
  border: 1.5px dashed #C9C2B4; background: repeating-linear-gradient(135deg, rgba(235, 214, 203, .18) 0 12px, transparent 12px 24px), #fff;
  transition: border-color .2s, background-color .2s, transform .3s var(--ease-out);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--terra); background-color: #FBF3EE; }
.dropzone.is-over { transform: scale(1.01); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone:focus-within { outline: 2.5px solid var(--terra-deep); outline-offset: 2px; }
.dz-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--terra-tint); color: var(--terra-deep); margin-bottom: 4px; }
.dz-text b { color: var(--terra-deep); }
.dz-progress { position: absolute; left: 16px; right: 16px; bottom: 10px; height: 4px; border-radius: 2px; background: var(--putty); overflow: hidden; opacity: 0; transition: opacity .2s; }
.dz-progress span { display: block; height: 100%; width: 0; background: var(--grad-terra); transition: width .2s; }
.dropzone.is-uploading .dz-progress { opacity: 1; }
.dz-status { font-size: 13.5px; margin-top: 8px; min-height: 1em; }
.dz-status.is-error { color: var(--danger); }
.dz-files { font-size: 13px; color: var(--ink); font-weight: 500; }

/* ---------- categories ---------- */
.cat-list { list-style: none; display: grid; gap: 14px; }
.cat-card { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 14px; }
.cat-card.is-hidden { opacity: .7; }
.cat-visual { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; display: grid; place-items: center; }
.cat-visual img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 10px rgba(46, 37, 32, .3)); transform: scale(1.4); }
.cat-pos { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(252, 251, 248, .9); font-size: 12px; font-weight: 700; }
.cat-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-title h2 { font-size: 20px; }
.cat-title a { text-decoration: none; }
.cat-title a:hover { color: var(--terra-deep); }
.cat-body .muted { margin-top: 4px; font-size: 14px; }
.cat-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--taupe-ink); }
.cat-actions { display: flex; align-items: center; gap: 6px; }
.cat-actions form { display: contents; }
.move-group { display: flex; }
.swatch-terra { background: radial-gradient(120% 90% at 15% 0%, rgba(214, 149, 123, .55), transparent 55%), linear-gradient(160deg, var(--terra), #7A4231); }
.swatch-ivory { background: radial-gradient(100% 80% at 85% 10%, #fff, transparent 55%), linear-gradient(160deg, #F4F3EE, #E2DFD4); }
.swatch-taupe { background: linear-gradient(160deg, #B2A797, #978A79); }
.swatch-oak { background: linear-gradient(180deg, rgba(46, 37, 32, .15), rgba(46, 37, 32, .4)), repeating-linear-gradient(176deg, #A88A6C 0 3px, #9B7E62 3px 5px, #A68567 5px 9px); }
.swatch-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.swatch-option { display: grid; gap: 6px; justify-items: center; text-align: center; font-size: 13px; font-weight: 500; cursor: pointer; }
.swatch-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch-chip { position: relative; width: 100%; aspect-ratio: 5 / 3; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s var(--ease-out), box-shadow .2s; }
.swatch-chip .punch { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--ivory); box-shadow: inset 0 1px 2px rgba(46, 37, 32, .4); }
.swatch-option:hover .swatch-chip { transform: translateY(-2px); }
.swatch-option input:checked + .swatch-chip { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--terra-deep); }
.swatch-option input:focus-visible + .swatch-chip { outline: 2.5px solid var(--terra-deep); outline-offset: 5px; }
.cat-preview { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 160px; padding: 0 24px; border-radius: 16px; margin-top: 4px; transition: background .4s; }
.cat-preview-copy { display: grid; }
.cat-preview-copy b { font-family: var(--display); font-weight: 400; font-size: 32px; letter-spacing: -.05em; line-height: 1; }
.cat-preview-copy small { opacity: .75; }
.cat-preview.tone-light { color: #fff; }
.cat-preview img { height: 220%; width: auto; filter: drop-shadow(0 16px 16px rgba(46, 37, 32, .35)); margin-right: -20px; }

/* ---------- texts ---------- */
.content-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.subnav { position: sticky; top: 80px; display: grid; gap: 2px; }
.search-block { margin-bottom: 10px; }
.subnav-link { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; text-decoration: none; font-weight: 500; font-size: 14.5px; color: var(--taupe-ink); transition: background-color .2s, color .2s; }
.subnav-link:hover { background: rgba(46, 37, 32, .05); color: var(--ink); }
.subnav-link.is-active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.subnav-link .count { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: rgba(46, 37, 32, .06); }
.subnav-link.is-active .count { background: var(--terra-tint); color: var(--terra-deep); }
.content-card { padding-bottom: 0; }
.lang-toggle { display: flex; gap: 4px; }
.lang-toggle label { cursor: pointer; }
.lang-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lang-toggle span { display: block; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; border: 1px solid var(--putty); color: var(--taupe-ink); transition: all .2s; }
.lang-toggle input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.lang-toggle input:focus-visible + span { outline: 2.5px solid var(--terra-deep); outline-offset: 2px; }
.text-rows { display: grid; margin: 0 -22px; }
.text-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 16px 22px; border-top: 1px solid var(--line); }
.text-row:focus-within { background: rgba(235, 214, 203, .18); }
.text-key { display: grid; align-content: start; gap: 3px; }
.text-key b { font-weight: 600; font-size: 14px; }
.text-key code { color: var(--taupe-ink); font-size: 12px; word-break: break-all; }
.text-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.text-value { position: relative; display: grid; gap: 4px; }
.lang-label { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; color: var(--taupe-ink); }
.text-value .input, .text-value .textarea { font-size: 14.5px; min-height: 40px; padding: 8px 12px; }
.text-value.is-changed .input, .text-value.is-changed .textarea { border-color: var(--terra); background: #FFFBF8; }
.restore { justify-self: start; border: 0; background: none; padding: 0; font-size: 12.5px; color: var(--terra-deep); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- design ---------- */
.design-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 30%, 520px); gap: 20px; align-items: start; }
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 12px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .2s; }
.palette-item:focus-within { border-color: var(--terra); }
.palette-item.has-error { border-color: var(--danger); }
.palette-meta { display: grid; gap: 2px; flex: 1; min-width: 0; }
.palette-meta label { font-size: 13px; font-weight: 600; }
.palette-meta .input { text-transform: uppercase; max-width: 110px; }
.hero-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.hero-slot { display: grid; gap: 8px; justify-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.hero-slot.has-error { border-color: var(--danger); }
.hero-slot-img { width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--grad-terra); display: grid; place-items: center; }
.hero-slot-img img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.3); filter: drop-shadow(0 10px 10px rgba(46, 37, 32, .3)); }
.preview-sticky { position: sticky; top: 80px; display: grid; gap: 12px; }
.preview-sticky {
  --pv-ivory: var(--ivory); --pv-paper: var(--paper); --pv-putty: var(--putty); --pv-taupe: var(--taupe); --pv-taupe-ink: var(--taupe-ink);
  --pv-terra: var(--terra); --pv-terra-deep: var(--terra-deep); --pv-terra-tint: var(--terra-tint); --pv-oak: var(--oak); --pv-oak-deep: var(--oak-deep); --pv-ink: var(--ink);
  --pv-display: var(--display); --pv-font: var(--font);
}
.preview {
  border-radius: 20px; overflow: hidden; background: var(--pv-ivory); color: var(--pv-ink); font-family: var(--pv-font);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); transition: background-color .3s;
}
.pv-swatches { display: flex; gap: 6px; }
.pv-swatches span { flex: 1; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line); }
.pv-ticker { background: var(--pv-ink); color: var(--pv-ivory); font-size: 10.5px; text-align: center; padding: 5px; }
.pv-header { display: flex; justify-content: space-between; align-items: center; margin: 10px; padding: 8px 12px; border-radius: 999px; background: var(--pv-paper); }
.pv-logo { display: flex; align-items: center; gap: 6px; font-family: var(--pv-display); font-weight: 600; letter-spacing: -.05em; }
.pv-logo i { width: 16px; height: 16px; border-radius: 5px; background: linear-gradient(135deg, var(--pv-terra), var(--pv-terra-deep)); }
.pv-nav { display: flex; gap: 6px; }
.pv-nav i { width: 26px; height: 5px; border-radius: 3px; background: var(--pv-putty); }
.pv-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; align-items: center; padding: 12px 18px 18px; }
.pv-h1 { font-family: var(--pv-display); font-size: 25px; line-height: 1; letter-spacing: -.05em; font-weight: 400; }
.pv-h1 em { font-style: normal; font-weight: 500; background: linear-gradient(100deg, var(--pv-terra-deep), var(--pv-terra) 40%, var(--pv-oak)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv-text { font-size: 11px; color: var(--pv-taupe-ink); margin: 8px 0 10px; }
.pv-btn { display: inline-block; padding: 6px 12px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 600; background: linear-gradient(135deg, var(--pv-terra), var(--pv-terra-deep)); }
.pv-arch { aspect-ratio: .8; border-radius: 999px 999px 14px 14px; overflow: hidden; background: radial-gradient(closest-side at 30% 25%, var(--pv-terra-tint), transparent), linear-gradient(160deg, var(--pv-terra), var(--pv-terra-deep)); display: grid; place-items: end center; }
.pv-arch img { width: 130%; max-width: none; margin-bottom: -10%; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .25)); }
.pv-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 18px 18px; }
.pv-card { display: grid; gap: 2px; font-size: 11px; }
.pv-card b { font-weight: 600; }
.pv-card small { font-family: var(--pv-display); color: var(--pv-taupe-ink); }
.pv-img { aspect-ratio: 4 / 5; border-radius: 10px; background: var(--pv-paper); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); margin-bottom: 4px; }
.pv-img.t2 { background: var(--pv-terra-tint); }
.pv-img.t3 { background: var(--pv-putty); }
.pv-footer { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 18px; background: var(--pv-ink); color: var(--pv-ivory); border-radius: 16px 16px 0 0; }
.pv-footer span { font-family: var(--pv-display); font-weight: 600; letter-spacing: -.05em; color: var(--pv-terra); }
.pv-footer small { font-size: 10px; opacity: .7; }

/* ---------- reviews ---------- */
.review-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.review-card { display: flex; flex-direction: column; gap: 12px; }
.review-card.is-hidden { opacity: .65; }
.review-top { display: flex; justify-content: space-between; align-items: center; }
.review-card .stars { color: var(--terra); letter-spacing: 2px; }
.stars-off { color: var(--putty); }
.review-card blockquote { margin: 0; font-size: 15px; line-height: 1.5; flex: 1; }
.review-foot { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.review-foot > span:nth-child(2) { display: grid; flex: 1; line-height: 1.3; }
.review-foot small { font-size: 13px; }
.review-foot .avatar { width: 34px; height: 34px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 28px; line-height: 1; color: var(--putty); cursor: pointer; transition: color .15s, transform .2s var(--ease-out); }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--terra); }
.star-input label:hover { transform: scale(1.15); }
.star-input input:focus-visible + label { outline: 2.5px solid var(--terra-deep); outline-offset: 2px; border-radius: 4px; }

/* ---------- confirm dialog ---------- */
.confirm { border: 0; padding: 0; border-radius: 22px; width: min(420px, calc(100% - 32px)); background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); }
.confirm::backdrop { background: rgba(46, 37, 32, .4); backdrop-filter: blur(4px); }
.confirm[open] { animation: dlgIn .35s var(--ease-out); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.confirm form { padding: 26px; display: grid; gap: 10px; }
.confirm h2 { font-size: 20px; }
.confirm p { color: var(--taupe-ink); }
.confirm-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--danger-tint); color: var(--danger); }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* ---------- auth ---------- */
.auth-body { background: var(--ivory); }
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; min-height: 100dvh; }
.auth-art { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; color: #fff; background: var(--terra-deep); }
.auth-mesh { position: absolute; inset: -20%; z-index: -1; }
.auth-mesh i { position: absolute; border-radius: 50%; filter: blur(60px); animation: drift 18s ease-in-out infinite alternate; }
.auth-mesh i:nth-child(1) { width: 60%; height: 60%; left: 5%; top: 10%; background: #C98A70; }
.auth-mesh i:nth-child(2) { width: 50%; height: 60%; left: 45%; top: 35%; background: var(--oak); animation-delay: -6s; }
.auth-mesh i:nth-child(3) { width: 45%; height: 45%; left: 20%; top: 55%; background: #7A4231; animation-delay: -11s; }
@keyframes drift { 50% { transform: translate(-6%, 8%) scale(1.1); } 100% { transform: translate(5%, -4%) scale(.95); } }
.auth-swatches { position: absolute; top: 18%; left: 50%; width: 220px; height: 300px; transform: translateX(-50%); }
.auth-swatches span { position: absolute; left: 0; bottom: 0; width: 150px; height: 230px; border-radius: 14px; transform-origin: 14% 96%; box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .5); animation: fanOut 1.4s var(--ease-out) both; }
.auth-swatches span::after { content: ""; position: absolute; top: 14px; right: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--terra-deep); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .35); }
.auth-swatches .s1 { background: var(--terra); --r: -24deg; }
.auth-swatches .s2 { background: #F1F0EA; --r: -6deg; animation-delay: .08s; }
.auth-swatches .s3 { background: var(--taupe); --r: 12deg; animation-delay: .16s; }
.auth-swatches .s4 { background: repeating-linear-gradient(176deg, #A88A6C 0 3px, #9B7E62 3px 5px, #A68567 5px 9px); --r: 30deg; animation-delay: .24s; }
@keyframes fanOut { from { transform: rotate(0deg) translateY(30px); opacity: 0; } to { transform: rotate(var(--r)); } }
.auth-swatches span { transform: rotate(var(--r)); }
.auth-quote { font-family: var(--display); font-size: clamp(1.6rem, 1rem + 1.6vw, 2.4rem); font-weight: 400; letter-spacing: -.04em; line-height: 1.1; max-width: 16ch; }
.auth-panel { position: relative; display: grid; place-items: center; padding: 72px 24px 32px; }
.auth-lang { position: absolute; top: 20px; right: 24px; }
.auth-card { width: min(400px, 100%); display: grid; gap: 14px; }
.auth-card h1 { font-size: 2rem; margin-top: 18px; }
.auth-card .muted { margin-bottom: 8px; }
.brand-lg { padding: 0; }
.brand-lg .brand-text b { color: var(--ink); }
.brand-lg .brand-text small { color: var(--taupe-ink); }
.auth-card form { margin-top: 6px; }
.auth-card .notice { margin-bottom: 0; }
.auth-card .btn-primary { min-height: 48px; margin-top: 6px; }

/* ---------- error page ---------- */
.error-page { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 80px 24px; }
.auth-panel .error-page { padding: 24px; }
.error-code { font-family: var(--display); font-size: 5rem; font-weight: 300; letter-spacing: -.06em; line-height: 1; background: var(--grad-terra); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page .row-actions { justify-content: center; margin-top: 12px; gap: 8px; }

.scrim { position: fixed; inset: 0; z-index: 45; background: rgba(46, 37, 32, .4); backdrop-filter: blur(3px); opacity: 0; transition: opacity .3s; }
.scrim.is-on { opacity: 1; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1240px) {
  .design-layout { grid-template-columns: 1fr; }
  .preview-col { order: -1; }
  .preview-sticky { position: static; max-width: 520px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-side { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .subnav { position: static; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav .search-block { flex: 0 0 220px; margin: 0; }
  .subnav-link { flex: none; background: rgba(46, 37, 32, .04); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%);
    transition: transform .45s var(--ease-out), visibility 0s .45s; visibility: hidden; box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: none; visibility: visible; transition: transform .45s var(--ease-out); }
  .sidebar-close { display: inline-grid; }
  .burger { display: inline-grid; margin-left: -8px; }
  .topbar { padding: 0 20px; }
  .topbar-title { display: block; }
  .page { padding: 24px 20px 120px; }
  .save-bar { left: 16px; right: 16px; bottom: 16px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 240px; padding: 28px; }
  .auth-swatches { top: 20px; transform: translateX(-50%) scale(.6); transform-origin: top center; }
  .auth-quote { font-size: 1.4rem; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .page-head { align-items: flex-start; }
  .page-actions { width: 100%; }
  .page-actions .btn-primary { flex: 1; }
  .topbar-actions .btn span { display: none; }
  .card { padding: 18px; }
  .card-foot { margin: 18px -18px -18px; padding: 12px 18px; }
  .field-row { grid-template-columns: 1fr; }
  .switch-list { grid-template-columns: 1fr; }
  .stats { gap: 10px; }
  .stat { padding: 16px; }
  .stat-num { font-size: 1.7rem; }
  .toolbar > * { flex: 1 1 100%; }
  .segmented { justify-content: space-between; }
  .segmented label { flex: 1; text-align: center; }

  /* tables become stacked cards */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { position: relative; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { padding: 3px 0; border: 0; text-align: left !important; }
  .table td[data-label] { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
  .table td[data-label]::before { content: attr(data-label); color: var(--taupe-ink); font-size: 13px; }
  .table td[data-label="Product"], .table td[data-label="Name"] { display: block; margin-bottom: 6px; }
  .table td[data-label="Product"]::before, .table td[data-label="Name"]::before { display: none; }
  .table .num s { display: inline; margin-left: 6px; }
  .table .col-check { position: absolute; right: 12px; top: 14px; width: auto; }
  .table .col-actions { width: auto; margin-top: 6px; }
  .table .row-actions { justify-content: flex-start; }
  .table-products .cell-product { padding-right: 32px; min-width: 0; }

  .text-row { grid-template-columns: 1fr; gap: 8px; }
  .text-values { grid-template-columns: 1fr; }
  .cat-card { grid-template-columns: 96px minmax(0, 1fr); }
  .cat-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .swatch-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-slots { grid-template-columns: 1fr 1fr; }
  .save-bar { padding-left: 16px; }
  .save-state { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
