:root {
  color-scheme: light;
  --bg: #f8fbff;
  --surface: #ffffff;
  --surface-soft: #f6f9fc;
  --text: #172238;
  --muted: #738198;
  --line: #e2eaf3;
  --line-strong: #cbd8e6;
  --primary: #2aaee8;
  --primary-dark: #127dae;
  --primary-soft: #e1f5ff;
  --teal: #13a37f;
  --teal-soft: #dcf8ef;
  --blue: #2d6df6;
  --blue-soft: #e8f0ff;
  --amber: #e17b23;
  --amber-soft: #fff2d7;
  --pink: #e85d8f;
  --pink-soft: #ffe5f0;
  --danger: #d43c32;
  --danger-soft: #ffe4e1;
  --warning: #b76712;
  --warning-soft: #fff6da;
  --shadow: 0 18px 46px rgba(40, 63, 92, 0.075);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(rgba(55, 91, 129, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 91, 129, 0.038) 1px, transparent 1px),
    linear-gradient(120deg, #fbfdff 0%, #f1f9ff 52%, #fcfbff 100%);
  background-size:
    40px 40px,
    40px 40px,
    auto;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

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

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 2;
}

.page {
  min-height: 100vh;
}

.top-alert {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 16px;
  color: var(--warning);
  background: linear-gradient(90deg, #fffaf0, #fff8e5);
  border-bottom: 1px solid #f3d89d;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.top-alert svg {
  color: #f08b18;
}

.shell {
  width: min(1300px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 2.5vw, 24px) 36px;
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
  margin-bottom: 18px;
}

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

.brand-mark-image {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid rgba(255, 190, 211, 0.48);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 239, 246, 0.72));
  box-shadow: 0 10px 24px rgba(232, 93, 143, 0.12);
}

.brand h1,
.brand p,
.section-head h2,
.section-head p,
.card-title h2,
.card-title span,
.queue-empty p,
.quota dl,
.task-stats p,
.batch-preview p {
  margin: 0;
}

.brand h1 {
  color: #3c84ff;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.nav-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.mini-status,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(32, 65, 100, 0.06);
  color: #46556b;
  font-size: 12px;
  font-weight: 800;
}

.mini-status strong {
  color: var(--text);
}

.dot,
.status-pill > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.dot.blue {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(45, 109, 246, 0.12);
}

.status-pill.online {
  color: #087752;
  background: var(--teal-soft);
  border-color: #abebd6;
}

.status-pill.online > span {
  background: var(--teal);
}

.status-pill.paused,
.status-pill.offline {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #ffc4bd;
}

.status-pill.paused > span,
.status-pill.offline > span {
  background: var(--danger);
}

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

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.submit-card {
  align-self: start;
  overflow: hidden;
}

.key-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 8px;
  padding: 16px 18px 10px;
}

.key-input {
  position: relative;
  display: grid;
  min-width: 0;
}

.key-input span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.key-input input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: #fff;
  outline: 0;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.key-input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(42, 174, 232, 0.14);
}

.inside-icon {
  position: absolute;
  right: 6px;
  top: 5px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  color: #6c7d95;
  background: transparent;
}

.inside-icon:hover {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.bind-button {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(180deg, #29b8ed, #168fd0);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(42, 174, 232, 0.24);
}

.key-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 0 18px 12px;
  color: #6c7d95;
  font-size: 12px;
  font-weight: 800;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  color: #5c6f87;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.text-button:hover {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.quota {
  display: grid;
  gap: 10px;
  margin: 0 18px 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.quota-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.quota-main span,
.quota dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quota-main strong {
  font-size: 24px;
  line-height: 1;
}

.meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce9f3;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--blue));
  transition: width 220ms ease;
}

.quota dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quota dd {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

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

.section-head h2 {
  font-size: 16px;
  line-height: 1.2;
}

.section-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 3px;
  border-radius: var(--radius);
  background: #f2f7fb;
}

.tab-button,
.segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  min-width: 52px;
  border: 0;
  border-radius: 6px;
  color: #5d6e84;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.tab-button.active,
.segment.active {
  color: var(--primary-dark);
  background: #dff4ff;
}

.workspace {
  min-width: 0;
  padding: 16px 18px 20px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin-bottom: 13px;
}

.field span {
  color: #56667d;
  font-size: 12px;
  font-weight: 800;
}

.field em {
  color: #ef6262;
  font-style: normal;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  outline: 0;
  padding: 9px 12px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(42, 174, 232, 0.13);
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 14px;
  font-weight: 900;
  white-space: nowrap;
}

