:root {
  color-scheme: light;
  --bg: #fafafb;
  --panel: #ffffff;
  --text: #262626;
  --muted: #8c8c8c;
  --line: #f0f0f0;
  --line-strong: #d9d9d9;
  --brand: #1677ff;
  --brand-dark: #0958d9;
  --brand-soft: #e6f4ff;
  --accent: #1677ff;
  --green: #389e0d;
  --green-soft: #f6ffed;
  --gold: #d48806;
  --gold-soft: #fffbe6;
  --red: #cf1322;
  --red-soft: #fff1f0;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 78px;
  --header-height: 64px;
  --radius: 8px;
  --shadow: 0 8px 24px rgba(140, 140, 140, 0.12);
  --shadow-soft: 0 2px 8px rgba(140, 140, 140, 0.08);
  font-family: "Public Sans", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

#app.portal-user {
  --bg: #faf8f7;
  --panel: #ffffff;
  --text: #2a1f1f;
  --muted: #9a8585;
  --line: rgba(42, 31, 31, 0.08);
  --line-strong: rgba(42, 31, 31, 0.16);
  --brand: #c0363c;
  --brand-dark: #8f2027;
  --brand-soft: #f5e8e8;
  --accent: #c0363c;
  --green: #2f8f69;
  --green-soft: #edf8f3;
  --gold: #b7791f;
  --gold-soft: #fff8e8;
  --red: #c0363c;
  --red-soft: #fff0f1;
  --radius: 14px;
  --shadow: 0 16px 38px rgba(80, 40, 40, 0.1);
  --shadow-soft: 0 8px 24px rgba(80, 40, 40, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.57;
}

#app {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

#app.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 18px 14px;
  box-shadow: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 18px;
  padding: 0 8px;
}

.sidebar .brand {
  justify-content: space-between;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 8px 18px rgba(207, 19, 34, 0.16);
}

.sidebar-toggle {
  min-width: 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  color: #595959;
  font-size: 22px;
  line-height: 1;
}

.sidebar-toggle span {
  transform: translateY(-1px);
}

.brand strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: grid;
  gap: 4px;
}

nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 11px;
  border-radius: var(--radius);
  color: #595959;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-parent {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 38px;
  border: 0;
  padding: 0 11px;
  border-radius: var(--radius);
  background: transparent;
  color: #595959;
  cursor: pointer;
  font-weight: 500;
  text-align: left;
}

nav a.active,
.nav-parent.active,
nav a:hover,
.nav-parent:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.nav-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f5f5f5;
  color: #595959;
  font-size: 12px;
  font-weight: 700;
}

.subnav-mark {
  display: none;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  transition: transform 0.18s ease, color 0.18s ease;
}

.nav-group.collapsed .nav-caret {
  transform: rotate(-90deg);
}

.nav-parent:hover .nav-caret,
.nav-parent.active .nav-caret {
  color: var(--brand);
}

nav a.active .nav-mark,
nav a:hover .nav-mark,
.nav-parent:hover .nav-mark,
.nav-parent.active .nav-mark {
  background: #fff;
  color: var(--brand);
  box-shadow: var(--shadow-soft);
}

.portal-user .sidebar {
  background: #fff;
}

.portal-user .sidebar > nav:not(.subnav) a {
  min-height: 48px;
  border-radius: 999px;
  font-weight: 800;
}

.portal-user .sidebar > nav:not(.subnav) a.active {
  background: #421719;
  color: #fff;
}

.portal-user .sidebar > nav:not(.subnav) a.active .nav-mark {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: none;
  border-radius: 999px;
}

.portal-user .subnav {
  gap: 8px;
}

.portal-user .subnav a,
.portal-user .subnav .nav-parent {
  min-height: 46px;
  border-radius: 999px;
  color: #554a4d;
  font-size: 16px;
  font-weight: 800;
}

.portal-user .subnav a.active,
.portal-user .subnav .nav-parent.active {
  background: #c93640;
  color: #fff;
}

.portal-user .subnav .nav-mark {
  width: 30px;
  height: 30px;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font-size: 20px;
}

.portal-user .subnav a.active .nav-mark,
.portal-user .subnav a:hover .nav-mark,
.portal-user .subnav .nav-parent.active .nav-mark,
.portal-user .subnav .nav-parent:hover .nav-mark {
  background: transparent;
  color: inherit;
  box-shadow: none;
}

.portal-user .subnav .subnav-child {
  min-height: 36px;
  padding-left: 46px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.portal-user .subnav .subnav-child.active {
  background: #f6e5e6;
  color: var(--brand);
}

.side-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.side-section > small {
  display: block;
  margin: 0 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.subnav a {
  min-height: 39px;
  font-size: 14px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.subnav-children {
  display: grid;
  gap: 4px;
  margin: 0 0 4px;
  padding-left: 35px;
}

.nav-group.collapsed .subnav-children,
.subnav-children[hidden] {
  display: none;
}

.subnav-child {
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

#app.sidebar-collapsed .sidebar {
  padding: 18px 10px;
  overflow-x: hidden;
}

#app.sidebar-collapsed .brand {
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 0;
}

#app.sidebar-collapsed .brand-identity {
  justify-content: center;
  gap: 0;
}

#app.sidebar-collapsed .brand-identity > div,
#app.sidebar-collapsed .nav-label,
#app.sidebar-collapsed .nav-caret,
#app.sidebar-collapsed .side-section > small {
  display: none;
}

#app.sidebar-collapsed nav a,
#app.sidebar-collapsed .nav-parent {
  justify-content: center;
  gap: 0;
  padding: 0;
}

#app.sidebar-collapsed .nav-mark {
  width: 30px;
  height: 30px;
}

#app.sidebar-collapsed .subnav-children {
  padding-left: 0;
}

#app.sidebar-collapsed .subnav-child {
  padding: 0;
}

#app.sidebar-collapsed .nav-dot {
  display: none;
}

#app.sidebar-collapsed .subnav-mark {
  display: grid;
}

#app.sidebar-collapsed .side-section {
  margin-top: 14px;
  padding-top: 12px;
}

.subnav-child.active .nav-dot,
.subnav-child:hover .nav-dot {
  background: var(--brand);
}

.main {
  min-width: 0;
  padding: 0 28px 28px;
}

.account-strip {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: var(--header-height);
  margin: 0 -28px 24px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.account-strip strong {
  font-weight: 600;
}

.account-strip small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.locale-switch select {
  min-width: 118px;
  height: 36px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background-color: #fff;
  color: var(--text);
  font-size: 14px;
}

.locale-switch.compact span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto 20px;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 4px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  color: #1f1f1f;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.33;
}

h2 {
  color: #1f1f1f;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

h3 {
  color: #1f1f1f;
  font-size: 14px;
  font-weight: 600;
}

a {
  color: var(--brand);
}

button,
.primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  color: #262626;
  cursor: pointer;
  font: inherit;
  font-weight: 400;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(22, 119, 255, 0.28);
  outline-offset: 2px;
}

.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1);
}

.primary:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #fff;
}

.actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.filter-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #595959;
  text-decoration: none;
  font-weight: 500;
}

.filter-tabs a:hover,
.filter-tabs a.active {
  border-color: #91caff;
  background: var(--brand-soft);
  color: var(--brand);
}

.filter-tabs span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f5f5f5;
  color: #595959;
  font-size: 12px;
}

