:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft Yahei", ui-sans-serif, system-ui, sans-serif;
  --ink: #201d38; --muted: #625f74; --line: #e6e3ef; --paper: #f7f6fb; --white: #fff;
  --accent: #5131bf; --accent-light: #eee7ff; --rail: #231b3d; --lime: #def384;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 16px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #876bf1; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 3vw, 2.6rem); letter-spacing: -.055em; line-height: 1.18; }
h2 { font-size: 1.15rem; line-height: 1.45; }
h3 { font-size: 1.1rem; }
small { font-size: .8rem; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.loading { margin: 4rem auto; text-align: center; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 41px; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink); font-size: .9rem; font-weight: 650; line-height: 1.25; text-align: center; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: #b8aed9; background: #faf8ff; }
.btn.primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn.primary:hover { background: #43259f; }
.btn.quiet { background: transparent; color: inherit; border-color: transparent; }
.btn.small { min-height: 32px; padding: .32rem .62rem; }
.btn.danger { color: #a32138; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .48rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { background: var(--lime); color: #231b3d; font-weight: 950; font-size: 28px; border-radius: 11px; width: 43px; height: 43px; text-align: center; line-height: 43px; }
.brand-text { display: grid; gap: .08rem; white-space: nowrap; }
.brand-text b { font-size: 1.08rem; letter-spacing: .15em; line-height: 1.1; }
.brand-text small { opacity: .75; }
.login-shell { display: grid; grid-template-columns: minmax(350px, 1fr) 1fr; min-height: 100svh; }
.login-panel { display: grid; place-items: center; padding: 2rem; }
.login-copy { width: min(100%, 365px); }
.login-copy h1 { margin: 2.75rem 0 1.55rem; }
.login-copy form { display: grid; gap: 1rem; }
.login-copy form button { margin-top: .38rem; }
.login-art { position: relative; overflow: hidden; display: grid; place-items: center; min-height: 20rem; margin: .85rem; border-radius: 22px; background: #251a46; isolation: isolate; }
.login-art span { position: absolute; z-index: -1; width: 88%; aspect-ratio: 1; border: 1px solid #5d497e; border-radius: 42%; transform: rotate(24deg); }
.login-art span:nth-child(2) { width: 70%; transform: rotate(48deg); }
.login-art span:nth-child(3) { width: 53%; transform: rotate(72deg); }
.login-art div { color: var(--lime); font-size: clamp(3.4rem, 10vw, 9rem); font-weight: 950; letter-spacing: -.075em; }
.workspace { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 2rem; padding: 1.65rem 1rem 1rem; background: var(--rail); color: #f4efff; }
.sidebar .brand { margin-left: .55rem; }
.sidebar nav { display: grid; gap: .3rem; }
.sidebar nav a { display: flex; align-items: center; gap: .63rem; padding: .66rem .67rem; border-radius: 9px; color: #e0d5f3; font-size: .91rem; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #453462; color: #fff; text-decoration: none; }
.sidebar nav a[aria-current] { font-weight: 700; }
.sidebar nav i { font-size: 1rem; color: #e2cdff; font-style: normal; width: 1.3rem; text-align: center; }
.sidebar-user { display: flex; align-items: center; gap: .55rem; margin-top: auto; padding: .75rem .25rem 0; border-top: 1px solid #4a3a68; }
.sidebar-user div { flex: 1; min-width: 0; display: grid; }
.sidebar-user b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .88rem; }
.sidebar-user small { color: #dfd0ef; }
.sidebar-user .btn { min-height: 36px; padding: .38rem; }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #604487; font-size: .86rem; flex: 0 0 auto; }
.topbar { display: flex; align-items: center; gap: .75rem; height: 58px; padding: 0 clamp(1.25rem, 4vw, 3.2rem); border-bottom: 1px solid var(--line); background: var(--white); font-size: .88rem; }
.topbar a,.topbar span { color: var(--muted); }
.page { max-width: 1510px; margin: auto; padding: 2.05rem clamp(1.25rem, 4vw, 3.2rem) 3rem; }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.title-row p { color: var(--muted); margin-top: .52rem; font-size: .96rem; line-height: 1.55; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.stat { display: grid; gap: .4rem; min-height: 95px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: .92rem 1rem; }
.stat span { color: var(--muted); font-size: .87rem; }
.stat strong { font-size: 1.75rem; line-height: 1; letter-spacing: -.035em; }
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-bottom: .9rem; }
.filter-bar .search { flex: 1; }
.filter-bar input[type=search] { min-width: min(260px, 100%); width: 100%; }
.filter-bar label:not(.check) { display: flex; align-items: center; gap: .5rem; }
label { display: grid; gap: .42rem; font-size: .9rem; font-weight: 620; }
input, select, textarea { width: 100%; padding: .6rem .68rem; min-height: 41px; border: 1px solid #dcd7e8; border-radius: 8px; background: #fff; color: var(--ink); font-size: .94rem; }
select { appearance: none; padding-right: 1.9rem; background-image: linear-gradient(45deg, transparent 50%, #655776 50%), linear-gradient(135deg, #655776 50%, transparent 50%); background-repeat: no-repeat; background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px; }
input[readonly] { background: #f2eff8; }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: .42rem; white-space: nowrap; }
.check input { width: 16px; height: 16px; min-height: 0; accent-color: var(--accent); }
.results-count { color: var(--muted); font-size: .85rem; margin: 1rem 0 .6rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .95rem; }
.product-card { display: flex; flex-direction: column; background: #fff; color: inherit; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.product-card:hover { border-color: #b6a4dc; text-decoration: none; }
.product-cover { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #f0e9fc; overflow: hidden; }
.product-cover img, .detail-cover img { width: 100%; height: 100%; object-fit: contain; }
.cover-placeholder,.detail-cover span { color: #8e75ba; font-size: 2.6rem; }
.card-body { display: grid; gap: .7rem; padding: .9rem; }
.eyeline { min-width: 0; overflow-wrap: anywhere; font-size: .79rem; color: var(--muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.badge { display: inline-flex; align-items: center; max-width: 100%; color: #4a4258; background: #efeaf5; border-radius: 100px; padding: .22rem .53rem; font-size: .77rem; line-height: 1.33; font-weight: 650; white-space: nowrap; }
.badge.green { color: #175038; background: #deeee2; }
.badge.blue { color: #214779; background: #e2ecff; }
.badge.violet { color: #4c2daa; background: #eee5fe; }
.badge.orange { color: #7e4118; background: #fae9d8; }
.card-data, .field-list { margin: 0; display: grid; gap: .74rem; }
.card-data { grid-template-columns: 1fr 1.35fr; padding-top: .65rem; border-top: 1px solid var(--line); }
dt { color: var(--muted); font-size: .83rem; margin-bottom: .21rem; }
dd { margin: 0; font-size: .93rem; font-weight: 650; overflow-wrap: anywhere; }
.empty { min-height: 182px; padding: 1.75rem; display: grid; place-content: center; justify-items: center; gap: .7rem; text-align: center; background: #fff; }
.catalog .empty { border: 1px dashed #d6caea; min-height: 268px; border-radius: 14px; }
.empty-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-light); color: var(--accent); font-size: 1.3rem; }
.empty p { color: var(--muted); font-size: .94rem; line-height: 1.55; }
.surface { margin-bottom: 1.15rem; background: #fff; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.section-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; padding: 1rem 1.14rem; border-bottom: 1px solid var(--line); }
.section-header p,.hint { color: var(--muted); font-size: .88rem; line-height: 1.55; margin-top: .29rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .87rem; }
th, td { padding: .72rem 1rem; border-bottom: 1px solid #eeebf4; min-width: 72px; }
th { color: #5c526f; font-weight: 650; background: #fbfaff; white-space: nowrap; }
td { overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
.back { margin-bottom: .8rem; font-size: .88rem; }
.product-overview { display: grid; grid-template-columns: minmax(140px, .98fr) 2fr; }
.detail-cover { display: grid; place-items: center; min-height: 224px; background: #f0e9fc; }
.detail-cover img { max-height: 365px; }
.overview-body,.pad { padding: 1.12rem; display: grid; gap: .9rem; }
.field-list { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.text-block { white-space: pre-wrap; font-size: .9rem; line-height: 1.65; color: #4e465f; }
.summary-strip { display: flex; flex-wrap: wrap; gap: .8rem 1.7rem; padding: .85rem 1.14rem; background: #fcfbff; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .87rem; }
.summary-strip strong { color: var(--ink); margin-left: .4rem; }
dialog { width: min(calc(100% - 1.6rem), 690px); max-height: calc(100% - 2rem); padding: 0; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); box-shadow: 0 22px 70px #17112f40; }
dialog::backdrop { background: #22183f77; }
.dialog-header,.dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: .55rem; flex-wrap: wrap; padding: .82rem 1.15rem; }
.dialog-header { border-bottom: 1px solid var(--line); }
.dialog-footer { border-top: 1px solid var(--line); }
.dialog-footer > div:last-child { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.dialog-body { padding: .9rem 1.15rem; }
.dialog-body .tag-row,.dialog-body .hint { margin-bottom: .85rem; }
.close { border: 0; background: transparent; color: #5b4d73; font-size: 1.6rem; padding: .1rem .4rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .84rem; }
.wide { grid-column: 1 / -1; }
.form-error { color: #a32138; font-size: .88rem; line-height: 1.5; }
.form-error:not(:empty) { margin-top: .55rem; }
#notice:not(:empty) { position: fixed; z-index: 10; bottom: 1rem; right: 1rem; max-width: calc(100vw - 2rem); padding: .72rem .95rem; border-radius: 8px; background: #2c2345; color: #fff; box-shadow: 0 8px 26px #29154d26; }
#notice.error { background: #8e2f49; }
@media (max-width: 890px) {
  .workspace { grid-template-columns: 175px minmax(0, 1fr); }
  .sidebar { padding-inline: .65rem; }
  .stat { min-height: 86px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 660px) {
  .login-shell,.workspace { display: flex; flex-direction: column; }
  .login-panel { min-height: 63svh; }
  .login-art { min-height: 15rem; }
  .sidebar { position: static; height: auto; padding: .78rem .8rem; gap: .72rem; }
  .sidebar .brand { margin-left: 0; }
  .sidebar nav { display: flex; gap: .2rem; overflow-x: auto; }
  .sidebar nav a { padding: .48rem .48rem; white-space: nowrap; }
  .sidebar nav i { display: none; }
  .sidebar-user { position: absolute; top: .72rem; right: .8rem; max-width: 45%; border: 0; padding: 0; }
  .topbar { height: 42px; }
  .page { padding-top: 1.35rem; }
  .section-header,.pad,.overview-body { padding: .8rem; }
  .product-overview { grid-template-columns: 1fr; }
  .detail-cover { min-height: 154px; }
  .detail-cover img { max-height: 250px; }
  .cards { grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); }
  .table-wrap { overflow: visible; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  tbody tr { display: grid; padding: .57rem .8rem; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { display: grid; grid-template-columns: 6.2rem minmax(0,1fr); align-items: baseline; gap: .55rem; min-width: 0; padding: .36rem 0; border: 0; }
  td::before { content: attr(data-label); color: var(--muted); }
  .table-wrap .btn { min-height: 39px; }
}
@media (max-width: 410px) {
  .form-grid { grid-template-columns: 1fr; }
  .filter-bar .search { min-width: 100%; }
}
