:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --line: #dce3ee;
  --text: #111827;
  --muted: #6b7280;
  --blue: #2563eb;
  --green: #059669;
  --orange: #ea580c;
  --red: #e11d48;
  --soft: #f8fafc;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

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

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

.topbar > div:first-child {
  min-width: 0;
}

.topbar h1,
.topbar p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h1 {
  margin: 0 0 4px;
  font-size: 22px;
}

p {
  margin: 0;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-shrink: 0;
  gap: 10px;
}

button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

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

button.needs-save {
  background: var(--orange);
  border-color: var(--orange);
}

button.small {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(5, 150, 105, 0.1), transparent 36%),
    #edf3f9;
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(30, 41, 59, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 41, 59, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
}

.login-page::after {
  content: "";
  position: fixed;
  left: -8vw;
  right: -8vw;
  bottom: -30vh;
  height: 54vh;
  pointer-events: none;
  transform: skewY(-4deg);
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.09), rgba(234, 88, 12, 0.07));
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  width: min(1040px, 100%);
  min-height: 560px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.login-showcase {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 560px;
  padding: 42px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(140deg, rgba(17, 24, 39, 0.98), rgba(30, 64, 175, 0.9) 64%, rgba(4, 120, 87, 0.88)),
    #111827;
}

.login-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.6;
}

.login-showcase::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 52px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), transparent 70%);
}

.login-showcase-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  width: 100%;
}

.login-mark {
  display: inline-flex;
  align-items: center;
  width: max-content;
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 900;
}

.login-showcase h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.08;
}

.login-showcase p {
  max-width: 440px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
  line-height: 1.8;
}

.login-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(520px, 100%);
}

.login-flow span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.login-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(520px, 100%);
}

.login-stats div {
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.22);
}

.login-stats strong,
.login-stats span {
  display: block;
}

.login-stats strong {
  margin-bottom: 8px;
  font-size: 24px;
}

.login-stats span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
  background: #fff;
}

.login-brand {
  margin-bottom: 26px;
}

