:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-2: #ebebef;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --surface-soft: rgba(246, 246, 248, 0.94);
  --line: rgba(17, 17, 17, 0.08);
  --line-strong: rgba(17, 17, 17, 0.14);
  --text: #111114;
  --text-soft: #53535a;
  --text-faint: #8a8a94;
  --accent: #4b5563;
  --accent-soft: rgba(75, 85, 99, 0.08);
  --success: #228b5a;
  --success-soft: rgba(34, 139, 90, 0.08);
  --warning: #b7791f;
  --warning-soft: rgba(183, 121, 31, 0.09);
  --danger: #c2413d;
  --danger-soft: rgba(194, 65, 61, 0.08);
  --shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.1);
  --shadow-md: 0 18px 44px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 10px 26px rgba(15, 23, 42, 0.06);
  --radius-xxl: 32px;
  --radius-xl: 26px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --max-width: 1480px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f8 42%, #efeff2 100%);
}

body {
  font-family:
    "SF Pro Display",
    "SF Pro Text",
    "Helvetica Neue",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 32%),
    radial-gradient(circle at right top, rgba(214, 214, 220, 0.26), transparent 24%),
    radial-gradient(circle at left bottom, rgba(221, 221, 226, 0.34), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f6f6f7 46%, #ececf0 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.92), transparent 18%),
    radial-gradient(circle at 84% 16%, rgba(255, 255, 255, 0.72), transparent 16%),
    radial-gradient(circle at 78% 76%, rgba(223, 223, 229, 0.3), transparent 18%);
  opacity: 1;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 1px 2px rgba(15, 23, 42, 0.03);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #9a9aa3;
}

textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.62;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(75, 85, 99, 0.18);
  box-shadow:
    0 0 0 4px rgba(75, 85, 99, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  background: #ffffff;
}

a {
  color: inherit;
}

code,
pre {
  font-family:
    "SF Mono",
    "SFMono-Regular",
    "Menlo",
    "Monaco",
    "Courier New",
    monospace;
}

code {
  background: rgba(15, 23, 42, 0.06);
  padding: 0.12rem 0.4rem;
  border-radius: 8px;
}

#app {
  position: relative;
  min-height: 100vh;
  z-index: 1;
}

.eyebrow,
.section-label {
  margin: 0 0 10px;
  color: var(--text-faint);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-copy h1,
.page-title,
.panel h2,
.empty-state h3,
.product-card h3,
.order-card h3,
.user-card h3,
.hero h1 {
  margin: 0;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(360px, 0.86fr);
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius-xxl);
  border: 1px solid rgba(17, 17, 17, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 248, 250, 0.88)),
    linear-gradient(140deg, rgba(255, 255, 255, 0.92), rgba(244, 244, 247, 0.82));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(28px) saturate(145%);
}

.login-copy {
  padding: 28px;
  border-radius: calc(var(--radius-xxl) - 8px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 246, 248, 0.82)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.92), transparent 34%);
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.login-copy h1 {
  font-size: clamp(1.62rem, 2.62vw, 3.15rem);
  line-height: 0.98;
  max-width: none;
  white-space: nowrap;
  letter-spacing: -0.055em;
}

.login-copy h1:lang(en) {
  font-size: clamp(1.18rem, 1.82vw, 2.08rem);
  line-height: 1;
  max-width: none;
  white-space: nowrap;
  text-wrap: nowrap;
}

.login-copy > p,
.muted-text,
.login-panel p,
.topbar-meta p,
.brand p,
.sidebar-user span,
.empty-state p {
  color: var(--text-soft);
  line-height: 1.7;
}

.login-points {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.bullet-card {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(247, 247, 249, 0.92);
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: var(--shadow-sm);
}

.bullet-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.login-panel {
  padding: 28px;
  border-radius: calc(var(--radius-xxl) - 8px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 248, 250, 0.88));
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: var(--shadow-md);
  display: grid;
  align-content: start;
  gap: 18px;
}

