:root {
  --canvas: #f4f5f2;
  --surface: #ffffff;
  --surface-soft: #f8f9f7;
  --ink: #242724;
  --muted: #72776f;
  --line: #e1e4de;
  --line-strong: #cfd4cc;
  --accent: #d95f49;
  --accent-dark: #b94634;
  --accent-soft: #fff0ec;
  --green: #2f7d59;
  --green-soft: #e8f5ee;
  --blue: #3973b6;
  --blue-soft: #eaf2fb;
  --amber: #a9681f;
  --amber-soft: #fff4df;
  --red: #b44238;
  --red-soft: #fcecea;
  --shadow: 0 1px 2px rgba(30, 35, 30, 0.04), 0 8px 24px rgba(30, 35, 30, 0.05);
}

* {
  box-sizing: border-box;
}

[v-cloak] {
  display: none;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(207, 212, 204, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: calc(100% - 32px);
  min-height: 64px;
  margin: 0 auto;
}

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid #f0c7be;
  border-radius: 8px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 18px;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.2;
}

.brand-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.tab-list {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.tab-button {
  min-width: 78px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: #666b64;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

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

.tab-button.is-active {
  color: var(--accent-dark);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(30, 35, 30, 0.1);
}

.system-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid #bfe1cf;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.system-state::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.system-state.badge-warning {
  border-color: #efd6aa;
  color: var(--amber);
  background: var(--amber-soft);
}

.system-state.badge-warning::before {
  animation: pulse 1.2s ease-in-out infinite;
}

.system-state.badge-error {
  border-color: #efc3be;
  color: var(--red);
  background: var(--red-soft);
}

.app-shell {
  width: calc(100% - 32px);
  margin: 0 auto;
  padding: 26px 0 44px;
}

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

.page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 760;
  line-height: 1.25;
}

.page-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.stat-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  font-size: 18px;
}

.stat-icon.is-green { color: var(--green); background: var(--green-soft); }
.stat-icon.is-coral { color: var(--accent-dark); background: var(--accent-soft); }
.stat-icon.is-blue { color: var(--blue); background: var(--blue-soft); }
.stat-icon.is-amber { color: var(--amber); background: var(--amber-soft); }

