/* =========================================================
   sheeridVerify · Tech / Cyber dark theme
   ========================================================= */
:root {
  --font: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "SF Mono", ui-monospace, Consolas, monospace;

  --bg: #05070d;
  --surface: #0b1120;
  --surface-2: #0f1830;
  --surface-3: #131f3b;
  --line: rgba(120, 160, 255, .14);
  --line-strong: rgba(120, 190, 255, .28);
  --text: #e6edff;
  --text-soft: #94a3c4;
  --text-mute: #5f6f93;

  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --green: #34f5b0;
  --amber: #fbbf24;
  --red: #ff5c7a;

  --grad: linear-gradient(120deg, #22d3ee 0%, #3b82f6 50%, #8b5cf6 100%);
  --glow-cyan: 0 0 0 1px rgba(34, 211, 238, .5), 0 0 24px -2px rgba(34, 211, 238, .45);
  --radius: 16px;
  --radius-sm: 10px;

  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  font-synthesis: none;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box }
html { scroll-behavior: smooth }
body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(59, 130, 246, .22), transparent 65%),
    radial-gradient(800px 500px at 92% 0%, rgba(139, 92, 246, .2), transparent 65%),
    radial-gradient(700px 480px at 50% 112%, rgba(34, 211, 238, .12), transparent 65%),
    var(--bg);
  background-attachment: fixed;
}
/* tech grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 170, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 30%, transparent 85%);
}
header, main { position: relative; z-index: 1 }
p { line-height: 1.7 }
[hidden] { display: none !important }
::selection { background: rgba(34, 211, 238, .35); color: #fff }

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(28px, calc((100vw - 1200px) / 2));
  background: rgba(5, 8, 16, .66);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
  opacity: .55;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}
.brand::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background:
    linear-gradient(#05070d, #05070d) padding-box,
    var(--grad) border-box;
  border: 2px solid transparent;
  box-shadow: 0 0 18px rgba(34, 211, 238, .55), inset 0 0 10px rgba(139, 92, 246, .5);
}
.brand span {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--text-soft);
  border-left: 1px solid var(--line-strong);
  padding-left: 14px;
}

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .3px;
  color: var(--text-soft);
  background: rgba(120, 160, 255, .07);
  border: 1px solid var(--line-strong);
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .2s, background .2s, border-color .2s, box-shadow .2s;
}
.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
#connection[data-state="ok"],
#job-state[data-state="completed"] { color: var(--green); background: rgba(52, 245, 176, .08); border-color: rgba(52, 245, 176, .4) }
#connection[data-state="ok"]::before { animation: blink 2s ease-in-out infinite }
#connection[data-state="error"],
#job-state[data-state="failed"] { color: var(--red); background: rgba(255, 92, 122, .08); border-color: rgba(255, 92, 122, .4) }
#connection[data-state="auth"],
#job-state[data-state="cancelling"],
#job-state[data-state="cancelled"] { color: var(--amber); background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .4) }
#job-state[data-state="running"] { color: var(--cyan); background: rgba(34, 211, 238, .09); border-color: rgba(34, 211, 238, .45); box-shadow: 0 0 18px -4px rgba(34, 211, 238, .6) }
#job-state[data-state="running"]::before { animation: blink 1s ease-in-out infinite }
#job-state[data-state="queued"] { color: var(--blue); background: rgba(59, 130, 246, .09); border-color: rgba(59, 130, 246, .4) }
@keyframes blink { 50% { opacity: .3 } }

/* ---------- Layout ---------- */
main { max-width: 1264px; margin: auto; padding: 52px 32px 28px }
.intro { margin-bottom: 36px }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--cyan);
  background: rgba(34, 211, 238, .08);
  border: 1px solid rgba(34, 211, 238, .3);
  padding: 5px 12px;
  border-radius: 6px;
}
.eyebrow::before { content: "//"; opacity: .6 }
h1 {
  font-size: 44px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin: 18px 0 10px;
  background: linear-gradient(100deg, #fff 0%, #a5d8ff 40%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(96, 165, 250, .35));
}
.intro p { color: var(--text-soft); margin: 0; font-size: 15px }
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, 1fr);
  gap: 28px;
  align-items: start;
}
fieldset { border: 0; padding: 0; margin: 0; min-width: 0 }
fieldset:disabled { opacity: .6 }