.primary-button {
  color: #fff;
  background: linear-gradient(180deg, #35bceb, #1597d7);
  box-shadow: 0 12px 26px rgba(42, 174, 232, 0.24);
}

.primary-button:hover {
  background: linear-gradient(180deg, #21afe6, #0d83c0);
}

.primary-button small {
  font-size: 12px;
  opacity: 0.9;
}

.primary-button.full {
  width: 100%;
}

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

.ghost-button:hover {
  color: var(--primary-dark);
  border-color: #a8dff5;
  background: var(--primary-soft);
}

.compact {
  min-height: 32px;
  padding: 0 11px;
  font-size: 13px;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #5f7188;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 22px rgba(32, 65, 100, 0.05);
}

.icon-button:hover {
  color: var(--primary-dark);
  border-color: #a8dff5;
  background: var(--primary-soft);
}

[data-tooltip]::after {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 8px);
  width: max-content;
  max-width: 220px;
  padding: 7px 9px;
  color: #fff;
  background: #1f2937;
  border-radius: 6px;
  content: attr(data-tooltip);
  font-size: 12px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.batch-preview {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin: 2px 0 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.batch-preview > span {
  display: inline-grid;
  place-items: center;
  height: 32px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.batch-preview p {
  color: #52647a;
  font-size: 12px;
  font-weight: 800;
}

.right-pane {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  min-width: 0;
}

.queue-card {
  min-height: 360px;
  overflow: hidden;
}

.history-card {
  min-height: 360px;
  overflow: hidden;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 14px 18px;
}

.card-title > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.card-title svg {
  color: var(--primary-dark);
}

.card-title h2 {
  font-size: 15px;
  line-height: 1.2;
}

.card-title span {
  color: #6c7d95;
  font-size: 12px;
  font-weight: 800;
  max-width: min(560px, 58vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 214px;
  color: #7a8ba3;
  font-size: 13px;
  font-weight: 800;
}

.queue-empty svg {
  color: #9ab1ca;
  animation: slow-spin 1.6s linear infinite;
}

.queue-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.queue-stats div {
  min-height: 80px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.queue-stats div:last-child {
  border-right: 0;
}

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

.queue-stats strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  line-height: 1;
}

.history-title {
  border-bottom: 1px solid var(--line);
}

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

.filters {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.segmented {
  display: inline-flex;
  min-height: 34px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  overflow-x: auto;
}

.small-field {
  width: 104px;
  margin-bottom: 0;
}

.small-field select {
  min-height: 34px;
  padding: 5px 9px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: #52647a;
  font-size: 12px;
  font-weight: 800;
}

.toggle-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.task-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.task-stats div {
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.task-stats span {
  display: block;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 900;
}

.task-stats p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  background: #fff;
}

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

th {
  color: #66758b;
  background: #fbfdff;
  font-weight: 900;
}

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

.empty-row td {
  height: 138px;
  color: #7a8ba3;
  text-align: center;
  font-weight: 800;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-queued {
  color: var(--warning);
  background: var(--warning-soft);
}

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

.status-success {
  color: #087752;
  background: var(--teal-soft);
}

.status-failed {
  color: var(--danger);
  background: var(--danger-soft);
}

.step-stack {
  display: grid;
  gap: 6px;
  min-width: 120px;
}

.step-label {
  color: #52647a;
  font-weight: 900;
}

.step-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: 112px;
}

.step-bar span {
  height: 5px;
  border-radius: 99px;
  background: #dce7ef;
}

.step-bar span.done {
  background: var(--primary);
}

.step-bar span.error {
  background: var(--danger);
}

.result-cell,
.remark-cell,
.email-cell {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-cell a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.result-cell a:hover {
  text-decoration: underline;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #5f7188;
  background: var(--surface-soft);
}

.mini-button:hover {
  color: var(--primary-dark);
  border-color: #a8dff5;
  background: var(--primary-soft);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 48px;
  padding: 8px 16px;
  color: #52647a;
  font-size: 13px;
  font-weight: 800;
}

.tutorial-card {
  margin-top: 18px;
  overflow: hidden;
}

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

.tutorial-head h2,
.tutorial-head p {
  margin: 0;
}

.tutorial-head h2 {
  font-size: 16px;
  line-height: 1.2;
}

.tutorial-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tutorial-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tutorial-intro {
  display: grid;
  gap: 14px;
  margin: 16px 18px;
  padding: 18px 22px;
  border: 1px solid #cbe9ff;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef9ff, #f6f4ff);
}

.tutorial-intro p {
  margin: 0;
  color: #41516a;
  font-size: 14px;
  line-height: 1.8;
  font-weight: 800;
}

.tutorial-intro strong {
  color: #0494ed;
  font-weight: 900;
}

.tutorial-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #ff9fab;
  border-radius: 10px;
  color: #ff3f56;
  background: rgba(255, 236, 241, 0.72);
  font-size: 13px;
  font-weight: 900;
}

.tutorial-warning svg {
  width: 18px;
  height: 18px;
  color: #ff3f56;
}

.tutorial-list {
  display: grid;
}

.tutorial-item {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

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

.tutorial-item summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px;
  color: #26344a;
  font-size: 14px;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.tutorial-item summary::-webkit-details-marker {
  display: none;
}

.tutorial-item summary span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 900;
}

.tutorial-item summary svg {
  color: #7d8da4;
  transition: transform 160ms ease;
}

.tutorial-item[open] summary svg {
  transform: rotate(180deg);
}

.tutorial-item p {
  margin: 0;
  padding: 0 18px 16px 70px;
  color: #5c6b82;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 700;
}

.requirement-list {
  display: grid;
  gap: 12px;
  padding: 4px 18px 16px 18px;
}

.requirement-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.requirement-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.requirement-item p {
  margin: 0;
  padding: 0;
  color: #26344a;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 800;
}

.requirement-item.bad .requirement-icon {
  color: #e74d4d;
  border-color: #f5b9b9;
  background: #fff5f5;
}

.requirement-item.warn .requirement-icon {
  color: #e39a39;
  border-color: #f1d2a7;
  background: #fff9ef;
}

.requirement-item.info .requirement-icon {
  color: #2a84df;
  border-color: #b8d7fb;
  background: #eef7ff;
}

.totp-guide {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 6px 18px 18px;
}

.totp-guide::before {
  position: absolute;
  left: 36px;
  top: 14px;
  bottom: 18px;
  width: 2px;
  background: linear-gradient(180deg, rgba(42, 174, 232, 0.35), rgba(42, 174, 232, 0.12));
  content: "";
}

.totp-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.totp-dot {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-top: 4px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #3ab5ef, #1797d8);
  box-shadow: 0 8px 18px rgba(42, 174, 232, 0.22);
  font-size: 14px;
  font-weight: 900;
}

.totp-content {
  min-width: 0;
}

.totp-content > p {
  margin: 0 0 10px;
  padding: 0;
  color: #26344a;
  font-size: 14px;
  line-height: 1.75;
  font-weight: 800;
}

.guide-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #b7ddfb;
  border-radius: 8px;
  color: #1591dd;
  background: #eef8ff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.guide-link:hover {
  border-color: #8cccf4;
  background: #e1f4ff;
}

.guide-link svg {
  width: 15px;
  height: 15px;
}

.example-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid;
  border-radius: 10px;
  background: #fff;
}

.example-box code {
  color: inherit;
  font-size: 13px;
  font-weight: 900;
  word-break: break-all;
}

.example-box.success {
  border-color: #b8ead0;
  background: #eefbf4;
  color: #1b9b67;
}

.example-box.danger {
  border-color: #f3c0c0;
  background: #fff2f2;
  color: #ff4d5d;
}

.example-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  color: inherit;
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.example-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px dashed #c9e2f7;
  border-radius: 10px;
  background: #f6fbff;
  color: #4b6f91;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.example-note span {
  color: #347dc7;
  white-space: nowrap;
}

.save-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #ffd69a;
  border-radius: 10px;
  background: #fff8e7;
  color: #f08b18;
  font-size: 13px;
  font-weight: 900;
}

.save-warning svg {
  width: 16px;
  height: 16px;
  color: #f08b18;
}

.pay-guide {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 6px 18px 18px;
}

.pay-guide::before {
  position: absolute;
  left: 36px;
  top: 14px;
  bottom: 18px;
  width: 2px;
  background: linear-gradient(180deg, rgba(45, 109, 246, 0.3), rgba(45, 109, 246, 0.12));
  content: "";
}

.pay-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.pay-dot {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-top: 4px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #34aef1, #1b94dc);
  box-shadow: 0 8px 18px rgba(45, 109, 246, 0.22);
  font-size: 14px;
  font-weight: 900;
}

.pay-content {
  min-width: 0;
}

.pay-content > p {
  margin: 0 0 10px;
  padding: 0;
  color: #26344a;
  font-size: 14px;
  line-height: 1.75;
  font-weight: 800;
}

.error-list {
  display: grid;
  gap: 10px;
  padding: 4px 18px 18px;
}

.error-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: center;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.error-row strong {
  color: #f12121;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 900;
}

.error-row span {
  color: #46556d;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
}

.error-row code {
  padding: 1px 6px;
  border-radius: 5px;
  color: #0d8bd3;
  background: #e6f6ff;
  font-size: 12px;
  font-weight: 900;
}

.disclaimer-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  margin: 6px 18px 18px;
  padding: 14px 16px;
  border: 1px solid #f0d6aa;
  border-radius: 12px;
  background: #fff9ee;
  color: #e88400;
  font-size: 14px;
  font-weight: 800;
}

.disclaimer-box svg {
  width: 20px;
  height: 20px;
  color: #ee8a00;
  flex: 0 0 auto;
}

.remark-dialog {
  width: min(520px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(25, 37, 54, 0.26);
}

.remark-dialog::backdrop {
  background: rgba(23, 33, 47, 0.34);
  backdrop-filter: blur(3px);
}

.remark-dialog form {
  margin: 0;
}

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

.dialog-head h2,
.dialog-head p {
  margin: 0;
}

.dialog-head h2 {
  font-size: 16px;
}

.dialog-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.toast-stack {
  position: fixed;
  z-index: 50;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 36px));
}