.filter-tabs a.active span {
  background: #fff;
  color: var(--brand);
}

.field {
  display: grid;
  gap: 6px;
  color: #595959;
  font-size: 13px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea,
.login-form input {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.login-form input:hover {
  border-color: var(--brand);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.login-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.08);
}

.field textarea {
  min-height: 92px;
  padding: 9px 11px;
  resize: vertical;
}

.field select[multiple] {
  min-height: 136px;
  padding: 8px 11px;
}

.field small {
  color: var(--muted);
  font-weight: 400;
}

.form-rule-section {
  padding: 14px 16px;
  border: 1px solid #cfe4ff;
  border-radius: 14px;
  background: #f8fbff;
}

.form-rule-section.form-rule-intro {
  border-color: transparent;
  background: #f3f8ff;
}

.form-rule-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-rule-title > span {
  display: inline-grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.form-rule-title strong {
  display: block;
  color: #14213d;
  font-size: 17px;
  font-weight: 800;
}

.form-rule-title small {
  display: block;
  margin-top: 4px;
  color: #617089;
  font-size: 13px;
  font-weight: 500;
}

.rule-tabs-field {
  padding: 10px;
  border: 1px solid #cfe4ff;
  border-radius: 14px;
  background: #eef6ff;
}

.rule-tabs-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #14213d;
  font-weight: 800;
}

.rule-tabs-label small {
  text-align: right;
}

.rule-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rule-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #30445f;
  font-weight: 800;
  padding: 0 16px;
}

.rule-tabs button:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand);
}

.rule-tabs button.active {
  background: #fff;
  color: var(--brand);
  box-shadow: inset 0 -3px #ff7a00, 0 8px 18px rgba(22, 119, 255, 0.12);
}

.rule-table-field {
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe4ff;
  border-radius: 14px;
  background: #fbfdff;
}

.rule-table-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rule-table-title strong {
  display: block;
  color: #14213d;
  font-size: 15px;
}

.rule-table-title small {
  display: block;
  margin-top: 4px;
}

.rule-table-title button,
.rule-table-row button {
  flex: 0 0 auto;
}

.rule-mode-hint {
  min-height: 36px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #eef6ff;
  color: #53657c;
  font-size: 13px;
  font-weight: 600;
}

.rule-table-rows {
  display: grid;
  gap: 10px;
}