/* ---------- Card (gradient border + corner glow) ---------- */
.card {
  position: relative;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 18px;
  background:
    radial-gradient(420px 160px at 100% 0%, rgba(139, 92, 246, .13), transparent 70%) padding-box,
    radial-gradient(420px 160px at 0% 0%, rgba(34, 211, 238, .1), transparent 70%) padding-box,
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(145deg, rgba(34, 211, 238, .55), rgba(120, 160, 255, .08) 38%, rgba(120, 160, 255, .08) 62%, rgba(139, 92, 246, .55)) border-box;
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .9), 0 0 40px -18px rgba(59, 130, 246, .35);
  transition: box-shadow .3s;
}
.card:hover { box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .9), 0 0 54px -14px rgba(34, 211, 238, .38) }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 26px }
h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
  margin: 0;
}
h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--grad);
  box-shadow: 0 0 12px var(--cyan);
  transform: rotate(45deg);
}
.section-title .small { margin-left: auto; padding: 7px 14px; font-size: 12px }

/* ---------- Form ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px }
label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-soft);
  margin-bottom: 20px;
  min-width: 0;
  transition: color .2s;
}
label:focus-within { color: var(--cyan) }
input, select, button { font: inherit }
input:not([type=checkbox]), select {
  width: 100%;
  height: 46px;
  min-width: 0;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  background: rgba(5, 9, 20, .75);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:not([type=checkbox]):hover, select:hover { border-color: rgba(34, 211, 238, .5) }
input::placeholder { color: var(--text-mute); font-size: 13px }
input:focus, select:focus {
  outline: none;
  background: rgba(8, 16, 36, .95);
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .16), 0 0 22px -4px rgba(34, 211, 238, .5);
}
input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 100px #0a1226 inset;
}
input:user-invalid { border-color: var(--red) }
input:disabled { cursor: not-allowed; opacity: .7 }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px }

.hint { color: var(--text-mute); font-size: 12px; font-weight: 400; line-height: 1.7; margin: 0 0 16px }
label .hint { margin: 0 }
.check { flex-direction: row; align-items: center; font-size: 12px; font-weight: 400; gap: 9px; line-height: 1.6 }
.check input { accent-color: var(--cyan); width: 16px; height: 16px; flex-shrink: 0 }
.checks { display: flex; flex-wrap: wrap; gap: 0 22px }
.file-box { border: 1px dashed var(--line-strong); background: rgba(5, 9, 20, .5); border-radius: var(--radius-sm); padding: 18px }
.file-box input { border: 0; padding: 8px 0; height: auto; background: none }
summary { cursor: pointer; font-weight: 600; font-size: 13px }
summary span { float: right; color: var(--text-mute); font-size: 11px; font-weight: 400 }
.details-body { padding-top: 22px }

/* ---------- Buttons ---------- */
.actions { display: flex; gap: 12px }
button {
  position: relative;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .6px;
  overflow: hidden;
  transition: transform .12s, box-shadow .25s, background .25s, border-color .25s, color .25s, filter .25s;
}
button:active:not(:disabled) { transform: translateY(1px) scale(.99) }
button:disabled { opacity: .4; cursor: not-allowed; filter: saturate(.5) }
.primary {
  flex: 1;
  color: #04101c;
  font-weight: 700;
  background: var(--grad);
  box-shadow: 0 8px 28px -8px rgba(59, 130, 246, .8), 0 0 0 1px rgba(255, 255, 255, .12) inset;
}
.primary::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  transition: left .6s;
}
.primary:hover:not(:disabled) { box-shadow: 0 10px 34px -6px rgba(34, 211, 238, .75), 0 0 0 1px rgba(255, 255, 255, .25) inset }
.primary:hover:not(:disabled)::after { left: 130% }
.secondary { color: var(--text-soft); background: rgba(120, 160, 255, .06); border-color: var(--line-strong) }
.secondary:hover:not(:disabled) { color: var(--cyan); border-color: var(--cyan); background: rgba(34, 211, 238, .08); box-shadow: 0 0 20px -6px rgba(34, 211, 238, .6) }

.privacy { font-family: var(--mono); font-size: 11px; color: var(--text-mute); text-align: center; margin: 18px 0 }
.error {
  color: var(--red);
  background: rgba(255, 92, 122, .08);
  border: 1px solid rgba(255, 92, 122, .4);
  border-left-width: 3px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin: 0 0 14px;
}

/* ---------- Progress ---------- */
.progress { position: sticky; top: 92px }
.progress-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px }
.status-box {
  background: rgba(5, 9, 20, .6);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.status-box h3 { font-size: 23px; letter-spacing: -.5px; margin: 10px 0 }
.status-box p { font-size: 13px; color: var(--text-soft); margin: 0 }
.status-box #result-detail { font-size: 11px; margin-top: 12px; white-space: pre-line }

#queue-summary {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  background: rgba(34, 211, 238, .07);
  border: 1px solid rgba(34, 211, 238, .25);
  padding: 5px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}
