/* ALBER admin — editorial, warm, mobile-first */
:root {
  --off-white: #FAF8F3; --white: #FFFFFF; --warm-black: #1A1814; --warm-gray: #6B6560; --warm-gray-light: #B8B2A8;
  --border: #EDE8E0; --border-strong: #DDD6CA; --beige: #F5EFE0; --beige-soft: #F7F4EE;
  --emerald: #2D6A4F; --emerald-light: #40916C; --emerald-pale: #D8F3DC; --emerald-ink: #1F4D39;
  --khaki: #8B9D6A; --gold: #D4AF37; --gold-pale: #FBF3D9; --red: #C0392B; --red-pale: #FBE9E7; --blue-pale: #E6EEF7; --blue: #3B5F8A;
  --radius: 14px; --radius-sm: 10px; --radius-xs: 7px;
  --shadow: 0 1px 2px rgba(26,24,20,.04), 0 6px 20px rgba(26,24,20,.06);
  --shadow-lg: 0 12px 40px rgba(26,24,20,.16);
  /* Song Myung ships only latin + korean glyphs: keep it for the Latin wordmark / version chip, use a serif with
     cyrillic + latin-ext (ə ğ ş) for every translated title so RU/AZ headings render in one consistent face */
  --font-wordmark: 'Song Myung', 'Noto Serif', Georgia, serif;
  --font-display: 'Noto Serif', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 64px; --top-h: 60px; --sidebar-w: 260px; --content-max: 1280px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--off-white); color: var(--warm-black); font: 15px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; }
body.lock { position: fixed; left: 0; right: 0; overflow: hidden; width: 100%; }
a { color: var(--emerald); text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
code { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--beige); padding: 1px 6px; border-radius: 5px; }
pre { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--beige); padding: 10px 12px; border-radius: 8px; overflow: auto; white-space: pre-wrap; }
:focus-visible { outline: 2px solid var(--emerald-light); outline-offset: 2px; }
::selection { background: var(--emerald-pale); }
.muted { color: var(--warm-gray); }
.small { font-size: 12.5px; }
.grow { flex: 1; }
[hidden] { display: none !important; }

