:root {
  --bg: #061225;
  --panel: rgba(9, 24, 48, 0.92);
  --panel-strong: rgba(13, 31, 60, 0.96);
  --panel-soft: rgba(15, 36, 68, 0.88);
  --text: #f1f7ff;
  --muted: #96abc9;
  --muted-strong: #a9dcff;
  --border: rgba(104, 166, 255, 0.2);
  --border-strong: rgba(127, 212, 255, 0.34);
  --primary: #8fcbff;
  --primary-deep: #4f98f8;
  --primary-soft: rgba(90, 162, 255, 0.12);
  --success: #16a34a;
  --danger: #ff6b8a;
  --shadow-lg: 0 22px 60px rgba(0, 8, 24, 0.45);
  --shadow-md: 0 12px 32px rgba(0, 8, 24, 0.34);
  --radius-xl: 16px;
  --radius-lg: 14px;
  --radius-md: 12px;
  --radius-sm: 999px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13.2px;
  background:
    radial-gradient(circle at 16% 8%, rgba(42, 121, 255, 0.24), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(87, 183, 255, 0.15), transparent 24%),
    linear-gradient(180deg, #061225 0%, #091a32 48%, #050b17 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(111, 178, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 178, 255, 0.055) 1px, transparent 1px),
    linear-gradient(120deg, rgba(90, 162, 255, 0.12), transparent 38%);
  background-size: 28px 28px, 28px 28px, auto;
  opacity: 0.8;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(935px, calc(100% - 20px));
  margin: 12px auto 20px;
}

.page-shell.narrow {
  width: min(858px, calc(100% - 20px));
}

.hero-card,
.card-panel,
.doc-section {
  position: relative;
  overflow: hidden;
  padding: 15px;
  margin-bottom: 9px;
  background:
    linear-gradient(180deg, rgba(13, 31, 60, 0.92), rgba(7, 18, 37, 0.9)),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.card-panel,
.doc-section {
  padding: 13px;
}

.hero-card::before,
.card-panel::before,
.doc-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(90, 162, 255, 0.16), transparent 34%),
    linear-gradient(260deg, rgba(127, 212, 255, 0.09), transparent 32%);
}

.hero-card::after,
.card-panel::after,
.doc-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 13px;
  right: 13px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(90, 162, 255, 0.68), rgba(127, 212, 255, 0.38), transparent);
}

.hero-head,
.section-title-row,
.footer-row,
.query-row,
.quota-row,
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.hero-head,
.hero-meta,
.section-title-row,
.preflight-grid,
.note-grid,
.field-group,
.tab-row,
.btn-row,
.query-row,
.result-head,
.footer-row,
.dialog-card,
.doc-sidebar,
.doc-section {
  position: relative;
  z-index: 1;
}

.hero-head {
  align-items: flex-start;
}

.brand-badge,
.meta-chip,
.queue-pill,
.back-link,
.stat-pill,
.inline-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
}

.brand-badge {
  margin-bottom: 7px;
  padding: 5px 9px;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, rgba(15, 36, 68, 0.96), rgba(8, 21, 42, 0.94));
  border: 1px solid rgba(104, 166, 255, 0.18);
}

.hero-title {
  margin: 0;
  color: var(--text);
  font-size: 1.48rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.hero-subtitle {
  margin: 6px 0 0;
  max-width: 540px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.queue-pill {
  padding: 7px 10px;
  color: var(--primary);
  font-size: 0.75rem;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(15, 36, 68, 0.96), rgba(8, 21, 42, 0.94));
  border: 1px solid rgba(104, 166, 255, 0.18);
}

.queue-pill strong {
  min-width: 18px;
  color: var(--primary);
  font-size: 0.82rem;
  text-align: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.meta-chip,
.stat-pill,
.inline-code {
  padding: 5px 8px;
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--primary-soft);
  border: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 5px;
  color: #86c8ff;
  font-size: 0.68rem;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.section-desc {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.42;
}

.back-link {
  padding: 7px 10px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(15, 36, 68, 0.96), rgba(8, 21, 42, 0.94));
  border: 1px solid rgba(104, 166, 255, 0.18);
}

.back-link:hover {
  border-color: var(--border-strong);
  box-shadow: 0 10px 24px rgba(61, 139, 255, 0.16);
}

.preflight-grid,
.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.quick-card,
.note-card {
  position: relative;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(15, 36, 68, 0.96), rgba(8, 21, 42, 0.94));
  border: 1px solid rgba(104, 166, 255, 0.18);
  border-radius: var(--radius-lg);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.quick-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
}

.quick-card:hover,
.note-card:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(18, 43, 78, 0.98), rgba(9, 24, 48, 0.96));
  border-color: var(--border-strong);
  box-shadow: 0 12px 30px rgba(0, 12, 32, 0.34);
}

.quick-card-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.quick-index {
  flex: none;
  width: 29px;
  height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #04101f;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 9px;
  background: linear-gradient(180deg, var(--primary), var(--primary-deep));
  box-shadow: 0 10px 24px rgba(61, 139, 255, 0.25);
}