.login-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.language-inline {
  display: grid;
  gap: 6px;
}

.language-inline span {
  color: var(--text-faint);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.language-inline select {
  min-width: 160px;
}

.language-panel {
  justify-items: end;
  margin-left: auto;
}

.login-grid {
  display: grid;
  gap: 12px;
}

.demo-credentials {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(247, 247, 249, 0.94);
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.72;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.primary-button,
.ghost-button,
.danger-button,
.filter-chip,
.nav-button {
  border-radius: 999px;
}

.primary-button,
.ghost-button,
.danger-button {
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-button {
  background: linear-gradient(180deg, #8d8d94, #75757c);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(111, 111, 118, 0.22);
}

.primary-button:hover {
  box-shadow: 0 14px 32px rgba(111, 111, 118, 0.28);
}

.ghost-button {
  background: rgba(244, 244, 247, 0.94);
  color: var(--text);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.ghost-button:hover {
  background: rgba(236, 236, 239, 0.98);
  border-color: var(--line-strong);
}

.danger-button {
  background: rgba(255, 247, 246, 0.9);
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.14);
}

.danger-button:hover {
  background: rgba(180, 35, 24, 0.1);
}

.app-shell {
  width: min(calc(100vw - 40px), var(--max-width));
  min-height: calc(100vh - 40px);
  margin: 20px auto;
  padding: 12px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(252, 252, 253, 0.96), rgba(241, 241, 244, 0.92));
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(30px) saturate(150%);
}

.sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  min-height: calc(100vh - 64px);
  padding: 20px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(244, 244, 247, 0.98), rgba(236, 236, 240, 0.96));
  border: 1px solid rgba(17, 17, 17, 0.06);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  box-shadow: var(--shadow-md);
}

.brand,
.sidebar-footer,
.panel,
.metric-card,
.product-card,
.order-card,
.user-card,
.summary-card,
.stat-chip,
.metric,
.mini-metric,
.price-tile,
.order-meta,
.bullet-card,
.empty-state,
.table-wrap,
.flash,
.stock-chip {
  backdrop-filter: blur(18px) saturate(150%);
}

.brand {
  padding: 18px;
  border-radius: 22px;
  background: rgba(251, 251, 252, 0.96);
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.brand h1 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand h1:lang(en) {
  font-size: 1rem;
  line-height: 1.12;
  white-space: normal;
  max-width: 14ch;
  text-wrap: balance;
}

.nav-group {
  display: grid;
  align-content: start;
  gap: 10px;
}

.nav-label {
  padding: 0 12px;
  color: var(--text-faint);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-button {
  padding: 14px 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.34);
  color: inherit;
  text-align: left;
  display: grid;
  gap: 3px;
}

.nav-button.is-secondary {
  margin: -2px 0 2px 18px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(17, 17, 17, 0.03);
  border-radius: 18px;
}

.nav-button.is-secondary strong {
  font-size: 0.91rem;
}

.nav-button.is-secondary span {
  font-size: 0.78rem;
}

.nav-button strong {
  font-size: 0.97rem;
  font-weight: 600;
}

.nav-button span {
  font-size: 0.84rem;
  color: var(--text-faint);
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(17, 17, 17, 0.08);
}

.nav-button.is-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 244, 247, 0.94));
  border-color: rgba(17, 17, 17, 0.08);
  box-shadow: var(--shadow-sm);
}

.nav-button.is-secondary.is-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 246, 248, 0.94));
  border-color: rgba(17, 17, 17, 0.07);
}

.sidebar-footer {
  padding: 16px;
  border-radius: 22px;
  background: rgba(251, 251, 252, 0.96);
  border: 1px solid rgba(17, 17, 17, 0.06);
  display: grid;
  gap: 12px;
}

.sidebar-user {
  display: grid;
  gap: 4px;
}

.sidebar-user strong {
  font-size: 1rem;
}

.sidebar-balance {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
}

.sidebar-balance span {
  display: block;
  color: var(--text-faint);
  font-size: 0.82rem;
}

