/* Goods Scene Supplier Portal — light theme, restrained burgundy accents. System fonts only (no external assets). */
:root {
  --bg: #f7f5f2; --surface: #fff; --surface-2: #faf8f6; --surface-3: #f2eee9;
  --border: #e8e2db; --border-strong: #d7cfc6;
  --text: #1f1a17; --text-2: #4f4843; --muted: #857c75;
  --brand: #7f3135; --brand-hover: #6d3636; --brand-tint: #f7eeee; --brand-tint-2: #ecd9d9;
  --ok: #2f6b45; --ok-bg: #eaf4ed; --ok-line: #cfe5d6;
  --warn: #8a5a00; --warn-bg: #fdf5e4; --warn-line: #f0dcae;
  --bad: #a3302f; --bad-bg: #fbeded; --bad-line: #f1cccb;
  --info: #2c5a85; --info-bg: #ecf2f8; --info-line: #cfdeed;
  --radius: 12px; --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(31, 26, 23, .05);
  --shadow: 0 1px 2px rgba(31, 26, 23, .04), 0 6px 20px rgba(31, 26, 23, .06);
  --focus: 0 0 0 3px rgba(127, 49, 53, .22);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--brand); }
h1, h2, h3 { color: var(--text); letter-spacing: -.01em; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0; font-weight: 650; }
h2 { font-size: 1.02rem; margin: 0 0 .85rem; font-weight: 650; }
h3 { font-size: .92rem; margin: 0 0 .5rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .04em; word-break: break-all; }