.stat-label {
  margin: 1px 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.stat-value {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-value.is-time {
  padding-top: 3px;
  font-size: 15px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 730;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  color: #646962;
  background: #eef0ec;
  font-size: 11px;
  font-weight: 700;
}

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

.search-field {
  position: relative;
  width: 240px;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 11px;
  color: #8b9088;
  font-size: 14px;
  pointer-events: none;
  transform: translateY(-50%);
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input {
  height: 38px;
  padding: 0 11px;
  font-size: 13px;
}

.search-field .input {
  padding-left: 33px;
}

.textarea {
  min-height: 280px;
  padding: 11px 12px;
  resize: vertical;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.65;
}

.input:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 95, 73, 0.12);
}

.input::placeholder,
.textarea::placeholder {
  color: #a1a59f;
}

.filter-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: #666b64;
  background: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.filter-toggle:hover {
  border-color: #b8beb6;
  color: var(--ink);
}

.filter-toggle:has(input:checked) {
  border-color: #efb4a8;
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.filter-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: #4d524c;
  background: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 680;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}

.btn:hover:not(:disabled) {
  border-color: #b6bcb4;
  color: var(--ink);
  background: var(--surface-soft);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  border-color: var(--accent-dark);
  color: #ffffff;
  background: var(--accent-dark);
}

.btn-danger {
  border-color: #dfb2ac;
  color: var(--red);
  background: var(--red-soft);
}

.btn-danger:hover:not(:disabled) {
  border-color: var(--red);
  color: #ffffff;
  background: var(--red);
}

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

.btn-icon {
  width: 36px;
  min-width: 36px;
  padding: 0;
  font-size: 17px;
}

.btn-quiet {
  border-color: transparent;
  background: transparent;
}

.btn-info {
  border-color: #b9d2ec;
  color: var(--blue);
  background: var(--blue-soft);
}

.btn-warning {
  border-color: #efd3a2;
  color: var(--amber);
  background: var(--amber-soft);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: collapse;
  font-size: 13px;
}

.orders-table {
  table-layout: fixed;
}

.orders-table .col-read { width: 3%; }
.orders-table .col-trade { width: 12%; }
.orders-table .col-keyword { width: 13%; }
.orders-table .col-product { width: 18%; }
.orders-table .col-amount { width: 6%; }
.orders-table .col-card-count { width: 6%; }
.orders-table .col-seller { width: 11%; }
.orders-table .col-status { width: 7%; }
.orders-table .col-time { width: 9%; }
.orders-table .col-rights { width: 7%; }
.orders-table .col-link { width: 8%; }

.card-count-cell {
  color: var(--blue);
  font-weight: 720;
}

.data-table th {
  height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 720;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  height: 52px;
  padding: 8px 12px;
  border-bottom: 1px solid #eceeea;
  vertical-align: middle;
}

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

.order-row {
  cursor: pointer;
  transition: background 120ms ease, filter 120ms ease, opacity 120ms ease;
}

.order-row:hover {
  background: #fafbf9;
}

.order-row.is-read {
  color: #777c76;
  background: #fafbf9;
  filter: grayscale(1);
  opacity: 0.42;
}

.order-row.is-read:hover {
  background: #f5f6f3;
  opacity: 0.55;
}

.mono {
  font-family: Consolas, "SFMono-Regular", monospace;
}

.trade-number {
  font-size: 12px;
  font-weight: 650;
}

.truncate-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.badge-success { color: var(--green); background: var(--green-soft); }
.badge-error { color: var(--red); background: var(--red-soft); }
.badge-warning { color: var(--amber); background: var(--amber-soft); }
.badge-ghost { color: #656a63; background: #eceeea; }

.read-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.detail-row td {
  height: auto;
  padding: 14px 18px;
  background: #f8f9f7;
}

.raw-detail {
  max-height: 220px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.empty-state {
  display: grid;
  min-height: 260px;
  padding: 36px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.empty-state-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 22px;
}

.empty-state-title {
  margin: 0;
  color: #4c514b;
  font-size: 14px;
  font-weight: 720;
}

.empty-state-copy {
  margin: 6px 0 0;
  font-size: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.pagination-label {
  min-width: 70px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

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

.settings-panel {
  padding: 18px;
}

.settings-panel.is-wide {
  grid-column: 1 / -1;
}

.section-heading {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 730;
}

.section-meta {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: #4f544e;
  font-size: 12px;
  font-weight: 680;
}

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

.field-row .input {
  min-width: 0;
}

.field-row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.field-row + .field-row,
.field-block + .field-block {
  margin-top: 14px;
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.query-panel {
  display: flex;
  min-height: 420px;
  flex-direction: column;
}

.query-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.query-panel-heading .section-meta {
  margin-bottom: 0;
}

.query-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid #bfe1cf;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.query-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.query-status.badge-warning {
  border-color: #efd6aa;
  color: var(--amber);
  background: var(--amber-soft);
}

.query-status.badge-error {
  border-color: #efc3be;
  color: var(--red);
  background: var(--red-soft);
}

.query-controls {
  display: grid;
  gap: 15px;
  margin-top: 20px;
}

.staging-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.staging-heading .field-label {
  margin: 0;
}

.staging-heading span {
  color: var(--muted);
  font-size: 11px;
}

.staging-submit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 8px;
  align-items: stretch;
}

.staging-input {
  min-height: 104px;
  max-height: 220px;
}

.staging-submit-layout .btn {
  min-height: 104px;
  padding: 12px;
  line-height: 1.4;
  white-space: normal;
}

.staging-list {
  max-height: 116px;
  overflow-y: auto;
  margin-top: 9px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.staging-empty,
.staging-more {
  padding: 11px 2px;
  color: var(--muted);
  font-size: 11px;
}

.staging-more {
  border-top: 1px solid var(--line);
  text-align: center;
}

.staging-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 35px;
  padding: 6px 2px;
  border-bottom: 1px solid #eceeea;
  font-size: 11px;
}

.staging-item:last-child {
  border-bottom: 0;
}

.staging-keyword {
  overflow: hidden;
  font-family: Consolas, "SFMono-Regular", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staging-state {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.staging-state.is-running {
  color: var(--amber);
}

.staging-state.is-error {
  color: var(--red);
}

.batch-query-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.batch-query-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.batch-query-copy strong {
  font-size: 12px;
  font-weight: 700;
}

.batch-query-copy span {
  color: var(--muted);
  font-size: 11px;
}

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

.query-result {
  margin-top: 12px;
}

.alert {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.alert-success {
  border-color: #bfe1cf;
  color: var(--green);
  background: var(--green-soft);
}

.alert-error {
  border-color: #efc3be;
  color: var(--red);
  background: var(--red-soft);
}

.monitor-log {
  min-height: 146px;
  max-height: 190px;
  overflow: auto;
  padding: 12px 14px;
  color: #dfe5db;
  background: #202420;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 11px;
  line-height: 1.65;
}

.query-console {
  overflow: hidden;
  margin-top: auto;
  border: 1px solid #343a34;
  border-radius: 6px;
  background: #202420;
}

.query-console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 13px;
  border-bottom: 1px solid #343a34;
  color: #dfe5db;
  background: #292e29;
  font-size: 11px;
}

.query-console-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.console-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #77d8a5;
  box-shadow: 0 0 0 3px rgba(119, 216, 165, 0.12);
}

.query-console-count {
  color: #949c93;
}

.query-captcha-live {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 13px;
  border-bottom: 1px solid #343a34;
  color: #dfe5db;
  background: #252a25;
}

.query-captcha-live img {
  display: block;
  width: 108px;
  height: 44px;
  object-fit: contain;
  border: 1px solid #485048;
  border-radius: 4px;
  background: #ffffff;
}

.query-captcha-live div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.query-captcha-live strong {
  font-size: 12px;
}

.query-captcha-live span {
  overflow: hidden;
  color: #aab2a9;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8e978d;
}

.log-prompt {
  color: #77d8a5;
  font-size: 16px;
  line-height: 1;
}

.log-line {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 7px;
}

.log-line span:last-child {
  overflow-wrap: anywhere;
}

.log-success { color: #77d8a5; }
.log-error { color: #f49b91; }
.log-running { color: #e5c776; }

.captcha-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: end;
}

.captcha-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 94px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--surface-soft);
}

.captcha-preview img {
  display: block;
  max-width: 100%;
  max-height: 82px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  width: min(360px, calc(100vw - 32px));
  box-shadow: 0 14px 34px rgba(30, 35, 30, 0.16);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(31, 35, 31, 0.5);
  backdrop-filter: blur(3px);
}

.modal-content {
  width: min(1120px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(20, 24, 20, 0.22);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.modal-title {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 15px;
  font-weight: 740;
}

.modal-body {
  padding: 18px;
}

.modal-product {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.detail-section + .detail-section {
  margin-top: 16px;
}

.detail-section-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 730;
}

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

.detail-section-heading .detail-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.copy-icon {
  font-size: 15px;
  line-height: 1;
}

.card-secret-row {
  position: relative;
}

.card-secret-row + .card-secret-row {
  margin-top: 8px;
}

.card-copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  border-color: #bfe1cf;
  color: var(--green);
  background: rgba(255, 255, 255, 0.88);
}

.card-secret {
  min-height: 48px;
  margin: 0;
  padding: 12px 52px 12px 12px;
  border: 1px solid #bfe1cf;
  border-radius: 6px;
  color: #245f45;
  background: var(--green-soft);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}


.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 12px;
}

.detail-grid .is-wide {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

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

.empty-detail {
  padding: 16px;
  border: 1px solid #efd3a2;
  border-radius: 6px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 12px;
  text-align: center;
}

.instructions {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 12px;
  line-height: 1.65;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.loading {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

.btn:not(.btn-primary) .loading {
  border-color: #d5d8d2;
  border-top-color: currentColor;
}

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

@keyframes pulse {
  50% { opacity: 0.35; }
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
  background: #edf2ee;
}

.login-panel {
  width: min(380px, 100%);
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(30, 35, 30, 0.1);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

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

.login-brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.login-password-label {
  margin-top: 15px;
}

.login-submit {
  width: 100%;
  margin-top: 22px;
}

.auth-loader {
  width: 28px;
  height: 28px;
  border: 3px solid #ccd8d0;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 650ms linear infinite;
}

.logout-button {
  flex: 0 0 auto;
}

.keyword-cell {
  overflow: hidden;
  color: #496357;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maintenance-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.schedule-badge {
  padding: 6px 9px;
  border: 1px solid #b9d2ec;
  border-radius: 6px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.maintenance-grid {
  display: grid;
  grid-template-columns: 0.9fr 0.9fr 1.2fr;
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.maintenance-section {
  min-width: 0;
  padding: 18px 20px 0 0;
}

.maintenance-section + .maintenance-section {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.maintenance-section h3 {
  margin: 0 0 14px;
  font-size: 13px;
}

.maintenance-section .input + .input {
  margin-top: 8px;
}

.maintenance-section > .btn {
  margin-top: 10px;
}

.maintenance-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.proxy-summary {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-height: 38px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}

.proxy-summary strong {
  color: var(--green);
  font-size: 22px;
}

.proxy-disabled {
  margin-left: auto;
  color: var(--red);
  font-weight: 700;
}
@media (max-width: 960px) {
  .header-inner {
    gap: 14px;
  }

  .brand {
    min-width: auto;
  }

  .brand-subtitle {
    display: none;
  }

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

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar {
    width: 100%;
    flex-wrap: wrap;
  }

  .search-field {
    flex: 1 1 220px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .maintenance-grid {
    grid-template-columns: 1fr;
  }

  .maintenance-section,
  .maintenance-section + .maintenance-section {
    padding: 16px 0 0;
    border-left: 0;
  }

  .maintenance-section + .maintenance-section {
    margin-top: 16px;
    border-top: 1px solid var(--line);
  }

  .settings-panel.is-wide {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .header-inner {
    width: calc(100% - 24px);
    padding: 10px 0;
    flex-wrap: wrap;
  }

  .brand {
    flex: 1;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .system-state {
    order: 2;
    margin-left: 0;
  }

  .tab-list {
    order: 3;
    width: 100%;
  }

  .tab-button {
    min-width: 0;
    flex: 1;
  }

  .app-shell {
    width: calc(100% - 24px);
    padding-top: 18px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .page-heading .btn {
    width: 100%;
  }

  .page-title {
    font-size: 20px;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    min-height: 94px;
    padding: 13px;
  }

  .stat-icon {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .stat-value {
    font-size: 18px;
  }

  .stat-value.is-time {
    font-size: 12px;
  }

  .panel-header,
  .settings-panel {
    padding: 14px;
  }

  .toolbar .filter-toggle {
    flex: 1;
    justify-content: center;
  }

  .staging-submit-layout {
    grid-template-columns: 1fr;
  }

  .staging-submit-layout .btn {
    min-height: 40px;
  }

  .field-row,
  .settings-actions,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .field-row .btn,
  .settings-actions .btn,
  .modal-actions .btn {
    width: 100%;
  }

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

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-content {
    width: 100%;
    max-height: 90vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

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

  .detail-grid .is-wide {
    grid-column: auto;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