.login-brand span {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.login-brand h1 {
  margin-top: 14px;
  font-size: 24px;
}

.login-brand p {
  line-height: 1.7;
}

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

.login-form button {
  height: 44px;
}

.login-message {
  font-size: 12px;
  line-height: 1.6;
}

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

@media (max-width: 900px) {
  .login-page {
    align-items: stretch;
    padding: 16px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-showcase {
    min-height: auto;
    padding: 28px;
  }

  .login-showcase h1 {
    font-size: 30px;
  }

  .login-panel {
    padding: 28px;
  }
}

@media (max-width: 560px) {
  .login-page {
    padding: 10px;
  }

  .login-showcase {
    display: none;
  }

  .login-panel {
    min-height: calc(100vh - 20px);
    padding: 24px;
  }
}

.layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.sidebar,
.content {
  min-height: calc(100vh - 100px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.sidebar {
  overflow: hidden;
}

.detail-view {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  min-height: calc(100vh - 72px);
  padding: 18px 24px;
  overflow-x: hidden;
}

.detail-view .detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100vh - 108px);
  max-height: calc(100vh - 108px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
}

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

.detail-nav-actions button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 32px;
  padding: 0 10px;
  width: 100%;
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  text-align: left;
}

.detail-nav-actions button.active,
.detail-nav-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.detail-view .filters {
  grid-template-columns: minmax(0, 1fr);
  padding: 12px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 0;
  background: transparent;
}

.detail-view .filters input,
.detail-view .filters select {
  height: 36px;
  min-height: 36px;
  padding: 7px 9px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
}

.detail-view .filters input::placeholder {
  color: rgba(255, 255, 255, 0.46);
}

.detail-view .filters select option {
  color: var(--text);
}

.detail-view .filters .date-filter {
  grid-template-columns: minmax(0, 1fr);
}

.detail-view .filters button {
  width: 100%;
  height: 34px;
  color: rgba(255, 255, 255, 0.86);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.detail-view .content {
  width: min(1480px, 100%);
  min-height: auto;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.filters {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.date-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dashboard-filter-panel {
  grid-template-columns: minmax(240px, 1.4fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(220px, 1fr) auto;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

textarea {
  min-height: 74px;
  resize: vertical;
}

.order-list {
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.detail-view .order-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  padding-right: 2px;
}

.sidebar-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 2px;
  color: rgba(255, 255, 255, 0.88);
}

.sidebar-list-head span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

.sidebar-order-page {
  display: grid;
  gap: 8px;
}

.detail-view .sidebar-order-page {
  flex: 1;
  min-height: 0;
  overflow: auto;
  align-content: start;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.order-item {
  height: auto;
  min-height: 92px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  background: #fff;
}

.detail-view .order-item {
  height: auto;
  min-height: 126px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.order-item.active {
  background: #f4f8ff;
  box-shadow: inset 4px 0 0 var(--blue);
}

.detail-view .order-item.active {
  border-color: rgba(96, 165, 250, 0.75);
  background: rgba(37, 99, 235, 0.18);
  box-shadow: inset 3px 0 0 #60a5fa;
}

.order-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}

.detail-view .order-title strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-view .order-title .badge {
  flex-shrink: 0;
  height: 20px;
  padding: 0 7px;
  font-size: 11px;
}

.order-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.detail-view .order-meta {
  color: rgba(255, 255, 255, 0.62);
  overflow: hidden;
  font-size: 11px;
  line-height: 1.55;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e0ecff;
  color: #1d4ed8;
  font-size: 12px;
  white-space: nowrap;
}

.content {
  padding: 0;
  overflow: auto;
}

.hidden {
  display: none !important;
}

.dashboard {
  min-height: calc(100vh - 72px);
  padding: 18px 24px;
  overflow-x: hidden;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: calc(100vh - 108px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
}

.dashboard-brand {
  display: grid;
  gap: 4px;
  padding: 4px 4px 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.dashboard-brand strong {
  font-size: 20px;
}

.dashboard-brand span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.dashboard-nav button {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: flex-start;
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  text-align: left;
}

.dashboard-nav button.active,
.dashboard-nav button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dashboard-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.dashboard-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-titlebar h2 {
  margin: 6px 0 6px;
  font-size: 26px;
}

.dashboard-titlebar p {
  max-width: 720px;
  line-height: 1.7;
}

.dashboard-titlebar .hero-kicker {
  background: #eef6ff;
  color: #1d4ed8;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.metric-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 126px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.metric-card:hover,
.metric-card.active {
  border-color: #93b4f8;
  background: #f6f9ff;
  box-shadow: inset 4px 0 0 var(--blue);
}

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

.metric-card strong {
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

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

.dashboard-insights {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 14px;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 14px;
}

.insight-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

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

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

.status-bars {
  display: grid;
  gap: 16px;
}

.status-bar-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
}

.status-bar-row span,
.status-bar-row strong {
  font-size: 13px;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.bar-track i.orange {
  background: var(--orange);
}

.bar-track i.blue {
  background: var(--blue);
}

.bar-track i.green {
  background: var(--green);
}

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

.dashboard-summary div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #fbfdff;
}

.dashboard-summary strong {
  font-size: 24px;
}

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

.amount-summary {
  display: grid;
  gap: 8px;
}

.amount-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #fbfdff;
}

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

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

.amount-summary .total {
  border-color: #93b4f8;
  background: #f6f9ff;
}

.amount-summary .total strong {
  color: var(--blue);
  font-size: 22px;
}

.help-text {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

.todo-list button {
  display: grid;
  grid-template-columns: 54px 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #fbfdff;
  text-align: left;
}

.todo-list button:hover {
  border-color: #b8caf0;
  background: #f6f9ff;
}

.todo-list strong {
  color: var(--text);
  font-size: 24px;
}

.todo-list span {
  color: var(--text);
  font-weight: 800;
}

.todo-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.dashboard-panel {
  min-height: 340px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.settings-main,
.settings-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.settings-panel {
  min-height: auto;
}

.settings-form {
  margin-top: 4px;
}

.settings-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.7;
}

.settings-summary {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.settings-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #fbfdff;
}

.settings-summary span,
.path-list span {
  color: var(--muted);
  font-size: 12px;
}

.path-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.path-list div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #fbfdff;
}

.path-list code {
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 12px;
  line-height: 1.5;
}

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

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

.dashboard-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.dashboard-filter-label {
  color: var(--blue);
}

.pager {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.pager div {
  display: inline-flex;
  gap: 6px;
}

.pager button {
  height: 30px;
  padding: 0 10px;
}

.pager.single button {
  display: none;
}

.detail-sidebar .pager {
  justify-content: space-between;
  width: 100%;
  padding: 8px 2px 0;
  color: rgba(255, 255, 255, 0.62);
}

.detail-sidebar .pager button {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.detail-sidebar .pager button:disabled {
  color: rgba(255, 255, 255, 0.38);
}

.dashboard-orders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.latest-orders {
  grid-template-columns: repeat(auto-fill, minmax(360px, 420px));
  align-items: start;
}

.dashboard-order {
  display: grid;
  height: auto;
  gap: 8px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.dashboard-order:hover {
  border-color: #b8caf0;
  background: #f8fbff;
}

.dashboard-order span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.latest-orders .dashboard-order {
  min-height: 138px;
}

.dashboard-order-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-order-top strong {
  color: var(--text);
  font-size: 15px;
}

.dashboard-order-top em {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e0ecff;
  color: #1d4ed8;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-empty {
  grid-column: 1 / -1;
  display: grid;
  place-content: center;
  min-height: 320px;
  text-align: center;
  gap: 8px;
}

.empty {
  display: grid;
  place-content: center;
  min-height: calc(100vh - 154px);
  text-align: center;
  gap: 8px;
}

.editor {
  display: grid;
  gap: 14px;
  padding: 0;
}

.order-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid #cfd9e7;
  border-radius: 8px;
  background: linear-gradient(135deg, #102a43 0%, #1f4f63 58%, #2563eb 100%);
  color: #fff;
}

.detail-view .order-hero {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  min-height: 150px;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.hero-copy h2 {
  margin: 6px 0;
  font-size: 24px;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.76);
}

.detail-view .hero-copy p {
  color: var(--muted);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #dffcf5;
  font-size: 12px;
  font-weight: 900;
}

.detail-view .hero-kicker {
  background: #eef6ff;
  color: #1d4ed8;
}

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

.hero-stats div {
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.detail-view .hero-stats div {
  border-color: #e8edf5;
  background: #fbfdff;
}

.hero-stats strong {
  display: block;
  font-size: 24px;
}

.detail-view .hero-stats strong {
  color: var(--text);
}

.hero-stats span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.detail-view .hero-stats span {
  color: var(--muted);
}

.detail-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-flow button {
  height: 42px;
  border-color: #e8edf5;
  background: #fbfdff;
  color: var(--muted);
}

.detail-flow button.active,
.detail-flow button:hover {
  border-color: #93b4f8;
  background: #f6f9ff;
  color: #1d4ed8;
  box-shadow: inset 0 -3px 0 var(--blue);
}

.step-section {
  display: none;
}

.editor[data-step="collect"] .step-collect,
.editor[data-step="store"] .step-store,
.editor[data-step="config"] .step-config,
.editor[data-step="materials"] .step-materials,
.editor[data-step="delivery"] .step-delivery {
  display: block;
}

.editor[data-step="store"] .split-sections.step-store {
  display: grid;
}

.editor:not([data-step="delivery"]) .workbench-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.editor[data-step="delivery"] .workbench-grid {
  grid-template-columns: minmax(0, 1fr);
}

.editor[data-step="delivery"] .workbench-main {
  display: none;
}

.editor[data-step="delivery"] .workbench-side {
  position: static;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.editor[data-step="delivery"] .save-panel {
  grid-column: 1 / -1;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.workbench-main,
.workbench-side {
  display: grid;
  gap: 14px;
}

.workbench-side {
  position: sticky;
  top: 14px;
}

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

.split-sections.step-section {
  display: none;
}

.editor[data-step="store"] .split-sections.step-section {
  display: grid;
}

.split-sections .row,
.split-sections .row.deal,
.workbench-side .row,
.workbench-side .row.after {
  grid-template-columns: 1fr;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.workbench-side .grid.two,
.workbench-side .checklist,
.workbench-side .checklist.compact {
  grid-template-columns: 1fr;
}

.focus-section {
  border-color: #bfd4ff;
  background: #f8fbff;
}

.side-panel {
  background: #fbfdff;
}

.assist-panel {
  border-color: #dbe5f3;
}

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

.status-tile {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #fff;
}

.status-tile span {
  width: max-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 11px;
  font-weight: 900;
}

.status-tile.done span {
  background: #ecfdf5;
  color: #047857;
}

.status-tile strong {
  font-size: 14px;
}

.status-tile em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  line-height: 1.5;
}

.quick-actions {
  display: grid;
  gap: 10px;
}

.quick-actions button {
  min-height: 38px;
}

.section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

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

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

.save-state {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.save-state.dirty {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.save-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: #bfdbfe;
  background: #f8fbff;
}

.save-panel h2 {
  margin-bottom: 4px;
}

.save-panel p {
  font-size: 13px;
  line-height: 1.6;
}

.save-panel button {
  min-width: 180px;
  height: 42px;
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
}

.section-tip {
  margin: -4px 0 12px;
  font-size: 13px;
  line-height: 1.6;
}

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

.detail-view .workbench-main .grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

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

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

.config-source-grid {
  margin-bottom: 14px;
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

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

label strong {
  color: var(--text);
}

.table {
  display: grid;
  gap: 8px;
}

.inline-empty {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px dashed #cfd9e7;
  border-radius: 8px;
  background: #fbfdff;
  color: var(--muted);
  font-size: 13px;
}

.row {
  display: grid;
  grid-template-columns: 140px 1fr 120px 1.4fr 42px;
  gap: 8px;
  align-items: center;
}

.row.deal {
  grid-template-columns: 120px 1.2fr 90px 1fr 1.2fr 42px;
}

.row.after {
  grid-template-columns: 160px 1fr 42px;
}

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

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}

.check input {
  width: 18px;
  min-height: 18px;
}

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

.pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
}

.pill.ok {
  background: #ecfdf5;
  color: #047857;
}

.file-tools {
  display: grid;
  grid-template-columns: 160px 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

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

.material-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.material-group {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

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

.material-group-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

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

.material-group .file-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.file-card {
  display: grid;
  gap: 8px;
  min-height: 90px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.file-card video,
.file-card img {
  width: 100%;
  max-height: 180px;
  margin-bottom: 8px;
  border-radius: 6px;
  background: #111827;
  object-fit: contain;
}

.file-card a {
  display: block;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
  word-break: break-all;
}

.file-card-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.file-edit-field {
  display: grid;
  gap: 5px;
}

.file-edit-field strong {
  font-size: 12px;
}

.file-edit-field textarea {
  min-height: 58px;
}

.file-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.file-card-actions a {
  min-width: 0;
  font-size: 13px;
}

.submit-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
}

.submit-link input {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}

.entry-card {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--muted);
}

.entry-card strong {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.entry-card input {
  margin-top: 0;
  min-height: 36px;
  font-size: 13px;
}

.config-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #fbfdff;
}

.config-block + .config-block {
  margin-top: 12px;
}

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

.config-block-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.config-block-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

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

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

.entry-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #e8f4ee;
  color: #047857;
  font-weight: 900;
}

.submit-page {
  position: relative;
  min-height: 100vh;
  background: #edf2f7;
}

.submit-page::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 230px;
  background: linear-gradient(135deg, #103f4a 0%, #16736c 52%, #2b6cb0 100%);
}

.submit-shell {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.submit-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
  align-items: end;
  min-height: 178px;
  padding: 24px;
  border-radius: 8px;
  color: #fff;
}

.submit-header h1 {
  margin-bottom: 8px;
  font-size: 30px;
}

.submit-header p {
  color: rgba(255, 255, 255, 0.78);
}

.submit-kicker {
  display: inline-flex;
  align-items: center;
  height: 26px;
  margin-bottom: 10px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #dffcf5;
  font-size: 12px;
  font-weight: 900;
}

.submit-header-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.submit-header-card strong {
  font-size: 15px;
}

.submit-header-card span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.7;
}

.submit-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: -18px 10px 14px;
}

.submit-guide div {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(220, 227, 238, 0.95);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.submit-guide span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 24px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 900;
}

.submit-guide strong {
  display: block;
  font-size: 15px;
}

.submit-guide p {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.5;
}

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

.submit-status {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.supplement-mode .submit-status {
  border-color: #93c5fd;
  background: #f8fbff;
}

.submit-status strong {
  font-size: 17px;
}

.submit-status p {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.6;
}

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

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #059669);
  transition: width 0.2s ease;
}

.step-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.step-row span {
  min-height: 28px;
  padding: 7px 8px;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.field-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.field-badge.required {
  background: #fee2e2;
  color: #b91c1c;
}

.field-badge.optional {
  background: #ecfdf5;
  color: #047857;
}

.section-no {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
}

.submit-page .section {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.submit-page input,
.submit-page textarea {
  min-height: 44px;
}

.submit-page label strong {
  font-size: 13px;
}

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

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

.fixed-submit-links {
  display: grid;
  gap: 10px;
}

.fixed-submit-links label {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #fbfdff;
}

.optional-submit-links {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8edf5;
}

.optional-submit-head {
  display: grid;
  gap: 4px;
}

.optional-submit-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.optional-submit-links label {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e8edf5;
  border-radius: 8px;
  background: #fbfdff;
}

.fixed-submit-links strong {
  font-size: 15px;
}

.optional-submit-links strong {
  font-size: 15px;
}

.upload-box {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 4px 12px;
  margin-top: 10px;
  padding: 16px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
}

.upload-box strong,
.upload-box em,
.upload-box input,
.upload-box .upload-count {
  grid-column: 2;
}

.upload-box em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
}

.upload-mark {
  grid-row: 1 / span 4;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.upload-video .upload-mark {
  background: #2563eb;
}

.upload-image .upload-mark {
  background: #059669;
}

.upload-box input {
  border: 0;
  padding: 6px 0 0;
  background: transparent;
}

.upload-count {
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
}

.submit-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px 0 4px;
  background: linear-gradient(180deg, rgba(238, 242, 247, 0), #eef2f7 28%);
}

.submit-actions button {
  width: 100%;
  height: 44px;
}

.submit-actions p {
  min-height: 22px;
  text-align: center;
  font-weight: 800;
}

.submit-actions p.submitting {
  color: #2563eb;
}

.submit-actions p.success {
  color: #047857;
}

.submit-actions p.error {
  color: #b91c1c;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.56);
}

.modal.hidden {
  display: none;
}

.modal-box {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: #dcfce7;
  color: #047857;
  font-size: 34px;
  font-weight: 900;
}

.modal.error .modal-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.modal.error .modal-icon::before {
  content: "!";
}

.modal.error .modal-icon {
  font-size: 0;
}

.modal h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.modal p {
  line-height: 1.7;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.go-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(5, 150, 105, 0.12)),
    #eef2f7;
}

.go-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 18px;
}

.go-card {
  width: min(520px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.go-kicker {
  display: inline-flex;
  align-items: center;
  height: 26px;
  margin-bottom: 14px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 900;
}

.go-card h1 {
  margin-bottom: 10px;
  font-size: 26px;
}

.go-card > p {
  line-height: 1.7;
}

.go-steps {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.go-steps div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 3px 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.go-steps span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}

.go-steps strong {
  font-size: 15px;
}

.go-steps p {
  font-size: 13px;
}

.go-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.go-actions button {
  height: 42px;
}

.go-message {
  min-height: 22px;
  margin-top: 12px;
  color: #047857;
  text-align: center;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.24);
}

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

  .order-hero,
  .workbench-grid,
  .split-sections {
    grid-template-columns: 1fr;
  }

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

  .dashboard-nav {
    min-height: auto;
  }

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

  .dashboard-brand {
    grid-column: 1 / -1;
  }

  .dashboard-titlebar,
  .dashboard-insights,
  .overview-grid,
  .settings-grid,
  .dashboard-filter-panel,
  .detail-flow,
  .editor[data-step="delivery"] .workbench-side {
    grid-template-columns: 1fr;
  }

  .dashboard-titlebar {
    align-items: flex-start;
    flex-direction: column;
  }

  .workbench-side {
    position: static;
  }

  .hero-stats,
  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .grid,
  .grid.two,
  .grid.three,
  .checklist,
  .file-list,
  .material-groups,
  .entry-grid,
  .submit-guide {
    grid-template-columns: 1fr;
  }

  .submit-header {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 22px 18px 38px;
  }

  .submit-header h1 {
    font-size: 28px;
  }

  .submit-guide {
    margin: -26px 8px 14px;
  }

  .span-2,
  .span-4 {
    grid-column: auto;
  }

  .row,
  .row.deal,
  .row.after,
  .file-tools,
  .save-panel,
  .submit-link,
  .go-actions {
    grid-template-columns: 1fr;
  }

  .save-panel {
    display: grid;
    align-items: stretch;
  }

  .save-panel button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .dashboard {
    padding: 10px;
  }

  .dashboard-nav,
  .dashboard-kpis,
  .dashboard-summary,
  .todo-list button {
    grid-template-columns: 1fr;
  }

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