:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #657084;
  --line: #dce3ee;
  --line-soft: #edf1f6;
  --slate: #111827;
  --slate-2: #1f2937;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --green: #0f766e;
  --green-soft: #ddf7ef;
  --amber: #b45309;
  --amber-soft: #fff4d8;
  --red: #b42318;
  --red-soft: #fee4e2;
  --violet: #6d28d9;
  --violet-soft: #f0e7ff;
  --shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  color: #fff;
  background: var(--slate);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.brand p {
  margin: 4px 0 0;
  color: #b9c4d5;
  font-size: 12px;
}

.top-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

.top-summary strong {
  display: block;
  margin-top: 2px;
  color: #fff;
}

.top-summary span {
  color: #8fa1b8;
}

.shell-main {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 24px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 13px;
  color: #475467;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.tab:hover {
  color: var(--ink);
  background: #f2f5f9;
}

.tab.active {
  color: #fff;
  background: var(--slate);
}

.period-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.period-box select,
.filters select,
.filters input,
.form-grid select,
.form-grid input,
.compact-input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.hero h2,
.modal h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero p {
  max-width: 900px;
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.button,
.icon-button,
.link-button {
  border: 0;
  border-radius: 6px;
}

.button {
  min-height: 36px;
  padding: 0 13px;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
}

.button:hover {
  filter: brightness(0.96);
}

.button.secondary {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.button.secondary.dark {
  color: #e5edf8;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.button.danger {
  color: #fff;
  background: var(--red);
}

.icon-button {
  width: 32px;
  height: 32px;
  color: var(--muted);
  background: #f2f5f9;
  font-size: 20px;
}

.link-button {
  padding: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 700;
}

.link-button.danger-text,
.danger-text {
  color: var(--red);
}

.link-sep {
  color: var(--muted);
  margin: 0 3px;
}

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

.compact-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.compact-filters input,
.compact-filters select {
  min-width: min(240px, 100%);
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form select {
  min-width: 128px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 2px 4px 2px 0;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tag.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.supervisor-dashboard {
  grid-template-columns: minmax(320px, 1.05fr) minmax(420px, 1.25fr) minmax(280px, 0.85fr);
}

.supervisor-inspect-head {
  margin-bottom: 14px;
}

.inline-tabs {
  display: inline-flex;
}

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

.two-col {
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.6fr);
}

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

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.priority-dashboard {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(420px, 1.35fr) minmax(260px, 0.72fr);
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}

.goal-card,
.benchmark-card,
.metric-tile {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.goal-card {
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(15, 118, 110, 0.94)),
    #1d4ed8;
  border-color: rgba(255, 255, 255, 0.12);
}

.goal-copy h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.goal-copy p:not(.eyebrow) {
  margin: 6px 0 0;
  color: #d8e8ff;
}

.motto-line {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #fef9c3;
  background: rgba(15, 23, 42, 0.18);
  font-size: 13px;
  line-height: 1.45;
}

.goal-card .eyebrow {
  color: #d9f99d;
}

.goal-visual {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.goal-visual strong {
  display: block;
  font-size: 30px;
  line-height: 1.1;
}

.goal-visual span {
  display: block;
  margin-top: 8px;
  color: #d8e8ff;
}

.progress-ring {
  width: 146px;
  height: 146px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(#fbbf24 0deg, #fbbf24 var(--progress), rgba(255, 255, 255, 0.18) var(--progress), rgba(255, 255, 255, 0.18) 360deg);
}

.progress-ring-inner {
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.88);
}

.progress-ring-inner strong {
  font-size: 24px;
}

.progress-ring-inner span {
  margin: 2px 0 0;
  color: #cbd5e1;
  font-size: 12px;
}

.goal-bars {
  display: grid;
  gap: 10px;
}

.mini-progress {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.2);
}

.mini-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.mini-progress small {
  display: block;
  margin-top: 6px;
  color: #c7d9ef;
  font-size: 11px;
}

.mini-track {
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.mini-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #fde68a, #fbbf24);
}

.metric-mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(112px, auto);
  gap: 14px;
}

.metric-tile {
  padding: 15px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.metric-tile:hover,
.goal-card:hover,
.benchmark-card:hover,
.panel:hover {
  border-color: #c7d5e8;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.07);
}

.metric-tile.primary {
  grid-row: span 2;
  align-content: center;
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.metric-tile.primary strong {
  font-size: 30px;
}

.metric-tile.success {
  background: #f4fbf8;
}

.metric-tile.warning {
  background: #fffaf0;
}

.metric-tile.info {
  background: #f7faff;
}

.metric-tile.neutral {
  background: #fafafa;
}

.metric-tile span,
.benchmark-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.15;
}

.metric-tile small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
  white-space: normal;
}

.metric-tile.primary small,
.metric-tile.primary span {
  color: #cbd5e1;
}

.metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
}

.metric-icon.small {
  width: 32px;
  height: 32px;
}

.metric-tile.primary .metric-icon {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.14);
}