/* ---------- typography ---------- */
.wordmark { font-family: var(--font-wordmark); font-size: 34px; letter-spacing: .32em; text-indent: .32em; color: var(--warm-black); line-height: 1; }
.wordmark.sm { font-size: 24px; }
.wordmark.xs { font-size: 18px; letter-spacing: .26em; }
.h-display { font-family: var(--font-display); font-weight: 400; font-size: 28px; letter-spacing: .02em; margin: 0 0 4px; }
.page-title { font-family: var(--font-display); font-weight: 400; font-size: 20px; letter-spacing: .04em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- boot / login ---------- */
.boot, .login { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px; padding: 24px 16px; padding-top: calc(24px + var(--sat)); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--border-strong); border-top-color: var(--emerald); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-card { width: 100%; max-width: 420px; background: var(--white); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 40px 28px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; animation: rise .5s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.login-title { font-family: var(--font-display); font-size: 22px; margin-top: 18px; letter-spacing: .03em; }
.login-sub { margin: 0 0 12px; color: var(--warm-gray); font-size: 14px; }
.btn-google { width: 100%; }
.login-foot { margin-top: 18px; }
.noaccess-ic { width: 60px; height: 60px; border-radius: 50%; background: var(--red-pale); color: var(--red); display: grid; place-items: center; margin-top: 16px; }
.noaccess-user { display: flex; align-items: center; gap: 10px; background: var(--beige-soft); border-radius: 999px; padding: 6px 14px 6px 6px; font-size: 14px; margin: 6px 0 12px; }

/* ---------- buttons / inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 500; font-size: 15px; transition: transform .15s var(--ease), box-shadow .15s, background .15s, opacity .15s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--emerald); color: #fff; box-shadow: 0 2px 8px rgba(45,106,79,.25); }
.btn-primary:hover { background: var(--emerald-light); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(45,106,79,.28); }
.btn-secondary { background: var(--white); border-color: var(--border-strong); color: var(--warm-black); }
.btn-secondary:hover { border-color: var(--warm-gray-light); background: var(--beige-soft); }
.btn-secondary.on { background: var(--emerald-pale); border-color: var(--emerald-light); color: var(--emerald-ink); }
.btn-ghost { background: transparent; color: var(--warm-gray); }
.btn-ghost:hover { background: var(--beige); color: var(--warm-black); }
.btn-danger { background: var(--red-pale); color: var(--red); }
.btn-danger:hover { background: #F6D7D2; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { min-height: 52px; font-size: 16px; border-radius: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--warm-gray); transition: background .15s, color .15s; flex: none; }
.iconbtn:hover { background: var(--beige); color: var(--warm-black); }
.iconbtn.danger:hover { background: var(--red-pale); color: var(--red); }
.iconbtn:disabled { opacity: .35; pointer-events: none; }
.inp { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--white); font: 16px/1.4 var(--font-ui); color: var(--warm-black); transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none; }
.inp:focus { outline: none; border-color: var(--emerald-light); box-shadow: 0 0 0 3px var(--emerald-pale); }
textarea.inp { resize: vertical; min-height: 44px; line-height: 1.45; }
select.inp { padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6560' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input[type=search].inp::-webkit-search-cancel-button { -webkit-appearance: none; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--warm-gray); letter-spacing: .01em; }
.field > small { font-size: 12.5px; line-height: 1.4; }
.field.sub { margin-bottom: 10px; }
.field-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.field-head > span { font-size: 13px; font-weight: 600; color: var(--warm-gray); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inp-row, .add-row { display: flex; gap: 8px; align-items: center; }
.inp-row .inp, .add-row .inp { flex: 1; }
.search { position: relative; flex: 1; min-width: 160px; }
.search > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--warm-gray-light); display: flex; pointer-events: none; }
.search .inp { padding-left: 38px; }

/* switch */
.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--emerald); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch.disabled { opacity: .45; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 16px; cursor: pointer; }
.switch-row > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.checkrow { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 8px; border-radius: 9px; cursor: pointer; }
.checkrow:hover { background: var(--beige-soft); }
.checkrow input { position: absolute; opacity: 0; width: 0; height: 0; }
/* the native input is invisible (0×0 / opacity 0): draw the keyboard focus ring on the visual box instead */
.checkrow input:focus-visible + i, .switch input:focus-visible + i { outline: 2px solid var(--emerald-light); outline-offset: 2px; }
.checkrow i { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong); background: #fff; flex: none; display: grid; place-items: center; transition: all .15s; }
.checkrow input:checked + i { background: var(--emerald); border-color: var(--emerald); }
.checkrow input:checked + i::after { content: ''; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.checkrow.inline { display: inline-flex; white-space: nowrap; }
.link-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); color: var(--warm-black); margin-bottom: 16px; }
.link-row > span { flex: 1; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; margin: 0 -16px 8px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--white); color: var(--warm-black); font-size: 13.5px; font-weight: 500; white-space: nowrap; flex: none; transition: all .15s; }
.chip b { font-weight: 500; color: var(--warm-gray); font-size: 12.5px; }
.chip.on { background: var(--warm-black); border-color: var(--warm-black); color: #fff; }
.chip.on b { color: rgba(255,255,255,.7); }
.chip.warn { border-style: dashed; color: #8a6d1d; }
.chip.warn svg { color: var(--gold); }
.chip.warn.on { background: #8a6d1d; border-color: #8a6d1d; color: #fff; }
.chip-add { border-style: dashed; color: var(--emerald); }
.chip.chip-new.on { background: var(--emerald); border-color: var(--emerald); }
.chips-edit { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.chips-edit .chip { min-height: 34px; padding: 0 6px 0 12px; }
.chips-edit .chip button { border: 0; background: transparent; color: inherit; display: flex; padding: 6px; border-radius: 50%; }
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.preset-row .chip { min-height: 32px; font-size: 12.5px; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--beige); color: var(--warm-gray); white-space: nowrap; }
.pill-added { background: var(--emerald-pale); color: var(--emerald-ink); }
.pill-updated { background: var(--gold-pale); color: #8a6d1d; }
.pill-removed { background: var(--red-pale); color: var(--red); }
.pill-src { background: var(--blue-pale); color: var(--blue); }
.pill-tier.tier-vip { background: var(--gold-pale); color: #8a6d1d; }
.pill-tier.tier-brilliant { background: #EAE4F7; color: #5B3F9E; }
.pill-tier.tier-blocked { background: var(--red-pale); color: var(--red); }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: calc(var(--top-h) + var(--sat)); padding: var(--sat) 16px 0; background: rgba(250,248,243,.88); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--border); }
.topbar-brand { display: flex; align-items: center; }
.topbar .page-title { flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar-txt { display: inline-grid; place-items: center; background: var(--emerald-pale); color: var(--emerald-ink); font-weight: 600; font-size: 13px; letter-spacing: .03em; }
.avatar-btn { border: 0; background: transparent; padding: 0; border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; }
.avatar-btn .avatar { width: 34px; height: 34px; }
.langtog { display: inline-flex; background: var(--beige); border-radius: 999px; padding: 3px; }
.langtog button { border: 0; background: transparent; min-height: 30px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--warm-gray); letter-spacing: .04em; }
.langtog button.on { background: var(--white); color: var(--warm-black); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.content { flex: 1; padding: 16px 16px calc(var(--nav-h) + var(--sab) + 24px); width: 100%; max-width: var(--content-max); margin: 0 auto; }
.page { animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.nav-badge { position: absolute; top: 6px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; }

/* bottom nav (mobile) */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; height: calc(var(--nav-h) + var(--sab)); padding-bottom: var(--sab); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
.bottomnav a, .bottomnav button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--warm-gray); font-size: 10.5px; font-weight: 500; letter-spacing: .01em; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.bottomnav .on { color: var(--emerald); }
.bottomnav .on svg { stroke-width: 2.1; }

/* save bar */
.savebar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--sab) + 10px); z-index: 44; background: var(--warm-black); color: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); animation: rise .3s var(--ease); }
.savebar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 10px 10px 14px; }
.savebar-txt { display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex: 1 1 100%; min-width: 0; }
.savebar-btns { margin-left: auto; }
.savebar-txt svg { color: var(--gold); flex: none; }
.savebar-btns { display: flex; gap: 6px; }
.savebar .btn-ghost { color: rgba(255,255,255,.75); min-height: 40px; padding: 0 12px; }
.savebar .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.savebar .btn-primary { min-height: 40px; }
.savebar-remote { display: flex; align-items: center; gap: 8px; padding: 8px 14px 10px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; color: rgba(255,255,255,.8); flex-wrap: wrap; }
.savebar-remote .btn { color: #fff; background: rgba(255,255,255,.12); }
body.has-bulk .savebar { bottom: calc(var(--nav-h) + var(--sab) + 72px); }

/* ---------- cards / layout blocks ---------- */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head b { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 600; }
.card-head svg { color: var(--emerald); }
.grid-2 { display: grid; gap: 16px; }
.hint { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--beige-soft); border: 1px solid var(--border); color: var(--warm-gray); font-size: 13.5px; line-height: 1.45; }
.hint:empty { display: none; }
.hint svg { flex: none; margin-top: 2px; color: var(--khaki); }
.hint a { font-weight: 600; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 56px 20px; color: var(--warm-gray); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: rgba(255,255,255,.5); }
.empty.small { padding: 32px 16px; }
.empty svg { color: var(--warm-gray-light); }
.empty p { margin: 0; max-width: 420px; line-height: 1.55; }
/* empty states / skeletons injected straight into a multi-column grid must span every column */
.pgrid > .empty, .mixgrid > .empty, .pk-grid > .empty, .pk-grid > .skeleton-grid, .mgrid > .empty, .mgrid > .skeleton-grid { grid-column: 1 / -1; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .sel-sort { width: auto; min-width: 140px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv > span { color: var(--warm-gray); flex: none; }
.kv > b { font-weight: 500; text-align: right; word-break: break-word; }
.kv.path b { font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
.tl-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tl-lang { width: 26px; flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--warm-gray-light); text-align: center; }

/* skeletons */
.sk { background: linear-gradient(90deg, var(--beige) 25%, #FBF9F5 50%, var(--beige) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-thumb { aspect-ratio: 1; }
.sk-row { height: 76px; margin-bottom: 10px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* ---------- dashboard ---------- */
.dash-hello { margin: 4px 0 18px; }
.dash-hello p { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 14px 12px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--warm-black); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--emerald-pale); color: var(--emerald); display: grid; place-items: center; margin-bottom: 6px; }
.stat b { font-family: var(--font-display); font-size: 26px; font-weight: 400; line-height: 1.1; }
.stat > span:last-child { font-size: 12.5px; color: var(--warm-gray); }
.pub-info { display: flex; align-items: center; gap: 14px; margin: 4px 0 8px; }
.ver { display: inline-grid; place-items: center; min-width: 52px; height: 40px; padding: 0 10px; border-radius: 10px; background: var(--warm-black); color: var(--gold); font-family: var(--font-wordmark); font-size: 16px; letter-spacing: .04em; flex: none; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quick-item { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px; border-radius: 10px; background: var(--beige-soft); color: var(--warm-black); font-size: 14px; font-weight: 500; text-decoration: none; transition: background .15s; }
.quick-item:hover { background: var(--emerald-pale); }
.quick-item svg { color: var(--emerald); }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.log li:last-child { border-bottom: 0; }
.log-time { flex: none; color: var(--warm-gray); min-width: 110px; font-size: 12.5px; }
.sync-card { border-color: var(--emerald-light); background: linear-gradient(180deg, #F3FAF5, #fff); }
.sync-groups { display: grid; gap: 12px; }
.sync-group ul { margin: 8px 0 0; padding: 0 0 0 4px; list-style: none; font-size: 13.5px; max-height: 150px; overflow: auto; }
.sync-group li { padding: 3px 0; }

/* ---------- products ---------- */
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pcard { position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s var(--ease), box-shadow .2s, opacity .2s; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pcard:hover { box-shadow: var(--shadow-lg); }
.pcard.dragging { opacity: .4; }
.pcard.over { outline: 2px solid var(--emerald-light); outline-offset: -2px; }
.pcard.selected { outline: 2px solid var(--emerald); outline-offset: -2px; }
.pcard-media { position: relative; aspect-ratio: 4 / 5; background: var(--beige-soft); overflow: hidden; }
.pcard-img, .pcard-img-alt { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s ease, transform .45s var(--ease); }
.pcard-img-alt { opacity: 0; }
@media (hover: hover) { .pcard.has-alt:hover .pcard-img { opacity: 0; } .pcard.has-alt:hover .pcard-img-alt { opacity: 1; transform: scale(1.03); } }
.pcard-noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--warm-gray-light); }
.pcard-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; z-index: 2; }
.leo-badge { display: inline-block; padding: 3px 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; border-radius: 3px; background: var(--warm-black); color: #fff; }
.badge-sale { background: var(--red); } .badge-new { background: var(--warm-black); } .badge-limited { background: #C9A94A; } .badge-koleksiya { background: var(--emerald); } .badge-custom { background: var(--khaki); }
.pcard-origin { position: absolute; bottom: 8px; left: 8px; z-index: 2; font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; background: rgba(255,255,255,.9); color: var(--warm-gray); backdrop-filter: blur(4px); }
.pcard-origin.o-admin { background: var(--emerald-pale); color: var(--emerald-ink); }
.pcard-origin.o-edited { background: var(--gold-pale); color: #8a6d1d; }
.pcard-hidden { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: rgba(250,248,243,.72); color: var(--warm-gray); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; backdrop-filter: grayscale(.6); }
.pcard.is-hidden .pcard-body { opacity: .55; }
.pcard-check { position: absolute; top: 8px; right: 8px; z-index: 4; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(255,255,255,.7); color: transparent; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.pcard.selected .pcard-check { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.pcard-grip { position: absolute; top: 8px; right: 8px; z-index: 2; color: #fff; opacity: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); cursor: grab; }
@media (hover: hover) { .pcard:hover .pcard-grip { opacity: .9; } }
.pcard-body { padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.pcard-brand { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--warm-gray); }
.pcard-name { font-size: 13.5px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pcard-price { display: flex; align-items: baseline; gap: 6px; font-size: 14px; margin-top: 2px; flex-wrap: wrap; }
.pcard-stock { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--emerald); background: rgba(45,106,79,0.1); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.pcard-stock.low { color: #8a6d1f; background: rgba(212,175,55,0.16); }
.pcard-stock.out { color: #C0392B; background: rgba(192,57,43,0.12); }
.price-old { color: var(--warm-gray-light); text-decoration: line-through; font-size: 12.5px; }
.price-sale { color: var(--red); font-weight: 600; }
.price-cur { font-weight: 600; }
.price-pct { font-size: 10.5px; font-weight: 700; color: var(--red); background: var(--red-pale); padding: 1px 5px; border-radius: 4px; }
.pcard-dots { display: flex; gap: 5px; min-height: 12px; margin-top: 4px; }
.pcard-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }
/* 4 action buttons (+ 2 reorder arrows) must fit a ~156px phone cell: buttons share the row, arrows wrap below */
.pcard-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0; padding: 0 4px 4px; border-top: 1px solid var(--border); margin-top: auto; }
.pcard-actions .iconbtn { flex: 1 1 0; width: auto; min-width: 0; height: 44px; }
.pcard-move { flex: 1 1 100%; display: flex; justify-content: center; border-top: 1px solid var(--border); }
.pcard-move .iconbtn { flex: 0 0 44px; width: 44px; }
.pcard.is-preview { max-width: 240px; cursor: default; }
.bulkbar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--sab) + 10px); z-index: 43; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; background: var(--white); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-lg); animation: rise .3s var(--ease); }
.bulk-n { font-weight: 600; font-size: 13.5px; padding: 0 6px; }
.bulkbar .btn-sm span { display: none; }

/* editor */
.pe { display: flex; flex-direction: column; gap: 16px; }
.pe-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; background: var(--beige-soft); border-radius: var(--radius); border: 1px solid var(--border); }
.pe-preview-lbl { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--warm-gray); align-self: flex-start; }
.pe-preview .pcard, .pe-preview .mixcard { width: 200px; }
.rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.rowx { display: flex; align-items: center; gap: 8px; }
.rowx .inp { flex: 1; min-width: 0; }
.rowx-btns { display: flex; flex: none; }
.rowx-btns .iconbtn { width: 34px; }
.colorinp { width: 44px; height: 44px; padding: 0; border: 1px solid var(--border-strong); border-radius: 10px; background: none; flex: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.colorinp::-webkit-color-swatch-wrapper { padding: 4px; } .colorinp::-webkit-color-swatch { border: 0; border-radius: 6px; }
.var-img { width: 44px; height: 54px; border-radius: 8px; border: 1px dashed var(--border-strong); background: var(--beige-soft); display: grid; place-items: center; color: var(--warm-gray-light); overflow: hidden; padding: 0; flex: none; }
.var-img img { width: 100%; height: 100%; object-fit: cover; }
.imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.imgtile { position: relative; border-radius: 12px; border: 1px dashed var(--border-strong); background: var(--beige-soft); aspect-ratio: 4 / 5; overflow: hidden; display: flex; flex-direction: column; }
.imgtile.tall { aspect-ratio: 9 / 16; max-width: 220px; }
.imgtile.has { border-style: solid; }
.imgtile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.imgtile-lbl { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.9); padding: 3px 7px; border-radius: 5px; color: var(--warm-gray); }
.imgtile-empty { flex: 1; display: grid; place-items: center; color: var(--warm-gray-light); }
.imgtile-btns { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; display: flex; gap: 6px; }
.imgtile-btns .btn { flex: 1; background: rgba(255,255,255,.94); }
.imgtile-btns .iconbtn { background: rgba(255,255,255,.94); width: 36px; height: 36px; }

/* ---------- overlays / sheets ---------- */
.ov { position: fixed; inset: 0; z-index: 100; background: rgba(26,24,20,0); transition: background .22s; display: flex; }
.ov.in { background: rgba(26,24,20,.42); }
.sh { background: var(--off-white); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transition: transform .28s var(--ease), opacity .22s; will-change: transform; }
.sh-grab { display: none; }
.sh-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: 8px 8px; border-bottom: 1px solid var(--border); background: var(--off-white); flex: none; }
.sh-title { font-family: var(--font-display); font-size: 17px; letter-spacing: .03em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.sh-cancel { justify-self: start; min-height: 44px; padding: 0 12px; border: 0; background: transparent; border-radius: 10px; color: var(--warm-gray); font-weight: 500; display: inline-flex; align-items: center; }
.sh-head-action { justify-self: end; min-height: 44px; padding: 0 12px; border: 0; background: transparent; border-radius: 10px; color: var(--emerald); font-weight: 600; }
.sh-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 16px; overscroll-behavior: contain; }
.sh-foot { display: flex; gap: 8px; padding: 10px 12px calc(10px + var(--sab)); border-top: 1px solid var(--border); background: var(--white); flex: none; }
.sh-foot .btn { flex: 1; }
.sh-foot .btn-ghost { flex: 0 0 auto; }
/* mobile: every sheet is a full-height bottom sheet */
.ov-sheet { align-items: flex-end; }
.sh-sheet { width: 100%; height: calc(100% - 14px - var(--sat)); margin-top: auto; border-radius: 20px 20px 0 0; transform: translateY(100%); }
.ov.in .sh-sheet { transform: none; }
.sh-sheet .sh-grab { display: flex; justify-content: center; padding: 8px 0 0; }
.sh-sheet .sh-grab span { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); }
.ov-dialog .sh-sheet, .ov-more .sh-sheet { height: auto; max-height: calc(100% - 40px); }
.ov-dialog .sh-body { padding: 12px 16px 6px; }
.dlg-text { margin: 0 0 12px; color: var(--warm-gray); line-height: 1.5; white-space: pre-line; }
.dlg-options { display: flex; flex-direction: column; gap: 4px; }
.dlg-opt { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border: 0; background: var(--white); border-radius: 10px; text-align: left; border: 1px solid var(--border); }
.dlg-opt span { flex: 1; }
.dlg-opt.on { border-color: var(--emerald-light); background: var(--emerald-pale); }
.dlg-opt svg:last-child { color: var(--emerald); }
.more-list { display: flex; flex-direction: column; gap: 2px; }
.more-item { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 10px; border-radius: 10px; color: var(--warm-black); text-decoration: none; border: 0; background: transparent; text-align: left; font-size: 15px; }
.more-item:hover { background: var(--beige-soft); }
.more-item.on { background: var(--emerald-pale); color: var(--emerald-ink); }
.more-item span { flex: 1; }
.more-item > svg:first-child { color: var(--emerald); }
.more-item.danger { color: var(--red); } .more-item.danger svg { color: var(--red); }
.usermenu-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 16px; }
.usermenu-head .avatar { width: 56px; height: 56px; font-size: 20px; }
.usermenu-head span { color: var(--warm-gray); font-size: 13.5px; }

/* ---------- picker ---------- */
.tabs { display: flex; gap: 4px; background: var(--beige); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--warm-gray); font-weight: 500; font-size: 14px; }
.tab.on { background: var(--white); color: var(--warm-black); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--border-strong); border-radius: 14px; background: var(--white); text-align: center; cursor: pointer; color: var(--warm-gray); transition: all .15s; }
.dropzone strong { color: var(--warm-black); font-weight: 500; }
.dropzone span { font-size: 12.5px; }
.dropzone svg { color: var(--emerald); }
.dropzone.over { border-color: var(--emerald); background: var(--emerald-pale); }
.pk-jobs { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pk-job { display: flex; gap: 10px; align-items: center; padding: 8px; background: var(--white); border: 1px solid var(--border); border-radius: 10px; }
.pk-job.pickable { cursor: pointer; } .pk-job.pickable:hover { border-color: var(--emerald-light); }
.pk-job.err { border-color: var(--red); }
.pk-job-thumb { width: 48px; height: 60px; border-radius: 6px; background: var(--beige-soft); overflow: hidden; flex: none; }
.pk-job-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pk-job-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pk-job-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-job-st { font-size: 12.5px; }
.bar { height: 5px; border-radius: 3px; background: var(--beige); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--emerald); transition: width .2s; }
.pk-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.pk-tools select { flex: 1; min-width: 0; }
.pk-grid, .mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pk-thumb, .mthumb { position: relative; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--white); overflow: hidden; aspect-ratio: 4 / 5; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.pk-thumb:hover, .mthumb:hover { box-shadow: var(--shadow-lg); }
.pk-thumb.on { outline: 3px solid var(--emerald); outline-offset: -3px; }
.pk-thumb img, .mthumb img { width: 100%; height: 100%; object-fit: cover; }
.pk-thumb-name, .mthumb-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.pk-thumb-tag { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--emerald); color: #fff; display: grid; place-items: center; }
.pk-url-preview { margin: 8px 0 14px; }
.pk-url-preview img { max-height: 220px; border-radius: 10px; }
.upl-progress { margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.fdet img { max-height: 320px; margin: 0 auto 12px; border-radius: 10px; }

/* ---------- blocks ---------- */
.blocks { display: flex; flex-direction: column; gap: 8px; }
.block-row { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: opacity .2s; }
.block-row.is-hidden { opacity: .6; }
.block-row.is-hidden .block-info b { text-decoration: line-through; text-decoration-color: var(--warm-gray-light); }
.block-row.dragging { opacity: .4; }
.block-row.over { outline: 2px solid var(--emerald-light); outline-offset: -2px; }
.block-main { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; min-height: 60px; }
.block-grip { color: var(--warm-gray-light); cursor: grab; display: none; }
.block-idx { width: 26px; height: 26px; border-radius: 8px; background: var(--beige); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--warm-gray); flex: none; }
.block-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.block-info b { font-weight: 600; font-size: 14.5px; }
.block-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block-ctl { display: flex; align-items: center; gap: 2px; flex: none; }
.block-ctl .switch { margin: 0 4px; }
.block-toggle svg { transition: transform .2s; }
.block-row.open .block-toggle svg { transform: rotate(180deg); }
.block-body { padding: 4px 14px 14px; border-top: 1px solid var(--border); animation: fade .2s; }
.block-editor { padding-top: 10px; }

