:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #dce3ea;
  --text: #17202a;
  --muted: #617080;
  --blue: #2563eb;
  --green: #0f8a5f;
  --amber: #b45309;
  --red: #c2410c;
  --shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, #eef4ff 0%, #f6f7f9 46%, #edf7f3 100%);
}

.login-panel {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #17202a;
  color: #fff;
  font-weight: 800;
  margin-bottom: 18px;
}

.login-panel h1,
.workspace-head h1,
.content-band h2 {
  margin: 0;
}

.login-panel p {
  margin: 10px 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.login-form,
.admin-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 10px 11px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.primary-button,
.ghost-button,
.text-button {
  border-radius: 6px;
  border: 1px solid transparent;
  min-height: 38px;
  padding: 8px 13px;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: var(--blue);
}

.ghost-button {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

.ghost-button:hover,
.primary-button:hover {
  filter: brightness(0.97);
}

.text-button {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  padding: 6px 0;
  min-height: 0;
  text-align: left;
}

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

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px;
  background: #101820;
  color: #fff;
}

.sidebar-brand {
  padding: 8px 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-brand strong {
  display: block;
  font-size: 18px;
}

.sidebar-brand span,
.sidebar-user small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.module-nav {
  display: grid;
  gap: 8px;
}

.module-nav button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  padding: 11px 12px;
}

.module-nav button.active,
.module-nav button:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.module-nav span {
  display: block;
  font-weight: 800;
}

.module-nav small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.56);
  line-height: 1.35;
}

.sidebar-user {
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding: 12px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-user .text-button {
  color: rgba(255, 255, 255, 0.72);
}

.workspace {
  min-width: 0;
  padding: 24px;
}

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

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

.head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.module-content {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.metric-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.metric-card,
.content-band {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.metric-card {
  padding: 16px;
}

.metric-card span,
.task-row span,
.task-row em,
.content-band p,
.user-row p {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 7px 0;
  font-size: 24px;
}

.metric-card em {
  font-style: normal;
  color: var(--green);
  font-size: 13px;
}

.content-band {
  padding: 18px;
}

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

.band-head p {
  margin: 6px 0 0;
}

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

.task-row,
.user-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.task-row h3,
.user-row h3 {
  margin: 0;
  font-size: 15px;
}

.task-row p,
.user-row p {
  margin: 5px 0;
  line-height: 1.45;
}

.priority {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 30px;
  border-radius: 6px;
  background: #e8eef6;
  color: #394656;
  font-size: 13px;
}

.priority.p0 {
  background: #fee2e2;
  color: #b91c1c;
}

.priority.p1 {
  background: #ffedd5;
  color: var(--amber);
}

.priority.p2 {
  background: #dbeafe;
  color: #1d4ed8;
}

.ads-overview,
.ads-split {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: var(--green);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-list,
.api-scope-list,
.keyword-list,
.suggestion-list,
.sync-list,
.plain-list {
  display: grid;
  gap: 10px;
}

.status-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.status-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.status-row span,
.api-scope-row p,
.keyword-row p,
.keyword-row strong,
.suggestion-row p,
.sync-row p,
.sync-row em,
.plain-list,
.ads-table-row p,
.ads-table-row small {
  color: var(--muted);
}

.status-row strong,
.keyword-bid,
.sync-row span {
  min-width: 0;
  color: var(--text);
}

.api-scope-row,
.keyword-row,
.suggestion-row,
.sync-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.api-scope-row {
  display: grid;
  gap: 10px;
}

.api-scope-row h3,
.keyword-row h3,
.sync-row h3 {
  margin: 0;
  font-size: 15px;
}

.api-scope-row p,
.keyword-row p,
.suggestion-row p,
.sync-row p {
  margin: 5px 0 0;
  line-height: 1.45;
}

.endpoint-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.endpoint-line em {
  display: inline-flex;
  max-width: 100%;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  padding: 4px 8px;
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.ads-table {
  min-width: 0;
  max-width: 100%;
  display: grid;
  overflow-x: auto;
}

.ads-table-row {
  min-width: 980px;
  display: grid;
  grid-template-columns: 70px minmax(210px, 1.25fr) 120px 110px 120px minmax(260px, 1.5fr);
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 4px;
}

.ads-table-row:last-child {
  border-bottom: 0;
}

.ads-table-head {
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ads-table-row h3 {
  margin: 0;
  font-size: 15px;
}

.ads-table-row p {
  margin: 5px 0;
  line-height: 1.45;
}

.ads-table-row small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.keyword-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px minmax(180px, 0.85fr);
  gap: 12px;
  align-items: center;
}

.keyword-bid {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.keyword-row strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.suggestion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
}

.suggestion-row span {
  color: var(--muted);
}

.suggestion-row strong {
  color: var(--blue);
}

.suggestion-row p {
  grid-column: 1 / -1;
}

.sync-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px minmax(150px, 0.65fr);
  gap: 12px;
  align-items: center;
}

.sync-row span {
  font-weight: 800;
}

.sync-row em {
  font-style: normal;
  overflow-wrap: anywhere;
}

.mini-metric-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mini-metric {
  border-bottom: 3px solid #dbeafe;
  background: var(--surface-soft);
  padding: 10px;
}

.mini-metric span,
.mini-metric em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.mini-metric strong {
  display: block;
  margin: 4px 0;
  font-size: 20px;
}

.plain-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  gap: 18px;
}

.admin-overview {
  display: grid;
  gap: 16px;
}

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

.admin-module-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-module-card .mini-metric-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-mini-tasks {
  margin-top: 12px;
}

.admin-mini-tasks .task-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.email-management-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

.email-notice-board,
.email-rule-card {
  min-width: 0;
}

.email-filter-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.email-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-filter-group button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 700;
  cursor: pointer;
}

.email-filter-group button.active {
  border-color: #1f6feb;
  background: #eaf2ff;
  color: #0f4fb5;
}

.email-filter-group button small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 600;
}

.email-search {
  display: grid;
  gap: 6px;
  max-width: 520px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.email-search input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
}

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

.email-notice-row {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.email-notice-row.priority-p0 {
  border-left-color: #dc2626;
}

.email-notice-row.priority-p1 {
  border-left-color: #f59e0b;
}

.email-notice-row.priority-p2,
.email-notice-row.priority-p3 {
  border-left-color: #1f6feb;
}

.email-notice-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.email-notice-top h3 {
  margin: 0;
  font-size: 15px;
}

.email-notice-top p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.email-notice-meta span {
  border-radius: 6px;
  background: #f3f6fa;
  padding: 4px 7px;
}

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

.email-rule-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.email-rule-list h3 {
  margin: 0;
  font-size: 14px;
}

.email-rule-list p {
  margin: 4px 0 0;
  line-height: 1.45;
}

.email-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(1.5px);
}

.email-preview-panel {
  width: min(980px, calc(100vw - 34px));
  max-height: min(780px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 68px rgba(15, 23, 42, 0.24);
  padding: 18px;
}

.email-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.email-preview-head h2 {
  margin: 8px 0 4px;
  font-size: 20px;
  line-height: 1.3;
}

.email-preview-head p,
.email-preview-meta {
  color: var(--muted);
  font-size: 12px;
}

.email-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-preview-meta span {
  border-radius: 6px;
  background: #f3f6fa;
  padding: 5px 8px;
}

.email-preview-action {
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.email-preview-action h3,
.email-preview-body h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.email-preview-action p {
  margin: 0 0 10px;
  line-height: 1.55;
}

.email-preview-body {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.email-preview-body pre {
  min-height: 220px;
  max-height: 100%;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}

.email-preview-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 12px;
}

legend {
  color: var(--muted);
  font-size: 13px;
  padding: 0 4px;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  color: var(--text);
}

.check-line input {
  width: 16px;
  height: 16px;
}

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

.user-row h3 span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.chip-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-line em {
  display: inline-flex;
  border-radius: 999px;
  background: #e8eef6;
  color: #394656;
  padding: 3px 8px;
  font-size: 12px;
  font-style: normal;
}

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

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  z-index: 1300;
  background: #17202a;
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  transition: 0.18s ease;
}

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

.after-action-success-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(1.5px);
}

.after-action-success-dialog {
  position: relative;
  display: grid;
  width: min(430px, calc(100vw - 32px));
  gap: 12px;
  justify-items: center;
  padding: 22px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.22);
  text-align: center;
}