/* ---- Top bar ---------------------------------------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; height: 60px; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); flex: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .78rem; letter-spacing: .02em; }
.brand-name { font-weight: 700; letter-spacing: -.01em; }
.brand-sub { color: var(--muted); font-size: .88rem; padding-left: .6rem; border-left: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: .25rem; height: 100%; }
.nav a { display: flex; align-items: center; gap: .4rem; height: 100%; padding: 0 .7rem; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .93rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; min-width: 0; }
.who { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; font-weight: 650; font-size: .85rem; flex: none; }
.who-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.who-email { font-size: .85rem; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.who-org { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.lang { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 999px; flex: none; }
.lang button { border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: .82rem; font-weight: 550; padding: .3rem .75rem; min-height: 32px; border-radius: 999px; cursor: pointer; }
.lang button:hover { background: rgba(255, 255, 255, .6); }
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.lang button:focus-visible { outline: none; box-shadow: var(--focus); }
.lang.large { padding: 4px; }
.lang.large button { min-height: 40px; padding: .45rem 1.2rem; font-size: .92rem; }

/* ---- Page ---------------------------------------------------------------------------------------------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.page-head .lead { color: var(--text-2); margin: .35rem 0 0; max-width: 62ch; }
.page-head .meta { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.back { display: inline-flex; align-items: center; gap: .3rem; color: var(--text-2); text-decoration: none; font-size: .9rem; font-weight: 500; margin-bottom: .8rem; background: none; border: 0; padding: 0; min-height: 0; cursor: pointer; }
.back:hover { color: var(--brand); background: none; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.25rem; align-items: start; }
.layout-2 > .main { grid-column: 1; grid-row: 1; }
.layout-2 > .side { grid-column: 2; grid-row: 1 / span 2; }
.layout-2 > .after { grid-column: 1; grid-row: 2; }
.stack { display: grid; gap: 1.25rem; align-content: start; }
.sticky { position: sticky; top: 80px; }

/* ---- Cards ---------------------------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.25rem 1.35rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .95rem; }
.card-head h2 { margin: 0; }
.card-foot { margin: 1.15rem -1.35rem -1.25rem; padding: .9rem 1.35rem; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.divider { height: 1px; background: var(--border); margin: 1.1rem 0; border: 0; }

/* ---- Forms ---------------------------------------------------------------------------------------------- */
.field { margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }
label, .label { display: block; font-weight: 600; font-size: .88rem; color: var(--text); margin: 0 0 .38rem; }
.req { color: var(--brand); margin-left: .15rem; }
.opt { color: var(--muted); font-weight: 400; margin-left: .3rem; font-size: .82rem; }
.help { color: var(--muted); font-size: .82rem; margin: .38rem 0 0; line-height: 1.45; }
.field-error { color: var(--bad); font-size: .82rem; margin: .38rem 0 0; }
input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  width: 100%; padding: .62rem .75rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text); font: inherit; line-height: 1.4; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #aaa29b; }
input:hover, textarea:hover, select:hover { border-color: #c5bcb2; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input:disabled, textarea:disabled { background: var(--surface-2); color: var(--text-2); }
textarea { min-height: 7.5rem; resize: vertical; }
.money { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; transition: border-color .15s, box-shadow .15s; max-width: 320px; }
.money:focus-within { border-color: var(--brand); box-shadow: var(--focus); }
.money.invalid { border-color: var(--bad); }
.money .affix { display: grid; place-items: center; padding: 0 .8rem; background: var(--surface-2); color: var(--text-2); font-weight: 650; font-size: .95rem; }
.money .affix.pre { border-right: 1px solid var(--border); }
.money .affix.post { border-left: 1px solid var(--border); font-size: .78rem; letter-spacing: .06em; }
.money input { border: 0; border-radius: 0; box-shadow: none !important; font-size: 1.08rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

/* ---- Buttons ---------------------------------------------------------------------------------------------- */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-weight: 600; font-size: .9rem; line-height: 1;
  padding: .66rem 1rem; min-height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
button:hover, .btn:hover { background: var(--surface-2); border-color: #c5bcb2; }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--focus); }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
button.danger { color: var(--bad); }
button.danger:hover { background: var(--bad-bg); border-color: var(--bad-line); }
button.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
button.ghost:hover { background: var(--surface-3); color: var(--text); }
button.block, .btn.block { width: 100%; }
button.sm { min-height: 32px; padding: .4rem .7rem; font-size: .84rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.is-busy { position: relative; color: transparent !important; pointer-events: none; }
button.is-busy .icon { visibility: hidden; }
button.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); border-right-color: transparent; animation: spin .7s linear infinite; }
button.primary.is-busy::after { border-color: #fff; border-right-color: transparent; }
.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--brand); font-weight: 550; text-decoration: none; cursor: pointer; }
.link:hover { background: none; text-decoration: underline; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.actions.end { justify-content: flex-end; }
.actions.stretch > * { flex: 1; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.lg { width: 24px; height: 24px; }

/* ---- Alerts / banner ---------------------------------------------------------------------------------------------- */
.banner-area { max-width: 1180px; margin: 0 auto; padding: 1rem 1.25rem 0; }
.banner-area:not([hidden]) + .wrap { padding-top: 1rem; }
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--ok-line); background: var(--ok-bg); color: #1f4a30; font-size: .92rem; }
.alert .icon { margin-top: .12rem; }
.alert.error { border-color: var(--bad-line); background: var(--bad-bg); color: #6f1f1e; }
.alert.warn { border-color: var(--warn-line); background: var(--warn-bg); color: #5f4000; }
.alert.info { border-color: var(--info-line); background: var(--info-bg); color: #1f4161; }
.alert strong { display: block; margin-bottom: .15rem; }
.alert-body { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.alert-close { margin-left: auto; background: none; border: 0; min-height: 0; padding: .15rem; color: inherit; opacity: .6; }
.alert-close:hover { opacity: 1; background: none; }

/* ---- Badges ---------------------------------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: .38rem; padding: .22rem .62rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; border: 1px solid var(--border); background: var(--surface-3); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.draft { background: #f1efec; color: #6b625b; border-color: #e5e0da; }
.badge.submitted_for_review { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge.changes_requested, .badge.pending { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge.approved, .badge.created { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge.failed { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.badge.none, .badge.skipped { background: transparent; border-color: transparent; color: var(--muted); padding-left: 0; }
.badge.none::before, .badge.skipped::before { display: none; }

/* ---- Filter tabs ---------------------------------------------------------------------------------------------- */
.tabs { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tab { min-height: 34px; padding: .4rem .85rem; border-radius: 999px; font-size: .86rem; font-weight: 550; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.tab .count { margin-left: .1rem; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.tab[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab[aria-pressed="true"]:hover { background: var(--brand-hover); }
.tab[aria-pressed="true"] .count { color: rgba(255, 255, 255, .82); }

/* ---- Product list ---------------------------------------------------------------------------------------------- */
.plist { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.prow { display: grid; grid-template-columns: 56px minmax(0, 2.4fr) minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 1fr) 92px; gap: 1rem; align-items: center; padding: .8rem 1.1rem; border-top: 1px solid var(--border); }
.plist.staff .prow { grid-template-columns: 56px minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .9fr); }
.prow:first-child { border-top: 0; }
.prow.head { padding-top: .55rem; padding-bottom: .55rem; background: var(--surface-2); color: var(--muted); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.prow.item { cursor: pointer; transition: background .12s; }
.prow.item:hover { background: #fcfaf8; }
.prow.item:focus-visible { outline: none; box-shadow: inset var(--focus); }
.c-action { text-align: right; }
.thumb-sm { width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--surface-3); border: 1px solid var(--border); overflow: hidden; display: grid; place-items: center; color: #b8afa7; }
.thumb-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-sub { color: var(--muted); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text); }
.price-missing { color: var(--warn); font-size: .84rem; font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.price-missing .icon { width: 15px; height: 15px; }
.date { color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; }

/* ---- Empty state ---------------------------------------------------------------------------------------------- */
.empty { text-align: center; padding: 3rem 1.5rem; }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; margin: 0 auto 1rem; }
.empty h2 { margin-bottom: .4rem; }
.empty p { color: var(--text-2); max-width: 48ch; margin: 0 auto 1.25rem; }

/* ---- Photos ---------------------------------------------------------------------------------------------- */
.dropzone { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.3rem 1rem; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--text-2); cursor: pointer; text-align: center; white-space: normal; min-height: 0; font-weight: 500; line-height: 1.4; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }
.dropzone strong { color: var(--text); font-weight: 650; }
.dropzone:hover strong, .dropzone.over strong { color: var(--brand); }
.dropzone .small { color: var(--muted); }
.dropzone.disabled, .dropzone.disabled:hover { cursor: default; border-color: var(--border-strong); background: var(--surface-2); color: var(--muted); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .6rem; margin-top: .9rem; }
.photo { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); border: 1px solid var(--border); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .tag { position: absolute; left: 6px; bottom: 6px; background: rgba(31, 26, 23, .74); color: #fff; font-size: .7rem; font-weight: 600; padding: .12rem .48rem; border-radius: 999px; }
.photo .remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .95); border: 1px solid var(--border); color: var(--text-2); }
.photo .remove .icon { width: 14px; height: 14px; }
.photo .remove:hover { color: var(--bad); background: #fff; }
.gallery-main { aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; color: #b8afa7; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-strip { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; padding-bottom: .2rem; }
.gallery-strip button { padding: 0; width: 64px; height: 64px; min-height: 0; border-radius: var(--radius-sm); overflow: hidden; flex: none; border: 2px solid var(--border); background: var(--surface-3); }
.gallery-strip button[aria-pressed="true"] { border-color: var(--brand); }
.gallery-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Read-only details ---------------------------------------------------------------------------------------------- */
.dl { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: .8rem 1rem; margin: 0; }
.dl dt { color: var(--muted); font-size: .86rem; padding-top: .05rem; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { padding: .18rem .6rem; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); font-size: .84rem; }
.notes { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem .85rem; color: var(--text-2); }

/* ---- Price panel ---------------------------------------------------------------------------------------------- */
.price-panel { border-color: var(--brand-tint-2); background: linear-gradient(180deg, #fff 0%, var(--brand-tint) 100%); }
.price-panel .label { color: var(--text-2); font-weight: 600; }
.price-panel .amount { font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; margin: .2rem 0 .3rem; }
.price-panel .per { color: var(--text-2); font-size: .86rem; margin: 0; }
.internal { display: flex; gap: .45rem; align-items: flex-start; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--brand-tint-2); color: var(--text-2); font-size: .82rem; }
.internal .icon { width: 16px; height: 16px; margin-top: .1rem; color: var(--brand); }

/* ---- Checklist ---------------------------------------------------------------------------------------------- */
.checklist { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; gap: .5rem; }
.checklist li { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--muted); }
.checklist .tick { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border-strong); flex: none; color: transparent; }
.checklist .tick .icon { width: 12px; height: 12px; stroke-width: 3; }
.checklist li.done { color: var(--text); }
.checklist li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ---- Timeline ---------------------------------------------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1.45rem; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: .42rem; width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 1.15rem; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li:first-child::before { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.timeline .t-state { font-weight: 600; font-size: .9rem; }
.timeline .t-date { color: var(--muted); font-size: .8rem; }
.timeline .t-comment { margin-top: .35rem; font-size: .88rem; color: var(--text-2); white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .45rem .65rem; }

/* ---- Tables (admin, account) ---------------------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 0 -1.35rem; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--muted); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: .55rem 1.35rem .55rem .6rem; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: .7rem 1.35rem .7rem .6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 1.35rem; }
.table tr:last-child td { border-bottom: 0; }
.table td.actions-cell { text-align: right; }
.table td.actions-cell .actions { justify-content: flex-end; flex-wrap: nowrap; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; margin-top: 1rem; align-items: center; }
.inline-form.user { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; margin-top: .6rem; }

/* ---- Sign-in ---------------------------------------------------------------------------------------------- */
.auth { min-height: calc(100vh - 170px); display: grid; place-items: center; padding: .5rem 0 2rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-head { text-align: center; margin-bottom: 1.4rem; }
.auth-head .brand-mark { width: 48px; height: 48px; border-radius: 13px; font-size: 1.05rem; margin: 0 auto .95rem; box-shadow: 0 6px 18px rgba(127, 49, 53, .25); }
.auth-head p { color: var(--text-2); margin: .45rem 0 0; }
.auth .card { padding: 1.6rem; box-shadow: var(--shadow); }
.auth-foot { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 1.1rem; }

/* ---- Loading ---------------------------------------------------------------------------------------------- */
.loading { display: flex; align-items: center; justify-content: center; gap: .6rem; color: var(--muted); padding: 4rem 0; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--border-strong); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 2px; position: fixed; top: 0; left: 0; right: 0; z-index: 30; overflow: hidden; pointer-events: none; }
body.busy .progress::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: var(--brand); animation: slide 1s ease-in-out infinite; }
@keyframes slide { to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; } }

/* ---- Responsive ---------------------------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .layout-2 { grid-template-columns: minmax(0, 1fr); }
  .layout-2 > .main, .layout-2 > .side, .layout-2 > .after { grid-column: 1; grid-row: auto; }
  .layout-2 > .main { order: 1; } .layout-2 > .side { order: 2; } .layout-2 > .after { order: 3; }
  .layout-2.side-first > .side { order: 0; }
  .sticky { position: static; }
  .brand-sub, .who-text { display: none; }
}
@media (max-width: 820px) {
  .prow.head { display: none; }
  .prow, .plist.staff .prow { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "thumb main status" "thumb price date"; gap: .3rem .85rem; padding: .85rem 1rem; }
  .plist.staff .prow { grid-template-areas: "thumb main status" "thumb supplier supplier" "thumb price date"; }
  .prow .c-thumb { grid-area: thumb; align-self: start; }
  .prow .c-main { grid-area: main; }
  .prow .c-status { grid-area: status; justify-self: end; }
  .prow .c-price { grid-area: price; }
  .prow .c-date { grid-area: date; justify-self: end; }
  .prow .c-supplier { grid-area: supplier; color: var(--muted); font-size: .84rem; }
  .prow .c-shopify, .prow .c-action { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .inline-form.user { grid-template-columns: 1fr 1fr; }
  .inline-form.user > :first-child { grid-column: 1 / -1; }
  .dl { grid-template-columns: 1fr; gap: .1rem; }
  .dl dd { margin-bottom: .7rem; }
}
@media (max-width: 640px) {
  .topbar-inner { height: auto; min-height: 56px; flex-wrap: wrap; gap: .4rem .75rem; padding: .55rem 1rem 0; }
  .nav { order: 3; width: calc(100% + 2rem); height: 44px; overflow-x: auto; margin: 0 -1rem; padding: 0 .5rem; border-top: 1px solid var(--border); }
  .nav a { white-space: nowrap; padding: 0 .65rem; }
  .who .avatar { width: 30px; height: 30px; }
  .wrap { padding: 1.2rem 1rem 2.5rem; }
  .banner-area { padding: .8rem 1rem 0; }
  h1 { font-size: 1.3rem; }
  .card { padding: 1.05rem 1rem; }
  .card-foot { margin: 1rem -1rem -1.05rem; padding: .85rem 1rem; }
  .table-wrap { margin: 0 -1rem; }
  .table th:first-child, .table td:first-child { padding-left: 1rem; }
  .page-head { margin-bottom: 1rem; }
  .page-head > button { width: 100%; }
  .price-panel .amount { font-size: 1.8rem; }
  .money { max-width: none; }
  .inline-form, .inline-form.user, .copy-row { grid-template-columns: 1fr; }
  .lang button { padding: .3rem .6rem; }
}

/* ---- Utilities ---------------------------------------------------------------------------------------------- */
.mb { margin-bottom: 1.25rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.steps { margin: 0; padding-left: 1.2rem; color: var(--text-2); display: grid; gap: .45rem; }
@media (max-width: 640px) { .hide-sm { display: none; } }
