:root {
  --bg: #0b0d10;
  --panel: #12161b;
  --panel-raised: #171c22;
  --line: #29313a;
  --line-soft: #20272f;
  --text: #f5f7f9;
  --muted: #96a1ad;
  --mint: #75f5c5;
  --mint-deep: #173c32;
  --amber: #ffc668;
  --blue: #8ebcff;
  --danger: #ff7d7d;
  --radius: 18px;
  --shadow: 0 24px 70px rgb(0 0 0 / 28%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 2%) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgb(255 255 255 / 2%) 1px, transparent 1px) 0 0 / 72px 72px,
    radial-gradient(circle at 72% 8%, rgb(117 245 197 / 10%), transparent 30%),
    var(--bg);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}

.page-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgb(13 17 21 / 82%);
}

.page-nav-button {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.page-nav-button.active {
  color: var(--text);
  background: var(--panel-raised);
  box-shadow: 0 2px 8px rgb(0 0 0 / 24%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--mint);
  border-radius: 11px;
  color: var(--mint);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 800;
  box-shadow: inset 0 0 22px rgb(117 245 197 / 8%);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 14px;
  letter-spacing: 0.02em;
}

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

.service-state {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 5px rgb(255 198 104 / 10%);
}

.service-state.ready .pulse {
  background: var(--mint);
  box-shadow: 0 0 0 5px rgb(117 245 197 / 10%);
}

.service-state.error .pulse {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgb(255 125 125 / 10%);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 58px;
  align-items: end;
  padding: 56px 0 42px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--mint);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 17px;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 680;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.intro-copy {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.flow {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.flow li {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: #d8dde2;
  font-size: 13px;
}

.flow span {
  color: var(--mint);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
}

.auth-card,
.result-card {
  min-height: 650px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(18 22 27 / 92%);
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 30px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

h2 {
  margin-bottom: 0;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.local-chip,
.format-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgb(117 245 197 / 25%);
  border-radius: 999px;
  color: var(--mint);
  background: var(--mint-deep);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.access-key-wrap {
  margin: -7px 0 24px;
  padding: 16px;
  border: 1px solid rgb(255 198 104 / 24%);
  border-radius: 12px;
  background: rgb(75 54 24 / 18%);
}

.access-key-wrap .field {
  margin-bottom: 0;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 25px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0d1115;
}

.mode-button {
  height: 38px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.mode-button.active {
  color: var(--text);
  background: var(--panel-raised);
  box-shadow: 0 2px 10px rgb(0 0 0 / 22%);
}

.field {
  display: grid;
  gap: 9px;
  margin-bottom: 20px;
  color: #dce1e6;
  font-size: 13px;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: #0d1115;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input {
  height: 50px;
}

.field select {
  height: 50px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 22px,
    calc(100% - 13px) 22px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.field textarea {
  min-height: 246px;
  padding-top: 13px;
  padding-bottom: 13px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #68737e;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgb(117 245 197 / 10%);
}

.field input:disabled,
.field textarea:disabled,
.field select:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.field-line,
.batch-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-line span:last-child {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
}

.field-line span[data-over="true"] {
  color: var(--danger);
}

.batch-help {
  margin-top: -9px;
  color: #6f7a85;
  font-size: 10px;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 68px;
}

.reveal {
  position: absolute;
  top: 50%;
  right: 9px;
  padding: 6px 7px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  transform: translateY(-50%);
}

.primary-action {
  display: flex;
  width: 100%;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  margin-top: 29px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  color: #062219;
  background: var(--mint);
  font-weight: 800;
  transition: transform 150ms ease, filter 150ms ease;
}

.primary-action:not(:disabled):hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.primary-action:disabled {
  color: #728078;
  background: #28312e;
}

.form-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-note[data-kind="error"] {
  color: var(--danger);
}

.form-note[data-kind="success"] {
  color: var(--mint);
}

.result-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.result-empty {
  flex: 1;
  padding: 34px;
  background:
    radial-gradient(circle at 78% 18%, rgb(117 245 197 / 8%), transparent 35%),
    var(--panel);
}

.result-live {
  display: flex;
  min-height: 390px;
  flex: 1;
  flex-direction: column;
  padding: 30px 30px 8px;
  background:
    radial-gradient(circle at 78% 10%, rgb(117 245 197 / 7%), transparent 32%),
    var(--panel);
}

.result-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.clear-button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: #11161a;
  font-size: 11px;
}

.clear-button:hover {
  border-color: #48535f;
  color: var(--text);
}

.progress-track {
  height: 5px;
  margin: 25px 0 15px;
  overflow: hidden;
  border-radius: 999px;
  background: #242b32;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
  transition: width 250ms ease;
}

.summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 19px;
  color: var(--muted);
  font-size: 11px;
}

.summary-stats strong {
  margin-right: 4px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.job-list {
  display: grid;
  max-height: 330px;
  gap: 8px;
  padding: 1px 3px 22px 0;
  overflow-y: auto;
  scrollbar-color: #3b4650 transparent;
}

.job-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 11px 14px;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgb(11 14 17 / 76%);
}

.job-main {
  min-width: 0;
}

.job-email {
  display: block;
  overflow: hidden;
  color: #e7ebee;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-detail {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.job-status {
  display: inline-flex;
  height: 23px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.job-status.succeeded {
  border-color: rgb(117 245 197 / 28%);
  color: var(--mint);
  background: rgb(23 60 50 / 45%);
}

.job-status.failed {
  border-color: rgb(255 125 125 / 28%);
  color: var(--danger);
  background: rgb(80 29 29 / 28%);
}

.job-status.running {
  border-color: rgb(255 198 104 / 28%);
  color: var(--amber);
  background: rgb(75 54 24 / 28%);
}

.job-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 7px;
}

.job-actions button {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #cbd2d8;
  background: #161b20;
  font-size: 10px;
}

.job-actions button:hover {
  border-color: var(--mint);
  color: var(--mint);
}

.result-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 62px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--mint);
  font-size: 23px;
}

.result-empty p:last-child {
  max-width: 420px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

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

.export-grid article {
  padding: 23px;
}

.export-grid article + article {
  border-left: 1px solid var(--line);
}

.format-tag {
  min-height: 22px;
  margin-bottom: 16px;
  padding: 0 8px;
}

.format-tag.amber {
  border-color: rgb(255 198 104 / 25%);
  color: var(--amber);
  background: rgb(75 54 24 / 45%);
}

.format-tag.blue {
  border-color: rgb(142 188 255 / 25%);
  color: var(--blue);
  background: rgb(33 53 80 / 45%);
}

.export-grid h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.export-grid p {
  min-height: 54px;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.export-grid button {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #7d8791;
  background: #13181d;
  font-size: 12px;
}

.export-grid button:not(:disabled) {
  border-color: rgb(117 245 197 / 26%);
  color: var(--mint);
  background: rgb(23 60 50 / 35%);
}

.export-grid article:nth-child(2) button:not(:disabled) {
  border-color: rgb(255 198 104 / 26%);
  color: var(--amber);
  background: rgb(75 54 24 / 32%);
}

.export-grid article:last-child button:not(:disabled) {
  border-color: rgb(142 188 255 / 28%);
  color: var(--blue);
  background: rgb(33 53 80 / 35%);
}

.export-grid button:not(:disabled):hover {
  filter: brightness(1.13);
}

.integration-section {
  margin-top: 18px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(18 22 27 / 88%);
  box-shadow: var(--shadow);
}

.integration-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
}

.integration-heading > p {
  max-width: 460px;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

.integration-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: start;
}

.integration-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: #0f1317;
}

.integration-card[open] {
  border-color: #35414b;
}

.integration-card summary {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 19px;
  cursor: pointer;
  list-style: none;
}

.integration-card summary::-webkit-details-marker {
  display: none;
}

.integration-card summary strong,
.integration-card summary small {
  display: block;
}

.integration-card summary strong {
  color: #e9edf1;
  font-size: 14px;
}

.integration-card summary small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.integration-card summary small[data-kind="success"] {
  color: var(--mint);
}

.integration-card summary small[data-kind="error"] {
  color: var(--danger);
}

.optional-chip {
  flex: none;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.integration-body {
  padding: 21px 19px 20px;
  border-top: 1px solid var(--line-soft);
}

.integration-body .field {
  margin-bottom: 15px;
}

.integration-body .field textarea {
  min-height: 118px;
}

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

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

.compact-settings {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.compact-settings .wide-field {
  grid-column: 1 / -1;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 17px;
}

.secondary-action {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #cbd2d8;
  background: #161b20;
  font-size: 11px;
  font-weight: 700;
}

.secondary-action:not(:disabled):hover {
  border-color: var(--mint);
  color: var(--mint);
}

.secondary-action:disabled {
  color: #5f6871;
}

.proxy-create-box {
  margin-top: 5px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgb(23 28 34 / 62%);
}

.proxy-pool-box {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgb(23 28 34 / 62%);
}

.proxy-pool-box .field {
  margin-bottom: 11px;
}

.proxy-pool-preview {
  padding: 11px 12px;
  border: 1px solid #29323a;
  border-radius: 9px;
  color: #aeb8c0;
  background: #0d1115;
  font-size: 10px;
  line-height: 1.55;
}

.proxy-pool-preview[data-kind="error"] {
  border-color: rgb(255 119 119 / 42%);
  color: var(--danger);
}

.proxy-pool-distribution {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.proxy-pool-distribution.hidden {
  display: none;
}

.proxy-slot-chip {
  padding: 4px 7px;
  border: 1px solid #303b44;
  border-radius: 999px;
  color: #cbd3d9;
  background: #161c21;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
}

.proxy-slot-chip.muted {
  color: var(--muted);
}

.micro-copy.proxy-mode-hint {
  margin-top: 11px;
  margin-bottom: 0;
}

.proxy-mode-hint[data-kind="active"] {
  color: var(--mint);
}

.proxy-mode-hint[data-kind="error"] {
  color: var(--danger);
}

.mini-heading {
  margin-bottom: 14px;
  color: #d9dfe4;
  font-size: 12px;
  font-weight: 700;
}

.check-grid {
  display: grid;
  gap: 10px;
  margin-top: 3px;
  color: #c6cdd3;
  font-size: 11px;
}

.check-grid label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}

.check-grid input {
  margin-top: 1px;
  accent-color: var(--mint);
}

.security-copy,
.micro-copy {
  margin: 3px 0 0;
  color: #77828d;
  font-size: 10px;
  line-height: 1.65;
}

.micro-copy {
  margin-top: -8px;
  margin-bottom: 17px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.records-section {
  padding: 52px 0 4px;
}

.records-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 28px;
}

.records-heading h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 5vw, 54px);
}

.records-refresh {
  flex: none;
  margin-bottom: 5px;
}

.records-access-card,
.records-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(18 22 27 / 92%);
  box-shadow: var(--shadow);
}

.records-access-card {
  display: grid;
  grid-template-columns: minmax(260px, 440px) auto minmax(260px, 1fr);
  gap: 13px;
  align-items: end;
  margin-bottom: 18px;
  padding: 20px;
}

.records-key-field {
  margin: 0;
}

.records-key-stack {
  display: grid;
  gap: 13px;
}

.primary-action.records-load {
  width: auto;
  min-width: 140px;
  height: 50px;
  justify-content: center;
  margin: 0;
}

.records-notice {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.records-notice[data-kind="success"] {
  color: var(--mint);
}

.records-notice[data-kind="warning"] {
  color: var(--amber);
}

.records-notice[data-kind="error"] {
  color: var(--danger);
}

.records-content {
  overflow: hidden;
}

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

.record-stats article {
  min-width: 0;
  padding: 21px 22px;
}

.record-stats article + article {
  border-left: 1px solid var(--line-soft);
}

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

.record-stats span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}

.record-stats strong {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 25px;
}

.records-toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 160px 160px auto auto;
  gap: 8px;
  align-items: center;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: rgb(15 19 23 / 78%);
}

.records-toolbar input,
.records-toolbar select {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: #0d1115;
  font-size: 11px;
}

.records-toolbar input:focus,
.records-toolbar select:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgb(117 245 197 / 9%);
}