.after-action-success-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
}

.after-action-success-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #dcfce7;
}

.after-action-success-icon::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 13px;
  width: 13px;
  height: 8px;
  border-left: 3px solid #059669;
  border-bottom: 3px solid #059669;
  transform: rotate(-45deg);
}

.after-action-success-dialog h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}

.after-action-success-dialog p {
  margin: 0;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.after-action-success-task {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.after-action-success-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 10px;
  margin-top: 4px;
}

.after-action-success-actions.single {
  grid-template-columns: 1fr;
}

.after-submit-progress-backdrop {
  position: fixed;
  inset: 0;
  z-index: 74;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(1.5px);
}

.after-submit-progress-dialog {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(500px, calc(100vw - 32px));
  gap: 11px;
  padding: 22px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.24);
  text-align: center;
}

.after-submit-progress-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
}

.after-submit-progress-status {
  position: relative;
  width: 38px;
  height: 38px;
  border: 3px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 999px;
  animation: after-loading-spin 0.82s linear infinite;
}

.after-submit-progress-backdrop.failed .after-submit-progress-status,
.after-submit-progress-backdrop.success .after-submit-progress-status {
  animation: none;
}

.after-submit-progress-backdrop.failed .after-submit-progress-status {
  border-color: #fecaca;
  background: #fef2f2;
}

.after-submit-progress-backdrop.failed .after-submit-progress-status::after {
  position: absolute;
  inset: 3px 0 0;
  color: #dc2626;
  content: "×";
  font-size: 22px;
  font-weight: 900;
  line-height: 26px;
}

.after-submit-progress-backdrop.success .after-submit-progress-status {
  border-color: #bbf7d0;
  background: #ecfdf5;
}

.after-submit-progress-backdrop.success .after-submit-progress-status::after {
  position: absolute;
  left: 10px;
  top: 9px;
  width: 12px;
  height: 7px;
  border-left: 3px solid #059669;
  border-bottom: 3px solid #059669;
  content: "";
  transform: rotate(-45deg);
}

.after-submit-progress-dialog h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  letter-spacing: 0;
}

