:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-blue: #eff6ff;
  --ink: #101828;
  --ink-soft: #344054;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --primary: #155eef;
  --primary-dark: #004eeb;
  --primary-soft: #eaf2ff;
  --success: #079455;
  --success-soft: #ecfdf3;
  --warning: #dc6803;
  --warning-soft: #fffaeb;
  --danger: #d92d20;
  --danger-soft: #fef3f2;
  --purple: #6938ef;
  --purple-soft: #f4f3ff;
  --navy: #0b1839;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 12px 30px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 28px 72px rgba(16, 24, 40, 0.14);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
[hidden] { display: none !important; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-right { text-align: right; }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flex-wrap { flex-wrap: wrap; }

/* Buttons */
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 42px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 650;
  line-height: 1;
  transition: 160ms ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 7px 18px rgba(21, 94, 239, .22); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #fff; color: var(--ink-soft); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: #98a2b3; }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--surface-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 34px; padding: 8px 11px; border-radius: 8px; font-size: 13px; }
.btn-lg { min-height: 50px; padding: 14px 21px; border-radius: 12px; }
.btn svg { width: 17px; height: 17px; }
.icon-btn {
  width: 40px; height: 40px; padding: 0; border: 1px solid var(--line);
  background: #fff; border-radius: 10px; display: inline-grid; place-items: center;
  color: var(--ink-soft);
}
.icon-btn:hover { background: var(--surface-soft); }
.icon-btn svg { width: 20px; height: 20px; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 760; letter-spacing: -.02em; }
.brand img { width: 38px; height: 38px; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-name { font-size: 17px; }
.brand-sub { color: var(--muted); font-size: 11px; font-weight: 550; margin-top: 4px; letter-spacing: .02em; }

/* Landing */
.landing-body { background: #fff; }
.site-header {
  position: sticky; top: 0; z-index: 40; height: 76px; background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px); border-bottom: 1px solid rgba(228,231,236,.9);
}
.site-header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-nav { display: flex; align-items: center; gap: 30px; color: var(--ink-soft); font-size: 14px; }
.site-nav a:hover { color: var(--primary); }
.site-actions { display: flex; align-items: center; gap: 10px; }
.auth-identity { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero {
  position: relative; overflow: hidden; padding: 92px 0 80px;
  background:
    radial-gradient(circle at 68% 20%, rgba(64, 139, 255, .16), transparent 30%),
    radial-gradient(circle at 92% 80%, rgba(75, 225, 171, .11), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}
.hero:before {
  content: ""; position: absolute; inset: 0; opacity: .34;
  background-image: linear-gradient(#d7e3f5 1px, transparent 1px), linear-gradient(90deg, #d7e3f5 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(to bottom, #000, transparent 76%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: center; }
.eyebrow {
  width: fit-content; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 11px; border: 1px solid #c7d7fe; border-radius: 999px;
  color: #175cd3; background: rgba(239,246,255,.9); font-size: 13px; font-weight: 700;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(21,94,239,.12); }
.hero h1 { font-size: clamp(42px, 5vw, 68px); line-height: 1.08; letter-spacing: -.052em; margin: 22px 0 22px; max-width: 720px; }
.hero h1 span { color: var(--primary); }
.hero-lead { font-size: 19px; line-height: 1.75; color: var(--ink-soft); max-width: 690px; margin: 0; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; }
.hero-note { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-top: 22px; }
.hero-note svg { width: 18px; height: 18px; color: var(--success); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 34px; }
.hero-chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.82); color: var(--ink-soft); font-size: 13px; box-shadow: var(--shadow-sm); }

.network-card {
  position: relative; background: rgba(255,255,255,.88); border: 1px solid rgba(207,222,244,.92);
  border-radius: 28px; box-shadow: 0 34px 90px rgba(21, 94, 239, .17); padding: 26px;
  backdrop-filter: blur(12px); overflow: hidden;
}
.role-entry-panel {
  position: relative; display: grid; gap: 14px; padding: 20px;
  border: 1px solid rgba(207,222,244,.92); border-radius: 28px;
  background: rgba(255,255,255,.9); box-shadow: 0 34px 90px rgba(21,94,239,.17);
  backdrop-filter: blur(12px);
}
.role-entry-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.role-entry-head strong { color: var(--primary); font-size: 12px; }
.role-entry-card { display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.role-entry-card.operator-entry { background: linear-gradient(145deg, #fff 20%, #f5f8ff); }
.role-entry-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--primary); background: var(--primary-soft); }
.operator-entry .role-entry-icon { color: #6938ef; background: #f4f3ff; }
.role-entry-icon svg { width: 25px; height: 25px; }
.role-entry-copy { min-width: 0; }
.role-label { color: var(--primary); font-size: 11px; font-weight: 750; }
.operator-entry .role-label { color: #6938ef; }
.role-entry-copy h2 { margin: 5px 0 7px; font-size: 18px; letter-spacing: -.02em; }
.role-entry-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.role-entry-actions { grid-column: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.role-text-link { margin-left: auto; color: var(--primary); font-size: 11px; font-weight: 700; }
.role-entry-note { margin: 0; color: var(--muted); font-size: 10px; text-align: center; }
.network-card:after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(21,94,239,.08); right: -120px; top: -120px; }
.network-card-head { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; }
.network-card-title { font-size: 15px; font-weight: 750; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 700; }
.status-pill:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.success { color: var(--success); background: var(--success-soft); }
.status-pill.warning { color: var(--warning); background: var(--warning-soft); }
.status-pill.blue { color: var(--primary); background: var(--primary-soft); }
.supply-profile { position: relative; z-index: 1; margin-top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.supply-company { display: flex; align-items: center; gap: 13px; }
.company-avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); }
.company-avatar svg { width: 23px; height: 23px; }
.supply-company strong { font-size: 15px; }
.supply-company > span:not(.company-avatar) { display: block; min-width: 0; }
.supply-company > span:not(.company-avatar) > span { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }
.profile-progress { margin-top: 21px; }
.progress-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.progress { height: 8px; background: #eef2f6; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #53b1fd); }
.supply-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.supply-metric { padding: 13px; border-radius: 13px; background: var(--surface-soft); border: 1px solid #eef2f6; }
.supply-metric span { color: var(--muted); font-size: 11px; }
.supply-metric strong { display: block; margin-top: 7px; font-size: 17px; }
.network-path { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 8px; align-items: center; margin-top: 18px; }
.path-node { min-height: 74px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: center; font-size: 12px; color: var(--muted); }
.path-node strong { display: block; color: var(--ink); font-size: 13px; margin-top: 7px; }
.path-arrow { color: #84adff; font-size: 18px; }

.section { padding: 92px 0; }
.section-soft { background: var(--surface-soft); }
.section-dark { background: var(--navy); color: #fff; }
.section-heading { display: grid; gap: 13px; max-width: 720px; margin-bottom: 42px; }
.section-heading.center { margin-inline: auto; text-align: center; justify-items: center; }
.section-kicker { color: var(--primary); text-transform: uppercase; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.section h2 { margin: 0; font-size: clamp(31px, 4vw, 44px); letter-spacing: -.04em; line-height: 1.15; }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.75; font-size: 16px; }
.section-dark .section-heading p { color: #b8c6df; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { position: relative; min-height: 250px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 25px; background: #fff; overflow: hidden; }
.feature-card:hover { border-color: #b9ccf5; box-shadow: var(--shadow-md); transform: translateY(-2px); transition: 180ms ease; }
.feature-index { position: absolute; right: 18px; top: 15px; font-size: 46px; font-weight: 850; color: #edf2f9; letter-spacing: -.06em; }
.feature-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin: 22px 0 10px; font-size: 19px; }
.feature-card p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 14px; }
.feature-list { display: grid; gap: 9px; margin-top: 18px; padding: 0; list-style: none; color: var(--ink-soft); font-size: 13px; }
.feature-list li { display: flex; align-items: center; gap: 8px; }
.feature-list li:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #84adff; }

.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mode-card { border: 1px solid #243a65; background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); border-radius: 20px; padding: 26px; }
.mode-card .mode-tag { display: inline-flex; padding: 6px 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #c7d7fe; font-size: 12px; }
.mode-card h3 { margin: 20px 0 9px; font-size: 21px; }
.mode-card p { margin: 0; color: #aab9d2; line-height: 1.7; font-size: 14px; }
.mode-split { display: grid; gap: 11px; margin-top: 20px; }
.mode-row { display: flex; justify-content: space-between; gap: 12px; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.09); color: #aab9d2; font-size: 12px; }
.mode-row strong { color: #fff; font-weight: 650; text-align: right; }

.workflow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.workflow-step { position: relative; padding-right: 26px; }
.workflow-step:not(:last-child):after { content: ""; position: absolute; left: 48px; right: 0; top: 23px; height: 1px; background: #cfdcf3; }
.step-number { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; box-shadow: 0 8px 18px rgba(21,94,239,.18); }
.workflow-step h3 { font-size: 15px; margin: 18px 0 7px; }
.workflow-step p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 13px; }

.principle-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 58px; align-items: center; }
.principle-panel { border: 1px solid var(--line); border-radius: 24px; padding: 28px; background: #fff; box-shadow: var(--shadow-md); }
.data-layer { display: grid; grid-template-columns: 130px 1fr; gap: 18px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); }
.data-layer:last-child { border-bottom: 0; }
.data-layer-label { font-size: 13px; font-weight: 750; }
.data-layer-copy { color: var(--muted); font-size: 13px; line-height: 1.55; }
.principle-copy h2 { margin-bottom: 20px; }
.principle-copy > p { color: var(--muted); line-height: 1.8; }
.quote-box { margin-top: 24px; padding: 18px 20px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 0 14px 14px 0; color: #194185; line-height: 1.7; font-weight: 650; }

.cta-band { padding: 70px 0; background: linear-gradient(115deg, #0a2a66, #155eef 58%, #0e9384); color: #fff; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.cta-inner h2 { margin: 0; font-size: clamp(30px, 4vw, 43px); letter-spacing: -.04em; }
.cta-inner p { margin: 12px 0 0; color: #d7e5ff; line-height: 1.65; }
.cta-actions { display: flex; gap: 10px; }
.cta-actions .btn-secondary { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.1); color: #fff; }
.site-footer { padding: 44px 0; background: #071126; color: #b8c6df; }
.footer-inner { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 42px; }
.footer-brand p { font-size: 13px; line-height: 1.75; max-width: 330px; }
.footer-column h4 { color: #fff; font-size: 13px; margin: 0 0 15px; }
.footer-column { display: grid; align-content: start; gap: 10px; font-size: 13px; }
.footer-column a:hover { color: #fff; }
.footer-bottom { margin-top: 34px; padding-top: 22px; border-top: 1px solid #17264a; display: flex; justify-content: space-between; font-size: 12px; color: #8291ac; }

/* Forms and auth */
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: #fff; }
.auth-aside { position: relative; padding: 52px clamp(34px, 6vw, 92px); color: #fff; overflow: hidden; background: linear-gradient(145deg, #071b47, #0d47b7 64%, #147d86); }
.auth-aside:before { content: ""; position: absolute; width: 660px; height: 660px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; right: -300px; top: -220px; box-shadow: 0 0 0 90px rgba(255,255,255,.025), 0 0 0 180px rgba(255,255,255,.02); }
.auth-aside .brand { position: relative; z-index: 1; }
.auth-aside .brand-sub { color: #c7d7fe; }
.auth-copy { position: relative; z-index: 1; max-width: 580px; margin-top: min(18vh, 160px); }
.auth-copy h1 { font-size: clamp(38px, 4.7vw, 62px); line-height: 1.12; letter-spacing: -.05em; margin: 0; }
.auth-copy p { color: #cbd8ed; font-size: 17px; line-height: 1.8; }
.auth-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 36px; }
.auth-point { padding: 15px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.06); font-size: 13px; color: #dbe7f8; }
.auth-main { display: grid; place-items: center; padding: 40px; }
.auth-box { width: min(430px, 100%); }
.auth-box h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; }
.auth-box > p { color: var(--muted); line-height: 1.6; margin: 10px 0 28px; }
.form-group { display: grid; gap: 7px; }
.form-label { color: var(--ink-soft); font-size: 13px; font-weight: 650; }
.form-hint { color: var(--muted); font-size: 12px; line-height: 1.5; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff;
  color: var(--ink); min-height: 43px; padding: 10px 12px; outline: none; box-shadow: var(--shadow-sm);
  transition: border 140ms ease, box-shadow 140ms ease;
}
.textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: #84adff; box-shadow: 0 0 0 4px rgba(21,94,239,.10); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: #f97066; box-shadow: 0 0 0 4px rgba(217,45,32,.08); }
.form-error { color: var(--danger); font-size: 12px; min-height: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.form-grid .full { grid-column: 1 / -1; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.checkbox-row input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.option-card { position: relative; display: block; min-width: 0; cursor: pointer; }
.option-card input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.option-card-content {
  position: relative; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box;
  width: 100%; height: 100%; min-height: 88px; padding: 16px 18px 16px 50px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.option-card-content:before {
  content: ""; position: absolute; left: 18px; top: 50%; width: 18px; height: 18px;
  border: 1px solid var(--line-strong); border-radius: 6px; background: #fff;
  transform: translateY(-50%); transition: 140ms ease;
}
.option-card-content:after {
  content: "✓"; position: absolute; left: 23px; top: 50%; color: #fff; font-size: 11px; font-weight: 800;
  opacity: 0; transform: translateY(-52%); transition: opacity 140ms ease;
}
.option-card-content strong { display: block; font-size: 14px; }
.option-card-content span { display: block; color: var(--muted); margin-top: 6px; font-size: 12px; line-height: 1.45; }
.option-card:hover .option-card-content { border-color: #b7c9e8; background: #fbfcff; }
.option-card input:focus-visible + .option-card-content { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,94,239,.10); }
.option-card input:checked + .option-card-content { border-color: var(--primary); background: var(--primary-soft); box-shadow: none; }
.option-card input:checked + .option-card-content:before { border-color: var(--primary); background: var(--primary); }
.option-card input:checked + .option-card-content:after { opacity: 1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-message { min-height: 20px; font-size: 13px; color: var(--danger); }
.auth-links { display: flex; justify-content: space-between; gap: 20px; margin-top: 22px; color: var(--muted); font-size: 13px; }
.auth-links a:hover { color: var(--primary); }

/* Supplier application */
.apply-body { min-height: 100vh; background: var(--surface-soft); }
.apply-header { height: 72px; border-bottom: 1px solid var(--line); background: #fff; }
.apply-header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.apply-layout { display: grid; grid-template-columns: 270px minmax(0, 760px); justify-content: center; gap: 30px; padding: 44px 0 80px; }
.apply-aside { align-self: start; position: sticky; top: 100px; }
.apply-aside h1 { font-size: 26px; line-height: 1.25; margin: 0 0 9px; }
.apply-aside > p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.step-list { display: grid; gap: 4px; margin-top: 28px; }
.step-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 10px; border-radius: 12px; color: var(--muted); }
.step-item.active { color: var(--ink); background: #fff; box-shadow: var(--shadow-sm); }
.step-item.done { color: var(--success); }
.step-bullet { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line-strong); font-size: 12px; font-weight: 750; background: #fff; }
.step-item.active .step-bullet { color: #fff; background: var(--primary); border-color: var(--primary); }
.step-item.done .step-bullet { color: #fff; background: var(--success); border-color: var(--success); }
.step-copy strong { display: block; font-size: 13px; margin-top: 2px; }
.step-copy span { display: block; font-size: 11px; margin-top: 4px; line-height: 1.45; }
.apply-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.apply-card-head { padding: 25px 28px; border-bottom: 1px solid var(--line); }
.apply-card-head h2 { margin: 0; font-size: 21px; }
.apply-card-head p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.apply-card-body { padding: 27px 28px; }
.apply-step { display: none; }
.apply-step.active { display: block; }
.review-grid { display: grid; gap: 12px; }
.review-item { display: grid; grid-template-columns: 120px 1fr; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.review-item span { color: var(--muted); }
.success-state { text-align: center; padding: 48px 24px; }
.success-icon { width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 21px; display: grid; place-items: center; color: var(--success); background: var(--success-soft); }
.success-icon svg { width: 36px; height: 36px; }
.success-state h2 { font-size: 26px; margin: 0; }
.success-state p { color: var(--muted); line-height: 1.7; max-width: 500px; margin: 12px auto 22px; }
.application-no { width: fit-content; margin: 0 auto 26px; padding: 10px 14px; border-radius: 10px; background: var(--surface-soft); border: 1px solid var(--line); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* App shell */
.app-body { overflow: hidden; background: var(--bg); }
.app-shell { height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { height: 100vh; background: #0b1736; color: #fff; display: flex; flex-direction: column; padding: 22px 16px 16px; overflow-y: auto; }
.sidebar .brand { padding: 0 8px 22px; }
.sidebar .brand-sub { color: #8ea1c4; }
.sidebar-nav { display: grid; gap: 4px; }
.nav-section-label { margin: 17px 11px 8px; color: #6f84a9; font-size: 10px; text-transform: uppercase; font-weight: 800; letter-spacing: .12em; }
.nav-item { width: 100%; border: 0; padding: 10px 11px; border-radius: 9px; background: transparent; color: #aab9d2; display: flex; align-items: center; gap: 11px; text-align: left; font-size: 13px; font-weight: 600; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: #155eef; box-shadow: 0 7px 18px rgba(21,94,239,.24); }
.nav-item svg { width: 18px; height: 18px; }
.nav-badge { margin-left: auto; padding: 3px 6px; border-radius: 999px; background: rgba(255,255,255,.11); color: #d8e3f5; font-size: 9px; }
.sidebar-footer { margin-top: auto; padding-top: 20px; }
.supplier-mini { padding: 13px; border: 1px solid #21345b; border-radius: 12px; background: rgba(255,255,255,.035); }
.supplier-mini strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.supplier-mini span { display: block; color: #8296b9; margin-top: 5px; font-size: 10px; }

.app-main { min-width: 0; height: 100vh; overflow: hidden; display: grid; grid-template-rows: 68px 1fr; }
.topbar { background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; gap: 20px; }
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mobile-menu { display: none; }
.page-title { font-size: 16px; font-weight: 750; white-space: nowrap; }
.breadcrumb { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.user-menu { display: flex; align-items: center; gap: 10px; padding-left: 9px; }
.user-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #155eef, #5b8def); font-size: 12px; font-weight: 800; }
.user-copy { line-height: 1.2; }
.user-copy strong { display: block; font-size: 12px; }
.user-copy span { color: var(--muted); font-size: 10px; }
.app-content { overflow-y: auto; padding: 26px 28px 54px; }
.app-view { display: none; max-width: 1480px; margin: 0 auto; }
.app-view.active { display: block; }
.view-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.view-heading h1 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.view-heading p { margin: 7px 0 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.view-actions { display: flex; gap: 10px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; }
.metric-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 18px; box-shadow: var(--shadow-sm); }
.metric-card-top { display: flex; justify-content: space-between; align-items: center; }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-icon { width: 33px; height: 33px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-soft); color: var(--ink-soft); }
.metric-icon svg { width: 17px; height: 17px; }
.metric-card[data-tone="blue"] .metric-icon { color: var(--primary); background: var(--primary-soft); }
.metric-card[data-tone="green"] .metric-icon { color: var(--success); background: var(--success-soft); }
.metric-card[data-tone="orange"] .metric-icon { color: var(--warning); background: var(--warning-soft); }
.metric-card[data-tone="purple"] .metric-icon { color: var(--purple); background: var(--purple-soft); }
.metric-value { margin-top: 13px; font-size: 28px; font-weight: 780; letter-spacing: -.04em; }
.metric-hint { color: var(--muted); margin-top: 5px; font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(330px,.8fr); gap: 16px; margin-top: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 14px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 18px 19px; }
.onboarding-overview { display: grid; grid-template-columns: 118px 1fr; gap: 24px; align-items: center; }
.progress-ring { position: relative; width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) var(--progress, 0%), #edf2f7 0); }
.progress-ring:before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #fff; }
.progress-ring-copy { position: relative; text-align: center; }
.progress-ring-copy strong { display: block; font-size: 25px; }
.progress-ring-copy span { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; }
.checklist { display: grid; gap: 8px; }
.check-item { display: grid; grid-template-columns: 29px 1fr auto; gap: 10px; align-items: center; padding: 9px; border-radius: 10px; }
.check-item:hover { background: var(--surface-soft); }
.check-mark { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--muted); }
.check-item.done .check-mark { color: #fff; border-color: var(--success); background: var(--success); }
.check-mark svg { width: 14px; height: 14px; }
.check-copy strong { display: block; font-size: 12px; }
.check-copy span { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; line-height: 1.4; }
.check-action { color: var(--primary); font-size: 11px; font-weight: 650; }
.event-list { display: grid; gap: 2px; }
.event-item { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: start; padding: 10px 4px; border-bottom: 1px solid #f0f2f5; }
.event-item:last-child { border-bottom: 0; }
.event-dot { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 800; }
.event-copy strong { display: block; font-size: 11px; }
.event-copy span { display: block; color: var(--muted); margin-top: 4px; font-size: 10px; line-height: 1.45; }
.event-time { color: #98a2b3; font-size: 9px; white-space: nowrap; }

.data-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); overflow: hidden; }
.toolbar { min-height: 61px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 9px; }
.search-box { position: relative; width: 280px; }
.search-box svg { position: absolute; width: 16px; height: 16px; left: 11px; top: 50%; transform: translateY(-50%); color: #98a2b3; }
.search-box .input { padding-left: 34px; min-height: 38px; }
.toolbar-filter { width: 180px; min-height: 38px; box-shadow: none; }
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { height: 42px; padding: 9px 13px; color: var(--muted); background: var(--surface-soft); font-weight: 650; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.data-table td { padding: 12px 13px; border-bottom: 1px solid #edf0f3; vertical-align: middle; }
.data-table tbody tr:hover { background: #fbfcfe; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.table-primary { font-weight: 650; color: var(--ink); }
.table-secondary { color: var(--muted); margin-top: 4px; font-size: 10px; }
.table-empty { padding: 58px 20px !important; text-align: center; color: var(--muted); }
.table-empty strong { display: block; color: var(--ink-soft); margin-bottom: 7px; }
.table-error, .table-error strong { color: var(--danger); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 8px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.badge-active, .badge-approved, .badge-completed { color: var(--success); background: var(--success-soft); }
.badge-draft, .badge-pending { color: var(--warning); background: var(--warning-soft); }
.badge-paused, .badge-partial { color: var(--purple); background: var(--purple-soft); }
.badge-archived, .badge-expired, .badge-failed, .badge-rejected, .badge-suspended { color: var(--danger); background: var(--danger-soft); }
.table-footer { padding: 11px 14px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); }
.table-result-count { flex: 0 0 auto; white-space: nowrap; }
.table-result-count + .unified-pagination { width: auto; flex: 1 1 auto; }
.table-pagination { display: flex; align-items: center; gap: 9px; }
.unified-pagination { width: 100%; min-height: 54px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; color: #66758f; font-size: 12px; }
.pager-size { justify-self: start; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.pager-size select { appearance: none; min-width: 84px; height: 42px; padding: 0 34px 0 16px; border: 0; border-radius: 14px; color: #344054; background: #f2f5f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath fill='%237aa7df' d='M1 1l6 6 6-6z'/%3E%3C/svg%3E") no-repeat right 14px center; font: inherit; font-size: 12px; cursor: pointer; }
.pager-pages { display: flex; align-items: center; justify-content: center; gap: 5px; }
.pager-page, .pager-arrow { width: 32px; height: 36px; padding: 0; border: 0; border-radius: 9px; color: #66758f; background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.pager-page:hover, .pager-arrow:hover:not(:disabled) { color: var(--ink); background: #f2f5f9; }
.pager-page.active { color: #101828; font-weight: 750; }
.pager-arrow { color: #9fb0c3; font-size: 20px; line-height: 1; }
.pager-arrow:disabled { color: #d4dde7; cursor: default; }
.pager-ellipsis { min-width: 24px; text-align: center; color: #9fb0c3; }
.pager-range { justify-self: end; white-space: nowrap; font-size: 12px; }
.metric-card-link { cursor: pointer; transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease; }
.metric-card-link:hover { transform: translateY(-1px); border-color: #b9c9e5; box-shadow: var(--shadow-md); }
.metric-card-link:focus-visible { outline: 3px solid rgba(47, 111, 237, .22); outline-offset: 2px; }
.dashboard-grid-single { grid-template-columns: minmax(0, 1fr); }

.import-process-panel { margin-bottom: 16px; }
.import-source-panel { margin-bottom: 16px; }
.import-workbook-config { margin-bottom: 16px; }
.smart-import-form { display: grid; gap: 16px; }
.import-description { min-height: 92px; }
.dropzone { border: 1.5px dashed #b6c8e8; border-radius: 15px; padding: 46px 24px; text-align: center; background: #fbfdff; transition: 150ms ease; }
.dropzone.dragging { border-color: var(--primary); background: var(--primary-soft); }
.dropzone.has-file { border-style: solid; border-color: #84adff; background: var(--primary-soft); }
.dropzone-icon { width: 50px; height: 50px; border-radius: 15px; margin: 0 auto 16px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); }
.dropzone-icon svg { width: 26px; height: 26px; }
.dropzone h3 { margin: 0; font-size: 15px; }
.dropzone p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.dropzone input { display: none; }
.import-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.import-actions > span { color: var(--muted); font-size: 11px; }
.import-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.guide-item { display: grid; grid-template-columns: 27px 1fr; gap: 10px; }
.guide-number { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); font-size: 10px; font-weight: 800; }
.guide-copy strong { display: block; font-size: 12px; }
.guide-copy span { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 4px; }
.import-sheet-list { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; }
.import-sheet-chip { display: inline-flex; align-items: center; gap: 8px; min-width: 140px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink-soft); background: #fff; cursor: pointer; transition: 150ms ease; }
.import-sheet-chip:hover { border-color: #b6c8e8; }
.import-sheet-chip.selected { border-color: #84adff; background: var(--primary-soft); box-shadow: inset 0 0 0 1px rgba(24,97,212,.08); }
.import-sheet-chip input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.import-sheet-chip span { min-width: 0; }
.import-sheet-chip strong, .import-sheet-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-sheet-chip strong { font-size: 11px; }
.import-sheet-chip small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.import-sheet-configs { display: grid; gap: 14px; margin-bottom: 16px; }
.import-sheet-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.import-sheet-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.import-sheet-card-head h3 { margin: 0; font-size: 14px; }
.import-sheet-card-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.import-header-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.import-header-row .input { width: 76px; min-height: 34px; padding: 6px 8px; box-shadow: none; }
.import-sheet-sample { margin-bottom: 14px; padding: 10px 11px; border-radius: 10px; background: var(--surface-soft); overflow: hidden; }
.import-sheet-sample > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 700; }
.import-sheet-sample-row { display: flex; gap: 12px; overflow: hidden; color: var(--ink-soft); font-size: 9px; white-space: nowrap; }
.import-sheet-sample-row + .import-sheet-sample-row { margin-top: 5px; }
.import-sheet-sample-row span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.import-sheet-sample-row strong { color: var(--muted); margin-right: 3px; }
.import-sheet-mappings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.import-preview { margin-top: 15px; }
.import-warning { margin-bottom: 14px; padding: 10px 12px; border: 1px solid #fedf89; border-radius: 10px; color: #93370d; background: var(--warning-soft); font-size: 11px; line-height: 1.55; }
.import-section-title { margin: 0 0 12px; color: var(--ink-soft); font-size: 13px; }
.import-mapping-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.import-mapping-item { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.import-mapping-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.import-mapping-title strong { font-size: 11px; }
.required-mark { color: var(--danger); }
.mapping-confidence { color: var(--muted); font-size: 9px; }
.mapping-confidence.high { color: var(--success); }
.mapping-confidence.medium { color: var(--primary); }
.import-mapping-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(105px, .6fr); gap: 7px; }
.import-mapping-controls .select, .import-mapping-controls .input { min-height: 36px; padding: 7px 9px; font-size: 11px; box-shadow: none; }
.import-preview-table-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.import-preview-table-head .import-section-title { margin-bottom: 4px; }
.import-preview-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.import-preview-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.import-preview-filters, .import-pagination { display: flex; align-items: center; gap: 9px; }
.import-preview-filters .select { min-width: 160px; min-height: 34px; padding: 6px 9px; box-shadow: none; font-size: 11px; }
.import-preview-filters .checkbox-row { align-items: center; font-size: 11px; white-space: nowrap; }
.import-preview-filters .checkbox-row input { margin-top: 0; }
.import-preview-table { min-width: 1900px; }
.import-preview-table th, .import-preview-table td { padding: 8px 7px; white-space: nowrap; }
.import-cell-input { min-height: 34px; min-width: 96px; padding: 6px 8px; font-size: 11px; box-shadow: none; }
.import-cell-input[data-row-field="product_name"] { min-width: 180px; }
.import-cell-input[data-row-field="brand"], .import-cell-input[data-row-field="model"] { min-width: 120px; }
.import-cell-input[data-row-field="category"] { min-width: 150px; }
.import-cell-input[data-row-field="supplier_sku"] { min-width: 145px; }
.import-cell-input[data-row-field="fulfillment_mode"] { min-width: 130px; }
.import-row-source { color: var(--muted); font-size: 10px; }
.import-row-delete { color: var(--danger); }
.import-preview-table tr.row-invalid td { background: #fff9f8; }
.import-preview-table tr.row-conflict td { background: #fff4ed; }
.import-preview-table tr.row-excluded td { color: var(--muted); background: #f7f8fa; opacity: .72; }
.import-preview-table tr.row-excluded .import-cell-input { text-decoration: line-through; }
.import-row-errors { color: var(--danger); font-size: 10px; }
.import-result { margin-top: 15px; }
.import-job-list { display: grid; }
.import-job { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.import-job:last-child { border-bottom: 0; }
.import-job strong { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-job span { display: block; color: var(--muted); margin-top: 5px; font-size: 9px; }
.import-error-details { grid-column: 1 / -1; border-radius: 10px; background: #fff7ed; padding: 10px 12px; color: #9a3412; }
.import-error-details summary { cursor: pointer; font-size: 10px; font-weight: 700; }
.import-error-summary { margin-top: 9px; border-top: 1px solid #fed7aa; padding-top: 9px; }
.import-error-summary strong { color: #9a3412; white-space: normal; }
.import-error-summary p { margin: 6px 0 0; font-size: 10px; line-height: 1.6; }
.import-retry-action { font-size: 11px; }
.brand-mode-panel { margin-bottom: 16px; }
.brand-mode-list { display: grid; }
.brand-mode-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 260px) auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.brand-mode-item strong, .brand-mode-item span { display: block; }
.brand-mode-item strong { font-size: 12px; }
.brand-mode-item span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.brand-mode-help { margin: 0; padding: 0 16px 14px; color: var(--muted); font-size: 10px; }
@media (max-width: 720px) { .brand-mode-item { grid-template-columns: 1fr; } }

.placeholder-card { min-height: 370px; display: grid; place-items: center; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.placeholder-inner { max-width: 470px; padding: 38px; }
.placeholder-icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 18px; color: var(--primary); background: var(--primary-soft); }
.placeholder-icon svg { width: 27px; height: 27px; }
.placeholder-inner h2 { margin: 0; font-size: 19px; }
.placeholder-inner p { color: var(--muted); line-height: 1.7; font-size: 12px; }
.empty-state-label { display: inline-flex; padding: 6px 9px; border-radius: 999px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); font-size: 10px; font-weight: 750; }
.settings-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 16px; }
.info-list { display: grid; gap: 0; }
.info-row { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted); }
.info-row strong { text-align: right; }

/* Dialogs */
dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 18px; box-shadow: var(--shadow-lg); color: var(--ink); overflow: auto; }
dialog::backdrop { background: rgba(7,17,38,.55); backdrop-filter: blur(3px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.dialog-head h2 { margin: 0; font-size: 18px; }
.dialog-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.dialog-body { padding: 22px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 22px; border-top: 1px solid var(--line); background: var(--surface-soft); }

/* Toast, loader */
.toast-region { position: fixed; z-index: 1000; right: 22px; bottom: 22px; display: grid; gap: 10px; width: min(390px, calc(100% - 32px)); }
.toast { display: grid; grid-template-columns: 31px 1fr; gap: 11px; padding: 13px 15px; color: #fff; background: #182230; border-radius: 12px; box-shadow: var(--shadow-lg); animation: toast-in 180ms ease; }
.toast.success { background: #05603a; }
.toast.error { background: #912018; }
.toast-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.12); font-weight: 800; }
.toast strong { display: block; font-size: 12px; }
.toast span { display: block; opacity: .82; margin-top: 4px; font-size: 10px; line-height: 1.45; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.skeleton { min-height: 19px; border-radius: 7px; background: linear-gradient(90deg, #eef2f6, #f8fafc, #eef2f6); background-size: 240% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -240% 0; } }

/* Responsive */
@media (max-width: 1050px) {
  .site-nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .network-card { max-width: 720px; }
  .card-grid, .mode-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow { grid-template-columns: repeat(3, 1fr); gap: 28px 0; }
  .workflow-step:nth-child(3):after { display: none; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .settings-grid { grid-template-columns: 1fr; }
  .import-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-column:last-child { display: none; }
}
@media (max-width: 840px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { min-height: 330px; }
  .auth-copy { margin-top: 70px; }
  .auth-main { padding: 46px 24px; }
  .apply-layout { grid-template-columns: 1fr; width: min(760px, calc(100% - 32px)); margin-inline: auto; }
  .apply-aside { position: static; }
  .step-list { grid-template-columns: repeat(4, 1fr); }
  .step-item { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .step-copy span { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 80; left: 0; top: 0; width: 248px; transform: translateX(-100%); transition: transform 180ms ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-grid; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, 1180px); }
  .site-header { height: 66px; }
  .site-actions .btn-ghost { display: none; }
  .hero { padding: 70px 0 58px; }
  .hero h1 { font-size: 42px; }
  .hero-lead { font-size: 16px; }
  .hero-actions, .cta-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .network-card { padding: 18px; border-radius: 20px; }
  .role-entry-panel { padding: 14px; border-radius: 20px; }
  .role-entry-card { grid-template-columns: 42px 1fr; padding: 15px; }
  .role-entry-icon { width: 42px; height: 42px; }
  .role-entry-actions { grid-column: 1 / -1; }
  .role-entry-actions .btn { flex: 1; }
  .role-text-link { width: 100%; margin: 5px 0 0; }
  .supply-metrics { grid-template-columns: 1fr; }
  .network-path { grid-template-columns: 1fr; }
  .path-arrow { transform: rotate(90deg); justify-self: center; }
  .section { padding: 68px 0; }
  .card-grid, .mode-grid { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: 1fr; gap: 25px; }
  .workflow-step:after { display: none !important; }
  .principle-grid { grid-template-columns: 1fr; gap: 34px; }
  .cta-inner { flex-direction: column; align-items: stretch; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; gap: 9px; }
  .auth-aside { padding: 36px 24px; }
  .auth-copy h1 { font-size: 38px; }
  .auth-points { grid-template-columns: 1fr; }
  .form-grid, .checkbox-grid { grid-template-columns: 1fr; }
  .import-actions { align-items: stretch; flex-direction: column; }
  .import-actions .btn { width: 100%; }
  .import-preview-table-head { align-items: flex-start; flex-direction: column; }
  .import-preview-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .import-mapping-grid { grid-template-columns: 1fr; }
  .import-sheet-mappings { grid-template-columns: 1fr; }
  .import-sheet-card-head, .import-preview-controls { align-items: stretch; flex-direction: column; }
  .import-preview-filters, .import-pagination { flex-wrap: wrap; }
  .unified-pagination { grid-template-columns: 1fr auto; gap: 10px; }
  .pager-pages { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; }
  .pager-range { justify-self: end; }
  .import-guide { grid-template-columns: 1fr; }
  .import-mapping-controls { grid-template-columns: 1fr; }
  .apply-card-head, .apply-card-body { padding-left: 19px; padding-right: 19px; }
  .step-copy strong { font-size: 10px; }
  .app-content { padding: 20px 14px 42px; }
  .topbar { padding: 0 14px; }
  .breadcrumb, .user-copy, .topbar-actions .icon-btn { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .view-heading { flex-direction: column; align-items: stretch; }
  .view-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .view-actions .btn { width: 100%; }
  .onboarding-overview { grid-template-columns: 1fr; justify-items: center; }
  .search-box { width: 100%; }
  .toolbar-filter { width: 100%; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .toolbar-right .btn { flex: 1; }
  .settings-grid { grid-template-columns: 1fr; }
  .review-item { grid-template-columns: 1fr; gap: 4px; }
}

/* Platform admin */
.admin-accent { color: #7f56d9; }
.admin-sidebar .nav-item.active { background: #6938ef; box-shadow: 0 7px 18px rgba(105,56,239,.28); }
.admin-sidebar .supplier-mini { border-color: #352763; }
.admin-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; margin-bottom: 16px; }
.application-company strong { display: block; font-size: 12px; }
.application-company span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; max-width: 260px; }
.tag { display: inline-flex; padding: 4px 7px; border-radius: 999px; background: #f2f4f7; color: var(--ink-soft); font-size: 9px; white-space: nowrap; }
.application-detail { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 20px; }
.detail-item { padding: 11px 0; border-bottom: 1px solid var(--line); }
.detail-item.full { grid-column: 1 / -1; }
.detail-item span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.detail-item strong { display: block; font-size: 12px; line-height: 1.55; }
.review-actions { display: flex; justify-content: space-between; gap: 10px; }
.credential-box { padding: 18px; border: 1px solid #abefc6; background: var(--success-soft); border-radius: 14px; }
.credential-box h3 { margin: 0 0 8px; color: #05603a; font-size: 15px; }
.credential-box p { margin: 0 0 15px; color: #067647; font-size: 11px; line-height: 1.55; }
.credential-row { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid #abefc6; font-size: 11px; }
.credential-row span { color: #067647; }
.credential-row code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.dialog-section-title { margin: 0 0 10px; color: var(--ink-soft); font-size: 12px; }
.cooperation-list { display: grid; gap: 8px; }
.cooperation-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.cooperation-item strong, .cooperation-item span { display: block; }
.cooperation-item strong { font-size: 12px; }
.cooperation-item div > span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.cooperation-empty { padding: 16px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); background: var(--surface-soft); font-size: 11px; text-align: center; }
.cooperation-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.cooperation-current { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.cooperation-current strong { color: var(--ink-soft); }
.admin-system-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.system-layer { display: grid; gap: 9px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.system-layer strong { font-size: 12px; }
.system-layer span { color: var(--muted); font-size: 10px; line-height: 1.55; }
@media (max-width: 900px) { .admin-metric-grid, .admin-system-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .application-detail, .cooperation-form { grid-template-columns: 1fr; } .detail-item.full, .cooperation-current { grid-column: auto; } }

/* Supplier marketplace and operator workspace */
.directory-toolbar { margin-bottom: 18px; }
.directory-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.directory-card h2 { margin: 12px 0 6px; font-size: 15px; }
.directory-card p { color: var(--muted); font-size: 11px; }
.directory-page { min-height: calc(100vh - 76px); background: var(--surface-soft); }
.directory-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.directory-group { margin-top: 14px; }
.directory-group > span { color: var(--muted); font-size: 10px; }
.directory-contact-button { width: 100%; margin-top: 16px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.chip { padding: 4px 8px; border-radius: 999px; background: #eef4ff; color: #175cd3; font-size: 9px; }
.info-list { display: grid; gap: 9px; }
.info-row { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 11px; }
.info-row span { color: var(--muted); }
.operator-sidebar .nav-item.active { background: #155eef; }
.operator-gap { margin-top: 16px; }
.integration-guide-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px; }
.integration-client-list { margin-top: 16px; }
.integration-scopes { margin: 0; padding: 0; border: 0; }
.integration-scopes .checkbox-row { margin-top: 8px; }
#supplier-token-value { display: block; word-break: break-all; font-size: 11px; }
@media (max-width: 900px) { .directory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 640px) { .directory-grid, .integration-guide-grid { grid-template-columns: 1fr; } }