.metric-tile.success .metric-icon {
  color: var(--green);
  background: var(--green-soft);
}

.metric-tile.warning .metric-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.metric-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

.choice-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.form-grid .choice-card {
  display: flex;
  gap: 9px;
}

.choice-card input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  flex: 0 0 auto;
}

.choice-card:has(input:checked) {
  color: #174ea6;
  border-color: #8bb8ff;
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.wechat-choice {
  align-items: flex-start;
  min-height: 70px;
}

.wechat-choice span,
.wechat-choice small,
.wechat-choice strong {
  display: block;
}

.wechat-choice small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.product-structure-tile {
  grid-column: span 1;
}

.product-structure-rows {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.product-row {
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.product-row strong,
.product-row b,
.product-row small {
  display: block;
}

.product-row b {
  margin-top: 5px;
  font-size: 16px;
}

.product-row small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.mini-track.light {
  height: 6px;
  background: #edf2f7;
}

.panel-head.compact {
  padding: 14px;
}

.benchmark-card {
  overflow: hidden;
}

.benchmark-list {
  display: grid;
  gap: 0;
}

.benchmark-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line-soft);
}

.benchmark-row strong {
  display: block;
  margin-top: 3px;
}

.benchmark-row small {
  color: var(--muted);
  white-space: nowrap;
}

.traffic-entry-card {
  margin-bottom: 14px;
}

.traffic-entry-form {
  display: grid;
  grid-template-columns: 150px minmax(160px, 1fr) 150px minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.traffic-entry-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.traffic-entry-form input,
.traffic-entry-form select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.traffic-entry-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.traffic-entry-list span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0 9px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 700;
}

.traffic-entry-history span {
  gap: 6px;
}

.traffic-entry-history strong {
  color: var(--ink);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(2, minmax(135px, 0.7fr)) repeat(4, minmax(135px, 1fr)) auto auto auto;
  gap: 10px;
  align-items: end;
}

.filter-grid label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.team-goal-visual {
  padding: 18px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, #111827, #164e63 64%, #0f766e);
}

.team-goal-visual .progress-ring {
  width: 106px;
  height: 106px;
}

.team-goal-visual .progress-ring-inner {
  width: 78px;
  height: 78px;
}

.team-goal-visual .progress-ring-inner strong {
  font-size: 20px;
}

.team-goal-copy span,
.team-goal-copy p {
  color: #c9d8e8;
}

.team-goal-copy span {
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.team-goal-copy strong {
  display: block;
  margin-top: 5px;
  font-size: 34px;
  line-height: 1;
}

.team-goal-copy p {
  margin: 8px 0 0;
  font-size: 12px;
}

.team-goal-track {
  grid-column: 1 / -1;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.team-goal-track div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fbbf24, #22c55e);
}

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

.income-breakdown div {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.income-breakdown span,
.income-breakdown strong {
  display: block;
}

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

.income-breakdown strong {
  margin-top: 10px;
  font-size: 22px;
  line-height: 1.15;
}

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

.panel-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.panel-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.panel-body {
  padding: 16px;
}

.kpi {
  padding: 15px;
}

.kpi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kpi-value {
  margin-top: 11px;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
}

.kpi-note {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.badge.green {
  color: var(--green);
  background: var(--green-soft);
}

.badge.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.badge.red {
  color: var(--red);
  background: var(--red-soft);
}

.badge.violet {
  color: var(--violet);
  background: var(--violet-soft);
}

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

.filters input {
  min-width: 230px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: #526071;
  background: #f8fafc;
  font-weight: 800;
}

td.wrap {
  white-space: normal;
  min-width: 220px;
  line-height: 1.5;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

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

.bar-row {
  display: grid;
  grid-template-columns: 96px minmax(120px, 1fr) 120px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.bar-track {
  position: relative;
  height: 24px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #f3f6fa;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.bar-fill.amber {
  background: linear-gradient(90deg, #f59e0b, #b45309);
}

.bar-fill.red {
  background: linear-gradient(90deg, #ef4444, #b42318);
}

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

.alert-list,
.task-list,
.chain {
  display: grid;
  gap: 10px;
}

.alert,
.task,
.chain-step {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.alert strong,
.task strong,
.chain-step strong {
  display: block;
  margin-bottom: 5px;
}

.alert p,
.task p,
.chain-step p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.alert.warning {
  border-color: #ffd7cf;
  background: #fff7f5;
}

.alert.good {
  border-color: #cdeee1;
  background: #f5fffb;
}

.chain-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.chain-no {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--slate-2);
  font-size: 12px;
  font-weight: 800;
}

.modal {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 22px 70px rgba(17, 24, 39, 0.28);
}

.modal::backdrop {
  background: rgba(17, 24, 39, 0.45);
}

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

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

.form-grid label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

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

.modal-actions {
  padding: 14px 18px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.small-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.qa-card {
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 13px;
  color: #d8e2ef;
  background: #172033;
  text-align: left;
  min-height: 94px;
}

.qa-card.active {
  color: #111827;
  background: #fbbf24;
  border-color: #fbbf24;
}

.answer {
  padding: 15px;
  border-radius: 8px;
  color: #d8e2ef;
  background: #0b1220;
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 13px;
}

.footer {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 22px;
  color: var(--muted);
  font-size: 12px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.login-card {
  width: min(980px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 24px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
}

.login-card h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
}

.login-copy {
  max-width: 720px;
  color: #cbd5e1;
  line-height: 1.7;
}

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

.account-card {
  min-height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 15px;
  color: #e5edf8;
  background: rgba(15, 23, 42, 0.65);
  text-align: left;
}

.account-card:hover {
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.22);
}

.account-card strong,
.account-card span,
.account-card small {
  display: block;
}

.account-card span {
  margin-top: 8px;
  color: #93c5fd;
}

.account-card small {
  margin-top: 12px;
  color: #cbd5e1;
  line-height: 1.5;
}

.review-thumb {
  display: block;
  max-width: 180px;
  max-height: 180px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
}

@media (max-width: 1120px) {
  .priority-dashboard {
    grid-template-columns: 1fr;
  }

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

  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-inner,
  .controls,
  .hero {
    align-items: stretch;
    flex-direction: column;
  }

  .top-summary,
  .period-box {
    justify-content: space-between;
  }

  .shell-main {
    padding: 14px;
  }

  .kpi-grid,
  .three-col,
  .qa-grid,
  .account-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .goal-visual,
  .metric-mosaic,
  .traffic-entry-form,
  .choice-grid,
  .choice-grid.compact {
    grid-template-columns: 1fr;
  }

  .metric-tile.primary {
    grid-row: auto;
  }

  .filters input {
    min-width: 100%;
  }
}

/* v0.5 visual refinement layer */
:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #d9e2ee;
  --line-soft: #edf2f7;
  --blue: #1d4ed8;
  --blue-soft: #eaf2ff;
  --green: #0f766e;
  --green-soft: #e5f7f3;
  --amber: #b45309;
  --amber-soft: #fff5da;
  --red: #b42318;
  --red-soft: #fff0ee;
  --violet: #7c3aed;
  --violet-soft: #f3edff;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

body {
  background:
    linear-gradient(180deg, #eef4fb 0, #f8fafc 260px, #f4f7fb 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background:
    linear-gradient(135deg, #101827 0%, #172033 58%, #113536 100%);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.topbar-inner {
  padding: 14px 24px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 22px rgba(37, 99, 235, 0.26);
}

.brand h1 {
  font-size: 19px;
}

.brand p {
  color: #c8d3e2;
}

.top-summary {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.top-summary div {
  min-width: 72px;
}

.shell-main {
  gap: 18px;
}

.controls {
  position: sticky;
  top: 72px;
  z-index: 15;
  padding: 4px 0;
  background: linear-gradient(180deg, rgba(244, 247, 251, 0.96), rgba(244, 247, 251, 0.82));
  backdrop-filter: blur(10px);
}

.tabs {
  gap: 4px;
  padding: 5px;
  border-color: rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.tab {
  min-height: 40px;
  padding: 0 15px;
  color: #4b5565;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.tab:hover {
  background: #edf3fa;
}

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, #111827, #233044);
  box-shadow: 0 8px 16px rgba(17, 24, 39, 0.16);
}

.period-box {
  min-height: 48px;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.period-box span {
  color: #526071;
  font-weight: 800;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-color: rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)),
    linear-gradient(135deg, rgba(29, 78, 216, 0.12), rgba(15, 118, 110, 0.09));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--blue), var(--green), #f59e0b);
}

.hero > * {
  position: relative;
}

.hero h2 {
  font-size: 25px;
}

.hero p {
  max-width: 760px;
  color: #566174;
}

.button {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 15px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.24);
}

.button.secondary {
  color: #243044;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.button.secondary.dark {
  color: #edf5ff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.panel,
.goal-card,
.benchmark-card,
.metric-tile,
.login-card {
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.055);
}

.panel,
.benchmark-card,
.metric-tile {
  overflow: hidden;
}

.panel:hover,
.goal-card:hover,
.benchmark-card:hover,
.metric-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.panel-head {
  min-height: 68px;
  padding: 17px 18px;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.panel-title {
  font-size: 16px;
  color: #172033;
}

.panel-subtitle {
  color: #697586;
}

.panel-body {
  padding: 18px;
}

.priority-dashboard {
  grid-template-columns: minmax(330px, 0.95fr) minmax(480px, 1.52fr) minmax(280px, 0.78fr);
  gap: 16px;
  margin-bottom: 16px;
}

.goal-card {
  position: relative;
  padding: 20px;
  background:
    linear-gradient(145deg, rgba(29, 78, 216, 0.98), rgba(15, 118, 110, 0.94)),
    #1d4ed8;
  box-shadow: 0 18px 42px rgba(29, 78, 216, 0.22);
}

.goal-card::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  opacity: 0.55;
}

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

.goal-copy h3 {
  font-size: 23px;
}

.motto-line {
  border-radius: 8px;
  background: rgba(7, 18, 38, 0.2);
}

.goal-visual {
  grid-template-columns: 132px minmax(0, 1fr);
}

.progress-ring {
  width: 132px;
  height: 132px;
}

.progress-ring-inner {
  width: 96px;
  height: 96px;
}

.goal-visual strong {
  font-size: 34px;
}

.mini-progress {
  padding: 10px 11px;
  background: rgba(7, 18, 38, 0.17);
}

.metric-mosaic {
  grid-template-columns: minmax(180px, 1.08fr) minmax(180px, 1fr);
  gap: 16px;
}

.metric-tile {
  min-height: 122px;
  padding: 17px;
  border-radius: 8px;
  background: #fff;
}

.metric-tile.primary {
  background:
    linear-gradient(135deg, #111827, #233044);
}

.metric-tile.primary strong {
  font-size: 34px;
}

.metric-tile.success {
  background: linear-gradient(180deg, #f4fbf8, #fff);
}

.metric-tile.warning {
  background: linear-gradient(180deg, #fff8eb, #fff);
}

.metric-tile.info {
  background: linear-gradient(180deg, #f5f9ff, #fff);
}

.metric-icon {
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.metric-tile span,
.benchmark-row span,
.kpi-label {
  color: #697586;
  letter-spacing: 0;
}

.metric-tile strong,
.kpi-value {
  color: #111827;
}

.metric-tile.primary strong {
  color: #fff;
}

.metric-tile small {
  color: #6b7280;
}

.product-structure-tile {
  grid-column: 1 / -1;
}

.product-structure-tile > div:last-child {
  min-width: 0;
}

.product-structure-rows {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.product-row {
  padding: 12px;
  border-color: #e6edf5;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.product-row strong {
  color: #364152;
  font-size: 12px;
}

.product-row b {
  color: #111827;
  font-size: 18px;
}

.benchmark-row {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
}

.benchmark-row small {
  grid-column: 2;
  margin-top: -4px;
  white-space: normal;
}

.traffic-entry-form {
  grid-template-columns: 144px minmax(170px, 1fr) 132px minmax(240px, 1.2fr) auto;
  gap: 12px;
}

.traffic-entry-list span {
  border: 1px solid #cfe0ff;
  background: #f3f7ff;
}

.choice-card {
  min-height: 46px;
  border-color: #dbe5f0;
  background: linear-gradient(180deg, #fff, #fbfdff);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.choice-card:hover {
  border-color: #a9c7f5;
  transform: translateY(-1px);
}

.choice-card input {
  width: 18px;
  height: 18px;
}

.choice-card:has(input:checked) {
  color: #123d82;
  border-color: #6ea8ff;
  background: linear-gradient(180deg, #eef6ff, #f8fbff);
  box-shadow: inset 0 0 0 1px #b9d7ff, 0 8px 18px rgba(37, 99, 235, 0.08);
}

.wechat-choice {
  min-height: 82px;
}

.table-wrap {
  border-radius: 0 0 8px 8px;
  background: #fff;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #475467;
  background: #f6f9fc;
}

td {
  background: #fff;
}

tbody tr:nth-child(even) td {
  background: #fbfdff;
}

tbody tr:hover td {
  background: #f3f8ff;
}

th,
td {
  padding: 12px 11px;
}

.badge {
  border-radius: 8px;
}

.alert,
.task,
.chain-step,
.qa-card {
  border-radius: 8px;
}

.alert.good {
  background: linear-gradient(180deg, #f5fffb, #fff);
}

.alert.warning {
  background: linear-gradient(180deg, #fff8f5, #fff);
}

.form-grid {
  gap: 14px;
}

.form-grid label,
.traffic-entry-form label {
  color: #344054;
}

.period-box select,
.filters select,
.filters input,
.form-grid select,
.form-grid input,
.traffic-entry-form input,
.traffic-entry-form select,
.compact-input,
textarea {
  min-height: 40px;
  border-color: #d7e0ec;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.period-box select:focus,
.filters select:focus,
.filters input:focus,
.form-grid select:focus,
.form-grid input:focus,
.traffic-entry-form input:focus,
.traffic-entry-form select:focus,
.compact-input:focus,
textarea:focus {
  outline: none;
  border-color: #7eb0ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.modal {
  width: min(860px, calc(100vw - 28px));
  max-height: min(86vh, 820px);
  border-radius: 8px;
  overflow: hidden;
}

.modal form {
  max-height: inherit;
  display: flex;
  flex-direction: column;
}

.modal-head {
  padding: 20px 22px;
  background:
    linear-gradient(90deg, #fff, #f8fbff);
}

.modal .form-grid {
  overflow: auto;
  padding: 20px 22px;
}

.form-error {
  margin: -4px 0 2px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 8px;
  padding: 9px 11px;
  color: #b42318;
  background: #fff1f1;
  font-size: 12px;
  font-weight: 800;
}

.modal-actions {
  position: sticky;
  bottom: 0;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.icon-button {
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-button:hover {
  color: #111827;
  background: #e8eef6;
}

.login-shell {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.24), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #182338 58%, #0d3b3c 100%);
}

.login-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(14px);
}

.account-card {
  min-height: 138px;
  border-radius: 8px;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.account-card:hover {
  transform: translateY(-2px);
}

@media (max-width: 1120px) {
  .controls {
    top: 70px;
  }

  .priority-dashboard {
    grid-template-columns: 1fr;
  }

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

  .metric-tile.primary {
    grid-row: auto;
    grid-column: span 2;
  }

  .product-structure-tile {
    grid-column: span 2;
  }

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

@media (max-width: 860px) {
  .topbar {
    position: static;
  }

  .topbar-inner {
    padding: 14px;
    gap: 12px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
  }

  .brand h1 {
    font-size: 17px;
  }

  .top-summary {
    width: 100%;
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 8px;
    scrollbar-width: none;
  }

  .top-summary::-webkit-scrollbar {
    display: none;
  }

  .top-summary div {
    flex: 0 0 auto;
    min-width: 94px;
    padding: 5px 7px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
  }

  .top-summary span {
    font-size: 11px;
  }

  .top-summary strong {
    font-size: 12px;
  }

  .top-summary .button {
    flex: 0 0 auto;
    width: auto;
    min-width: 72px;
    min-height: 44px;
    padding: 0 14px;
  }

  .consultant-shell .brand p {
    display: none;
  }

  .consultant-shell .top-summary div:nth-child(1) {
    min-width: 82px;
  }

  .consultant-shell .top-summary div:nth-child(2) {
    min-width: 112px;
  }

  .consultant-shell .top-summary div:nth-child(3) {
    min-width: 104px;
  }

  .shell-main {
    padding: 12px 14px 28px;
  }

  .controls {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: 1fr;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 0 0 auto;
    min-height: 42px;
  }

  .period-box {
    min-height: 42px;
  }

  .hero {
    padding: 18px 18px 18px 20px;
  }

  .hero h2 {
    font-size: 23px;
  }

  .hero p {
    line-height: 1.55;
  }

  .metric-mosaic,
  .benchmark-list,
  .product-structure-rows,
  .traffic-entry-form,
  .filter-grid,
  .income-breakdown {
    grid-template-columns: 1fr;
  }

  .team-goal-visual {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .team-goal-visual .progress-ring {
    width: 92px;
    height: 92px;
  }

  .team-goal-visual .progress-ring-inner {
    width: 68px;
    height: 68px;
  }

  .metric-tile.primary,
  .product-structure-tile {
    grid-column: auto;
  }

  .goal-card {
    padding: 18px;
  }

  .goal-visual {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 14px;
  }

  .progress-ring {
    width: 118px;
    height: 118px;
  }

  .progress-ring-inner {
    width: 86px;
    height: 86px;
  }

  .goal-visual strong {
    font-size: 27px;
  }

  .metric-tile {
    min-height: 106px;
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .metric-icon {
    width: 38px;
    height: 38px;
  }

  .panel-head {
    min-height: auto;
    padding: 15px;
  }

  .panel-body {
    padding: 15px;
  }

  .choice-grid.compact,
  .wechat-choice-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    padding: 16px;
  }
}

@media (max-width: 520px) {
  .login-shell {
    padding: 16px;
  }

  .login-card {
    padding: 18px;
  }

  .login-card h1 {
    font-size: 25px;
  }

  .account-grid {
    gap: 10px;
  }

  .account-card {
    min-height: 118px;
    padding: 14px;
  }

  .top-summary {
    display: flex;
  }

  .hero-actions,
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .compact-filters,
  .inline-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .compact-filters input,
  .compact-filters select,
  .inline-form select {
    width: 100%;
    min-width: 0;
  }

  .button,
  .button.secondary {
    width: 100%;
  }

  .top-summary .button {
    width: auto;
  }

  .goal-visual {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .metric-tile strong {
    font-size: 21px;
  }

  .metric-tile.primary strong {
    font-size: 30px;
  }

  .team-goal-visual {
    grid-template-columns: 1fr;
  }

  .income-breakdown strong {
    font-size: 20px;
  }

  th,
  td {
    padding: 10px 9px;
  }
}

/* v0.6 consultant order and invoice workspace */
.consultant-shell #view {
  min-width: 0;
}

.consultant-shell .panel:hover {
  transform: none;
}

.period-alert {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #f1cf91;
  border-radius: 8px;
  padding: 9px 12px;
  color: #7a3e08;
  background: #fff9eb;
  box-shadow: 0 6px 16px rgba(180, 83, 9, 0.06);
  font-size: 12px;
}

.period-alert strong {
  color: #8a4609;
  white-space: nowrap;
}

.period-alert-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #d97706;
  font-weight: 900;
}

.module-head {
  align-items: center;
}

.panel-actions,
.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.record-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid #e2e9f2;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.record-summary > div {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 13px 16px;
  border-right: 1px solid #e2e9f2;
}

.record-summary > div:last-child {
  border-right: 0;
}

.record-summary span,
.record-summary strong {
  display: block;
}

.record-summary span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.record-summary strong {
  margin-top: 7px;
  color: #172033;
  font-size: 21px;
  line-height: 1.15;
}

.invoice-summary > div:nth-child(2) strong {
  color: var(--green);
}

.invoice-summary > div:nth-child(3) strong {
  color: var(--amber);
}

.order-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  align-items: end;
  padding: 15px;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  background: #fbfcfe;
}

.invoice-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(150px, 1fr)) auto;
  align-items: end;
  padding: 15px;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  background: #fbfcfe;
}

.order-filters .filter-search {
  grid-column: span 2;
}

.filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.filters label input,
.filters label select {
  width: 100%;
  min-width: 0;
}

.filter-actions {
  min-height: 40px;
}

.result-count {
  margin: 12px 0 0;
  color: #697586;
  font-size: 12px;
  font-weight: 700;
}

.priority-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: #98a2b3;
  background: #f2f4f7;
  font-size: 19px;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.priority-button:hover {
  color: #b45309;
  background: #fff4d8;
}

.priority-button.active {
  color: #b45309;
  background: #fff0bf;
  box-shadow: inset 0 0 0 1px #f1cf72;
}

.priority-row td {
  background: #fffdf6;
}

.priority-row td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}

.invoice-pending-row td {
  background: #fffbf2;
}

.order-table td.wrap,
.invoice-table td.wrap {
  min-width: 180px;
}

.order-table td.wrap strong,
.order-table td.wrap small,
.invoice-table td.wrap strong,
.invoice-table td.wrap small {
  display: block;
}

.order-table td.wrap small,
.invoice-table td.wrap small {
  margin-top: 5px;
  color: #667085;
  line-height: 1.45;
}

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

.empty-result {
  height: 96px;
  color: #667085;
  text-align: center;
  vertical-align: middle;
}

.invoice-fields {
  min-width: 0;
  margin: 2px 0;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  padding: 14px;
  background: #f7faff;
}

.invoice-fields legend {
  padding: 0 7px;
  color: #174ea6;
  font-size: 12px;
  font-weight: 900;
}

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

.invoice-grid .wide {
  grid-column: 1 / -1;
}

@media (max-width: 1120px) {
  .order-filters {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .invoice-filters {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  .module-head {
    align-items: flex-start;
  }

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

  .record-summary > div:nth-child(2) {
    border-right: 0;
  }

  .record-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid #e2e9f2;
  }

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

  .order-filters .filter-search,
  .invoice-filters .filter-search,
  .filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .period-alert {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .period-alert > span:last-child {
    width: calc(100% - 34px);
    margin-left: 33px;
    margin-top: -5px;
  }

  .module-head,
  .panel-actions,
  .filter-actions {
    width: 100%;
  }

  .panel-actions {
    display: flex;
  }

  .panel-actions .button {
    flex: 1 1 0;
    white-space: nowrap;
  }

  .order-filters,
  .invoice-filters,
  .invoice-grid {
    grid-template-columns: 1fr;
  }

  .order-filters .filter-search,
  .invoice-filters .filter-search,
  .invoice-grid .wide,
  .filter-actions {
    grid-column: auto;
  }

  .record-summary strong {
    font-size: 18px;
  }
}

/* v0.7 refund, invoice follow-up and profile workspace */
.modal-wide {
  width: min(920px, calc(100vw - 28px));
}

.field-hint {
  min-height: 18px;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.data-retention-note {
  margin: 0;
  border-left: 3px solid #e9a23b;
  padding: 9px 11px;
  color: #69400c;
  background: #fff9eb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.refund-overview {
  display: grid;
  grid-template-columns: minmax(250px, 1.55fr) repeat(5, minmax(126px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.refund-overview-primary,
.refund-stat {
  min-width: 0;
  min-height: 128px;
  border-radius: 8px;
  padding: 17px;
}

.refund-overview-primary {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #172235;
  box-shadow: 0 12px 28px rgba(23, 34, 53, 0.18);
}

.refund-overview-primary::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -32px;
  width: 110px;
  height: 110px;
  border: 18px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.refund-overview-primary > * {
  position: relative;
  z-index: 1;
}

.refund-overview-primary span,
.refund-stat span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.refund-overview-primary span {
  color: #cbd5e1;
}

.refund-overview-primary strong {
  display: block;
  margin-top: 10px;
  font-size: 31px;
  line-height: 1.05;
}

.refund-overview-primary p {
  margin: 13px 0 0;
  color: #cbd5e1;
  font-size: 12px;
}

.refund-overview-primary b {
  margin-left: 5px;
  border-radius: 5px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.12);
}

.trend-warn {
  color: #ffd27a;
}

.trend-good {
  color: #91e6c5;
}

.refund-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 7px 18px rgba(17, 24, 39, 0.05);
}

.refund-stat:nth-child(3) {
  border-top: 3px solid #16a36a;
}

.refund-stat:nth-child(4) {
  border-top: 3px solid #2563eb;
}

.refund-stat:nth-child(5) {
  border-top: 3px solid #e9a23b;
}

.refund-stat strong {
  margin-top: 9px;
  color: #172033;
  font-size: 22px;
}

.refund-stat small {
  margin-top: 6px;
  color: #667085;
  font-size: 11px;
  line-height: 1.4;
}

.refund-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(4, minmax(135px, 1fr));
  align-items: end;
  padding: 15px;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  background: #fbfcfe;
}

.refund-filters .filter-search {
  grid-column: span 2;
}

.refund-table td {
  vertical-align: top;
}

.refund-table td small {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-size: 11px;
}

.refund-table td.wrap {
  min-width: 210px;
}

.special-refund-row td {
  background: #fffbf2;
}

.special-refund-row td:first-child {
  box-shadow: inset 3px 0 0 #e9a23b;
}

.media-status {
  display: inline-block;
  min-width: 92px;
  border-radius: 6px;
  padding: 5px 7px;
  color: #156b4e;
  background: #e9f9f2;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.media-status.cleared,
.media-status.archived {
  color: #667085;
  background: #f2f4f7;
}

.profile-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid #e4eaf2;
  border-left: 1px solid #e4eaf2;
}

.profile-details > div {
  min-height: 84px;
  border-right: 1px solid #e4eaf2;
  border-bottom: 1px solid #e4eaf2;
  padding: 14px 16px;
  background: #fff;
}

.profile-details > div.wide {
  grid-column: 1 / -1;
}

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

.profile-details dd {
  margin: 8px 0 0;
  color: #172033;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.profile-details .profile-motto {
  color: #174ea6;
  font-size: 17px;
}

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

.wechat-ledger-item {
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  padding: 15px;
  background: #fff;
}

.wechat-ledger-item > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.wechat-number {
  border-radius: 5px;
  padding: 4px 7px;
  color: #174ea6;
  background: #eaf2ff;
  font-size: 12px;
  font-weight: 900;
}

.wechat-ledger-item dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.wechat-ledger-item dl div {
  min-width: 0;
}

.wechat-ledger-item dt {
  color: #667085;
  font-size: 11px;
}

.wechat-ledger-item dd {
  margin: 4px 0 0;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.wechat-channel-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  border-top: 1px solid #edf1f6;
  padding-top: 12px;
}

.wechat-channel-row > span:first-child {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 1280px) {
  .refund-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .refund-overview-primary {
    grid-column: span 1;
  }

  .refund-filters {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  .refund-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .refund-overview-primary {
    grid-column: 1 / -1;
  }

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

  .refund-filters .filter-search,
  .refund-filters .filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .refund-overview {
    grid-template-columns: 1fr;
  }

  .refund-overview-primary,
  .refund-stat {
    min-height: 112px;
  }

  .refund-stat {
    padding: 14px 16px;
  }

  .refund-filters,
  .profile-details,
  .wechat-ledger-item dl {
    grid-template-columns: 1fr;
  }

  .refund-filters .filter-search,
  .refund-filters .filter-actions,
  .profile-details > div.wide {
    grid-column: auto;
  }
}

/* Shared-server login */
.server-login-card {
  width: min(560px, 100%);
}

.server-login-form {
  display: grid;
  gap: 13px;
  margin-top: 24px;
}

.server-login-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.server-login-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.server-login-form input:focus {
  outline: none;
  border-color: #7eb0ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.qa-account-panel {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid #e4eaf2;
  padding-top: 17px;
}

.qa-account-panel > span {
  color: #475467;
  font-size: 12px;
  font-weight: 900;
}

.qa-account-panel > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.qa-account-panel .button {
  width: 100%;
  min-height: 40px;
  white-space: normal;
}

.qa-account-panel small {
  color: #667085;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 520px) {
  .qa-account-panel > div {
    grid-template-columns: 1fr;
  }
}

/* Shared-server authentication */
.server-login-shell,
.server-password-shell {
  padding: 32px;
  background: #edf1f5;
}

.server-login-layout {
  width: min(1040px, 100%);
  min-height: min(680px, calc(100vh - 64px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.82fr);
  overflow: hidden;
  border: 1px solid #d9e0e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(24, 39, 58, 0.14);
}

.server-login-intro {
  min-width: 0;
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f8fbff;
  background: #172b3f;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #0f9478;
  font-size: 14px;
  font-weight: 900;
}

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

.auth-brand strong {
  font-size: 16px;
}

.auth-brand small {
  margin-top: 3px;
  color: #b8c8d8;
  font-size: 11px;
}

.auth-statement {
  max-width: 450px;
}

.auth-statement p {
  margin: 0 0 13px;
  color: #72dcc2;
  font-size: 12px;
  font-weight: 800;
}

.auth-statement h1 {
  margin: 0;
  color: #fff;
  font-size: 38px;
  line-height: 1.25;
}

.auth-statement > span {
  display: block;
  margin-top: 22px;
  color: #c5d2df;
  font-size: 13px;
}

.auth-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #aebdcb;
  font-size: 11px;
}

.auth-foot i {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: #efb43b;
}

.server-login-card {
  width: auto;
  padding: 48px 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 0;
  border-radius: 0;
  color: #172033;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-form-head > span {
  display: block;
  color: #0f806a;
  font-size: 11px;
  font-weight: 850;
}

.auth-form-head h1,
.auth-form-head h2 {
  margin: 8px 0 0;
  color: #172033;
  font-size: 28px;
  line-height: 1.25;
}

.auth-form-head p {
  margin: 9px 0 0;
  color: #697586;
  font-size: 12px;
  line-height: 1.6;
}

.server-login-form {
  margin-top: 30px;
  gap: 16px;
}

.server-login-form label {
  gap: 8px;
  color: #344054;
  font-size: 12px;
}

.server-login-form input {
  min-height: 46px;
  border-color: #ccd5df;
  padding: 0 13px;
  color: #172033;
  background: #fff;
}

.server-login-form input:focus {
  border-color: #0f9478;
  box-shadow: 0 0 0 3px rgba(15, 148, 120, 0.13);
}

.server-login-form .auth-submit {
  min-height: 46px;
  margin-top: 4px;
  border: 1px solid #1f58c7;
  color: #fff;
  background: #2459d3;
  box-shadow: 0 8px 18px rgba(36, 89, 211, 0.2);
}

.auth-help {
  margin: 18px 0 0;
  color: #7a8697;
  font-size: 11px;
  text-align: center;
}

.password-rule {
  margin: -2px 0 0;
  padding: 9px 11px;
  border-left: 3px solid #0f9478;
  color: #526174;
  background: #f2f8f6;
  font-size: 11px;
  line-height: 1.55;
}

.server-password-shell .server-login-card {
  width: min(520px, 100%);
  border: 1px solid #d9e0e8;
  border-radius: 8px;
  box-shadow: 0 20px 52px rgba(24, 39, 58, 0.12);
}

@media (max-width: 820px) {
  .server-login-layout {
    grid-template-columns: 1fr;
  }

  .server-login-intro {
    min-height: 270px;
    padding: 30px 34px;
    gap: 34px;
  }

  .auth-statement h1 {
    max-width: 620px;
    font-size: 32px;
  }

  .server-login-card {
    padding: 40px 34px;
  }
}

@media (max-width: 520px) {
  .server-login-shell,
  .server-password-shell {
    padding: 0;
  }

  .server-login-layout {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .server-login-intro {
    min-height: 236px;
    padding: 24px 22px;
    gap: 24px;
  }

  .auth-brand-mark {
    width: 38px;
    height: 38px;
  }

  .auth-statement h1 {
    font-size: 26px;
  }

  .auth-statement > span {
    margin-top: 14px;
  }

  .auth-foot {
    display: none;
  }

  .server-login-card,
  .server-password-shell .server-login-card {
    padding: 32px 22px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .server-password-shell .server-login-card {
    min-height: 100vh;
  }

  .auth-form-head h1,
  .auth-form-head h2 {
    font-size: 25px;
  }
}