.after-submit-progress-message,
.after-submit-progress-context {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

.after-submit-progress-message {
  color: #1e293b;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.5;
}

.after-submit-progress-backdrop.failed .after-submit-progress-message {
  color: #b42318;
}

.after-submit-progress-context {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.after-submit-progress-track {
  overflow: hidden;
  width: 100%;
  height: 8px;
  margin-top: 3px;
  border-radius: 999px;
  background: #e2e8f0;
}

.after-submit-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  transition: width 0.28s ease;
}

.after-submit-progress-backdrop.failed .after-submit-progress-track span {
  background: #dc2626;
}

.after-submit-progress-backdrop.success .after-submit-progress-track span {
  background: #059669;
}

.after-submit-progress-meta {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.after-submit-progress-meta strong {
  color: #1d4ed8;
}

.after-submit-progress-steps {
  display: grid;
  grid-template-columns: repeat(var(--steps), minmax(0, 1fr));
  width: 100%;
  gap: 6px;
}

.after-submit-progress-steps span {
  min-width: 0;
  padding-top: 7px;
  border-top: 3px solid #dbe2ea;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0;
}

.after-submit-progress-steps span.done {
  border-color: #059669;
  color: #047857;
}

.after-submit-progress-steps span.current {
  border-color: #2563eb;
  color: #1d4ed8;
}

.after-submit-progress-steps span.failed {
  border-color: #dc2626;
  color: #b42318;
}

.after-submit-progress-task {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.after-task-center {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1180;
  width: min(390px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #c9d5e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 31, 48, 0.2);
}

.after-task-center.collapsed {
  width: min(260px, calc(100vw - 32px));
}

.after-task-center-head {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  background: #132333;
  color: #ffffff;
  cursor: pointer;
  text-align: left;
}

.after-task-center-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.after-task-center-title strong {
  font-size: 14px;
  line-height: 1.25;
}

.after-task-center-title em {
  overflow: hidden;
  color: #c8d8e8;
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-task-center-toggle {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 16px;
}

.after-task-center-body {
  background: #ffffff;
}

.after-task-center-list {
  max-height: min(56vh, 560px);
  overflow-y: auto;
}

.after-task-row {
  display: grid;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid #e4eaf1;
}

.after-task-row:last-child {
  border-bottom: 0;
}

.after-task-row-head,
.after-task-row-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.after-task-row-head button {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: #14283c;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-task-row-head button:hover {
  color: #1769d2;
  text-decoration: underline;
}

.after-task-row-head span {
  flex: 0 0 auto;
  color: #1769d2;
  font-size: 12px;
  font-weight: 700;
}

.after-task-row.success .after-task-row-head span {
  color: #087a51;
}

.after-task-row.failed .after-task-row-head span {
  color: #c5362d;
}

.after-task-row > p {
  overflow: hidden;
  margin: 0;
  color: #526579;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-task-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #e5ebf2;
}

.after-task-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2474e5;
  transition: width 180ms ease;
}

.after-task-row.success .after-task-progress span {
  background: #0a9b67;
}

.after-task-row.failed .after-task-progress span {
  background: #d5493f;
}

.after-task-row-meta span {
  min-width: 0;
  overflow: hidden;
  color: #607286;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-task-row-meta em {
  flex: 0 0 auto;
  color: #8795a5;
  font-size: 11px;
  font-style: normal;
}

.after-task-clear {
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-top: 1px solid #e4eaf1;
  background: #f7f9fc;
  color: #506479;
  cursor: pointer;
  font-size: 12px;
}

.after-task-clear:hover {
  background: #eef3f8;
  color: #263b51;
}

.compact-button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
}

.after-sales-desk {
  display: grid;
  gap: 8px;
}

.after-sales-desk h2,
.after-sales-desk h3,
.after-sales-desk p {
  margin: 0;
}

.after-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.55fr);
  gap: 10px;
}

.after-hero-panel,
.after-pulse-panel,
.after-portal-card,
.after-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.after-hero-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.58fr) minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.after-hero-copy {
  display: grid;
  align-content: center;
  gap: 6px;
}

.after-hero-copy h2 {
  font-size: 20px;
  line-height: 1.15;
}

.after-hero-copy p,
.after-pulse-panel p,
.after-portal-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.after-state-pill {
  width: fit-content;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #def1ed;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.after-hero-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.after-big-action {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 72px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
}

.after-big-action:hover,
.after-big-action.active {
  border-color: var(--green);
  background: #f1faf7;
}

.after-big-action span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.after-big-action strong {
  font-size: 28px;
  line-height: 1;
}

.after-big-action.danger {
  border-color: #f0b8b1;
  background: #fee4e2;
}

.after-big-action.red {
  border-color: #e9aaa2;
  background: #ffe9e6;
}

.after-big-action.amber {
  border-color: #efd8a5;
  background: #fff3d6;
}

.after-pulse-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.after-ring {
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#b42318 var(--risk), #e6ecef 0);
}

.after-ring span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: inherit;
  background: var(--surface);
  font-weight: 900;
}

.after-portal-card {
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 18px;
}