.records-page-size {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.records-page-size select {
  width: 70px;
}

.danger-action,
.table-delete {
  border: 1px solid rgb(255 125 125 / 25%);
  border-radius: 8px;
  color: var(--danger);
  background: rgb(80 29 29 / 20%);
  font-size: 10px;
}

.danger-action {
  height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.danger-action:disabled {
  opacity: 0.45;
}

.danger-action:not(:disabled):hover,
.table-delete:hover {
  border-color: var(--danger);
  background: rgb(80 29 29 / 34%);
}

.records-table-wrap {
  position: relative;
  overflow-x: auto;
}

.records-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  table-layout: fixed;
}

.records-table th,
.records-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.records-table th {
  color: #7f8a94;
  background: #101418;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.records-table td {
  color: #cdd4da;
  font-size: 11px;
}

.records-table th:nth-child(1) { width: 180px; }
.records-table th:nth-child(2) { width: 105px; }
.records-table th:nth-child(3) { width: 115px; }
.records-table th:nth-child(4) { width: 175px; }
.records-table th:nth-child(5),
.records-table th:nth-child(6) { width: 155px; }
.records-table th:nth-child(7) { width: 115px; }
.records-table th:nth-child(8) { width: 65px; }

.records-table tbody tr:hover {
  background: rgb(117 245 197 / 2.5%);
}

.record-account,
.record-proxy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.record-account strong {
  overflow: hidden;
  color: #edf1f4;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-account small,
.record-proxy small,
.record-proxy span,
.record-subline {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.record-proxy strong {
  overflow: hidden;
  color: #dfe5e9;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-proxy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-status {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #151a1f;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.record-status.succeeded,
.record-status.imported {
  border-color: rgb(117 245 197 / 28%);
  color: var(--mint);
  background: rgb(23 60 50 / 36%);
}

.record-status.failed,
.record-status.cancelled {
  border-color: rgb(255 125 125 / 28%);
  color: var(--danger);
  background: rgb(80 29 29 / 25%);
}

.record-status.running {
  border-color: rgb(255 198 104 / 28%);
  color: var(--amber);
  background: rgb(75 54 24 / 25%);
}

.record-subline {
  display: block;
  margin-top: 6px;
}

.record-secret {
  display: grid;
  gap: 7px;
}

.record-secret code {
  display: block;
  max-width: 135px;
  overflow: hidden;
  color: #dce3e8;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-secret code.revealed {
  max-height: 96px;
  overflow: auto;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.record-secret-actions {
  display: flex;
  gap: 5px;
}

.record-secret-actions button {
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #151a1f;
  font-size: 9px;
}

.record-secret-actions button:not(:disabled):hover {
  border-color: var(--amber);
  color: var(--amber);
}

.record-time {
  color: var(--muted) !important;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px !important;
  line-height: 1.5;
}

.record-time span,
.record-time small {
  display: block;
  white-space: nowrap;
}

.record-time small {
  margin-top: 4px;
  color: #68737e;
  font: inherit;
}

.table-delete {
  height: 28px;
  padding: 0 8px;
}

.records-empty {
  padding: 54px 24px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.records-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 17px;
}

.records-pagination span {
  min-width: 170px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.clipboard-fallback {
  position: fixed;
  top: -1000px;
  left: -1000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

footer {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding-top: 24px;
  color: #68737e;
  font-size: 11px;
}

footer span::before {
  margin-right: 7px;
  color: var(--mint);
  content: "·";
}

@media (max-width: 850px) {
  .intro,
  .workspace,
  .integration-grid {
    grid-template-columns: 1fr;
  }

  .intro {
    gap: 32px;
    padding-top: 42px;
  }

  .auth-card,
  .result-card {
    min-height: auto;
  }

  .result-empty {
    min-height: 270px;
  }

  .integration-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .integration-heading > p {
    text-align: left;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 13px;
  }

  .page-nav {
    order: 3;
    width: 100%;
  }

  .page-nav-button {
    flex: 1;
  }

  .records-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .records-access-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .records-notice {
    grid-column: 1 / -1;
  }

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

  .record-stats article:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }

  .record-stats article:nth-child(5) {
    border-top: 1px solid var(--line-soft);
  }

  .records-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(135px, auto);
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .brand small {
    display: none;
  }

  .service-state {
    max-width: 130px;
    text-align: right;
  }

  .intro {
    padding: 38px 0 30px;
  }

  h1 {
    font-size: 39px;
  }

  .auth-card,
  .result-empty {
    padding: 23px;
  }

  .result-live {
    padding: 23px 20px 6px;
  }

  .integration-section {
    padding: 22px;
  }

  .records-section {
    padding-top: 38px;
  }

  .records-heading h1 {
    font-size: 38px;
  }

  .records-access-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .records-notice {
    grid-column: auto;
  }

  .primary-action.records-load {
    width: 100%;
  }

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

  .record-stats article {
    padding: 17px;
  }

  .record-stats article:nth-child(3),
  .record-stats article:nth-child(5) {
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .record-stats article:nth-child(4) {
    border-top: 1px solid var(--line-soft);
    border-left: 1px solid var(--line-soft);
  }

  .records-toolbar {
    grid-template-columns: 1fr;
  }

  .records-page-size {
    justify-content: space-between;
  }

  .records-page-size select {
    width: 90px;
  }

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

  .settings-grid .wide-field,
  .compact-settings .wide-field {
    grid-column: auto;
  }

  .batch-help {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

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

  .job-status {
    width: fit-content;
  }

  .job-actions {
    flex-wrap: wrap;
  }

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

  .export-grid article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

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