.rule-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.rule-row-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.pricing-tier-range-grid {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.surcharge-rule-grid {
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
}

.country-zone-row {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.country-zone-head {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr);
  gap: 10px;
}

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

.country-zone-head label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.country-zone-head input,
.country-zone-head select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.rule-empty {
  padding: 14px;
  border: 1px dashed #cfe4ff;
  border-radius: 12px;
  background: #f8fbff;
  color: #53657c;
  font-size: 13px;
  font-weight: 600;
}

.rule-row-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.rule-row-grid input,
.rule-row-grid select {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.rule-table-row .danger {
  color: #c93640;
}

.rule-table-field[data-pricing-mode="first_additional"] .rule-table-rows,
.rule-table-field[data-pricing-mode="first_additional"] [data-add-pricing-tier] {
  display: none;
}

.rule-table-field[data-pricing-mode="tier_first_additional"] .pricing-tier-unit-grid,
.rule-table-field:not([data-pricing-mode="tier_first_additional"]) .pricing-tier-first-grid {
  display: none;
}

.upload-field {
  position: relative;
}

.upload-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-drop {
  display: grid;
  gap: 6px;
  min-height: 118px;
  place-items: center;
  padding: 18px;
  border: 1px dashed #b7d0ff;
  border-radius: var(--radius);
  background: #f7fbff;
  color: var(--brand);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.upload-field:hover .upload-drop,
.upload-field input[type="file"]:focus + .upload-drop {
  border-color: var(--brand);
  background: #eef6ff;
}

.upload-drop span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.upload-preview {
  width: 100%;
  max-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafafa;
}

.upload-preview.is-multiple {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  padding: 8px;
  overflow: auto;
}

.upload-preview img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.upload-preview.is-multiple img {
  height: 96px;
  max-height: none;
  border-radius: 8px;
  object-fit: cover;
}

.grid {
  display: grid;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto 20px;
}

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

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

.metric,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.metric {
  min-height: 112px;
  padding: 20px;
  display: grid;
  align-content: space-between;
}

.metric small {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  color: #1f1f1f;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.metric.success {
  background: linear-gradient(180deg, #fff, var(--green-soft));
}

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

.overview-dashboard.user-section.active {
  max-width: 1440px;
  margin: 0 auto 20px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid #d6e4ff;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.overview-hero h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.overview-hero p {
  max-width: 760px;
  margin: 0;
  color: #595959;
  line-height: 1.75;
}

.overview-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.overview-hero-stats div,
.overview-metric,
.overview-todo,
.overview-progress-row,
.overview-rank-row,
.overview-warehouse-row,
.overview-activity-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.overview-hero-stats div {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 96px;
  padding: 14px;
}

.overview-hero-stats span,
.overview-metric span,
.overview-progress-row span,
.overview-rank-row span,
.overview-warehouse-row span,
.overview-activity-row span {
  color: var(--muted);
  font-size: 12px;
}

.overview-hero-stats strong {
  color: var(--brand);
  font-size: 24px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.overview-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.overview-metric {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-height: 112px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.overview-metric strong {
  color: #1f1f1f;
  font-size: 24px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.overview-metric small {
  color: var(--muted);
  line-height: 1.5;
}

.overview-metric.success {
  background: #f6ffed;
  border-color: #d9f7be;
}

.overview-metric.success strong {
  color: var(--green);
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.overview-panel {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}

.overview-panel.wide {
  grid-column: span 2;
}

.overview-todo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.overview-todo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 12px;
  color: var(--text);
  text-decoration: none;
}

.overview-todo.is-hot {
  border-color: #ffd591;
  background: #fffaf0;
}

.overview-todo strong {
  color: var(--brand);
  font-size: 20px;
}

.overview-progress-row,
.overview-warehouse-row {
  display: grid;
  gap: 9px;
  padding: 12px;
  margin-bottom: 10px;
}

.overview-progress-row > div:first-child,
.overview-warehouse-row > div:first-child,
.overview-rank-row,
.overview-activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.overview-progress-row strong,
.overview-rank-row strong,
.overview-warehouse-row strong,
.overview-activity-row strong {
  overflow-wrap: anywhere;
}

.overview-rank-row,
.overview-activity-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  min-height: 58px;
  padding: 12px;
  margin-bottom: 10px;
}

.overview-rank-row small,
.overview-warehouse-row small,
.overview-activity-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.redhat-overview .overview-hero {
  border-color: #ffd6e7;
  background: linear-gradient(180deg, #fff, #fff7fb);
}

.redhat-overview .overview-hero-stats strong {
  color: #d9363e;
}

.redhat-overview .level-hero {
  box-shadow: none;
}

.redhat-resource-row {
  grid-template-columns: minmax(0, 1fr) auto;
  color: var(--text);
  text-decoration: none;
}

.redhat-resource-row span {
  color: var(--brand);
  font-size: 20px;
  font-weight: 700;
}

.overview-warehouse-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.overview-warehouse-row .progress-track {
  grid-column: 1 / -1;
}

.level-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 18px;
  padding: 18px;
  border: 1px solid #d6e4ff;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: var(--shadow-soft);
}

.level-score {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 4px;
}

.level-score strong {
  color: var(--brand);
  font-size: 32px;
  line-height: 1;
}

.level-score small {
  color: var(--muted);
}

.level-progress-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.level-progress-item {
  display: grid;
  gap: 7px;
}

.level-progress-item div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #595959;
}

.level-progress-item small {
  color: var(--muted);
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0f0f0;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--green));
}

.level-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(220px, 1.2fr);
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.level-rule.active {
  border-color: #91caff;
  background: #f8fbff;
}

.level-rule small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.level-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.level-benefits span {
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f6ffed;
  color: #237804;
  font-size: 12px;
}

.segment-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  max-width: 1440px;
  margin: 0 auto 20px;
}

.segment-card {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.segment-card strong {
  color: var(--brand);
  font-size: 26px;
  line-height: 1;
}

.segment-card span {
  color: #595959;
  font-size: 13px;
}

.settings-overview {
  display: grid;
  gap: 18px;
}

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

.setting-card {
  display: grid;
  gap: 18px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.setting-card:hover {
  border-color: #91caff;
  background: #f8fbff;
}

.setting-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.setting-card small {
  color: var(--muted);
  line-height: 1.6;
}

.setting-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  align-self: end;
}

.setting-card-meta span {
  color: #595959;
  font-size: 13px;
}

.setting-card-meta b {
  color: var(--brand);
  font-size: 13px;
}

.settings-block {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.settings-tag-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-tag-groups > div {
  display: grid;
  gap: 12px;
}

.settings-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-tags span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #ffd6d6;
  border-radius: 999px;
  background: #fff6f6;
  color: #8f1d24;
  font-size: 13px;
}

.settings-tags small {
  color: #8c8c8c;
  font-size: 12px;
}

.platform-info-preview {
  align-self: start;
}

.platform-info-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.platform-info-head img {
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
}

.platform-info-head strong {
  display: block;
  font-size: 20px;
}

.platform-info-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.panel {
  padding: 20px;
  margin: 0 auto 20px;
  max-width: 1440px;
}

.user-section:not(.active) {
  display: none;
}

.user-section.active:not(.grid):not(.split) {
  max-width: 1440px;
  margin: 0 auto 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.portal-user .main {
  background:
    linear-gradient(180deg, rgba(255, 246, 246, 0.86), rgba(250, 248, 247, 0) 220px),
    var(--bg);
}

.portal-user .account-strip {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

.customer-overview.user-section.active {
  max-width: 1180px;
  margin: 0 auto 20px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.customer-welcome-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  margin-bottom: 16px;
  overflow: hidden;
  padding: 26px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.14), transparent 28%),
    linear-gradient(135deg, #3d1a1c, #6f252b 58%, #a6383e);
  color: #fff;
  box-shadow: 0 18px 44px rgba(101, 30, 35, 0.18);
}

.customer-welcome-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 14px);
  pointer-events: none;
}

.customer-welcome-card > * {
  position: relative;
  z-index: 1;
}

.customer-welcome-card h2 {
  margin: 4px 0 6px;
  color: #fff;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.customer-welcome-card p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.customer-welcome-card p strong {
  color: #fff;
}

.customer-welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.customer-welcome-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.customer-welcome-actions a.primary {
  border-color: #fff;
  background: #fff;
  color: #3d1a1c;
}

.customer-welcome-code {
  min-width: 150px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  text-align: right;
}

.customer-welcome-code span {
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

.customer-welcome-code strong {
  display: block;
  margin-top: 3px;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0;
}

.customer-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.customer-stat-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.customer-stat-card.rose {
  background: #fff3f4;
  border-color: #f5c6ca;
}

.customer-stat-card.violet {
  background: #f6f2ff;
  border-color: #ddd1ff;
}

.customer-stat-card.amber {
  background: #fff8e8;
  border-color: #f2d89a;
}

.customer-stat-card.green {
  background: #eefaf4;
  border-color: #c7ead8;
}

.customer-stat-card strong {
  display: block;
  color: var(--text);
  font-size: 26px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.customer-stat-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.customer-stat-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.customer-stat-card b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand);
  font-style: normal;
  flex: 0 0 auto;
}

.customer-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.customer-panel {
  max-width: none;
  margin: 0;
  border-radius: 20px;
}

.customer-panel-wide {
  min-width: 0;
}

.customer-recent-list,
.customer-quick-actions {
  display: grid;
  gap: 10px;
}

.customer-recent-package {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbf8f8;
}

.package-type-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.customer-recent-package strong,
.user-package-info strong {
  display: block;
  overflow-wrap: anywhere;
}

.customer-recent-package small,
.user-package-info small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.customer-recent-package-tail {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.customer-recent-package-tail > span {
  color: var(--muted);
  font-size: 12px;
}

.customer-quick-actions a {
  display: grid;
  gap: 3px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbf8f8;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.customer-quick-actions a:hover {
  border-color: rgba(192, 54, 60, 0.3);
  background: #fff;
  transform: translateY(-1px);
}

.customer-quick-actions span {
  color: var(--muted);
  font-size: 12px;
}

.customer-tip {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #f2d89a;
  border-radius: 18px;
  background: #fff8e8;
  color: #7a4d0b;
}

.customer-tip strong {
  color: #5f3900;
}

.customer-tip span {
  color: #7a4d0b;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.inline-field {
  width: min(360px, 100%);
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto 20px;
}

.calculator-grid,
.fee-grid {
  display: grid;
  gap: 12px;
}

.calculator-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.quote-results {
  display: grid;
  gap: 12px;
}

.section-subtitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 10px;
}

.section-subtitle strong {
  font-size: 15px;
}

.package-quote-results {
  margin-bottom: 18px;
}

.quote-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #d6e4ff;
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: #f8fbff;
}

.quote-summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.warehouse-card,
.quote-card,
.row-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.warehouse-card:hover,
.quote-card:hover,
.row-card:hover {
  border-color: #d6e4ff;
  box-shadow: var(--shadow-soft);
}

.warehouse-card {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.invite-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #eff6ff;
}

.invite-panel span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.invite-panel strong {
  display: block;
  overflow-wrap: anywhere;
}

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

.warehouse-head small,
.quote-head small,
.row-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.address-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.address-grid div {
  display: grid;
  gap: 5px;
  min-height: 64px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafafa;
}

.address-grid span {
  color: var(--muted);
  font-size: 12px;
}

.address-grid strong,
.warehouse-address-text {
  overflow-wrap: anywhere;
}

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

.domestic-address-grid .wide {
  grid-column: 1 / -1;
}

.row-card.photo-row {
  grid-template-columns: minmax(0, 1fr) auto 88px;
  align-items: center;
}

.photo-thumb {
  display: block;
  width: 72px;
  height: 56px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.package-stats {
  margin-bottom: 14px;
}

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

.redhat-package-card .package-photo-inline {
  width: 80px;
  height: 58px;
}

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

.redhat-order-card .order-detail-grid .wide {
  grid-column: span 2;
}

.order-card-actions {
  justify-content: flex-end;
}

.package-remark {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafafa;
  color: var(--muted);
}

.domestic-address-grid div {
  min-height: 58px;
  background: #fff;
}

.warehouse-address-text {
  margin: 0;
  padding: 13px;
  border: 1px dashed #91caff;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: #1f1f1f;
}

.quote-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.quote-card-recommended {
  border-color: #91caff;
  box-shadow: var(--shadow-soft);
}

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

.quote-head > strong {
  color: var(--brand);
  white-space: nowrap;
}

.quote-price {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.quote-price strong {
  color: var(--brand);
  font-size: 18px;
}

.fee-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  color: #595959;
  font-size: 13px;
}

.fee-grid span {
  min-height: 32px;
  padding: 7px 9px;
  border-radius: 6px;
  background: #fafafa;
  overflow-wrap: anywhere;
}

.unavailable-block {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.row-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 14px;
  align-items: center;
  min-height: 60px;
  padding: 12px 14px;
}

.channel-product-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(180px, auto) minmax(120px, auto) auto;
}

.user-package-card.is-selectable {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.portal-user .filter-tabs {
  display: flex;
  gap: 6px;
  padding: 4px 0 14px;
  overflow-x: auto;
}

.portal-user .filter-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.portal-user .filter-tabs a:hover {
  background: #fbf8f8;
  color: var(--text);
}

.portal-user .filter-tabs a.active {
  border-color: rgba(192, 54, 60, 0.2);
  background: var(--brand-soft);
  color: var(--brand);
}

.portal-user .filter-tabs span {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(154, 133, 133, 0.13);
  font-size: 11px;
}

.portal-user .filter-tabs a.active span {
  background: #fff;
}

.portal-user .customer-packages-panel,
.portal-user .customer-orders-panel,
.portal-user .customer-freight-panel,
.portal-user .customer-warehouse-panel {
  max-width: 1180px;
  border-radius: 22px;
}

.portal-user .customer-packages-panel > .section-title,
.portal-user .customer-orders-panel > .section-title,
.portal-user .customer-freight-panel > .section-title,
.portal-user .customer-warehouse-panel > .section-title {
  align-items: flex-start;
}

.portal-user .user-package-card {
  grid-template-columns: auto minmax(210px, 1fr) auto minmax(250px, 0.9fr) auto;
  min-height: 82px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
}

.portal-user .user-package-card.is-selectable {
  border-color: rgba(192, 54, 60, 0.22);
  background: #fffafa;
}

.portal-user .user-package-card:hover {
  border-color: rgba(192, 54, 60, 0.28);
  transform: translateY(-1px);
}

.user-package-select-cell {
  display: flex;
  align-items: center;
}

.portal-user .package-select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(192, 54, 60, 0.2);
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.package-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--accent);
  font-weight: 700;
}

.package-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.user-package-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.user-package-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.user-package-meta span {
  display: grid;
  gap: 3px;
  min-height: 48px;
  padding: 8px 9px;
  border-radius: 12px;
  background: #fbf8f8;
}

.user-package-meta em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.user-package-meta strong {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.user-package-state {
  display: flex;
  justify-content: flex-end;
  white-space: nowrap;
}

.badge.warm {
  background: #fff8e8;
  color: #9a5f00;
}

.portal-user .calculator-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbf8f8;
}

.portal-user .quote-card {
  border-radius: 18px;
}

.portal-user .quote-card-recommended {
  border-color: rgba(192, 54, 60, 0.35);
  box-shadow: 0 14px 28px rgba(192, 54, 60, 0.08);
}

.portal-user .quote-price strong,
.portal-user .quote-head > strong {
  color: var(--brand);
}

.portal-user .fee-grid span {
  border: 1px solid rgba(42, 31, 31, 0.04);
  border-radius: 10px;
  background: #fbf8f8;
}

.portal-user .warehouse-card {
  border-radius: 20px;
}

.portal-user .warehouse-head.domestic-warehouse-head {
  margin: -16px -16px 0;
  padding: 18px;
  border-radius: 20px 20px 0 0;
  background: #3d1a1c;
  color: #fff;
}

.portal-user .warehouse-head.domestic-warehouse-head small {
  color: rgba(255, 255, 255, 0.7);
}

.portal-user .domestic-address-grid div {
  min-height: 72px;
  border-radius: 14px;
  background: #fbf8f8;
}

.portal-user .warehouse-address-text {
  border-color: rgba(192, 54, 60, 0.25);
  background: var(--brand-soft);
}

.portal-user .customer-warehouse-panel {
  max-width: 760px;
}

.customer-warehouse-address-wrap {
  display: grid;
  gap: 18px;
}

.portal-user .customer-address-card {
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-radius: 20px;
  background: #fff;
}

.warehouse-address-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 24px;
  background: #421719;
  color: #fff;
}