.quick-title {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 760;
}

.quick-desc {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.32;
}

.quick-arrow {
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 800;
}

.field-group {
  margin-top: 9px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.field-label .required {
  color: var(--danger);
}

.field-input,
.field-textarea,
.query-input {
  width: 100%;
  color: #f0f7ff;
  caret-color: var(--primary);
  border: 1px solid rgba(104, 166, 255, 0.18);
  border-radius: var(--radius-md);
  outline: none;
  background: linear-gradient(180deg, rgba(15, 36, 68, 0.96), rgba(8, 21, 42, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field-input,
.query-input {
  height: 42px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.field-textarea {
  min-height: 116px;
  padding: 10px 12px;
  resize: vertical;
  font-size: 0.82rem;
  line-height: 1.52;
}

.field-input::placeholder,
.field-textarea::placeholder,
.query-input::placeholder {
  color: #6f88ac;
}

.field-input:focus,
.field-textarea:focus,
.query-input:focus {
  color: #f0f7ff;
  border-color: #80c8ff;
  background: linear-gradient(180deg, rgba(15, 36, 68, 0.98), rgba(8, 21, 42, 0.96));
  box-shadow: 0 0 0 3px rgba(90, 162, 255, 0.16), 0 0 24px rgba(90, 162, 255, 0.1);
}

.field-input:-webkit-autofill,
.field-textarea:-webkit-autofill,
.query-input:-webkit-autofill,
.field-input:-webkit-autofill:hover,
.field-textarea:-webkit-autofill:hover,
.query-input:-webkit-autofill:hover,
.field-input:-webkit-autofill:focus,
.field-textarea:-webkit-autofill:focus,
.query-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f0f7ff;
  caret-color: var(--primary);
  box-shadow: 0 0 0 1000px #0b1f3d inset, 0 0 0 3px rgba(90, 162, 255, 0.16);
  border-color: #80c8ff;
  transition: background-color 9999s ease-in-out 0s;
}

.tab-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
  margin-bottom: 4px;
}

.tab-btn,
.primary-btn,
.secondary-btn,
.query-btn,
.page-btn,
.cancel-btn,
.coupon-btn,
.dialog-btn {
  cursor: pointer;
  transition: filter 0.16s ease, transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.tab-btn {
  height: 34px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 740;
  border-radius: var(--radius-md);
  background: rgba(11, 28, 55, 0.92);
  border: 1px solid rgba(104, 166, 255, 0.16);
}

.tab-btn.active {
  color: #c6e8ff;
  background: rgba(37, 91, 157, 0.34);
  border-color: rgba(127, 212, 255, 0.3);
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 11px;
}

.primary-btn,
.secondary-btn,
.query-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 800;
}

.primary-btn,
.query-btn,
.dialog-btn.primary,
.page-btn.active {
  color: #04101f;
  background: linear-gradient(180deg, var(--primary), var(--primary-deep));
  box-shadow: 0 10px 24px rgba(61, 139, 255, 0.25);
}

.secondary-btn,
.page-btn {
  color: var(--primary);
  background: linear-gradient(180deg, rgba(15, 36, 68, 0.96), rgba(8, 21, 42, 0.94));
  border: 1px solid rgba(104, 166, 255, 0.18);
}

.primary-btn:hover,
.query-btn:hover,
.secondary-btn:hover,
.page-btn:hover:not(:disabled),
.cancel-btn:hover:not(:disabled),
.coupon-btn:hover:not(:disabled),
.dialog-btn:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.primary-btn:active,
.secondary-btn:active,
.query-btn:active,
.page-btn:active,
.cancel-btn:active,
.coupon-btn:active,
.dialog-btn:active {
  transform: scale(0.99);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.query-btn:disabled,
.page-btn:disabled,
.cancel-btn:disabled,
.coupon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.wide-btn {
  width: 100%;
}

.query-row {
  align-items: stretch;
  margin-top: 9px;
}

.query-input {
  flex: 1;
}

.query-btn {
  flex: none;
  min-width: 94px;
}

.note-card {
  padding: 10px;
}

.note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 5px;
}

.note-icon {
  font-size: 0.82rem;
}

.note-title {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 740;
}

.note-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.38;
}

.stat-pill {
  margin-left: auto;
  white-space: nowrap;
}

.quota-card {
  display: none;
  margin-top: 9px;
  padding: 11px;
  border-radius: var(--radius-lg);
  background: rgba(7, 18, 37, 0.82);
  border: 1px solid rgba(104, 166, 255, 0.18);
}

.quota-row {
  align-items: flex-start;
  flex-wrap: wrap;
}

.quota-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.quota-item {
  min-width: 92px;
}

.quota-item strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 0.98rem;
}

.quota-label {
  color: var(--muted);
  font-size: 0.72rem;
}

.progress-wrap {
  min-width: 180px;
  flex: 1;
}

.progress-bar {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: rgba(104, 166, 255, 0.16);
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-deep), var(--primary));
}