/* ---------- texts ---------- */
.texts { display: flex; flex-direction: column; gap: 8px; }
.trow { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.trow.changed { border-color: var(--gold); }
.trow-key { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trow-cell { display: flex; align-items: center; gap: 8px; }
.trow-cell .inp { min-height: 40px; padding: 8px 10px; }   /* 16px on phones (iOS auto-zooms on smaller controls); 15px from 769px */
.trow-act { display: flex; justify-content: flex-end; }

/* ---------- mix ---------- */
.mixgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mixcard { position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; cursor: pointer; }
.mixcard.dragging { opacity: .4; } .mixcard.over { outline: 2px solid var(--emerald-light); outline-offset: -2px; }
.mixcard-media { position: relative; aspect-ratio: 9 / 16; background: var(--beige-soft); }
.mixcard-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mixcard-tag { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; background: var(--gold); color: var(--warm-black); }
.mixcard-txt { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 30px 10px 10px; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; display: flex; flex-direction: column; gap: 2px; }
.mixcard-txt b { font-size: 13.5px; }
.mixcard-txt span { font-size: 11.5px; opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mixcard.is-hidden .mixcard-media { opacity: .7; }
.mixcard .pcard-origin { bottom: auto; top: 8px; right: 8px; left: auto; }
.mixcard.is-preview { cursor: default; }

/* ---------- orders / users ---------- */
.olist, .ulist { display: flex; flex-direction: column; gap: 8px; }
.orow, .urow { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); border-left-width: 4px; }
.orow { cursor: pointer; }
.orow.st-new { border-left-color: var(--emerald); } .orow.st-contacted { border-left-color: var(--gold); } .orow.st-done { border-left-color: var(--warm-gray-light); } .orow.st-cancelled { border-left-color: var(--red); opacity: .8; }
.orow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.orow-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.orow-date { font-size: 12.5px; color: var(--warm-gray); }
.orow-thumb { width: 28px; height: 34px; border-radius: 5px; object-fit: cover; margin-left: auto; }
.orow-cust { font-size: 14.5px; }
.orow-items { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.orow-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.orow-total { font-family: var(--font-display); font-size: 18px; }
.orow-btns { display: flex; }
.sel-status { min-height: 36px; padding: 6px 30px 6px 10px; width: auto; border-radius: 9px; background-position: right 8px center; }   /* font-size 13.5px only from 769px */
.sel-status.st-new { border-color: var(--emerald-light); color: var(--emerald-ink); background-color: var(--emerald-pale); }
.sel-status.st-contacted { border-color: var(--gold); background-color: var(--gold-pale); color: #8a6d1d; }
.sel-status.st-cancelled { color: var(--red); }
.odet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.odet-total { margin-left: auto; font-family: var(--font-display); font-size: 22px; }
.oitems { display: flex; flex-direction: column; gap: 6px; }
.oitem { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--white); border: 1px solid var(--border); border-radius: 10px; }
.oitem img, .oitem-noimg { width: 44px; height: 54px; border-radius: 6px; object-fit: cover; flex: none; background: var(--beige-soft); display: grid; place-items: center; color: var(--warm-gray-light); }
.oitem > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.oitem b { font-size: 14px; }
.urow { align-items: center; border-left-color: var(--border); }
.urow.tier-vip { border-left-color: var(--gold); } .urow.tier-brilliant { border-left-color: #8B6FD0; } .urow.tier-blocked { border-left-color: var(--red); }
.urow-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.urow-info b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }

/* ---------- AI ---------- */
.page-ai { display: flex; flex-direction: column; min-height: calc(100vh - var(--top-h) - var(--nav-h) - var(--sab) - 32px); min-height: calc(100dvh - var(--top-h) - var(--nav-h) - var(--sab) - 32px); }
.ai-ctx { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; font-size: 13.5px; flex-wrap: wrap; }
.ai-ctx b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50%; }
.ai-log { flex: 1; display: flex; flex-direction: column; gap: 12px; padding-bottom: 12px; }
.ai-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; animation: fade .2s; }
.ai-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.ai-av { width: 30px; height: 30px; border-radius: 50%; background: var(--warm-black); color: var(--gold); display: grid; place-items: center; flex: none; }
.ai-bubble { padding: 10px 14px; border-radius: 16px; background: var(--white); border: 1px solid var(--border); font-size: 14.5px; line-height: 1.55; word-break: break-word; }
.ai-bubble ul { margin: 6px 0; padding-left: 18px; }
.ai-msg.model .ai-bubble { border-bottom-left-radius: 4px; }
.ai-msg.user .ai-bubble { background: var(--emerald); color: #fff; border-color: var(--emerald); border-bottom-right-radius: 4px; }
.ai-bubble.err { background: var(--red-pale); border-color: var(--red-pale); color: var(--red); }
.ai-imgs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ai-imgs img { width: 90px; height: 110px; object-fit: cover; border-radius: 8px; }
.ai-tools { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.ai-tools .btn-sm { min-height: 30px; padding: 0 8px; font-size: 12.5px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--warm-gray-light); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.ai-quick { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.ai-quick::-webkit-scrollbar { display: none; }
.ai-quick .chip { min-height: 34px; font-size: 13px; }
.ai-pending { display: flex; gap: 8px; margin-bottom: 8px; }
.ai-pend { position: relative; }
.ai-pend img { width: 56px; height: 68px; object-fit: cover; border-radius: 8px; }
.ai-pend button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--warm-black); color: #fff; display: grid; place-items: center; padding: 0; }
.ai-form { position: sticky; bottom: calc(var(--nav-h) + var(--sab) + 8px); display: flex; align-items: flex-end; gap: 6px; padding: 6px; background: var(--white); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow); }
.ai-form .inp { border: 0; box-shadow: none; padding: 10px 6px; min-height: 40px; max-height: 160px; background: transparent; }
.ai-form .iconbtn { width: 40px; height: 40px; }
.btn-send { width: 40px; min-height: 40px; padding: 0; border-radius: 11px; flex: none; }
body.has-savebar .ai-form { bottom: calc(var(--nav-h) + var(--sab) + 84px); }

/* ---------- roles / embed ---------- */
.rolebadge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--emerald-pale); color: var(--emerald-ink); white-space: nowrap; line-height: 1.4; }
.rolebadge.super { background: var(--gold-pale); color: #8a6d1d; }
.rolebadge.super svg { color: var(--gold); }
.userblock-txt .rolebadge { align-self: flex-start; margin-top: 3px; }
.usermenu-head .rolebadge { margin-top: 2px; }
.topbar-close { flex: none; }
.topbar-close span { white-space: nowrap; }
.login-or { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--warm-gray-light); margin: -4px 0; }
button.sidebar-site { border: 0; background: transparent; font: inherit; cursor: pointer; text-align: left; }