.warehouse-address-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.warehouse-address-title span {
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.warehouse-address-title strong {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.warehouse-city-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.warehouse-address-lines {
  display: grid;
}

.warehouse-address-line {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
}

.warehouse-line-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-size: 22px;
}

.warehouse-address-line span:not(.warehouse-line-icon) {
  display: block;
  color: #a78d91;
  font-size: 14px;
  font-weight: 700;
}

.warehouse-address-line strong {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 17px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.warehouse-copy-all {
  width: calc(100% - 48px);
  min-height: 50px;
  margin: 20px 24px;
  border: 0;
  border-radius: 999px;
  background: #c93640;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(201, 54, 64, 0.18);
}

.warehouse-copy-all:hover {
  background: #b92f38;
}

.warehouse-address-tips {
  display: grid;
  gap: 8px;
  padding: 18px 24px;
  border: 1px solid #ffd766;
  border-radius: 20px;
  background: #fffaf0;
  color: #7a4d0b;
}

.warehouse-address-tips div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.warehouse-address-tips span {
  font-size: 18px;
  line-height: 1;
}

.warehouse-address-tips strong {
  color: #8a5400;
  font-size: 14px;
  font-weight: 800;
}

.account-binding-card {
  grid-template-columns: minmax(0, 1fr) auto minmax(160px, auto);
}

.tracking-order-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.tracking-order-summary div {
  display: grid;
  gap: 5px;
  min-height: 58px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.tracking-order-summary span {
  color: var(--muted);
  font-size: 12px;
}

.tracking-order-summary strong {
  overflow-wrap: anywhere;
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #fafafa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.data-table td {
  color: var(--text);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.xhs-material-grid {
  columns: 4 220px;
  column-gap: 14px;
}

.xhs-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  overflow: hidden;
  break-inside: avoid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.xhs-card:hover {
  border-color: #ffd8bf;
  box-shadow: 0 8px 22px rgba(31, 31, 31, 0.09);
  transform: translateY(-1px);
}

.xhs-card.is-used {
  background: #fffdfc;
}

.xhs-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #fafafa;
  color: inherit;
  text-decoration: none;
}

.xhs-cover-video {
  aspect-ratio: 3 / 4;
}

.xhs-cover-poster {
  aspect-ratio: 1 / 1;
}

.xhs-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.24s ease;
}

.xhs-card:hover .xhs-cover img {
  transform: scale(1.025);
}

.xhs-video-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(31, 31, 31, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.xhs-card-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.xhs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.xhs-meta span {
  max-width: 100%;
  min-height: 23px;
  padding: 2px 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #fafafa;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhs-card h3 {
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.xhs-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin: 0;
  overflow: hidden;
  color: #595959;
  font-size: 13px;
}

.xhs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.xhs-tags span {
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--red-soft);
  color: #a8071a;
  font-size: 12px;
}

.xhs-usage {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.xhs-usage-list {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.xhs-usage-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fafafa;
}

.xhs-usage-list button {
  min-height: 28px;
  padding: 0 8px;
  white-space: nowrap;
}

.xhs-card-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.xhs-card-foot button,
.xhs-card-foot .primary {
  min-height: 32px;
  padding: 0 10px;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.1fr);
  gap: 18px;
  align-items: start;
}

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

.knowledge-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.knowledge-card:hover,
.knowledge-card.active {
  border-color: #b7d7ff;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.knowledge-card img {
  width: 112px;
  height: 128px;
  border-radius: 8px;
  object-fit: cover;
  background: #f5f7fb;
}

.knowledge-card-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.knowledge-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.knowledge-card p {
  display: -webkit-box;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.knowledge-preview {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.knowledge-cover {
  aspect-ratio: 16 / 7;
  background: #f5f7fb;
}

.knowledge-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.knowledge-article {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.knowledge-article h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.3;
}

.knowledge-subtitle,
.knowledge-article p {
  margin: 0;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.85;
}

.knowledge-subtitle {
  color: var(--muted);
  font-size: 16px;
}

.knowledge-points {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  background: #f7fbff;
}

.knowledge-points span {
  color: #1f2937;
  font-size: 14px;
  line-height: 1.55;
}

.knowledge-lock {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #ffd8bf;
  border-radius: 8px;
  background: #fff7e6;
}

.knowledge-lock p {
  color: #7a3e00;
}

.knowledge-lock button {
  justify-self: start;
}

.knowledge-article.compact {
  padding: 18px;
}

.knowledge-article h3,
.knowledge-article h4 {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.knowledge-article h3 {
  font-size: 20px;
}

.knowledge-article h4 {
  font-size: 17px;
}

.knowledge-article blockquote {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  background: #f7fbff;
  color: #374151;
  line-height: 1.75;
}

.knowledge-article ul {
  margin: 0;
  padding-left: 20px;
  color: #4b5563;
  line-height: 1.85;
}

.knowledge-article ol {
  margin: 0;
  padding-left: 20px;
  color: #4b5563;
  line-height: 1.85;
}

.knowledge-article img {
  max-width: 100%;
  border-radius: 8px;
}

.knowledge-article figure {
  margin: 0;
}

.knowledge-article figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.knowledge-article aside {
  padding: 12px 14px;
  border: 1px solid #ffd8bf;
  border-radius: 8px;
  background: #fff7e6;
  color: #7a3e00;
  line-height: 1.75;
}

.knowledge-article hr {
  width: 100%;
  height: 1px;
  border: 0;
  background: var(--line);
}

.editor-field {
  display: grid;
  gap: 10px;
}

.editor-label {
  display: grid;
  gap: 5px;
  color: #595959;
  font-size: 13px;
  font-weight: 500;
}

.editor-label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.editor-toolbar button {
  min-height: 32px;
  padding: 0 10px;
  background: #fff;
  color: #1f2937;
}

.editor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.editor-workspace textarea {
  min-height: 360px;
  line-height: 1.7;
}

.editor-preview {
  min-height: 360px;
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.knowledge-composer-card {
  min-height: calc(100vh - 130px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f3f4f6;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.knowledge-composer-form {
  display: grid;
  min-height: inherit;
}

.knowledge-composer-top {
  position: static;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.knowledge-composer-top h2,
.knowledge-settings-panel h3 {
  margin: 0;
  font-size: 18px;
}

.knowledge-composer-top p {
  margin: 3px 0 0;
}

.knowledge-composer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.knowledge-composer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
  padding: 18px;
}

.knowledge-composer-editor {
  min-width: 0;
}

.knowledge-settings-panel {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 13px;
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.knowledge-settings-panel .field,
.knowledge-settings-panel .modal-checkbox {
  min-width: 0;
}

.rich-editor-field {
  display: grid;
  gap: 10px;
}

.knowledge-composer-editor .editor-label {
  display: none;
}

.rich-editor-shell {
  display: grid;
  gap: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f3f4f6;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.rich-editor-toolbar {
  position: static;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-height: 48px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.rich-editor-toolbar button,
.rich-editor-toolbar select,
.rich-color-picker {
  width: auto;
  flex: 0 0 auto;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #374151;
  font-size: 13px;
}

.rich-editor-toolbar button {
  padding: 0 9px;
}

.rich-editor-toolbar button:hover,
.rich-editor-toolbar select:hover,
.rich-color-picker:hover {
  background: #eef2f7;
}

.rich-editor-toolbar select {
  min-width: 112px;
  max-width: 150px;
  padding: 0 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.toolbar-divider {
  width: 1px;
  height: 22px;
  margin: 0 3px;
  background: #e5e7eb;
}

.rich-color-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  cursor: pointer;
}

.rich-color-picker input {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}

.rich-editor-paper {
  width: min(840px, calc(100% - 32px));
  min-height: 680px;
  margin: 16px auto 0;
  padding: 54px 64px 64px;
  border: 1px solid #edf0f4;
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.modal-card .rich-editor-paper {
  width: 100%;
  min-height: 440px;
  margin: 0;
  padding: 24px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.rich-composer-head {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.rich-composer-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 16px;
  align-items: center;
}

.rich-composer-line.compact {
  grid-template-columns: minmax(0, 1fr) 54px;
}

.rich-title-input,
.rich-author-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #262626;
}

.rich-title-input {
  min-height: 46px;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.35;
}

.rich-title-input::placeholder,
.rich-author-input::placeholder,
.rich-editor-canvas[data-empty="true"]::before {
  color: #b8bdc7;
}

.rich-author-input {
  min-height: 28px;
  font-size: 16px;
}

.rich-counter {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.rich-editor-canvas {
  min-height: 540px;
  outline: none;
  color: #333;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.rich-editor-canvas[data-empty="true"]::before {
  content: attr(data-placeholder);
  pointer-events: none;
}

.rich-editor-canvas p,
.rich-editor-canvas h2,
.rich-editor-canvas h3,
.rich-editor-canvas h4,
.rich-editor-canvas blockquote,
.rich-editor-canvas ul,
.rich-editor-canvas ol,
.rich-editor-canvas pre,
.rich-editor-canvas table,
.rich-editor-canvas aside {
  margin-top: 0;
  margin-bottom: 16px;
}

.rich-editor-canvas h2 {
  font-size: 25px;
  line-height: 1.35;
}

.rich-editor-canvas h3 {
  font-size: 21px;
}

.rich-editor-canvas h4 {
  font-size: 18px;
}

.rich-editor-canvas blockquote,
.rich-editor-canvas aside {
  padding: 12px 14px;
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  background: #f7fbff;
  color: #374151;
}

.rich-editor-canvas aside {
  border-color: #faad14;
  background: #fff7e6;
  color: #7a3e00;
}

.rich-editor-canvas table,
.knowledge-article table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}

.rich-editor-canvas th,
.rich-editor-canvas td,
.knowledge-article th,
.knowledge-article td {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.rich-editor-canvas th,
.knowledge-article th {
  background: #f8fafc;
  font-weight: 600;
}

.rich-editor-canvas pre,
.knowledge-article pre {
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: #111827;
  color: #f9fafb;
  line-height: 1.65;
}

.rich-source-textarea {
  width: 100%;
  min-height: 540px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: "Consolas", "Courier New", monospace;
  line-height: 1.6;
}

.rich-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.rich-editor-footer strong {
  color: var(--text);
}

.article-preview-modal .modal-body.single {
  display: block;
}

.inline-form-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.inline-form {
  display: grid;
  gap: 16px;
}

.inline-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.inline-form-head h2 {
  margin: 0;
  font-size: 20px;
}

.inline-form-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.inline-form-body .modal-span {
  grid-column: 1 / -1;
}

.inline-form-preview {
  min-width: 0;
}

.admin-redhat-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

.admin-redhat-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-redhat-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-redhat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-redhat-grid div {
  display: grid;
  gap: 5px;
  min-height: 64px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafafa;
}

.admin-redhat-grid span {
  color: var(--muted);
  font-size: 12px;
}

.admin-redhat-grid strong {
  overflow-wrap: anywhere;
}

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

.logistics-product-actions {
  display: flex;
  justify-content: flex-end;
}

.logistics-product-actions button {
  min-width: 112px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #1f1f1f;
  color: #fff;
  box-shadow: var(--shadow);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 20, 20, 0.36);
}

.modal-card {
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  height: auto;
  max-height: min(86vh, 860px);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-card.compact {
  width: min(560px, 100%);
}

.modal-card.rule-config-modal {
  width: min(1080px, 100%);
}

.modal-form {
  display: grid;
  grid-template-rows: auto minmax(0, auto) auto;
  min-height: 0;
  height: 100%;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
}

.modal-head {
  border-bottom: 1px solid var(--line);
}

.modal-close {
  min-width: 36px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.modal-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  align-items: start;
  gap: 14px;
  min-height: 0;
  padding: 20px;
  overflow: auto;
}

.modal-card.compact .modal-body {
  grid-template-columns: 1fr;
}

.modal-span {
  grid-column: 1 / -1;
}

.modal-checkbox {
  align-content: start;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  padding: 10px 0 0;
}

.modal-checkbox input {
  width: 16px;
  min-height: 16px;
  margin: 2px 0 0;
}

.modal-checkbox small {
  grid-column: 2;
}

.modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: #fafafa;
}

.error {
  padding: 28px;
}

#app.login-shell {
  display: block;
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(135deg, #f7fbff, #fafafb 52%, #f8fbf4);
}

.login-card {
  position: relative;
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.login-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

#app.public-portal {
  display: block;
  min-height: 100vh;
  background: #faf8f7;
}

.public-page {
  min-height: 100vh;
  color: #2a1f1f;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 76px;
  padding: 12px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(42, 31, 31, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.public-brand img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 8px 18px rgba(192, 54, 60, 0.14);
}

.public-brand strong,
.public-brand small {
  display: block;
}

.public-brand strong {
  font-size: 18px;
  line-height: 1.2;
}

.public-brand small {
  color: #9a8585;
}

.public-nav nav,
.public-nav-actions,
.public-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.public-nav nav {
  justify-content: center;
}

.public-nav a {
  color: #5f4a4a;
  font-weight: 700;
  text-decoration: none;
}

.public-nav nav a {
  padding: 8px 10px;
}

.public-nav nav a.active {
  color: #c93640;
}

.public-nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.public-nav-has-children > a {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.public-nav-caret {
  color: #9a8585;
  font-size: 12px;
  line-height: 1;
}

.public-nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 30;
  display: grid;
  min-width: 178px;
  padding: 8px;
  border: 1px solid rgba(42, 31, 31, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(66, 23, 25, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  visibility: hidden;
}

.public-nav-dropdown::before {
  position: absolute;
  top: -12px;
  right: 0;
  left: 0;
  height: 12px;
  content: "";
}

.public-nav-has-children:hover .public-nav-dropdown,
.public-nav-has-children:focus-within .public-nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  visibility: visible;
}

.public-nav-dropdown a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px !important;
  border-radius: 10px;
  color: #5f4a4a;
  white-space: nowrap;
}

.public-nav-dropdown a:hover,
.public-nav-dropdown a.active {
  background: #fff6f6;
  color: #c93640;
}

.primary-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.primary-link {
  background: #c93640;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(201, 54, 64, 0.18);
}

.ghost-link {
  border: 1px solid rgba(42, 31, 31, 0.12);
  background: #fff;
  color: #3d1a1c !important;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.8fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: clamp(48px, 8vw, 92px) clamp(20px, 5vw, 72px) 44px;
  background:
    linear-gradient(180deg, rgba(255, 246, 246, 0.86), rgba(250, 248, 247, 0) 65%),
    #faf8f7;
}

.public-kicker,
.public-section-head span,
.public-calculator-head span {
  color: #c93640;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.public-hero h1 {
  max-width: 760px;
  margin: 12px 0 18px;
  color: #2a1f1f;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: 0;
}

.public-hero p {
  max-width: 650px;
  margin: 0 0 24px;
  color: #6f5b5b;
  font-size: 17px;
}

.public-invite-box {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  gap: 10px;
  align-items: end;
  max-width: 520px;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid rgba(192, 54, 60, 0.16);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.public-invite-box label,
.public-calculator label {
  display: grid;
  gap: 6px;
  color: #7a6666;
  font-weight: 800;
}

.public-invite-box input,
.public-calculator input,
.public-calculator select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(42, 31, 31, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #2a1f1f;
}

.public-invite-box button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: #421719;
  color: #fff;
  font-weight: 800;
}

.public-hero-visual {
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: 34px;
  border: 1px solid rgba(42, 31, 31, 0.08);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 54px rgba(80, 40, 40, 0.12);
}

.public-hero-visual img {
  width: min(100%, 360px);
  min-height: 220px;
  object-fit: contain;
}

.public-hero-visual div {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background: #fff8e8;
  color: #7a4d0b;
}

.public-hero-visual strong {
  color: #421719;
  font-size: 18px;
}

.public-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 20px;
}

.public-section-wide {
  max-width: 1280px;
}

.public-section-head {
  max-width: 720px;
  margin-bottom: 22px;
}

.public-section-head h2,
.public-about h2,
.public-contact h2 {
  margin: 6px 0 8px;
  color: #2a1f1f;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
  letter-spacing: 0;
}

.public-section-head p,
.public-about p,
.public-contact p {
  color: #7a6666;
}

.public-calculator {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(42, 31, 31, 0.08);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.public-calculator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public-calculator-head strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.public-calculator-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.public-form-note {
  margin: 0;
  color: #9a8585;
}

.public-quote-results {
  margin-top: 16px;
}

.public-feature-grid,
.public-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.public-feature,
.public-flow-item,
.public-faq,
.public-contact-grid div {
  border: 1px solid rgba(42, 31, 31, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.public-feature {
  min-height: 150px;
  padding: 18px;
}

.public-feature strong {
  color: #421719;
  font-size: 19px;
}

.public-feature p,
.public-flow-item p,
.public-faq p {
  margin: 8px 0 0;
  color: #7a6666;
}

.public-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: center;
}

.public-about img {
  width: 100%;
  min-height: 180px;
  padding: 24px;
  border: 1px solid rgba(42, 31, 31, 0.08);
  border-radius: 24px;
  background: #fff;
  object-fit: contain;
}

.public-about-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.public-about-points span {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(192, 54, 60, 0.18);
  border-radius: 999px;
  background: #fff6f6;
  color: #8f1d24;
  font-weight: 800;
}

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

.public-flow-item {
  min-height: 150px;
  padding: 18px;
}

.public-flow-item b {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #f5e8e8;
  color: #c93640;
}

.public-flow-item strong {
  display: block;
  font-size: 18px;
}

.public-faq-list {
  display: grid;
  gap: 10px;
}

.public-faq {
  padding: 16px 18px;
}

.public-faq summary {
  cursor: pointer;
  color: #421719;
  font-size: 16px;
  font-weight: 800;
}

.public-contact {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 80px;
}

.public-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.public-contact-grid div {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 14px;
}

.public-contact-grid span {
  color: #9a8585;
  font-weight: 800;
}

.public-contact-grid strong {
  color: #2a1f1f;
  overflow-wrap: anywhere;
}

.recruit-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.58fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: clamp(50px, 8vw, 96px) clamp(20px, 5vw, 72px) 56px;
  background:
    linear-gradient(135deg, #fff8f3 0%, #fff 48%, #fff0ec 100%);
}

.recruit-hero h1 {
  margin: 14px 0 8px;
  color: #421719;
  font-size: clamp(48px, 7vw, 86px);
  line-height: 1.02;
  letter-spacing: 0;
}

.recruit-hero p {
  max-width: 720px;
  color: #675252;
  font-size: 18px;
}

.recruit-hero-lead {
  margin: 0 0 16px;
  color: #d8202a !important;
  font-size: clamp(24px, 3vw, 34px) !important;
  font-weight: 900;
}

.recruit-hero-card {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 30px;
  border: 1px solid rgba(216, 32, 42, 0.16);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 54px rgba(90, 32, 32, 0.13);
  text-align: center;
}

.recruit-hero-card img {
  width: min(100%, 220px);
  aspect-ratio: 1;
  object-fit: contain;
}

.recruit-hero-card strong {
  color: #421719;
  font-size: 22px;
}

.recruit-hero-card span {
  color: #8a6a55;
}

.recruit-subnav {
  position: sticky;
  top: 76px;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(42, 31, 31, 0.08);
  background: rgba(255, 248, 243, 0.94);
  backdrop-filter: blur(12px);
}

.recruit-subnav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(66, 23, 25, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #421719;
  font-weight: 900;
  text-decoration: none;
}

.recruit-subnav a.active {
  border-color: #d8202a;
  background: #d8202a;
  color: #fff;
}

.recruit-page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.56fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: center;
  padding: clamp(44px, 7vw, 82px) clamp(20px, 5vw, 72px);
  background: linear-gradient(135deg, #fff8f3 0%, #fff 52%, #fff1ed 100%);
}

.recruit-page-hero h1 {
  max-width: 760px;
  margin: 12px 0 16px;
  color: #421719;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.06;
  letter-spacing: 0;
}

.recruit-page-hero p {
  max-width: 720px;
  color: #675252;
  font-size: 18px;
}

.recruit-service-visual,
.recruit-partner-card,
.recruit-hero-metrics {
  border: 1px solid rgba(216, 32, 42, 0.15);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(90, 32, 32, 0.11);
}

.recruit-service-visual {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 28px;
  text-align: center;
}

.recruit-service-visual img {
  width: min(100%, 240px);
  min-height: 170px;
  object-fit: contain;
}

.recruit-service-visual strong,
.recruit-partner-card strong {
  color: #421719;
  font-size: 21px;
}

.recruit-service-visual span,
.recruit-partner-card span {
  color: #7a6666;
}

.recruit-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.recruit-hero-metrics div {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 18px;
  border-radius: 18px;
  background: #fff8f3;
}

.recruit-hero-metrics strong {
  color: #d8202a;
  font-size: 34px;
  line-height: 1;
}

.recruit-hero-metrics span {
  color: #421719;
  font-weight: 900;
}

.recruit-partner-card {
  display: grid;
  gap: 10px;
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(216, 32, 42, 0.08), rgba(245, 178, 107, 0.14)),
    #fff;
}

.recruit-location-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.recruit-location-grid article {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 18px;
  border: 1px solid rgba(66, 23, 25, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.recruit-location-grid strong {
  color: #d8202a;
  font-size: 18px;
}

.recruit-location-grid span {
  color: #7a6666;
}

.recruit-story,
.recruit-support,
.recruit-join-flow {
  background: transparent;
}

.recruit-compare-grid,
.recruit-card-grid,
.recruit-income-grid,
.recruit-step-grid {
  display: grid;
  gap: 14px;
}

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

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

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

.recruit-compare-grid article,
.recruit-card-grid article,
.recruit-income-grid article,
.recruit-step-grid article,
.recruit-level-table div,
.recruit-form {
  border: 1px solid rgba(66, 23, 25, 0.08);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.recruit-compare-grid article,
.recruit-card-grid article,
.recruit-income-grid article,
.recruit-step-grid article {
  min-height: 148px;
  padding: 18px;
}

.recruit-compare-grid h3,
.recruit-card-grid strong,
.recruit-income-grid strong,
.recruit-step-grid strong {
  display: block;
  color: #421719;
  font-size: 18px;
}

.recruit-compare-grid p,
.recruit-card-grid p,
.recruit-income-grid p,
.recruit-step-grid p {
  margin: 10px 0 0;
  color: #7a6666;
}

.recruit-definition {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: center;
}

.recruit-definition img {
  width: 100%;
  padding: 24px;
  border-radius: 24px;
  background: #fff8f3;
  object-fit: contain;
}

.recruit-step-grid article span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #d8202a;
  color: #fff;
  font-weight: 900;
}

.recruit-growth-path {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.recruit-growth-path span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(216, 32, 42, 0.18);
  border-radius: 999px;
  background: #fff8f3;
  color: #421719;
  font-weight: 900;
}

.recruit-level-table {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.recruit-level-table div {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.recruit-level-table strong {
  color: #d8202a;
}

.recruit-level-table span {
  color: #7a6666;
}

.recruit-application {
  max-width: 980px;
}

.recruit-form {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.recruit-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.recruit-form label,
.recruit-form fieldset {
  display: grid;
  gap: 7px;
  color: #6f5b5b;
  font-weight: 800;
}

.recruit-form input,
.recruit-form select,
.recruit-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(42, 31, 31, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #2a1f1f;
}

.recruit-form textarea {
  padding-top: 10px;
  resize: vertical;
}

.recruit-form fieldset {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 14px;
  border: 1px solid rgba(216, 32, 42, 0.14);
  border-radius: 16px;
  background: #fff8f3;
}

.recruit-form legend {
  padding: 0 8px;
  color: #421719;
}

.recruit-form fieldset label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
}

.recruit-form input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
}

.recruit-form button {
  width: fit-content;
  border: 0;
  cursor: pointer;
}

.recruit-closing {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding: clamp(46px, 7vw, 82px) 20px;
  background: #421719;
  color: #fff;
  text-align: center;
}

.recruit-closing h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: 0;
}

.recruit-closing p,
.recruit-closing span {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.recruit-closing strong {
  margin-top: 12px;
  color: #f5b26b;
  font-size: 22px;
}

.login-brand {
  margin-bottom: 22px;
  padding: 0;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #595959;
  font-size: 14px;
  font-weight: 500;
}

.quick-login {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.login-switch {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.login-switch button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
}

.login-message {
  margin: 14px 0 0;
  color: var(--brand-dark);
  font-weight: 600;
}

@media (max-width: 1080px) {
  .grid.four,
  .calculator-grid,
  .segment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-hero,
  .overview-layout {
    grid-template-columns: 1fr;
  }

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

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

  .customer-overview-layout {
    grid-template-columns: 1fr;
  }

  .portal-user .user-package-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .portal-user .user-package-badges,
  .portal-user .user-package-meta,
  .portal-user .user-package-state {
    grid-column: 2;
  }

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

  .overview-panel.wide {
    grid-column: auto;
  }

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

  .public-nav {
    grid-template-columns: 1fr auto;
  }

  .public-nav nav {
    display: none;
  }

  .public-hero,
  .public-about,
  .public-contact,
  .recruit-hero,
  .recruit-definition,
  .recruit-page-hero {
    grid-template-columns: 1fr;
  }

  .public-calculator-grid,
  .public-feature-grid,
  .recruit-card-grid,
  .recruit-compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-flow-grid,
  .recruit-income-grid,
  .recruit-step-grid,
  .recruit-level-table,
  .recruit-location-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 880px) {
  #app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    margin-bottom: 12px;
  }

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

  .side-section {
    margin-top: 12px;
    padding-top: 12px;
  }

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

  nav a,
  .nav-parent {
    justify-content: center;
    padding: 0 8px;
    font-size: 13px;
  }

  .subnav-children {
    padding-left: 0;
  }

  .subnav-child {
    min-height: 32px;
    padding: 0 6px;
    font-size: 12px;
  }

  .nav-dot {
    display: none;
  }

  .nav-mark {
    display: none;
  }

  #app.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  #app.sidebar-collapsed .sidebar {
    padding: 14px;
  }

  #app.sidebar-collapsed .brand {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 8px;
  }

  #app.sidebar-collapsed .brand-identity {
    gap: 12px;
  }

  #app.sidebar-collapsed .brand-identity > div,
  #app.sidebar-collapsed .nav-label,
  #app.sidebar-collapsed .nav-caret,
  #app.sidebar-collapsed .side-section > small {
    display: block;
  }

  #app.sidebar-collapsed .nav-caret {
    display: inline-flex;
  }

  #app.sidebar-collapsed nav a,
  #app.sidebar-collapsed .nav-parent {
    justify-content: center;
    gap: 11px;
    padding: 0 8px;
  }

  #app.sidebar-collapsed .subnav-children {
    padding-left: 0;
  }

  #app.sidebar-collapsed .subnav-mark {
    display: none;
  }

  .main {
    padding: 0 18px 20px;
  }

  .account-strip {
    position: sticky;
    margin: 0 -18px 18px;
    padding: 0 18px;
  }

  .topbar,
  .section-title,
  .section-subtitle,
  .account-strip {
    align-items: stretch;
    flex-direction: column;
    justify-content: center;
    min-height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .public-nav {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 18px;
  }

  .public-nav-actions {
    justify-content: stretch;
  }

  .public-nav-actions a,
  .public-hero-actions a {
    flex: 1;
  }

  .public-hero {
    min-height: auto;
    padding: 34px 18px;
  }

  .public-hero-actions,
  .public-invite-box,
  .public-calculator-head {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .public-section {
    padding: 38px 18px;
  }

  .public-calculator-grid,
  .public-feature-grid,
  .public-flow-grid,
  .public-contact-grid {
    grid-template-columns: 1fr;
  }

  .public-hero-visual {
    padding: 22px;
  }

  .grid.three,
  .grid.four,
  .address-grid,
  .admin-redhat-grid,
  .calculator-grid,
  .fee-grid,
  .segment-grid,
  .settings-grid,
  .settings-tag-groups,
  .split {
    grid-template-columns: 1fr;
  }

  .row-card {
    grid-template-columns: 1fr;
  }

  .row-card.photo-row {
    grid-template-columns: 1fr;
  }

  .redhat-package-card .package-detail-grid {
    grid-template-columns: 1fr;
  }

  .redhat-order-card .order-detail-grid {
    grid-template-columns: 1fr;
  }

  .redhat-order-card .order-detail-grid .wide {
    grid-column: auto;
  }

  .tracking-order-summary {
    grid-template-columns: 1fr;
  }

  .overview-hero-stats,
  .overview-metric-grid,
  .customer-stat-grid,
  .overview-todo-grid,
  .overview-rank-row,
  .overview-activity-row {
    grid-template-columns: 1fr;
  }

  .customer-welcome-card,
  .customer-recent-package {
    grid-template-columns: 1fr;
  }

  .customer-welcome-code {
    text-align: left;
  }

  .portal-user .user-package-card,
  .portal-user .calculator-grid,
  .user-package-meta {
    grid-template-columns: 1fr;
  }

  .portal-user .user-package-badges,
  .portal-user .user-package-meta,
  .portal-user .user-package-state {
    grid-column: auto;
    justify-content: flex-start;
  }

  .xhs-material-grid {
    columns: 1;
  }

  .admin-redhat-head {
    flex-direction: column;
  }

  .admin-redhat-badges {
    justify-content: flex-start;
  }

  .level-hero,
  .level-rule,
  .knowledge-layout {
    grid-template-columns: 1fr;
  }

  .knowledge-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .knowledge-card img {
    width: 92px;
    height: 112px;
  }

  .knowledge-article {
    padding: 18px;
  }

  .knowledge-article h2 {
    font-size: 22px;
  }

  .level-score {
    justify-items: start;
  }

  .level-progress-item div:first-child {
    flex-direction: column;
  }

  .quote-summary,
  .quote-head,
  .invite-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .quote-price {
    justify-content: space-between;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-card {
    height: auto;
    max-height: calc(100vh - 24px);
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .rule-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .rule-table-title,
  .rule-table-row {
    grid-template-columns: 1fr;
  }

  .pricing-tier-range-grid,
  .pricing-tier-unit-grid,
  .pricing-tier-first-grid,
  .surcharge-rule-grid,
  .country-zone-head,
  .country-zone-price-grid {
    grid-template-columns: 1fr;
  }

  .inline-form-body {
    grid-template-columns: 1fr;
  }

  .inline-form-head {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-composer-card {
    min-height: auto;
  }

  .knowledge-composer-top {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-composer-actions {
    justify-content: stretch;
  }

  .knowledge-composer-actions button {
    flex: 1;
  }

  .knowledge-composer-layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .knowledge-settings-panel {
    position: static;
    max-height: none;
  }

  .rich-editor-toolbar {
    position: static;
  }

  .rich-editor-paper {
    width: 100%;
    min-height: 560px;
    margin: 0;
    padding: 28px 18px 36px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .rich-composer-line,
  .rich-composer-line.compact {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .rich-counter {
    text-align: left;
  }

  .rich-title-input {
    font-size: 23px;
  }

  .rich-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .editor-workspace {
    grid-template-columns: 1fr;
  }

  .editor-preview {
    max-height: none;
  }

  .modal-head,
  .modal-actions {
    padding: 14px;
  }

  .quick-login {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .recruit-hero {
    padding: 38px 16px 34px;
  }

  .recruit-card-grid,
  .recruit-compare-grid,
  .recruit-income-grid,
  .recruit-step-grid,
  .recruit-level-table,
  .recruit-location-grid,
  .recruit-hero-metrics,
  .recruit-form-grid,
  .recruit-form fieldset {
    grid-template-columns: 1fr;
  }

  .recruit-subnav {
    position: static;
    justify-content: flex-start;
  }

  .recruit-form button {
    width: 100%;
  }

  .recruit-growth-path span {
    width: 100%;
    justify-content: center;
  }
}