.progress-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.table-wrap,
.doc-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(104, 166, 255, 0.18);
  background: rgba(7, 18, 37, 0.82);
}

.task-table,
.doc-table {
  width: 100%;
  border-collapse: collapse;
}

.task-table {
  min-width: 760px;
}

.task-table th,
.task-table td,
.doc-table th,
.doc-table td {
  padding: 9px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(104, 166, 255, 0.12);
  font-size: 0.76rem;
}

.task-table th,
.doc-table th {
  color: #9acfff;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(19, 45, 82, 0.88);
}

.task-table td,
.doc-table td {
  color: #d8eaff;
}

.account-cell {
  cursor: help;
}

.account-preview {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
}

.account-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: min(520px, calc(100vw - 28px));
  padding: 8px 10px;
  border: 1px solid rgba(170, 210, 255, 0.22);
  border-radius: 8px;
  background: rgba(4, 9, 18, 0.94);
  color: #edf7ff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38);
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: pre-wrap;
  word-break: break-all;
}

.account-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.task-table tr:hover td {
  background: rgba(19, 45, 82, 0.88);
}

.task-table tr:last-child td,
.doc-table tr:last-child td {
  border-bottom: none;
}

.status-badge {
  width: auto;
  min-width: max-content;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(104, 166, 255, 0.2);
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  background: var(--primary-soft);
}

.status-success {
  color: #ffffff;
  background: var(--success);
  border-color: rgba(74, 222, 128, 0.52);
  box-shadow: none;
}

.status-waiting,
.status-processing,
.status-failed {
  color: var(--muted-strong);
  background: var(--primary-soft);
  border-color: var(--border);
}

.link-cell a {
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}

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

.cancel-btn,
.coupon-btn {
  min-height: 26px;
  padding: 0 9px;
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  border: 1px solid var(--border);
}

.text-muted,
.empty-state,
.not-cancelable {
  color: var(--muted);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 130px;
  padding: 15px;
  gap: 5px;
  text-align: center;
}

.empty-state span {
  font-size: 1.32rem;
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.page-btn {
  min-width: 29px;
  height: 29px;
  padding: 0 8px;
  color: #a8bad6;
  font-size: 0.74rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
}

.page-gap {
  display: inline-flex;
  align-items: center;
  padding: 0 3px;
  color: var(--muted);
}

.footer-row {
  justify-content: center;
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.74rem;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 40;
  min-width: 190px;
  max-width: min(92vw, 460px);
  padding: 10px 13px;
  color: #e9f3ff;
  font-size: 0.82rem;
  text-align: center;
  background: rgba(7, 18, 37, 0.94);
  border: 1px solid rgba(104, 166, 255, 0.22);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 10, 22, 0.68);
  backdrop-filter: blur(10px);
}

.dialog-overlay.show {
  display: flex;
}

.dialog-card {
  width: min(380px, 100%);
  padding: 18px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(15, 36, 68, 0.96), rgba(8, 21, 42, 0.94));
  border: 1px solid rgba(104, 166, 255, 0.18);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.dialog-title {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.dialog-message {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.dialog-btn {
  min-width: 72px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-weight: 800;
}

.dialog-btn.secondary {
  color: var(--primary);
  background: rgba(90, 162, 255, 0.08);
  border: 1px solid var(--border);
}

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px;
}

.doc-sidebar {
  position: sticky;
  top: 12px;
  align-self: start;
}

.doc-sidebar nav {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.doc-sidebar a {
  padding: 8px 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 720;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(15, 36, 68, 0.96), rgba(8, 21, 42, 0.94));
  border: 1px solid rgba(104, 166, 255, 0.18);
}

.doc-sidebar a:hover {
  color: var(--primary);
  border-color: var(--border-strong);
}

.doc-section h3 {
  margin: 16px 0 8px;
  color: var(--text);
  font-size: 0.92rem;
}

.inline-code,
.code-block code {
  font-family: var(--mono);
}

.code-block {
  margin: 10px 0 0;
  padding: 13px;
  overflow-x: auto;
  color: #d8eaff;
  background: rgba(7, 18, 37, 0.82);
  border: 1px solid rgba(104, 166, 255, 0.18);
  border-radius: var(--radius-lg);
  line-height: 1.58;
}

.code-block code {
  font-size: 0.78rem;
}

#cardInput,
#singleEmail,
#singlePassword,
#singleTwoFactor,
#queryCardInput {
  width: 100%;
  height: 53px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 0.9rem;
}

#submitBtn {
  width: 100%;
  min-height: 53px;
  font-size: 0.92rem;
}

#paymentsGuideBtn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

@media (max-width: 900px) {
  .page-shell,
  .page-shell.narrow {
    width: min(100% - 14px, 100%);
  }

  .hero-head,
  .section-title-row,
  .result-head,
  .query-row,
  .quota-row {
    align-items: stretch;
    flex-direction: column;
  }

  .preflight-grid,
  .note-grid,
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-sidebar {
    position: static;
  }

  .query-btn {
    width: 100%;
  }
}