#jobs { list-style: none; padding: 0; margin: 0 0 14px; max-height: 232px; overflow: auto; scrollbar-width: thin }
#jobs li { margin: 8px 0 }
#jobs button {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  color: var(--text);
  background: rgba(120, 160, 255, .05);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 11px 14px;
}
#jobs button:hover { border-color: rgba(34, 211, 238, .5); background: rgba(34, 211, 238, .06) }
#jobs button[aria-pressed=true] {
  background: linear-gradient(90deg, rgba(34, 211, 238, .14), rgba(139, 92, 246, .08));
  border-color: rgba(34, 211, 238, .6);
  box-shadow: 0 0 22px -8px rgba(34, 211, 238, .7), inset 3px 0 0 var(--cyan);
}
#jobs button span:first-child { font-family: var(--mono); overflow-wrap: anywhere }
#jobs button span:last-child { color: var(--text-soft); font-size: 11px; white-space: nowrap }
#selected-job { font-family: var(--mono); font-size: 11px; color: var(--text-mute); overflow-wrap: anywhere; margin: 0 0 14px }
#selected-job:empty { display: none }

.task-actions { display: grid; gap: 8px }
.cancel { width: 100%; font-size: 13px; padding: 11px 16px }
#cancel:hover:not(:disabled),
#delete:hover:not(:disabled) { color: var(--red); border-color: var(--red); background: rgba(255, 92, 122, .08); box-shadow: 0 0 20px -6px rgba(255, 92, 122, .6) }
#resume { color: var(--green); border-color: rgba(52, 245, 176, .45) }
#resume:hover:not(:disabled) { color: var(--green); border-color: var(--green); background: rgba(52, 245, 176, .08); box-shadow: 0 0 20px -6px rgba(52, 245, 176, .6) }

/* ---------- Activity log (terminal) ---------- */
.log-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px dashed var(--line-strong);
}
.log-heading h3 { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 2px; color: var(--text-soft); margin: 0 }
.log-heading h3::before { content: "$ "; color: var(--cyan) }
.log-heading span { font-family: var(--mono); font-size: 11px; color: var(--cyan); background: rgba(34, 211, 238, .08); padding: 3px 10px; border-radius: 6px }
#logs {
  padding: 8px 14px;
  list-style: none;
  max-height: 360px;
  overflow: auto;
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 12.5px;
  background: #03060d;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: inset 0 0 30px rgba(34, 211, 238, .05);
  scrollbar-width: thin;
}
#logs li {
  position: relative;
  padding: 9px 0 9px 18px;
  line-height: 1.6;
  color: var(--text);
  overflow-wrap: anywhere;
  border: 0;
  border-bottom: 1px solid rgba(120, 160, 255, .07);
}
#logs li:last-child { border-bottom: 0 }
#logs li:not(.empty)::before { content: ">"; position: absolute; left: 0; color: var(--cyan); text-shadow: 0 0 8px var(--cyan) }
#logs time { font-size: 11px; color: var(--text-mute); display: block; font-variant-numeric: tabular-nums }
#logs .empty { color: var(--text-mute); padding: 30px 0; text-align: center }
#logs .empty::before { content: none }

/* ---------- Footer ---------- */
footer {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  color: var(--text-mute);
  font-size: 11px;
  letter-spacing: 1.5px;
  border-top: 1px solid var(--line);
  margin-top: 34px;
  padding-top: 22px;
}

/* ---------- Scrollbar ---------- */
#jobs::-webkit-scrollbar, #logs::-webkit-scrollbar { width: 6px }
#jobs::-webkit-scrollbar-thumb, #logs::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .intro, .card, .privacy { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both }
  .progress { animation-delay: .1s }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) } }

/* ---------- Responsive ---------- */
@media (max-width: 850px) {
  .workspace { grid-template-columns: 1fr }
  .progress { position: static }
  header { padding: 0 22px }
  main { padding: 34px 20px }
  .intro { margin-bottom: 26px }
  h1 { font-size: 36px }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr }
  .card { padding: 20px }
  h1 { font-size: 29px }
  .brand { font-size: 18px; gap: 8px }
  .brand::before { width: 20px; height: 20px; flex-shrink: 0 }
  .brand span { display: none }
  summary span { display: none }
  .actions { flex-direction: column }
  footer { flex-direction: column; gap: 6px }
}
@media (max-width: 360px) {
  .brand { font-size: 16px; gap: 6px }
  .brand::before { width: 18px; height: 18px }
}