.after-portal-card span,
.after-panel-head span,
.after-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.after-portal-card strong {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-source-badges,
.after-case-meta,
.after-case-card footer,
.after-case-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.after-source-badges em,
.after-case-card footer em,
.after-case-sub em {
  padding: 3px 8px;
  border-radius: 999px;
  background: #def1ed;
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.after-source-badges em.warn {
  background: #fff3d6;
  color: var(--amber);
}

.auth-status-panel {
  overflow: visible;
}

.auth-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

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

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

.interface-status-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.interface-status-card.store {
  border-top: 3px solid var(--red);
}

.interface-status-card.service {
  border-top: 3px solid var(--blue);
}

.interface-status-card.erp {
  border-top: 3px solid #eab308;
}

.interface-status-head {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.interface-status-head h3 {
  margin: 0;
  font-size: 15px;
}

.interface-status-head span {
  color: var(--muted);
  font-size: 12px;
}

.interface-status-list {
  display: grid;
  gap: 6px;
  max-height: 390px;
  padding: 8px;
  overflow: auto;
}

.interface-status-card.service .interface-status-list {
  max-height: 390px;
}

.interface-sublist {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.interface-row {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-left: 3px solid #8aa0ad;
  border-radius: 8px;
  background: var(--surface);
}

.interface-row.ok {
  border-left-color: var(--green);
}

.interface-row.warning,
.interface-row.refresh_due {
  border-left-color: var(--amber);
}

.interface-row.reauthorize {
  border-left-color: var(--red);
}

.interface-row.planned {
  border-left-color: #eab308;
}

.interface-row-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 7px;
  min-width: 0;
}

.interface-row-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.2;
}

.interface-row-main p,
.interface-row-warning {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.interface-row-main p {
  white-space: nowrap;
}

.interface-row-warning {
  color: var(--red);
}

.interface-row-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.interface-row-meta span {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 42px;
  padding: 5px 6px;
  border-radius: 6px;
  background: #f8fafc;
}

.interface-row-meta em,
.interface-row-meta small {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.15;
}

.interface-row-meta b {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 11px;
  line-height: 1.15;
}

.auth-platform-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.auth-platform-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.auth-platform-head h3 {
  margin: 0;
  font-size: 15px;
}

.auth-platform-head span,
.auth-shop-main p,
.auth-shop-times span,
.auth-shop-times em,
.auth-empty,
.auth-status-error {
  color: var(--muted);
}

.auth-shop-list {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.auth-shop-row {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-left: 3px solid #8aa0ad;
  border-radius: 8px;
  background: var(--surface);
}

.auth-shop-row.ok {
  border-left-color: var(--green);
}

.auth-shop-row.warning,
.auth-shop-row.refresh_due {
  border-left-color: var(--amber);
}

.auth-shop-row.reauthorize {
  border-left-color: var(--red);
}

.auth-shop-main,
.auth-shop-times > div {
  min-width: 0;
}

.auth-shop-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 7px;
}

.auth-shop-main strong,
.auth-shop-times strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-shop-main strong {
  font-size: 13px;
  line-height: 1.2;
}

.auth-shop-main p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-status-badge {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: #def1ed;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.auth-status-badge.warning,
.auth-status-badge.refresh_due {
  background: #fff3d6;
  color: var(--amber);
}

.auth-status-badge.reauthorize {
  background: #fee2e2;
  color: var(--red);
}

.auth-status-badge.planned {
  background: #fef3c7;
  color: #a16207;
}

.auth-shop-times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.auth-shop-times > div {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 6px;
  border-radius: 6px;
  background: #f8fafc;
}

.auth-shop-times span,
.auth-shop-times em {
  font-size: 11px;
  font-style: normal;
  line-height: 1.2;
}

.auth-shop-times strong {
  font-size: 12px;
  line-height: 1.18;
}

.auth-shop-times em.warn {
  color: var(--red);
}

.auth-empty,
.auth-status-error {
  padding: 14px;
  font-size: 13px;
}

.after-visual-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 10px;
}

.after-panel {
  min-width: 0;
  overflow: hidden;
}

.after-case-panel {
  overflow: visible;
}

.after-panel-head,
.after-queue-head,
.after-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.after-section-title {
  padding: 0;
  border-bottom: 0;
}

.after-queue-head {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 6px;
  padding: 7px 9px;
}

.after-queue-head h2 {
  white-space: nowrap;
}

.after-queue-head .after-tabs {
  justify-content: flex-start;
}

.after-queue-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  width: 100%;
}

.after-shop-filter {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  outline: none;
}

.after-shop-filter:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8, 151, 114, 0.12);
}

.after-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 5px;
  width: 100%;
}

.after-search-row input {
  width: 100%;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  outline: none;
}

.after-search-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(8, 151, 114, 0.12);
}

.after-flow-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.after-flow-card {
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
}

.after-flow-card:hover,
.after-flow-card.active {
  border-color: var(--green);
  background: #f1faf7;
}

.after-flow-card span,
.after-flow-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.after-flow-card strong {
  font-size: 22px;
}

.after-flow-card.danger {
  border-left: 4px solid #b42318;
}

.after-flow-card.red {
  border-left: 4px solid #8f1b13;
}

.after-flow-card.amber {
  border-left: 4px solid var(--amber);
}

.after-flow-card.blue {
  border-left: 4px solid var(--blue);
}

.after-flow-card.green {
  border-left: 4px solid var(--green);
}

.after-workbench-grid {
  display: grid;
  grid-template-columns: minmax(430px, 560px) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.after-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.after-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.after-tab.active {
  border-color: var(--green);
  background: #def1ed;
  color: var(--green);
}

.after-tab span {
  font-weight: 900;
}

.after-queue-list {
  display: grid;
  align-content: start;
  gap: 2px;
  overflow: visible;
  padding: 3px 5px 5px;
}

.after-approval-batch-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 3px;
  padding: 7px 8px;
  border: 1px solid #e3b341;
  border-radius: 8px;
  background: #fff9df;
}

.after-approval-batch-check,
.after-approval-card-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #654f10;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.after-approval-batch-check input,
.after-approval-card-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.after-approval-batch-count {
  min-width: 0;
  color: #7b6a38;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.after-approval-batch-toolbar .primary-button {
  grid-column: 1 / -1;
  width: 100%;
}

.after-approval-card-check {
  flex: 0 0 auto;
  padding-right: 5px;
  border-right: 1px solid var(--line);
}

.after-approval-card-check input:disabled,
.after-approval-batch-check input:disabled {
  cursor: wait;
}