.sidebar-balance strong {
  display: block;
  margin-top: 6px;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
}

.sidebar-balance-stack {
  display: grid !important;
  gap: 4px;
}

.sidebar-balance-stack span {
  display: block;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.content-shell {
  min-width: 0;
  padding: 8px;
  display: grid;
  gap: 14px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(252, 252, 253, 0.98), rgba(245, 245, 248, 0.96));
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: var(--shadow-md);
}

.topbar-meta {
  display: grid;
  gap: 8px;
}

.topbar-meta .page-title {
  font-size: clamp(1.95rem, 3vw, 3rem);
  line-height: 0.96;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-content {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 24px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 247, 249, 0.94));
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: var(--shadow-md);
}

.panel-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel h2 {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.02;
}

.stack {
  display: grid;
  gap: 16px;
}

.dashboard-insight-stack {
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.order-detail-sections {
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.grid-2,
.grid-3,
.grid-4,
.summary-grid,
.product-grid,
.price-matrix,
.order-grid,
.user-metrics {
  display: grid;
  gap: 14px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.summary-card,
.metric,
.stat-chip,
.mini-metric,
.order-meta,
.price-tile {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(250, 250, 251, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: var(--shadow-sm);
}

.metric-card span,
.summary-card span,
.metric-label,
.stat-chip span,
.mini-metric span,
.order-meta span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-faint);
  font-size: 0.84rem;
  font-weight: 600;
}

.metric-card strong,
.summary-card strong {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.05em;
}

.metric strong,
.stat-chip strong,
.mini-metric strong,
.order-meta strong {
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}

.order-meta.order-meta-compact-time strong {
  font-size: 0.98rem;
  line-height: 1.48;
  letter-spacing: -0.015em;
}

.metric-card p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.66;
}

.metric-card.active strong {
  color: var(--success);
}

.metric-card.warn strong {
  color: var(--warning);
}

.metric-card.error strong {
  color: var(--danger);
}

.notice-stack {
  display: grid;
  gap: 10px;
}

.notice {
  padding: 15px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  font-size: 0.94rem;
  line-height: 1.68;
}

.notice.warning {
  background: rgba(251, 246, 237, 0.98);
  border-color: rgba(183, 121, 31, 0.16);
}

.notice.info {
  background: rgba(246, 247, 249, 0.98);
  border-color: rgba(75, 85, 99, 0.12);
}

.notice.muted {
  background: rgba(250, 250, 251, 0.98);
  color: var(--text-soft);
}

.flash {
  padding: 15px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(252, 252, 253, 0.98);
  box-shadow: var(--shadow-sm);
}

.flash.info {
  border-color: rgba(155, 188, 255, 0.14);
  background: rgba(155, 188, 255, 0.08);
}

.flash.success {
  border-color: rgba(132, 212, 170, 0.14);
  background: rgba(132, 212, 170, 0.08);
}

.flash.error {
  border-color: rgba(255, 141, 133, 0.14);
  background: rgba(255, 141, 133, 0.08);
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 246, 248, 0.96)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.92), transparent 38%);
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 14px;
}

.product-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(242, 242, 245, 0.96);
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.price-row strong {
  font-size: 2.55rem;
  letter-spacing: -0.08em;
}

.price-row span {
  color: var(--text-faint);
}

.stock-chip {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(132, 212, 170, 0.08);
  border: 1px solid rgba(132, 212, 170, 0.14);
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 600;
}

.product-actions,
.inline-actions,
.panel-actions,
.pill-row,
.filter-bar,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-actions {
  align-items: center;
}

.table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 1px 2px rgba(15, 23, 42, 0.03);
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

table.compact-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

