:root {
  --bg: #f7f5f0; --card: #fff; --text: #1c2420; --muted: #5c6861; --line: #e6e0d4; --line-strong: #cfc7b8;
  --navy: #0a3c7d; --navy-deep: #001440;
  --primary: #1b5e3c; --primary-d: #144a2f; --primary-soft: #ecf6f0;
  --accent: #e78513; --accent-soft: #fef3e2;
  --green: #15803d; --green-soft: #dcfce7; --amber: #b45309; --amber-soft: #fef3c7; --red: #b91c1c; --red-soft: #fee2e2;
  --slate-soft: #f2eee6; --radius: 12px; --shadow: 0 1px 3px rgba(28,36,32,.06), 0 6px 18px rgba(28,36,32,.05);
  --shadow-lg: 0 20px 50px rgba(0,20,64,.24);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--text); background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); line-height: 1.5; font-size: 15px; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.grow { flex: 1; min-width: 0; } .spacer { flex: 1; } .nowrap { white-space: nowrap; } .center { display: block; margin: 14px auto 0; } .prewrap { white-space: pre-line; }
.icon { flex: none; }

/* ---------- header (Peidi corporate navy) ---------- */
.app-header { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); box-shadow: 0 2px 12px rgba(0,20,64,.16); }
.header-in { max-width: 1280px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); flex: none; }
.brand-lockup { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.brand-corp { font-size: 16px; font-weight: 800; letter-spacing: .01em; }
.brand-sep { opacity: .4; font-weight: 400; }
.brand-sub { font-size: 15px; font-weight: 600; color: #fde68a; }
.brand-name { font-size: 16px; white-space: nowrap; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav-tab { border: 0; background: none; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; color: rgba(255,255,255,.78); transition: background .15s, color .15s; }
.nav-tab:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-on, .nav-on:hover { background: rgba(255,255,255,.18); color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }
.header-right { display: flex; align-items: center; gap: 12px; color: var(--text); }
.container { max-width: 1280px; margin: 0 auto; padding: 24px 24px 56px; min-height: 74vh; }
.app-footer { background: var(--navy-deep); color: rgba(255,255,255,.82); font-size: 13px; padding: 24px; border-top: 3px solid var(--accent); }
.footer-in { max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.app-footer a { color: #fde68a; text-decoration: none; }
.app-footer a:hover { text-decoration: underline; }

.seg { display: inline-flex; background: var(--slate-soft); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.seg-btn { border: 0; background: none; padding: 5px 11px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; }
.seg-on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.app-header .lang-switch { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.app-header .lang-switch .seg-btn { color: rgba(255,255,255,.82); }
.app-header .lang-switch .seg-on { background: #fff; color: var(--navy); }

.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.user-btn { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 8px 3px 3px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.96); color: var(--text); list-style: none; }
.user-btn::-webkit-details-marker, summary::-webkit-details-marker { display: none; }
.user-name { font-weight: 600; font-size: 14px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; color: var(--text); }
.menu-right { left: auto; right: 0; }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 7px; cursor: pointer; text-align: left; text-decoration: none; color: var(--text); font-size: 14px; }
.menu-item:hover { background: var(--slate-soft); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-head { padding: 8px 10px 10px; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); margin-bottom: 6px; }

/* ---------- hero banner (Peidi x MeatyWay) ---------- */
.hero-banner { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); border-radius: 16px; overflow: hidden; margin-bottom: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--primary); }
.hero-copy { padding: 26px 28px; color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 10px; background: radial-gradient(500px 260px at 0% 0%, rgba(183,224,67,.16), transparent), linear-gradient(135deg, #1b5e3c 0%, #12422a 100%); }
.hero-eyebrow { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); color: #fef3c7; padding: 3px 10px; border-radius: 999px; }
.hero-brand { font-size: 28px; line-height: 1.15; letter-spacing: -.01em; font-weight: 800; }
.hero-tagline { font-size: 16px; font-weight: 600; color: #dcfce7; }
.hero-desc { font-size: 14px; color: rgba(255,255,255,.84); max-width: 52ch; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.hero-stat { font-size: 12px; font-weight: 600; background: rgba(0,0,0,.22); padding: 4px 10px; border-radius: 999px; color: #fff; }
.hero-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: #fde68a; text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(253,230,138,.4); }
.hero-link:hover { background: rgba(255,255,255,.12); }
.hero-media { position: relative; min-height: 230px; max-height: 280px; background: linear-gradient(135deg, #d9ecdf, #e8d5b7); overflow: hidden; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block; }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--slate-soft); color: #475569; white-space: nowrap; }
.badge-active { background: var(--green-soft); color: var(--green); }
.badge-new { background: var(--accent-soft); color: #b45309; }
.badge-preorder { background: #fef3c7; color: var(--amber); }
.badge-discontinued { background: var(--slate-soft); color: #64748b; }
.pet-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(10,60,125,.9); color: #fff; white-space: nowrap; }
.pet-both { background: rgba(27,94,60,.92); color: #fff; }
.pet-cat { background: rgba(124,58,237,.9); color: #fff; }
.role-admin { background: #e0e7ff; color: var(--navy); }
.role-viewer { background: var(--slate-soft); color: #475569; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover { background: var(--slate-soft); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #991b1b; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; padding: 11px; }
.icon-btn { border: 0; background: none; padding: 7px; border-radius: 8px; cursor: pointer; color: var(--muted); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--slate-soft); color: var(--text); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-danger:hover { background: var(--red-soft); color: var(--red); }
.link-btn { border: 0; background: none; color: var(--primary); cursor: pointer; font-weight: 600; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.input, .select { width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; }
.select { width: auto; padding-right: 8px; }
.textarea { resize: vertical; min-height: 80px; }
.input:focus, .select:focus, .btn:focus-visible, .card:focus-visible, .pill:focus-visible, .nav-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.search-wrap { position: relative; display: flex; align-items: center; flex: 1; min-width: 190px; max-width: 340px; }
.search-wrap > .icon { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.search-wrap .input { padding-left: 36px; padding-right: 34px; }
.kbd { position: absolute; right: 9px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; font-size: 11px; padding: 0 6px; color: var(--muted); background: #fff; pointer-events: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 17px; height: 17px; }

.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 26px; letter-spacing: -.01em; }
.page-head p { margin-top: 4px; }

/* ---------- catalog ---------- */
.pet-pills .seg-on { background: var(--primary); color: #fff; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.pill { border: 1px solid var(--line-strong); background: #fff; padding: 6px 13px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.pill:hover { border-color: var(--primary); }
.pill-on { background: var(--primary); color: #fff; border-color: var(--primary); }
.pill-n { font-size: 12px; opacity: .72; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.chips-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.chip { border: 1px solid var(--line); background: #fff; padding: 2px 10px; border-radius: 999px; cursor: pointer; font-size: 13px; color: #3d4842; display: inline-flex; gap: 6px; }
.chip:hover { border-color: var(--primary); }
.chip-on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-d); font-weight: 600; }
.chip-n { opacity: .55; }
.result-info { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 12px 30px rgba(27,94,60,.14); }
.card-media { position: relative; aspect-ratio: 16 / 10; background: #f3efe6; overflow: hidden; border-bottom: 1px solid var(--line); }
.card-img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.card-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.featured-flag { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--accent); display: grid; place-items: center; box-shadow: var(--shadow); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.sku { font-family: ui-monospace, Menlo, monospace; font-weight: 600; color: #3d4842; }
.card-cat { text-align: right; color: var(--primary-d); font-weight: 600; }
.card-title { font-size: 17px; line-height: 1.3; }
.card-alt { font-size: 13px; color: var(--muted); }
.card-summary { font-size: 14px; color: #47544d; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.card-foot { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-size: 14px; }
.foot-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 12px; background: var(--slate-soft); color: #47544d; border-radius: 6px; padding: 1px 8px; }
.empty { text-align: center; color: var(--muted); padding: 70px 20px; display: grid; justify-items: center; gap: 10px; }
.empty-cell { text-align: center; color: var(--muted); padding: 30px; }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #faf8f3; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-hover .row-click { cursor: pointer; }
.table-hover .row-click:hover td { background: #faf8f3; }
.td-thumb { width: 64px; }
.thumb { width: 52px; height: 38px; object-fit: cover; object-position: center; border-radius: 6px; background: #f3efe6; display: block; }
.thumb-empty { display: inline-grid; place-items: center; color: var(--muted); }
.cell-title { font-weight: 600; } .cell-sub { font-size: 12px; color: var(--muted); }
.actions { white-space: nowrap; text-align: right; }
.user-cell { display: flex; align-items: center; gap: 10px; }

/* ---------- admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); border-top: 3px solid var(--primary); }
.kpi-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.kpi-value { font-size: 24px; }
.subtabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.subtab { border: 0; background: none; padding: 10px 16px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtab-on { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,20,64,.55); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 16px; overflow-y: auto; }
.modal { position: relative; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; display: flex; flex-direction: column; margin: auto 0; }
.modal-sm { max-width: 440px; } .modal-md { max-width: 640px; } .modal-lg { max-width: 820px; } .modal-xl { max-width: 1080px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 19px; } .modal-sub { color: var(--muted); font-size: 14px; }
.modal > .modal-close { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(255,255,255,.92); }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: #faf8f3; border-radius: 0 0 16px 16px; }
.confirm-msg { color: #3d4842; }

.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; }
.gallery { min-width: 0; }
.stage { position: relative; aspect-ratio: 4 / 3; background: #f4f1ea; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.stage-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.stage-empty { color: var(--muted); display: grid; justify-items: center; gap: 8px; }
.nav-btn { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; }
.nav-prev { left: 10px; } .nav-next { right: 10px; }
.stage-count { position: absolute; top: 10px; right: 12px; z-index: 2; background: rgba(28,36,32,.72); color: #fff; font-size: 12px; padding: 1px 9px; border-radius: 999px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumb-btn { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; width: 74px; height: 56px; flex: none; cursor: pointer; background: #f4f1ea; }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.thumb-on { border-color: var(--primary); }
.info { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.info-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-right: 40px; }
.cat-label { color: var(--primary-d); font-size: 13px; font-weight: 600; }
.featured-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--amber); background: var(--amber-soft); padding: 2px 9px; border-radius: 999px; }
.detail-title { font-size: 25px; line-height: 1.25; letter-spacing: -.01em; }
.detail-alt { color: var(--muted); margin-top: -8px; }
.sku-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: #fff; border-radius: 8px; padding: 3px 10px; cursor: pointer; font-size: 13px; color: var(--muted); }
.sku-pill strong { color: var(--text); font-family: ui-monospace, Menlo, monospace; }
.sku-pill:hover { border-color: var(--primary); }
.sku-print { display: none; }
.detail-summary { font-size: 16px; color: #3d4842; }
.highlights { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.hl { background: var(--slate-soft); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.hl-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hl-value { font-size: 17px; }
.hl-sub { font-size: 12px; color: var(--muted); }
.block h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.spec-table th { text-align: left; width: 38%; background: #faf8f3; font-weight: 600; color: #47544d; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.resources { display: grid; gap: 8px; }
.resource { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: var(--text); }
.resource:hover { border-color: var(--primary); background: var(--primary-soft); }
.file-badge { flex: none; width: 42px; height: 42px; border-radius: 8px; background: var(--slate-soft); color: #3d4842; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.file-pdf { background: var(--red-soft); color: var(--red); }
.file-xls, .file-xlsx { background: var(--green-soft); color: var(--green); }
.file-doc, .file-docx, .file-link { background: #dbeafe; color: var(--navy); }
.file-video { background: var(--accent-soft); color: var(--amber); }
.resource-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.resource-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-sub, .resource-size { font-size: 12px; color: var(--muted); }
.resource-dl { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(2,6,23,.92); display: flex; justify-content: center; align-items: flex-start; overflow: auto; cursor: zoom-out; padding: 36px 24px; }
.lightbox img { max-width: min(100%, 960px); height: auto; margin: auto; background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox-close { position: fixed; top: 14px; right: 14px; color: #fff; z-index: 95; }
.lightbox-close:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ---------- forms ---------- */
.editor { display: flex; flex-direction: column; gap: 16px; }
.section { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 0; min-width: 0; display: grid; gap: 12px; }
.section legend { font-weight: 700; padding: 0 8px; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: #3d4842; }
.field-hint { font-size: 12px; color: var(--muted); }
.field-check { align-self: end; padding-bottom: 9px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.list-editor { display: grid; gap: 10px; }
.rows { display: grid; gap: 10px; }
.row-card { display: flex; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fcfbf7; align-items: flex-start; }
.row-fields { flex: 1; min-width: 0; display: grid; gap: 10px; }
.row-actions { display: flex; flex-direction: column; }
.row-add { display: flex; flex-wrap: wrap; gap: 8px; }
.img-row { display: flex; gap: 12px; align-items: flex-start; }
.img-prev { width: 72px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--slate-soft); flex: none; margin-top: 22px; }
.form-error { background: var(--red-soft); color: var(--red); border: 1px solid #fecaca; padding: 9px 12px; border-radius: 9px; font-size: 14px; }

.dropzone { border: 2px dashed var(--line-strong); border-radius: 12px; padding: 26px; text-align: center; display: grid; justify-items: center; gap: 4px; cursor: pointer; color: #47544d; background: #fcfbf7; }
.dropzone:hover, .dz-over { border-color: var(--primary); background: var(--primary-soft); }
.tpl { margin: 10px 0; }
.import-result { margin: 12px 0; display: grid; gap: 10px; }
.import-sum { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-stat { padding: 3px 12px; border-radius: 999px; background: var(--slate-soft); font-size: 13px; font-weight: 600; color: #47544d; }
.pill-stat.ok { background: var(--green-soft); color: var(--green); } .pill-stat.info { background: #dbeafe; color: var(--navy); }
.pill-stat.warn { background: var(--amber-soft); color: var(--amber); } .pill-stat.bad { background: var(--red-soft); color: var(--red); }
.issues { margin: 0; padding-left: 18px; font-size: 13px; max-height: 120px; overflow: auto; }
.issues .bad { color: var(--red); } .issues .warn { color: var(--amber); }
.preview-table { max-height: 240px; box-shadow: none; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.radio-card { display: flex; gap: 10px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 12px; cursor: pointer; align-items: flex-start; }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.radio-card span { display: flex; flex-direction: column; font-size: 14px; }
.radio-card small { color: var(--muted); }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(900px 500px at 15% -10%, rgba(27,94,60,.16), transparent), radial-gradient(800px 500px at 95% 110%, rgba(10,60,125,.14), transparent), var(--bg); }
.login-top { position: absolute; top: 18px; right: 22px; }
.login-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--primary); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 30px 30px 26px; display: grid; gap: 8px; }
.login-brand { margin-bottom: 6px; color: var(--navy); }
.login-brand .brand-sub { color: var(--primary); }
.login-card h1 { font-size: 24px; }
.login-form { display: grid; gap: 14px; margin-top: 12px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--primary); font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px 6px; }
.demo-box { margin-top: 16px; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 10px 12px; background: #faf8f3; display: grid; gap: 6px; }
.demo-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.demo-row code { flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* ---------- toast ---------- */
.toast-root { position: fixed; z-index: 100; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--text); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-lg); transition: opacity .4s, transform .4s; }
.toast-success { background: var(--primary); } .toast-error { background: #991b1b; }
.toast-out { opacity: 0; transform: translateY(8px); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-banner { grid-template-columns: 1fr; }
  .hero-media { min-height: 190px; max-height: 220px; order: -1; }
  .detail { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .user-name { display: none; }
}
@media (max-width: 640px) {
  .header-in { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .brand-sep, .brand-sub { display: none; }
  .container { padding: 18px 12px 40px; }
  .hero-copy { padding: 20px 18px; }
  .hero-brand { font-size: 22px; }
  .grid2, .grid3, .grid4, .modes { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 0; }
  .modal { border-radius: 0; min-height: 100vh; margin: 0; }
  .modal-foot { border-radius: 0; }
  .highlights { grid-template-columns: 1fr 1fr; }
  .search-wrap { max-width: none; min-width: 100%; }
  .detail-title { font-size: 21px; }
}

/* ---------- print: single product spec sheet ---------- */
@media print {
  body { background: #fff; font-size: 12px; }
  #app, .toast-root, .lightbox, .no-print { display: none !important; }
  .modal-backdrop { position: static; background: none; padding: 0; display: block; overflow: visible; }
  .modal-backdrop:not(:last-of-type) { display: none; }
  .modal { box-shadow: none; border-radius: 0; max-width: none; }
  .modal-body { padding: 0; }
  .detail { grid-template-columns: 1fr 1.2fr; gap: 18px; }
  .stage { aspect-ratio: auto; background: none; border: 0; }
  .stage-img { position: static; height: auto; max-height: 280px; cursor: auto; }
  .sku-print { display: block; font-family: ui-monospace, Menlo, monospace; color: #475569; }
  .hl, .spec-table th { background: #f2eee6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
