:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --sidebar: #141527;
  --sidebar-2: #1b1d33;
  --text: #1f2937;
  --muted: #667085;
  --line: #e4e7ec;
  --brand: #ff5a1f;
  --brand-2: #ff8a3d;
  --green: #12b76a;
  --blue: #2e90fa;
  --red: #f04438;
  --amber: #f79009;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(420px, 1.1fr);
  background: #0f172a;
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px;
  color: #fff;
  overflow: hidden;
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 90, 31, 0.42), transparent 26%),
    radial-gradient(circle at 78% 70%, rgba(46, 144, 250, 0.32), transparent 22%);
  opacity: 0.9;
}

.login-brand > * {
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
}

.login-brand h1 {
  max-width: 560px;
  margin: 80px 0 18px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.login-brand p {
  max-width: 520px;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.7;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 48px 32px;
  background: #fff;
}

.login-card {
  width: min(100%, 420px);
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.login-card p {
  margin: 0 0 30px;
  color: var(--muted);
}

.portal-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.portal-switcher a {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  background: #fff;
}

.portal-switcher a.active {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff7ed;
}

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

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

.form-section h3 {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: #111827;
  font-size: 16px;
}

.inline-url-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.checkbox-field {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.radio-options {
  display: grid;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.radio-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.radio-options input {
  accent-color: var(--brand);
}

.form-actions-sticky {
  position: sticky;
  bottom: 0;
  z-index: 2;
  justify-content: flex-end;
  margin: 0 -16px -16px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

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

.field label {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  outline: none;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.14);
}

.login-error,
.form-status {
  min-height: 20px;
  color: var(--red);
  font-size: 13px;
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: #d0d5dd;
  background: var(--sidebar);
}

.sidebar-head {
  padding: 22px 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-head strong {
  display: block;
  color: #fff;
}

.sidebar-head span {
  display: block;
  color: #98a2b3;
  font-size: 12px;
}

.menu-search {
  padding: 14px 14px 10px;
}

.menu-search input {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: #e5e7eb;
  background: var(--sidebar-2);
  outline: none;
}

.nav-scroll {
  flex: 1;
  overflow: auto;
  padding: 0 10px 18px;
}

.nav-group {
  margin-top: 8px;
}

.nav-group-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 10px;
  border: 0;
  border-radius: 8px;
  color: #e5e7eb;
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.nav-group-title:hover,
.nav-group.open .nav-group-title {
  background: rgba(255, 255, 255, 0.06);
}

.nav-items {
  display: none;
  padding: 4px 0 6px;
}

.nav-group.open .nav-items {
  display: grid;
}

.nav-link {
  display: block;
  padding: 9px 12px 9px 30px;
  border-radius: 7px;
  color: #aab2c0;
  text-decoration: none;
  font-size: 13px;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 90, 31, 0.16);
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #344054;
  background: #fff;
}

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

.lang-select {
  width: auto;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.user-chip > span:last-child {
  display: grid;
  gap: 1px;
  line-height: 1.1;
}

.user-chip strong {
  color: #101828;
  font-size: 13px;
}

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

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

.translation-summary article {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.translation-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.translation-summary strong {
  color: #101828;
  font-size: 26px;
  line-height: 1;
}

.translation-summary .needs-work {
  border-color: #fed7aa;
  background: #fff7ed;
}

.avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-size: 12px;
  font-weight: 900;
}

.content {
  padding: 24px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-title {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.2;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  background: #fff;
  font-weight: 700;
  text-decoration: none;
}

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

.btn.green {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.btn.success {
  border-color: #abefc6;
  color: #027a48;
  background: #ecfdf3;
}

.btn.warning {
  border-color: #fedf89;
  color: #b54708;
  background: #fffaeb;
}

.btn.red {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
}

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

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

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

.metric-card {
  padding: 18px;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
}

.metric-card em {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 12px;
  font-style: normal;
}

.dashboard-products-section {
  margin-top: 16px;
}

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

.dashboard-product-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 12px;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #fff;
}

.dashboard-product-card img,
.dashboard-product-card .product-thumb-fallback {
  width: 74px;
  height: 74px;
}

.dashboard-product-card strong {
  display: block;
  color: var(--brand);
  font-size: 16px;
  margin-bottom: 6px;
}

.dashboard-product-card span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.panel {
  overflow: hidden;
}

.panel-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  margin: 0;
  font-size: 16px;
}

.panel-body {
  padding: 16px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.filter-bar input,
.filter-bar select {
  min-width: 170px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.table-wrap {
  overflow: auto;
}

.products-panel {
  overflow: visible;
}

.products-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(0, 4fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.products-toolbar h3 {
  margin: 0;
  font-size: 16px;
}

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

.product-actions-bar input,
.product-actions-bar select {
  min-width: 160px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.bulk-control {
  position: relative;
}

.bulk-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  min-width: 168px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.bulk-control:hover .bulk-menu,
.bulk-control:focus-within .bulk-menu {
  display: grid;
}

.bulk-menu button {
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #344054;
  text-align: left;
  font-weight: 700;
}

.bulk-menu button:hover {
  background: #f9fafb;
}

.products-table {
  min-width: 1120px;
}

.products-table .text-right {
  text-align: right;
}

.product-name-cell {
  width: min(300px, 36vw);
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.product-name-cell img,
.product-thumb-fallback {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f2f4f7;
}

.product-thumb-fallback {
  display: grid;
  place-items: center;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

.product-name-cell span {
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  color: #667085;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.45;
}

.product-info-cell {
  min-width: 150px;
  color: #475467;
  line-height: 1.75;
}

.product-info-cell strong {
  color: #111827;
}

.product-row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

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

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  color: #475467;
  background: #f9fafb;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

td {
  color: #344054;
}

.row-title {
  color: #111827;
  font-weight: 800;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #344054;
  background: #eef2f7;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.green {
  color: #027a48;
  background: #dcfae6;
}

.badge.red {
  color: #b42318;
  background: #fee4e2;
}

.badge.amber {
  color: #b54708;
  background: #fef0c7;
}

.badge.dark {
  color: #344054;
  background: #eef2f7;
}

.badge.blue {
  color: #175cd3;
  background: #d1e9ff;
}

.actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.switch {
  position: relative;
  width: 42px;
  height: 22px;
  display: inline-block;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d0d5dd;
  transition: 0.2s;
}

.switch span::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch input:checked + span {
  background: var(--green);
}

.switch input:checked + span::before {
  transform: translateX(20px);
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
}

.settings-nav {
  display: grid;
  gap: 8px;
  align-content: start;
}

.settings-tab {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  text-align: left;
  font-weight: 800;
}

.settings-tab.active {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff7ed;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: min(760px, 100%);
  max-height: min(820px, 90vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

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

.modal-head h3 {
  margin: 0;
}

.modal-body {
  overflow: auto;
  padding: 18px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  min-width: 240px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #fff;
  background: #101828;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.empty {
  padding: 44px 20px;
  color: var(--muted);
  text-align: center;
}

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

.admin-split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.table-card-head {
  flex-wrap: wrap;
}

.form-card {
  align-self: start;
}

.form-submit-row {
  justify-content: flex-end;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.product-row-actions.center {
  justify-content: center;
}

.categories-table {
  min-width: 1040px;
}

.brands-table {
  min-width: 620px;
}

.application-table {
  min-width: 980px;
}

.attributes-table {
  min-width: 720px;
}

.colors-table {
  min-width: 520px;
}

.storehouse-table {
  min-width: 1040px;
}

.collect-table {
  min-width: 820px;
}

.orders-panel {
  overflow: visible;
}

.orders-filter-bar {
  align-items: center;
}

.orders-filter-bar input,
.orders-filter-bar select {
  min-width: 190px;
}

.order-status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff7ed;
}

.order-status-strip strong {
  margin-right: 8px;
  color: #111827;
  font-size: 14px;
}

.order-status-strip select {
  min-width: 210px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.orders-table {
  min-width: 1460px;
}

.orders-table th:last-child,
.orders-table td:last-child {
  position: sticky;
  right: 0;
  background: inherit;
  box-shadow: -8px 0 14px rgba(15, 23, 42, 0.04);
}

.orders-table td:last-child {
  background: #fff;
}

.order-actions {
  flex-wrap: nowrap;
}

.order-claim-panel {
  margin-bottom: 16px;
  overflow: visible;
}

.panel-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.claim-orders-table {
  min-width: 980px;
}

.agent-assignment-cell {
  display: grid;
  gap: 5px;
  min-width: 128px;
}

.agent-assignment-cell small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.assignment-policy {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
  text-align: left;
}

.order-code-cell {
  white-space: nowrap;
}

.muted-dash {
  color: #98a2b3;
}

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

.detail-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.detail-item span {
  display: block;
  margin-bottom: 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.detail-item strong {
  color: #111827;
  font-size: 14px;
}

.invoice-preview {
  display: grid;
  gap: 16px;
  padding: 6px;
}

.invoice-preview > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.invoice-preview strong {
  font-size: 22px;
}

.invoice-preview span {
  color: var(--muted);
  font-weight: 800;
}

.invoice-preview dl {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
}

.invoice-preview dt {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.invoice-preview dd {
  margin: 0;
  color: #111827;
  font-weight: 700;
}

.people-panel,
.sellers-panel {
  overflow: visible;
}

.people-filter-bar {
  align-items: center;
}

.people-filter-bar input,
.people-filter-bar select {
  min-width: 190px;
}

.customers-table {
  min-width: 980px;
}

.addresses-table {
  min-width: 920px;
}

.sellers-table {
  min-width: 2380px;
}

.payouts-table {
  min-width: 1120px;
}

.payments-table {
  min-width: 820px;
}

.person-cell {
  min-width: 150px;
  display: block;
}

.person-avatar {
  display: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #334155, #ff5a1f);
  font-size: 12px;
  font-weight: 900;
}

.person-cell strong {
  display: block;
  color: #111827;
  font-weight: 800;
}

.person-cell em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.people-actions {
  min-width: 430px;
  flex-wrap: wrap;
}

.seller-actions {
  width: 470px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

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

.mini-list > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.mini-list strong,
.mini-list span {
  display: block;
}

.mini-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

.permission-overview > div {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.permission-overview > div:last-child {
  border-right: 0;
}

.permission-overview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.permission-overview strong {
  display: block;
  margin-top: 6px;
  color: #111827;
  font-size: 14px;
}

.permission-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.form-error {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  background: #fff1f2;
  font-size: 13px;
  font-weight: 700;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.danger-confirm {
  display: grid;
  gap: 8px;
}

.danger-confirm strong {
  color: #991b1b;
}

.salesmans-table {
  min-width: 1060px;
}

.referral-cell {
  display: grid;
  gap: 4px;
  min-width: 260px;
}

.referral-cell strong {
  color: #111827;
  font-size: 13px;
}

.referral-cell span {
  max-width: 360px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

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

.package-card-head {
  min-height: 34px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.package-card h3 {
  margin: 0;
  color: #111827;
  font-size: 17px;
}

.package-price {
  color: #111827;
  font-size: 30px;
  line-height: 1;
}

.package-card dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.package-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f2f4f7;
}

.package-card dt,
.package-card dd {
  margin: 0;
  font-size: 13px;
}

.package-card dt {
  color: var(--muted);
  font-weight: 700;
}

.package-card dd {
  color: #111827;
  font-weight: 800;
  text-align: right;
}

.package-card p {
  min-height: 44px;
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.55;
}

.package-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.package-empty {
  grid-column: 1 / -1;
}

.guarantee-panel {
  max-width: 920px;
}

.manual-methods-table {
  min-width: 760px;
}

.manual-methods-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.method-logo,
.receipt-thumb {
  width: 70px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f2f4f7;
}

.method-logo.fallback,
.receipt-thumb.fallback {
  display: inline-grid;
  place-items: center;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.offline-payments-table {
  min-width: 1120px;
}

.affiliate-config-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.compact-config-panel {
  box-shadow: var(--shadow);
}

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

.settings-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #f2f4f7;
}

.settings-row .field {
  gap: 5px;
}

.notice-line {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #fedf89;
  border-radius: 8px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 700;
}

.affiliate-users-table,
.referral-users-table,
.affiliate-withdraw-table,
.affiliate-logs-table {
  min-width: 980px;
}

.refunds-table {
  min-width: 1100px;
}

.report-panel {
  overflow: hidden;
}

.report-table {
  min-width: 860px;
}

.report-table td:nth-child(2),
.refunds-table td:nth-child(4) {
  color: #111827;
  font-weight: 700;
}

.marketing-panel,
.support-panel,
.website-panel {
  overflow: hidden;
}

.flash-deals-table {
  min-width: 1120px;
}

.subscribers-table,
.website-pages-table {
  min-width: 760px;
}

.tickets-table,
.conversations-table {
  min-width: 1040px;
}

.conversations-table small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.newsletter-compose {
  display: grid;
  gap: 16px;
}

.newsletter-compose .full {
  grid-column: 1 / -1;
}

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

.recipient-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.recipient-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f9fafb;
}

.email-chip-list {
  max-height: 250px;
  overflow: auto;
  padding: 8px;
}

.email-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 9px;
  align-items: center;
  padding: 9px 8px;
  border-radius: 7px;
}

.email-chip:hover {
  background: #f9fafb;
}

.email-chip em {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.small-empty {
  padding: 12px;
}

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

.website-section-panel {
  box-shadow: var(--shadow);
}

.website-section-panel.wide {
  grid-column: 1 / -1;
}

.website-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
}

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

.section-title-row h3 {
  margin: 0;
  font-size: 15px;
}

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

.menu-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
}

.switch-line {
  min-height: 76px;
  align-items: flex-start;
}

.text-link {
  color: #175cd3;
  font-weight: 700;
  text-decoration: none;
}

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

.setup-panel,
.setup-card {
  overflow: hidden;
}

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

.setup-config-grid.single {
  grid-template-columns: minmax(0, 720px);
}

.setup-card {
  box-shadow: var(--shadow);
}

.setup-card .panel-head .switch {
  flex: 0 0 auto;
}

.activation-form {
  gap: 4px;
}

.activation-form .switch-line {
  min-height: 52px;
  padding: 10px 0;
  border-bottom: 1px solid #f2f4f7;
}

.languages-table,
.translations-table,
.sites-table,
.currencies-table,
.locations-table,
.inter-table {
  min-width: 860px;
}

.translations-table {
  min-width: 1080px;
}

.currencies-table {
  min-width: 980px;
}

.locations-table {
  min-width: 920px;
}

.content-panel,
.content-form-panel {
  overflow: hidden;
}

.blog-posts-table {
  min-width: 1120px;
}

.blog-categories-table,
.staffs-table,
.roles-table {
  min-width: 820px;
}

.content-title-cell {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 300px;
}

.roles-table small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

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

.permission-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
}

.permission-card strong {
  margin-bottom: 2px;
  color: #111827;
}

.system-panel,
.logs-panel,
.system-card {
  overflow: hidden;
}

.system-update-grid,
.server-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.version-strip div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
}

.version-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.version-strip strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.server-status-table,
.system-update-table,
.admin-log-table,
.seller-balance-log-table {
  min-width: 760px;
}

.uploaded-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
  padding: 16px;
}

.uploaded-file-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.uploaded-file-card strong,
.uploaded-file-card span,
.uploaded-file-card em {
  display: block;
}

.uploaded-file-card span,
.uploaded-file-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.uploaded-file-card .actions {
  grid-column: 1 / -1;
}

.addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.addon-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.addon-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.addon-card h3 {
  margin: 0;
  font-size: 15px;
}

.addon-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.addon-card .switch {
  grid-column: 3;
}

.value-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.color-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
}

.color-name i {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.center-body {
  display: grid;
  place-items: center;
  min-height: 92px;
}

.collect-panel {
  margin-top: 8px;
}

.collect-product-cell {
  width: min(460px, 46vw);
}

.collect-note {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  color: #475467;
  text-align: center;
  background: #fff;
  font-size: 13px;
}

.text-danger {
  color: #d92d20;
}

.text-success {
  color: #039855;
}

.media-thumb,
.media-icon {
  display: inline-grid;
  place-items: center;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f2f4f7;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.media-thumb {
  width: 72px;
  height: 44px;
  border-radius: 6px;
}

.media-icon {
  width: 34px;
  height: 34px;
  border-radius: 5px;
}

.media-empty {
  color: #98a2b3;
}

.profile-output {
  min-height: 140px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  font-family: Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
}

.profile-generate-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  align-items: end;
}

.profile-generate-form .toolbar {
  align-self: end;
  justify-content: flex-start;
}

.profile-generate-form .field em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.profile-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #dcfae6;
}

.profile-result strong {
  display: block;
  margin-bottom: 8px;
  color: #027a48;
}

.profile-result textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid #abefc6;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.compact-search {
  min-height: 36px;
  min-width: 260px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

.pager button {
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.pager button.active {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.modal-help {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 8px;
  color: #475467;
  background: #f9fafb;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: 280px;
    transform: translateX(-100%);
    transition: 0.2s;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .metrics-grid,
  .dashboard-products-grid,
  .two-column,
  .admin-split,
  .settings-grid,
  .products-toolbar,
  .affiliate-config-grid,
  .website-config-grid,
  .setup-config-grid,
  .system-update-grid,
  .server-status-grid,
  .version-strip,
  .permission-overview,
  .recipient-grid,
  .permissions-matrix,
  .profile-generate-form,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .website-section-panel.wide {
    grid-column: auto;
  }

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

  .product-actions-bar {
    justify-content: stretch;
  }

  .product-actions-bar input,
  .product-actions-bar select,
  .product-actions-bar .btn,
  .bulk-control {
    width: 100%;
  }

  .form-grid .full {
    grid-column: auto;
  }

  .inline-url-field {
    grid-template-columns: 1fr;
  }

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

  .login-brand {
    min-height: 320px;
    padding: 36px 24px;
  }
}

@media (max-width: 640px) {
  .content,
  .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .page-head {
    display: grid;
  }

  .toolbar,
  .filter-bar {
    display: grid;
  }

  .filter-bar input,
  .filter-bar select,
  .btn {
    width: 100%;
  }

  .portal-switcher {
    grid-template-columns: 1fr;
  }

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