table.compact-table th,
table.compact-table td {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.dashboard-insight-stack .compact-table,
.order-detail-sections .compact-table {
  font-size: 0.94rem;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(244, 244, 247, 0.98);
  color: #6d6d76;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

tbody tr:nth-child(even) {
  background: rgba(247, 247, 249, 0.7);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 600;
}

.status-pill.processing {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(0, 113, 227, 0.12);
}

.status-pill.completed,
.status-pill.active_unsold,
.status-pill.active {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(20, 128, 74, 0.12);
}

.status-pill.failed,
.status-pill.error,
.status-pill.inactive {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(180, 35, 24, 0.12);
}

.status-pill.unsold_redeemed,
.status-pill.redeemed,
.status-pill.sold {
  color: #8d4f08;
  background: rgba(154, 103, 0, 0.11);
  border-color: rgba(154, 103, 0, 0.12);
}

.status-pill.pending_check,
.status-pill.locked_for_order,
.status-pill.unknown {
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.08);
}

.code-block {
  margin: 0;
  padding: 18px;
  border-radius: 18px;
  background: rgba(246, 246, 248, 0.98);
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-all;
  overflow: auto;
}

.nested-panel {
  background: rgba(250, 250, 251, 0.88);
  border: 1px solid rgba(17, 17, 17, 0.05);
  box-shadow: none;
}

.detail-key-value {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.detail-key-value div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 17, 17, 0.05);
}

.detail-key-value span {
  font-size: 12px;
  color: var(--text-soft);
}

.detail-key-value strong {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}

.order-detail-sections table {
  min-width: 0;
  table-layout: fixed;
}

.order-detail-sections th,
.order-detail-sections td {
  word-break: break-word;
}

.empty-state {
  padding: 34px 24px;
  text-align: center;
  border-radius: var(--radius-xl);
  background: rgba(249, 249, 250, 0.95);
  border: 1px dashed var(--line-strong);
}

.toolbar-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.inventory-admin-grid {
  align-items: start;
}

.supplier-list {
  display: grid;
  gap: 12px;
}

.supplier-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(250, 250, 251, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: var(--shadow-sm);
}

.supplier-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.supplier-card-meta {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  color: var(--text-soft);
  font-size: 0.9rem;
}

.supplier-card-meta span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.user-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(252, 252, 253, 0.99), rgba(244, 244, 247, 0.96));
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: var(--shadow-sm);
}

.user-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.user-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-matrix {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-tile strong {
  font-size: 0.98rem;
}

.price-tile .muted-text {
  font-size: 0.84rem;
}

.filter-row {
  align-items: center;
}

.filter-row select,
.filter-row input {
  width: auto;
  min-width: 170px;
}

.order-card {
  padding: 22px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(252, 252, 253, 0.99), rgba(244, 244, 247, 0.96));
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 16px;
}

.order-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-shell {
  width: 100%;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 18px;
  padding: 30px;
  border-radius: 30px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 245, 247, 0.97)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.96), transparent 34%);
  box-shadow: var(--shadow-md);
}

.hero.hero-checker {
  grid-template-columns: 1fr;
  padding: 38px 40px;
  border-color: rgba(17, 17, 17, 0.055);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(246, 246, 248, 0.975)),
    radial-gradient(circle at top right, rgba(231, 231, 236, 0.5), transparent 38%),
    radial-gradient(circle at left bottom, rgba(255, 255, 255, 0.92), transparent 28%);
  box-shadow:
    0 22px 52px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.hero::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -90px;
  bottom: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 226, 232, 0.7), transparent 68%);
  pointer-events: none;
}

.hero.hero-checker::after {
  width: 340px;
  height: 340px;
  right: -110px;
  bottom: -140px;
  background: radial-gradient(circle, rgba(223, 223, 229, 0.42), transparent 70%);
}

.hero-copy {
  display: grid;
  align-content: start;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 0.92;
}

.hero-text {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.72;
}

.hero-substatus {
  margin: 14px 0 0;
  color: var(--text-faint);
  font-size: 0.92rem;
  line-height: 1.6;
}

.hero.hero-checker .hero-copy {
  gap: 0;
}

.hero.hero-checker .eyebrow {
  margin-bottom: 12px;
  color: #8d8d96;
}