.after-case-card {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 0;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.after-case-card:hover,
.after-case-card.selected {
  border-color: var(--green);
  background: #f1faf7;
}

.after-case-card.note-red {
  border-left: 4px solid #e11d48;
}

.after-case-card.note-amber {
  border-left: 4px solid #f59e0b;
}

.after-case-card.note-blue {
  border-left: 4px solid #2563eb;
}

.after-case-card.note-green {
  border-left: 4px solid #059669;
}

.after-case-card.note-purple {
  border-left: 4px solid #7c3aed;
}

.after-case-card strong,
.after-case-card p,
.after-case-card footer span {
  overflow-wrap: anywhere;
}

.after-case-main,
.after-case-sub {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.after-card-top {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.after-card-tags {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.after-card-tags > span:not(.after-lane-tag) {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-note-color-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line);
}

.after-note-color-dot.note-red,
.after-color-choice.note-red span,
.after-order-color-pill.note-red {
  background: #e11d48;
}

.after-note-color-dot.note-amber,
.after-color-choice.note-amber span,
.after-order-color-pill.note-amber {
  background: #f59e0b;
}

.after-note-color-dot.note-blue,
.after-color-choice.note-blue span,
.after-order-color-pill.note-blue {
  background: #2563eb;
}

.after-note-color-dot.note-green,
.after-color-choice.note-green span,
.after-order-color-pill.note-green {
  background: #059669;
}

.after-note-color-dot.note-purple,
.after-color-choice.note-purple span,
.after-order-color-pill.note-purple {
  background: #7c3aed;
}

.after-card-top em {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.after-queue-fields {
  display: grid;
  gap: 1px;
}

.after-queue-field {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 17px;
  align-items: center;
  gap: 4px;
}

.after-queue-field-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.after-queue-field-value {
  min-width: 0;
  overflow: hidden;
  flex: 0 1 auto;
  color: var(--text);
  font-size: 13px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-queue-field.muted .after-queue-field-value {
  color: #34444d;
  font-size: 11px;
  font-weight: 800;
}

.after-copy-button {
  flex: 0 0 auto;
  min-width: 30px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #46606f;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.after-copy-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.after-copy-button.compact {
  height: 20px;
  min-width: 32px;
}

.after-copy-spacer {
  width: 30px;
}

.after-queue-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 2px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.after-queue-pagination > div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.after-queue-head .compact-button,
.after-queue-pagination .compact-button {
  min-height: 26px;
  padding: 3px 8px;
  font-size: 11px;
}

.after-queue-pagination .compact-button {
  min-height: 24px;
}

.after-queue-page-select {
  width: 54px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
}

.after-case-main strong {
  min-width: 0;
  overflow: hidden;
  flex: 1 1 auto;
  font-size: 14px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-case-main em {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.after-case-sub {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
}

.after-case-sub span,
.after-case-sub em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-case-sub em {
  flex: 0 0 auto;
  padding: 1px 5px;
  font-size: 10px;
}

.after-case-logistics span {
  flex: 1 1 auto;
  color: #34444d;
}

.after-case-card p {
  color: #34444d;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 12px;
  line-height: 1.3;
}

.after-case-card footer {
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.after-lane-tag {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.after-lane-tag {
  flex: 0 0 auto;
  background: #edf1f3;
  color: #34444d;
}

.after-lane-tag.danger {
  background: #fee4e2;
  color: #b42318;
}

.after-lane-tag.red {
  background: #ffe9e6;
  color: #8f1b13;
}

.after-lane-tag.amber {
  background: #fff3d6;
  color: var(--amber);
}

.after-lane-tag.blue {
  background: #e0edf9;
  color: var(--blue);
}

.after-lane-tag.green {
  background: #def1ed;
  color: var(--green);
}

.after-mini-progress {
  display: grid;
  gap: 5px;
}

.after-mini-progress > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.after-progress-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--steps), minmax(0, 1fr));
  align-items: center;
  width: 100%;
}

.after-progress-track::before,
.after-progress-track::after {
  position: absolute;
  right: 8px;
  left: 8px;
  height: 3px;
  border-radius: 999px;
  content: "";
}

.after-progress-track::before {
  background: #dfe7eb;
}

.after-progress-track::after {
  width: calc(var(--progress) * 1%);
  background: var(--green);
}

.after-progress-node {
  position: relative;
  z-index: 1;
  justify-self: center;
  border: 2px solid #c9d4da;
  border-radius: 999px;
  background: var(--surface);
}

.after-mini-track {
  height: 16px;
}

.after-mini-track .after-progress-node {
  width: 10px;
  height: 10px;
}

.after-case-track {
  height: 20px;
}

.after-case-track .after-progress-node {
  width: 12px;
  height: 12px;
}

.after-progress-node.done {
  border-color: var(--green);
  background: var(--green);
}

.after-progress-node.current {
  border-color: var(--green);
  background: var(--surface);
  box-shadow: 0 0 0 4px #def1ed;
}

.after-case-body {
  display: grid;
  gap: 7px;
  padding: 8px;
}

.after-detail-layout {
  position: relative;
  grid-template-columns: minmax(280px, 0.92fr) minmax(310px, 1fr) minmax(300px, 0.96fr);
  gap: 0;
  align-items: stretch;
  min-height: 0;
  height: 100%;
}

.after-detail-layout.is-detail-refreshing .after-action-column {
  opacity: 0.78;
  filter: grayscale(0.08);
  pointer-events: none;
  user-select: none;
}

.after-detail-refresh-overlay {
  position: absolute;
  z-index: 12;
  top: 8px;
  right: 8px;
  display: grid;
  pointer-events: none;
}

.after-detail-refresh-card {
  display: flex;
  align-items: center;
  width: auto;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.after-detail-refresh-card strong {
  color: var(--text);
  font-size: 12px;
}

.after-detail-refresh-card p,
.after-detail-refresh-card .after-detail-loading-track,
.after-detail-refresh-card .after-detail-loading-steps {
  display: none;
}

.after-detail-loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #dbeafe;
  border-top-color: #2563eb;
  border-right-color: #4f46e5;
  border-radius: 999px;
  animation: after-loading-spin 0.82s linear infinite;
}

.after-detail-loading-track {
  position: relative;
  overflow: hidden;
  width: min(260px, 100%);
  height: 6px;
  margin-top: 4px;
  border-radius: 999px;
  background: #e2e8f0;
}

.after-detail-loading-track span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -35%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
  animation: after-loading-bar 1.1s ease-in-out infinite;
}

.after-detail-loading-steps {
  display: flex;
  width: min(260px, 100%);
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

@keyframes after-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes after-loading-bar {
  0% {
    left: -42%;
  }
  100% {
    left: 100%;
  }
}

.after-detail-form {
  display: contents;
}

.after-detail-column {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 7px;
  padding: 8px;
}

.after-timeline-column {
  align-content: stretch;
  grid-template-rows: minmax(0, 1fr);
}

.after-timeline-column,
.after-action-column,
.after-platform-column,
.after-note-column {
  border-left: 1px solid var(--line);
}

.after-column-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.after-column-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.15;
}

.after-column-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

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

.after-action-column .after-api-head,
.after-platform-column .after-api-head {
  display: none;
}

.after-action-column .after-api-box,
.after-platform-column .after-api-box {
  padding: 0;
  border: 0;
  background: transparent;
}

.after-action-section {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.after-platform-api-module {
  border-color: #bfdbfe;
  border-left: 4px solid #2563eb;
  background: #eff6ff;
}

.after-manual-action-module {
  border-color: #fde68a;
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.after-manual-note-module {
  border-color: #cbd5e1;
  border-left: 4px solid #64748b;
  background: #f8fafc;
}

.after-action-section-head,
.after-manual-action-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.after-action-section-head strong,
.after-manual-action-head strong {
  font-size: 13px;
}

.after-action-section-head span,
.after-manual-action-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.after-platform-api-module .after-api-box {
  padding: 0;
  border: 0;
  background: transparent;
}

.after-platform-api-module .after-api-head {
  display: none;
}

.after-action-column .after-evidence-actions,
.after-platform-column .after-evidence-actions {
  margin-top: 2px;
}

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

.after-action-buttons button {
  min-height: 36px;
}

.after-manual-note-actions {
  grid-template-columns: minmax(0, 1fr);
}

.after-platform-submit-actions {
  grid-template-columns: minmax(0, 1fr);
}

.after-manual-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.after-manual-action-button {
  min-height: 34px;
}

.after-approval-module {
  border-color: #e3b341;
  background: #fffdf4;
}

.after-approval-summary {
  display: grid;
  gap: 8px;
  margin: 0;
}

.after-approval-summary div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.after-approval-summary dt {
  color: #6d7885;
  font-size: 12px;
}

.after-approval-summary dd {
  min-width: 0;
  margin: 0;
  color: #263748;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.after-approval-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
  margin-top: 12px;
}

.after-approval-waiting {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed #dfc365;
  color: #6d5a1b;
  font-size: 12px;
  line-height: 1.5;
}

.after-note-head {
  align-items: center;
}

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

.after-case-head h2 {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.after-detail-id-stack {
  display: grid;
  gap: 4px;
}

.after-detail-id-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  font-size: 20px;
  line-height: 1.15;
}

.after-detail-id-line span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.after-detail-id-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
}

.after-case-head span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.after-case-head .after-detail-id-line span {
  font-size: 14px;
  font-weight: 900;
}

.after-case-head .after-detail-id-line strong {
  font-size: 20px;
  font-weight: 950;
}

.after-next-box,
.after-progress-section {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #b8ded6;
  border-radius: 8px;
  background: #f1faf7;
}

.after-next-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.after-next-box strong {
  line-height: 1.45;
}

.after-next-box em,
.after-progress-line > strong {
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.after-order-note-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.after-manual-note-module .after-order-note-section {
  margin-top: 2px;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px dashed #cbd5e1;
  border-radius: 0;
  background: transparent;
}

.after-order-note-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.after-order-note-head strong {
  display: block;
  font-size: 13px;
}

.after-order-note-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.after-order-note-head em,
.after-order-color-pill {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef2f7;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.after-order-color-pill {
  color: #fff;
}

.after-order-note-section textarea,
.after-action-note textarea {
  resize: vertical;
}

.after-ticket-fields {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8px;
}

.after-ticket-fields label {
  display: grid;
  gap: 5px;
}

.after-ticket-fields label.hidden {
  display: none;
}

.after-ticket-fields span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.after-note-color-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.after-color-choice {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}

.after-color-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.after-color-choice span {
  display: inline-grid;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: #eef2f7;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.after-color-choice.note-none span {
  color: var(--muted);
}

.after-color-choice b {
  min-width: 0;
  overflow: hidden;
  color: #34444d;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-color-choice.active,
.after-color-choice:has(input:checked) {
  border-color: var(--green);
  background: #eefaf5;
  box-shadow: 0 0 0 2px #def1ed;
}

.after-order-note-actions {
  display: flex;
  justify-content: flex-end;
}

.after-saved-note-section {
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 10px;
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #f0fdf4;
}

.after-routing-reason {
  --routing-accent: #475569;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid var(--routing-accent);
  border-radius: 8px;
  background: #f8fafc;
}

.after-routing-reason.tone-danger,
.after-routing-reason.tone-red {
  --routing-accent: #dc2626;
  border-color: #fecaca;
  background: #fff7f7;
}

.after-routing-reason.tone-amber {
  --routing-accent: #d97706;
  border-color: #fde68a;
  background: #fffbeb;
}

.after-routing-reason.tone-green {
  --routing-accent: #059669;
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.after-routing-reason.tone-blue {
  --routing-accent: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.after-routing-reason-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.after-routing-reason-head div {
  min-width: 0;
}

.after-routing-reason-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.after-routing-reason-head strong {
  display: block;
  margin-top: 2px;
  color: var(--routing-accent);
  font-size: 17px;
  line-height: 1.2;
}

.after-routing-reason-head em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.after-routing-reason > p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.after-routing-reason dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.after-routing-reason dl div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 6px;
  padding-top: 5px;
  border-top: 1px dashed color-mix(in srgb, var(--routing-accent) 28%, transparent);
}

.after-routing-reason dt,
.after-routing-reason dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.4;
}

.after-routing-reason dt {
  color: var(--muted);
  font-weight: 800;
}

.after-routing-reason dd {
  color: #34444d;
  font-weight: 700;
}

.after-saved-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.after-saved-note-head strong {
  font-size: 13px;
}

.after-saved-note-section p {
  margin: 0;
  color: #184a3a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  white-space: pre-wrap;
}

.after-saved-note-section p.muted {
  color: var(--muted);
}

.after-saved-note-section p.after-service-ticket-note {
  color: #14532d;
}

.after-note-timeline {
  display: grid;
  gap: 8px;
}

.after-note-timeline-item {
  display: grid;
  gap: 4px;
  padding: 8px 0 8px 12px;
  border-left: 2px solid #86efac;
}

.after-note-timeline-item time {
  color: #166534;
  font-size: 11px;
  font-weight: 900;
}

.after-note-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.after-note-timeline-meta span {
  color: #3f5d50;
  font-size: 11px;
  font-weight: 800;
}

.after-progress-line {
  display: grid;
  gap: 5px;
}

.after-progress-labels {
  display: grid;
  grid-template-columns: repeat(var(--steps), minmax(0, 1fr));
  gap: 4px;
}

.after-progress-labels span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.after-progress-labels span.done {
  color: var(--green);
}

.after-progress-labels span.current {
  color: #b42318;
}

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

.after-detail-grid div {
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.after-detail-grid .wide {
  grid-column: 1 / -1;
}

.after-detail-grid .after-product-fact-cell {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.after-detail-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.after-detail-grid strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.after-info-column .after-detail-grid strong {
  overflow: visible;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.after-detail-grid .after-return-fact strong {
  display: grid;
  gap: 2px;
  overflow: visible;
  white-space: normal;
}

.after-return-fact em {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px;
  font-style: normal;
  line-height: 1.3;
}

.after-return-fact b {
  color: var(--muted);
}

.after-return-fact i {
  min-width: 0;
  overflow-wrap: anywhere;
  font-style: normal;
}

.after-fact-section,
.after-buyer-section,
.after-evidence-section,
.after-check-section,
.after-note-section {
  display: grid;
  gap: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.after-fact-section {
  border-top: 0;
  padding-top: 0;
}

.after-product-section {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
}

.after-product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.after-product-head strong {
  font-size: 14px;
  font-weight: 950;
}

.after-product-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.after-product-list {
  display: grid;
  gap: 6px;
}

.after-product-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 6px;
  padding: 7px;
  border: 1px solid #d8e7fb;
  border-radius: 8px;
  background: #fff;
}

.after-product-row.is-unmatched {
  border-color: #fde68a;
  background: #fffdf3;
}

.after-product-row div {
  min-width: 0;
}

.after-product-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.after-product-row strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
}

.after-timeline-column .after-buyer-section {
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-top: 0;
  height: 100%;
  min-height: calc(100vh - 220px);
  padding-top: 0;
}

.after-timeline-column .after-pipeline {
  height: 100%;
  max-height: none;
  min-height: 0;
  align-content: start;
  grid-auto-rows: max-content;
}

.after-evidence-form {
  display: grid;
  gap: 6px;
}

.after-evidence-form.after-detail-form {
  display: contents;
}

.after-api-note,
.after-api-box {
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.after-api-note strong,
.after-api-head strong {
  font-size: 13px;
}

.after-api-note span,
.after-api-head span,
.after-detail-error {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.after-api-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

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

.after-api-actions,
.after-reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.after-api-actions em {
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9f3ff;
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.after-action-requirements {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.after-reason-hint {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #c7e2d8;
  border-radius: 8px;
  background: #eefaf5;
  color: #184a3a;
}

.after-reason-hint strong {
  font-size: 12px;
}

.after-reason-hint span {
  color: #315f50;
  font-size: 12px;
  line-height: 1.45;
}

.after-api-diagnostic {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #f2c36b;
  border-radius: 8px;
  background: #fff8e7;
  color: #6c3d00;
}

.after-api-diagnostic strong {
  font-size: 12px;
}

.after-api-diagnostic span {
  color: #7a4a08;
  font-size: 12px;
  line-height: 1.45;
}

.after-file-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.after-file-preview-card {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: start;
}

.after-file-preview-card button,
.after-file-preview-card img,
.after-file-preview-card video {
  width: 76px;
  height: 76px;
  border-radius: 8px;
}

.after-file-preview-card button {
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.after-file-preview-card img,
.after-file-preview-card video {
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.after-file-preview-card span,
.after-file-preview-card em {
  max-width: 86px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.after-file-preview-card span {
  color: var(--text);
  font-weight: 800;
}

.after-file-preview-card em {
  color: var(--muted);
  font-style: normal;
}

.after-evidence-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.after-dynamic-fields {
  display: grid;
  gap: 8px;
}

.after-field-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.45fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.after-icon-button {
  width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 900;
}

.after-evidence-actions,
.after-note-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.after-note-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.after-evidence-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.after-platform-detail {
  gap: 12px;
}

.after-buyer-comment {
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.after-buyer-comment span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.after-buyer-comment strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.after-buyer-media {
  display: flex;
  max-height: 58px;
  flex-wrap: wrap;
  gap: 5px;
  align-items: flex-start;
  overflow: auto;
}

.after-buyer-media button,
.after-buyer-media .after-thumb-button {
  overflow: hidden;
  display: block;
  width: 48px !important;
  max-width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  max-height: 48px !important;
  min-height: 48px !important;
  flex: 0 0 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  cursor: zoom-in;
}

.after-buyer-media img {
  display: block;
  width: 48px !important;
  height: 48px !important;
  object-fit: cover;
}

.after-image-preview {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.after-image-preview-panel {
  position: relative;
  max-width: min(920px, 92vw);
  max-height: 88vh;
}

.after-image-preview-panel img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.after-video-preview-player,
.after-video-preview-frame {
  display: block;
  width: min(920px, 92vw);
  height: min(520px, 72vh);
  border: 0;
  border-radius: 8px;
  background: #000;
}

.after-image-preview-panel .after-preview-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.after-preview-nav {
  position: fixed;
  top: 50%;
  z-index: 41;
  width: 48px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
}

.after-preview-nav:hover {
  background: rgba(15, 23, 42, 0.72);
}

.after-preview-nav.prev {
  left: max(28px, calc((100vw - 1040px) / 2));
}

.after-preview-nav.next {
  right: max(28px, calc((100vw - 1040px) / 2));
}

.after-preview-counter {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.after-buyer-media p,
.after-history-list p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.after-history-list {
  display: grid;
  gap: 8px;
}

.after-history-list.compact {
  gap: 4px;
}

.after-history-count {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.after-history-list article {
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.after-history-list article strong {
  font-size: 12px;
}

.after-history-list article span,
.after-history-list article a {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.after-history-list article p {
  color: var(--text);
}

.after-pipeline {
  display: grid;
  max-height: 360px;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 6px;
  overflow: auto;
  padding-right: 2px;
}

.after-pipeline-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.after-pipeline-more {
  margin-top: 2px;
}

.after-pipeline-more summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.after-pipeline-more p {
  margin-top: 6px;
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}

.after-pipeline-item {
  position: relative;
  display: grid;
  align-self: start;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.after-pipeline-item::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: -8px;
  left: 12px;
  width: 2px;
  background: #d7e0e8;
}

.after-pipeline-item:last-child::before {
  display: none;
}

.after-pipeline-dot {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 1px var(--line);
}

.after-pipeline-item.case .after-pipeline-dot {
  background: #475569;
}

.after-pipeline-item.buyer {
  border-color: #b7e4d4;
  background: #f1fbf7;
}

.after-pipeline-item.buyer .after-pipeline-dot {
  background: var(--green);
}

.after-pipeline-item.seller {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.after-pipeline-item.seller .after-pipeline-dot {
  background: var(--blue);
}

.after-pipeline-item.platform {
  border-color: #fed7aa;
  background: #fff7ed;
}

.after-pipeline-item.platform .after-pipeline-dot {
  background: var(--red);
}

.after-pipeline-item.limited .after-pipeline-dot {
  background: var(--amber);
}

.after-pipeline-body {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.after-pipeline-body header {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.after-pipeline-body strong {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.after-pipeline-body time,
.after-pipeline-body span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.after-pipeline-body > span,
.after-pipeline-body p {
  overflow-wrap: anywhere;
}

.after-pipeline-body p {
  margin: 0;
  color: #263540;
  font-size: 12px;
  line-height: 1.35;
}

.after-pipeline-media {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}

.after-pipeline-media button,
.after-pipeline-media a {
  overflow: hidden;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: zoom-in;
  text-decoration: none;
}

.after-pipeline-media .after-pipeline-video {
  width: auto;
  min-width: 64px;
  padding: 0 8px;
  cursor: pointer;
}

.after-pipeline-media img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: cover;
}

.after-pipeline-media span {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.after-pipeline-media .after-pipeline-video span {
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--accent);
  white-space: nowrap;
}

.after-reason-list button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
}

.after-check-section ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.after-check-section li {
  color: #34444d;
  font-size: 13px;
  line-height: 1.45;
}

.after-chat-panel {
  min-height: 530px;
}

.after-chat-log {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 420px;
  overflow: auto;
  padding: 14px;
  background: var(--surface-soft);
}

.after-chat-message {
  display: flex;
}

.after-chat-message p {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.after-chat-message.assistant p {
  border: 1px solid var(--line);
  background: var(--surface);
}

.after-chat-message.user {
  justify-content: flex-end;
}

.after-chat-message.user p {
  background: var(--green);
  color: #fff;
}

.after-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
}

.after-empty-case {
  display: grid;
  gap: 12px;
  min-height: 220px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

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

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

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

  .metric-grid,
  .admin-grid,
  .admin-module-grid,
  .ads-overview,
  .ads-split,
  .email-management-layout,
  .mini-metric-list,
  .after-hero-grid,
  .after-visual-row,
  .after-workbench-grid,
  .after-detail-layout,
  .after-hero-panel,
  .after-hero-actions,
  .after-flow-board,
  .auth-platform-grid,
  .auth-shop-row,
  .auth-shop-times,
  .after-detail-grid,
  .after-api-grid,
  .after-field-row,
  .after-evidence-actions,
  .after-note-actions {
    grid-template-columns: 1fr;
  }

  .workspace-head,
  .band-head,
  .task-row,
  .keyword-row,
  .sync-row,
  .email-notice-top,
  .after-case-head,
  .after-queue-head {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .status-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .after-pulse-panel {
    align-items: flex-start;
  }

  .after-timeline-column,
  .after-action-column,
  .after-platform-column,
  .after-note-column {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .workspace {
    padding: 14px;
  }

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

  .login-panel {
    padding: 24px;
  }

  .after-tabs {
    justify-content: flex-start;
  }

  .after-chat-form {
    grid-template-columns: 1fr;
  }

  .after-task-center,
  .after-task-center.collapsed {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
  }

  .after-task-center.collapsed {
    left: auto;
    width: 250px;
    max-width: calc(100% - 16px);
  }

  .after-task-center-list {
    max-height: 48vh;
  }

  .email-preview-backdrop {
    padding: 10px;
  }

  .email-preview-panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 12px;
  }

  .email-preview-head {
    grid-template-columns: 1fr;
  }

  .after-approval-actions {
    grid-template-columns: 1fr;
  }
}