.toast {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: toast-in 180ms ease both;
}

.toast strong {
  font-size: 14px;
}

.toast span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.success {
  border-left-color: var(--teal);
}

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

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1160px) {
  .layout {
    grid-template-columns: 340px minmax(0, 1fr);
  }

  .queue-stats {
    grid-template-columns: 1fr;
  }

  .queue-stats div {
    min-height: 64px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .queue-stats div:last-child {
    border-bottom: 0;
  }
}

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

  .right-pane {
    grid-template-rows: auto auto;
  }

  .queue-card,
  .history-card {
    border-radius: var(--radius);
  }

  .history-card {
    border-top: 1px solid var(--line);
  }

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

  .queue-stats div {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .top-alert {
    align-items: flex-start;
    text-align: left;
  }

  .app-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-status {
    justify-content: stretch;
  }

  .mini-status,
  .status-pill {
    flex: 1 1 130px;
    justify-content: center;
  }

  .nav-status .icon-button {
    flex: 0 0 38px;
    width: 38px;
    height: 32px;
  }

  .key-strip {
    grid-template-columns: 1fr;
  }

  .bind-button {
    width: 100%;
  }

  .section-head,
  .card-title,
  .filters {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs,
  .segmented {
    width: 100%;
  }

  .tab-button,
  .segment {
    flex: 1 1 auto;
  }

  .queue-stats,
  .task-stats {
    grid-template-columns: 1fr;
  }

  .queue-empty {
    min-height: 180px;
  }

  .batch-preview {
    grid-template-columns: 34px 1fr;
  }

  .batch-preview .text-button {
    justify-content: flex-start;
  }

  .tutorial-item summary {
    grid-template-columns: 36px minmax(0, 1fr) 22px;
    padding-inline: 14px;
  }

  .tutorial-item p {
    padding: 0 14px 15px 60px;
  }

  .tutorial-intro {
    margin: 14px;
    padding: 15px 16px;
    border-radius: 12px;
  }

  .requirement-list {
    padding: 4px 14px 14px;
  }

  .totp-guide {
    gap: 16px;
    padding: 6px 14px 14px;
  }

  .totp-guide::before {
    left: 30px;
    top: 10px;
    bottom: 14px;
  }

  .totp-step {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
  }

  .totp-dot {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .pay-guide {
    gap: 16px;
    padding: 6px 14px 14px;
  }

  .pay-guide::before {
    left: 30px;
    top: 10px;
    bottom: 14px;
  }

  .pay-step {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
  }

  .pay-dot {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .error-list {
    padding: 4px 14px 14px;
  }

  .error-row {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 11px 13px;
  }

  .disclaimer-box {
    margin: 6px 14px 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
  }
}

@media (max-width: 460px) {
  .shell {
    padding-inline: 12px;
  }

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

  .brand-mark-image {
    width: 46px;
    height: 46px;
  }

  .quota dl {
    grid-template-columns: 1fr;
  }

  .pagination {
    justify-content: center;
    flex-wrap: wrap;
  }
}