.hero.hero-checker h1 {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(2.2rem, 4vw, 4.15rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
  color: #17171b;
}

.hero.hero-checker h1:lang(en) {
  max-width: 14ch;
  white-space: normal;
  text-wrap: balance;
  font-size: clamp(1.96rem, 3vw, 3.2rem);
  line-height: 1.02;
}

.hero.hero-checker .hero-text {
  max-width: 72ch;
  margin-top: 18px;
  color: #66666f;
  font-size: 1rem;
  line-height: 1.78;
}

.hero.hero-checker .hero-substatus {
  width: fit-content;
  margin-top: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: rgba(255, 255, 255, 0.88);
  color: #75757f;
  font-size: 0.84rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.hero-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.workspace {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-card {
  min-height: 110px;
}

.summary-card strong {
  font-size: 2rem;
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(248, 248, 250, 0.98);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-chip.is-active {
  background: rgba(232, 232, 236, 0.98);
  border-color: rgba(17, 17, 17, 0.1);
  color: #1f1f23;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(248, 248, 250, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.06);
  color: var(--text-soft);
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  padding: 0;
  min-width: 18px;
}

.chart-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(250, 250, 251, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.chart-metrics,
.tier-stock-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-meta {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.sales-chart {
  width: 100%;
  height: auto;
  display: block;
}

.sales-chart-grid line {
  stroke: rgba(15, 23, 42, 0.08);
  stroke-width: 1;
}

.sales-chart-grid text,
.sales-chart-point text {
  fill: var(--text-faint);
  font-size: 12px;
}

.sales-chart-area {
  fill: rgba(107, 114, 128, 0.1);
}

.sales-chart-line {
  fill: none;
  stroke: #6b7280;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-chart-point circle {
  fill: #ffffff;
  stroke: #6b7280;
  stroke-width: 2;
}

.text-profit {
  color: var(--success);
  font-weight: 700;
}

.text-loss {
  color: var(--danger);
  font-weight: 700;
}

.table-empty {
  padding: 28px 16px;
  color: var(--text-soft);
  text-align: center;
}

.table-link {
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}

.table-link:hover {
  text-decoration: underline;
}

.panel,
.metric-card,
.product-card,
.order-card,
.user-card,
.summary-card,
.hero,
.topbar,
.login-card,
.flash {
  animation: fade-slide-in 420ms ease both;
}

@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1240px) {
  .app-shell {
    width: min(calc(100vw - 28px), var(--max-width));
    margin: 14px auto;
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

  .toolbar-grid,
  .login-card,
  .hero {
    grid-template-columns: 1fr;
  }

  .grid-4,
  .summary-grid,
  .product-grid,
  .grid-3,
  .price-matrix,
  .order-grid,
  .user-metrics,
  .chart-metrics,
  .tier-stock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .login-screen {
    padding: 18px;
  }

  .login-card,
  .app-shell {
    width: calc(100vw - 20px);
    margin: 10px auto;
    padding: 10px;
    border-radius: 28px;
  }

  .login-copy,
  .login-panel,
  .topbar,
  .panel,
  .hero,
  .product-card,
  .order-card,
  .user-card {
    padding: 18px;
  }

  .content-shell {
    padding: 4px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .summary-grid,
  .product-grid,
  .price-matrix,
  .order-grid,
  .user-metrics,
  .chart-metrics,
  .tier-stock-grid {
    grid-template-columns: 1fr;
  }

  .filter-row select,
  .filter-row input,
  .panel-actions > *,
  .inline-actions > * {
    width: 100%;
  }

  .primary-button,
  .ghost-button,
  .danger-button {
    width: 100%;
  }

  table {
    min-width: 760px;
  }

  .hero.hero-checker {
    padding: 24px;
  }

  .hero.hero-checker h1 {
    white-space: normal;
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 0.98;
  }

  .login-panel-head {
    flex-direction: column;
  }

  .language-panel {
    width: 100%;
    justify-items: stretch;
    margin-left: 0;
  }
}