/* ---------- settings ---------- */
.admins { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.admin-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); }
.admin-row b { flex: 1; min-width: 0; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-row-super { border-color: var(--gold); background: var(--gold-pale); }
.admin-row-super .avatar-txt { background: var(--gold); color: #fff; }
.admin-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-info b { flex: none; }
.admin-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-row-mod { flex-wrap: wrap; }
.add-row-mod .inp { flex: 1 1 200px; }
.danger-zone { border-color: #F2D6D2; }
.danger-item { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--border); }
.danger-item:first-of-type { border-top: 0; }
.danger-item p { margin: 2px 0 0; }
.hist { display: flex; flex-direction: column; gap: 8px; }
.hist-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; }
.hist-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 12px; right: 12px; top: calc(12px + var(--sat)); z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--warm-black); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-10px); transition: all .25s var(--ease); pointer-events: auto; max-width: 480px; margin: 0 auto; width: 100%; }
.toast.in { opacity: 1; transform: none; }
.toast-ic { display: flex; color: var(--emerald-pale); }
.toast-err { background: var(--red); } .toast-err .toast-ic { color: #fff; }
.toast-info { background: #2C3E50; } .toast-info .toast-ic { color: var(--gold); }
.toast-msg { flex: 1; line-height: 1.4; }

/* =============================== tablet ≥ 769px =============================== */
@media (min-width: 769px) {
  .bottomnav { display: none; }
  .content { padding: 24px 24px 40px; }
  .chips, .ai-quick { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .savebar { position: sticky; top: var(--top-h); left: auto; right: auto; bottom: auto; margin: 0 24px; z-index: 39; border-radius: 0 0 14px 14px; }
  .savebar-in { flex-wrap: nowrap; }
  .savebar-txt { flex: 1 1 auto; }
  .bulkbar { position: sticky; top: calc(var(--top-h) + 12px); bottom: auto; left: auto; right: auto; margin-bottom: 12px; }
  .bulkbar .btn-sm span { display: inline; }
  .pgrid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .mixgrid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .pk-grid, .mgrid { grid-template-columns: repeat(5, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .quick { grid-template-columns: repeat(3, 1fr); }
  .block-grip { display: flex; }
  .trow { grid-template-columns: 220px 1fr 1fr 1fr 44px; align-items: center; gap: 8px; }
  .trow-key { flex-direction: column; align-items: flex-start; gap: 4px; }
  .trow-key code { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tl-lang { display: none; }
  .trow .tl-lang { display: none; }
  .danger-item { flex-direction: row; align-items: center; justify-content: space-between; }
  .danger-item > div { flex: 1; }
  .page-ai { min-height: calc(100vh - var(--top-h) - 64px); }
  .ai-form { bottom: 16px; }
  body.has-savebar .ai-form { bottom: 16px; }
  .ai-msg { max-width: 78%; }
  .pcard-actions .iconbtn { height: 38px; }
  .pcard-move .iconbtn { flex-basis: 38px; width: 38px; }
  .trow-cell .inp { font-size: 15px; }
  .sel-status { font-size: 13.5px; }
  .imgs { max-width: 420px; }
  /* sheets become side panels / centered modals */
  .ov-panel { justify-content: flex-end; }
  .sh-panel { width: min(560px, 100%); height: 100%; transform: translateX(100%); }
  .sh-panel.sh-lg { width: min(600px, 100%); }
  .ov.in .sh-panel { transform: none; }
  .ov-modal { align-items: center; justify-content: center; padding: 24px; }
  .sh-modal { width: min(640px, 100%); max-height: calc(100% - 48px); border-radius: 18px; transform: translateY(14px) scale(.98); opacity: 0; }
  .sh-modal.sh-sm { width: min(440px, 100%); } .sh-modal.sh-lg { width: min(900px, 100%); }
  .ov.in .sh-modal { transform: none; opacity: 1; }
  .sh-head { padding: 10px 12px; }
  .sh-cancel { width: 44px; padding: 0; justify-content: center; }
  .sh-head-action { display: none; }
  .sh-body { padding: 20px 22px; }
  .sh-foot { padding: 12px 16px; justify-content: flex-end; }
  .sh-foot .btn { flex: 0 0 auto; min-width: 120px; }
  .ov-dialog .sh-body { padding: 14px 22px 8px; }
  .ov-more .sh-modal { width: 360px; }
  .pe-preview .pcard { width: 220px; }
  .topbar { padding: 0 24px; height: var(--top-h); }
  .topbar-brand { display: none; }
  .page-title { font-size: 24px; }
}
/* hover-reveal of card actions only where a real hover exists — on touch tablets ≥769px the transparent buttons
   would still be hit-testable (a tap on the card's bottom strip would silently hide/duplicate/delete) */
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .pcard-actions { opacity: 0; transition: opacity .15s; }
  .pcard:hover .pcard-actions, .pcard:focus-within .pcard-actions, .mixcard:hover .pcard-actions, .mixcard:focus-within .pcard-actions { opacity: 1; }
}
/* =============================== tablet rail 769–1023px =============================== */
@media (min-width: 769px) and (max-width: 1023px) {
  .sidebar { display: flex; flex-direction: column; width: 76px; flex: none; position: sticky; top: 0; height: 100vh; height: 100dvh; background: var(--white); border-right: 1px solid var(--border); padding: 16px 10px; gap: 12px; }
  .brand { display: flex; justify-content: center; padding: 6px 0 12px; }
  .brand .wordmark { font-size: 13px; letter-spacing: .18em; }
  .brand-sub { display: none; }
  .snav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
  .snav a { position: relative; display: flex; justify-content: center; align-items: center; height: 46px; border-radius: 10px; color: var(--warm-gray); }
  .snav a span { display: none; }
  .snav a.on { background: var(--emerald-pale); color: var(--emerald-ink); }
  .snav .nav-badge { right: 6px; top: 6px; }
  .sidebar-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .sidebar-site { display: none; }
  .userblock { display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .userblock-txt { display: none; }
}
/* =============================== desktop ≥ 1024px =============================== */
@media (min-width: 1024px) {
  .sidebar { display: flex; flex-direction: column; width: var(--sidebar-w); flex: none; position: sticky; top: 0; height: 100vh; height: 100dvh; background: var(--white); border-right: 1px solid var(--border); padding: 24px 16px 18px; }
  .brand { display: flex; align-items: baseline; gap: 10px; padding: 4px 10px 22px; text-decoration: none; }
  .brand-sub { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
  .snav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .snav a { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 11px; color: var(--warm-gray); font-weight: 500; font-size: 14.5px; text-decoration: none; transition: background .15s, color .15s; }
  .snav a:hover { background: var(--beige-soft); color: var(--warm-black); }
  .snav a.on { background: var(--emerald-pale); color: var(--emerald-ink); }
  .snav a.on svg { color: var(--emerald); }
  .snav .nav-badge { position: static; margin-left: auto; }
  .sidebar-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
  .sidebar-site { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 13px; color: var(--warm-gray); }
  .sidebar-site:hover { color: var(--emerald); }
  .userblock { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
  .userblock-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .userblock-txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .userblock-txt span { font-size: 12px; color: var(--warm-gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-right .avatar-btn { display: none; }
  .content { padding: 28px 32px 48px; }
  .savebar { margin: 0 32px; }
  .pgrid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .mixgrid { grid-template-columns: repeat(5, 1fr); }
  .pk-grid, .mgrid { grid-template-columns: repeat(6, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .stat b { font-size: 30px; }
  .page-settings { max-width: 860px; }
  .page-ai { max-width: 900px; }
}
@media (min-width: 1440px) {
  .pgrid { grid-template-columns: repeat(5, 1fr); }
  .stats { grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 480px) { .topbar-brand { display: none; } .topbar { gap: 10px; } }
/* embed: on mobile "← back to site" lives in the "More" sheet, not in the top bar */
@media (max-width: 768px) { .topbar-close { display: none; } }
/* =============================== phone ≤ 768px =============================== */
@media (max-width: 768px) {
  /* the fixed save bar (~88px, two rows) and bulk bar (~52px) sit above the bottom nav and would otherwise cover
     the last rows of every page; reserve the space while they are shown */
  body.has-savebar .content { padding-bottom: calc(var(--nav-h) + var(--sab) + 120px); }
  body.has-bulk .content { padding-bottom: calc(var(--nav-h) + var(--sab) + 84px); }
  body.has-bulk.has-savebar .content { padding-bottom: calc(var(--nav-h) + var(--sab) + 184px); }
  /* block rows: title on its own line, controls below — the 5 controls otherwise squeeze the title to ~90px */
  .block-main { flex-wrap: wrap; padding: 10px 10px 8px 12px; row-gap: 4px; }
  .block-info { flex: 1 1 calc(100% - 40px); }
  .block-info b { font-size: 15px; }
  .block-ctl { flex: 1 1 100%; justify-content: flex-end; }
  /* two-column field pairs stack on phones */
  .row2 { grid-template-columns: 1fr; }
}
/* =============================== touch devices: 44px tap targets =============================== */
@media (hover: none) {
  .iconbtn, .rowx-btns .iconbtn, .pcard-move .iconbtn, .imgtile-btns .iconbtn, .ai-form .iconbtn { width: 44px; height: 44px; }
  .pcard-actions .iconbtn { height: 44px; }
  .pcard-move .iconbtn { flex-basis: 44px; }
  .langtog button { min-height: 38px; padding: 0 14px; }
  .bulkbar .btn-sm, .ai-tools .btn-sm { min-height: 44px; }
  .checkrow { min-height: 44px; }
  /* tiny remove buttons keep their look, the hit area is extended with a pseudo-element */
  .chips-edit .chip button, .ai-pend button { position: relative; }
  .chips-edit .chip button::before { content: ''; position: absolute; inset: -9px -10px -9px -4px; }
  .ai-pend button::before { content: ''; position: absolute; inset: -10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }


/* ═══ merged from the 2026-09-19 audit fixes ═══ */
/* ── fix:G3-content-views ── */
/* MOB-12 — bigger hit area for the block visibility switch (scoped to .block-ctl only; .switch-row editors untouched) */
.block-ctl .switch { margin: 0 8px; }
.block-ctl .switch::before { content: ''; position: absolute; inset: -8px -6px; }
@media (hover: none) { .block-ctl .switch input { position: absolute; inset: -8px -6px; width: auto; height: auto; } }
/* MOB-16 — readable language badge / secondary text (warm-gray ≈5.7:1 on white); .empty svg and .pcard-noimg stay light */
.tl-lang { color: var(--warm-gray); width: 30px; font-size: 11.5px; background: var(--beige); border-radius: 6px; padding: 3px 0; text-align: center; }
.price-old { color: var(--warm-gray); }
.login-or { color: var(--warm-gray); }
/* I18-07 — texts view: rows for keys the site never reads */
.texts-pill-unused { background: var(--beige); color: var(--warm-gray); }
.trow.texts-unused code { opacity: .75; }

/* ── fix:G6-shell-app ── */
/* MOB-10 — embed mode: the site's overlay bar already clears the notch, so the iframe must not add the top inset again */
html.embed{--sat:0px}

/* MOB-11 — touch targets ≥44px on phones (Apple HIG); .ai-quick/.chips-edit/.preset-row chips out-specify bare .chip and are named explicitly */
@media (hover:none){
  .chip{min-height:44px}
  .chips-edit .chip{min-height:34px}
  .preset-row .chip{min-height:40px}
  .ai-quick .chip{min-height:40px}
  .sel-status{min-height:44px}
  .btn-sm{min-height:44px;padding:0 14px}
  .savebar .btn-ghost,.savebar .btn-primary{min-height:44px}
  .btn-send,.ai-form .btn-send{width:44px;min-height:44px}
  .tab{min-height:44px}
  .langtog button{min-height:40px}
  .imgtile-btns .btn{min-height:40px}
}
.btn,.iconbtn,.chip,.orow,.urow,.mthumb,.pk-thumb{-webkit-tap-highlight-color:transparent}
.iconbtn:active,.chip:active{transform:scale(.97)}

/* ── fix:G2-orders-dashboard ── */
/* ---- orders: sticky search + period chips, paging, UA disclosure ---- */
.toolbar-sticky { position: sticky; top: calc(var(--top-h) + var(--sat)); z-index: 5; background: var(--off-white); padding: 8px 0; margin: -8px 0 6px; }
.orders-toolbar { gap: 8px; }
.orders-toolbar .chips { flex: 1 1 100%; order: 2; margin: 0; padding: 0 0 2px; }
.orders-toolbar .chip { min-height: 34px; padding: 0 12px; font-size: 13px; }
.orders-more { display: flex; justify-content: center; padding: 14px 0 8px; }
.orders-more .btn { width: 100%; max-width: 360px; }
.orders-note { display: inline-flex; color: var(--warm-gray); }
.orders-ua summary { cursor: pointer; list-style: none; font-weight: 500; }
.orders-ua summary::-webkit-details-marker { display: none; }
.orders-ua > span { display: block; margin-top: 4px; text-align: right; word-break: break-all; font-weight: 400; }
/* ---- dashboard: sales tiles, top products, stock watch, 1C feed ---- */
.dash-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 4px 0 10px; font-family: var(--font-display); font-weight: 400; font-size: 20px; }
.dash-sec small { font-family: var(--font-ui); font-size: 12.5px; color: var(--warm-gray); text-align: right; }
.dash-rev { font-family: var(--font-ui); font-size: 13px; font-weight: 500; color: var(--emerald); white-space: nowrap; }
.dash-stat-split b a { color: inherit; }
.dash-sk-num { display: block; height: 28px; width: 64%; margin: 2px 0 4px; border-radius: 8px; }
.dash-sk-list { height: 96px; }
.dash-status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.dash-status > span { font-size: 12.5px; color: var(--warm-gray); margin-right: 2px; }
.dash-status .pill { text-transform: none; letter-spacing: 0; font-size: 12.5px; padding: 4px 10px; }
.dash-st-new { background: var(--emerald-pale); color: var(--emerald-ink); }
.dash-st-contacted { background: var(--gold-pale); color: #8a6d1d; }
.dash-st-done { background: var(--beige); color: var(--warm-black); }
.dash-st-cancelled { background: var(--red-pale); color: var(--red); }
.dash-top { list-style: none; margin: 0; padding: 0; }
.dash-top li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.dash-top li:last-child { border-bottom: 0; }
.dash-top-n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--beige); color: var(--warm-gray); font-size: 11.5px; font-weight: 600; display: grid; place-items: center; }
.dash-top a, .dash-top-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--warm-black); }
.dash-top-meta { flex: none; font-size: 12.5px; color: var(--warm-gray); }
.dash-stock li { align-items: center; justify-content: space-between; }
.dash-stock a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--warm-black); }
.dash-inv-src { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.dash-inv-stale { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--gold-pale); color: #8a6d1d; font-size: 13.5px; line-height: 1.4; }
.dash-inv-stale svg { flex: none; margin-top: 2px; }
@media (min-width: 769px) {
  .orders-toolbar .chips { flex: 0 0 auto; order: 0; }
  .dash-stats { grid-template-columns: repeat(5, 1fr); }
}

/* ── G1 products ── */
/* PRD-14/COR-15: invalid field marker on save() validation failure */
.inp.is-invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(192,57,43,.15); }

/* PRD-16/MOB-13: 3 buttons now fit .pcard-move at 375px (up / down / move-to) */
.pcard-move { gap: 2px; }

/* PRD-20: category label + sku/#id copy row under the price */
.pcard-meta { font-size: 11px; color: var(--warm-gray); display: flex; align-items: center; gap: 4px; padding: 0 10px 8px; }
.pcard-sku { font: inherit; background: none; border: 0; color: inherit; text-decoration: underline dotted; padding: 0; min-height: 24px; cursor: pointer; }

/* INT-07: "· 1C" pill next to the stock count when the 1C feed overrides it */
.pcard-inv { display: inline-block; margin-left: 4px; padding: 1px 5px; border-radius: 5px; background: var(--emerald-pale); color: var(--emerald-ink); font-size: 10px; font-weight: 700; letter-spacing: .02em; vertical-align: middle; }

/* PRD-19/INT-07: inline warning hints (badge/stock overridden by 1C or the sale badge) */
small.warn { display: block; color: #8a6d1d; }

/* PRD-12: brand colour palette — horizontal scroll row of swatch chips */
.palette { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.palette::-webkit-scrollbar { display: none; }
.chip.pal { flex: none; gap: 6px; }
.chip.pal i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--border-strong); }

/* PRD-13: ghost size chips showing the site's default preset when the field is empty */
.pe-sizes-hint { display: flex; flex-direction: column; gap: 6px; }
.chip.ghost { opacity: .55; background: transparent; border-style: dashed; pointer-events: none; }

/* PRD-17/MOB-18: compact horizontal preview on phones so the first field starts higher on screen */
@media (max-width: 768px) {
  .pe-preview { flex-direction: row; align-items: flex-start; gap: 12px; padding: 10px; }
  .pe-preview .pcard, .pe-preview .mixcard { width: 120px; }
  .pe-preview .pcard-body { padding: 6px 8px; }
  .pe-preview .pcard-name { font-size: 12px; -webkit-line-clamp: 1; min-height: 0; }
}

/* MOB-06: colour-variant row wraps instead of squeezing the label input to ~60px at 375px */
@media (max-width: 480px) {
  .rowx.var { flex-wrap: wrap; row-gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); }
  .rowx.var .inp { flex: 1 1 140px; }
  .rowx.var .rowx-btns { flex: 1 1 100%; justify-content: flex-end; }
}

/* MOB-07: single-column photo tiles at 375px so the remove button is never clipped */
@media (max-width: 480px) {
  .imgs { grid-template-columns: 1fr; max-width: 260px; }
  .imgtile-btns .btn { min-width: 0; overflow: hidden; }
  .imgtile-btns .btn span { overflow: hidden; text-overflow: ellipsis; }
}

/* MOB-23: long-press on a card image opens the iOS "Save Image" callout instead of the card action */
.pcard img, .mixcard img, .pk-thumb img, .mthumb img, .imgtile img, .var-img img, .oitem img, .orow-thumb {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; pointer-events: none;
}
.pcard, .mixcard, .chip, .bottomnav a { -webkit-user-select: none; user-select: none; }


/* ── site-pause (maintenance mode) card ── */
.maint-card { border-top: 3px solid var(--emerald); transition: border-color .2s ease; }
.maint-card.is-on { border-top-color: var(--red); }
.maint-card .card-head { display: flex; align-items: center; gap: 10px; }
.maint-pill { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .02em; }
.maint-pill.off { background: var(--emerald-pale); color: var(--emerald-ink); border: 1px solid var(--emerald-light); }
.maint-pill.on { background: var(--red-pale); color: var(--red); border: 1px solid #fca5a5; }
.maint-card .switch-row { margin: 12px 0; }
.maint-card #sMaintFields { margin-bottom: 12px; }

/* ── email+password login form (secondary front door) ── */
.login-email-form { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 4px; text-align: left; }
.login-email-form .field span { font-size: 12px; font-weight: 600; color: var(--ink-2); display: block; margin-bottom: 4px; }
.login-email-form .field { display: block; }
.login-link { background: none; border: none; color: var(--emerald); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px; text-decoration: underline; }
