/* =========================================================
   sheeridVerify · Cyber Dark Compact 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, 0.12);
  --line-strong: rgba(120, 190, 255, 0.24);
  --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%);
  --radius: 14px;
  --radius-sm: 8px;

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

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}
body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(800px 420px at 12% -10%, rgba(59, 130, 246, 0.18), transparent 65%),
    radial-gradient(700px 400px at 92% 0%, rgba(139, 92, 246, 0.16), transparent 65%),
    radial-gradient(600px 380px at 50% 112%, rgba(34, 211, 238, 0.1), transparent 65%), var(--bg);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 170, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  -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%);
}
p {
  line-height: 1.6;
}
[hidden] {
  display: none !important;
}
::selection {
  background: rgba(34, 211, 238, 0.35);
  color: #fff;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, calc((100vw - 1200px) / 2));
  background: rgba(5, 8, 16, 0.82);
  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: 0.5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
}
.brand::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background:
    linear-gradient(#05070d, #05070d) padding-box,
    var(--grad) border-box;
  border: 2px solid transparent;
  box-shadow:
    0 0 14px rgba(34, 211, 238, 0.5),
    inset 0 0 8px rgba(139, 92, 246, 0.4);
}
.brand span {
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--text-soft);
  border-left: 1px solid var(--line-strong);
  padding-left: 10px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-soft);
  background: rgba(120, 160, 255, 0.08);
  border: 1px solid var(--line-strong);
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}
.header-btn:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.3);
}

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--text-soft);
  background: rgba(120, 160, 255, 0.07);
  border: 1px solid var(--line-strong);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  cursor: pointer;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
#connection[data-state="ok"],
#job-state[data-state="completed"] {
  color: var(--green);
  background: rgba(52, 245, 176, 0.08);
  border-color: rgba(52, 245, 176, 0.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, 0.08);
  border-color: rgba(255, 92, 122, 0.4);
}
#connection[data-state="auth"],
#job-state[data-state="cancelling"],
#job-state[data-state="cancelled"] {
  color: var(--amber);
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.4);
}
#job-state[data-state="running"] {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.09);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 16px -4px rgba(34, 211, 238, 0.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, 0.09);
  border-color: rgba(59, 130, 246, 0.4);
}
@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

/* ---------- Layout ---------- */
main {
  position: relative;
  max-width: 1200px;
  margin: auto;
  padding: 22px 20px 24px;
}
.intro {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.intro-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
}
.eyebrow::before {
  content: "//";
  opacity: 0.6;
}
h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0;
  background: linear-gradient(100deg, #fff 0%, #a5d8ff 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.intro p {
  color: var(--text-mute);
  margin: 0;
  font-size: 12.5px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
fieldset:disabled {
  opacity: 0.6;
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
  background:
    radial-gradient(420px 160px at 100% 0%, rgba(139, 92, 246, 0.09), transparent 70%) padding-box,
    radial-gradient(420px 160px at 0% 0%, rgba(34, 211, 238, 0.07), transparent 70%) padding-box,
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(
        145deg,
        rgba(34, 211, 238, 0.45),
        rgba(120, 160, 255, 0.08) 38%,
        rgba(120, 160, 255, 0.08) 62%,
        rgba(139, 92, 246, 0.45)
      )
      border-box;
  box-shadow:
    0 14px 40px -18px rgba(0, 0, 0, 0.8),
    0 0 28px -14px rgba(59, 130, 246, 0.25);
  transition: box-shadow 0.25s;
}
.card:hover {
  box-shadow:
    0 16px 45px -16px rgba(0, 0, 0, 0.85),
    0 0 34px -10px rgba(34, 211, 238, 0.3);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 0;
}
h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 10px var(--cyan);
  transform: rotate(45deg);
}
.section-title .small {
  margin-left: auto;
  padding: 5px 12px;
  font-size: 11.5px;
  border-radius: 6px;
}

/* ---------- Form Fields ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  margin-bottom: 12px;
  min-width: 0;
  transition: color 0.2s;
}
label:focus-within {
  color: var(--cyan);
}
input,
select,
button {
  font: inherit;
}
input:not([type="checkbox"]):not([type="radio"]),
select {
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  background: rgba(5, 9, 20, 0.75);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}
input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover {
  border-color: rgba(34, 211, 238, 0.5);
}
input::placeholder {
  color: var(--text-mute);
  font-size: 12.5px;
}
input:focus,
select:focus {
  outline: none;
  background: rgba(8, 16, 36, 0.95);
  border-color: var(--cyan);
  box-shadow:
    0 0 0 2px rgba(34, 211, 238, 0.15),
    0 0 16px -4px rgba(34, 211, 238, 0.45);
}
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: 0.7;
}
input[type="date"] {
  color-scheme: dark;
  font-family: var(--mono);
  letter-spacing: 0.5px;
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8) sepia(100%) saturate(300%) hue-rotate(140deg);
  cursor: pointer;
  opacity: 0.8;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  background: rgba(34, 211, 238, 0.15);
  filter: drop-shadow(0 0 6px var(--cyan));
  transform: scale(1.1);
}
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.field-hint {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-mute);
  margin-top: 3px;
  line-height: 1.4;
  transition: color 0.2s;
}
.field-hint.valid {
  color: #34f5b0;
}
.field-hint.invalid {
  color: #ff5c7a;
}

.hint {
  color: var(--text-mute);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 10px;
}
label .hint {
  margin: 0;
}

/* ---------- Buttons ---------- */
.actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
button {
  position: relative;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.4px;
  overflow: hidden;
  transition:
    transform 0.12s,
    box-shadow 0.2s,
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}
button:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: saturate(0.5);
}
.primary {
  flex: 1;
  color: #04101c;
  font-weight: 700;
  background: var(--grad);
  box-shadow:
    0 6px 22px -6px rgba(59, 130, 246, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.primary:hover:not(:disabled) {
  box-shadow:
    0 8px 28px -4px rgba(34, 211, 238, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}
.secondary {
  color: var(--text-soft);
  background: rgba(120, 160, 255, 0.06);
  border-color: var(--line-strong);
}
.secondary:hover:not(:disabled) {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  box-shadow: 0 0 16px -4px rgba(34, 211, 238, 0.5);
}

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

/* ---------- Progress Sidebar ---------- */
.progress {
  position: sticky;
  top: 70px;
}
.progress-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
#jobs {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
}
#jobs li {
  margin: 0;
}
#jobs button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  background: rgba(120, 160, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text);
  transition: all 0.2s;
}
#jobs button:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.05);
}
#jobs button[aria-pressed="true"] {
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.08);
  box-shadow:
    0 0 16px -6px rgba(34, 211, 238, 0.6),
    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 10px;
}
#selected-job:empty {
  display: none;
}

.task-error-box {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 92, 122, 0.1);
  border: 1px solid rgba(255, 92, 122, 0.35);
  color: #ff8ca3;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.task-actions {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
}
.cancel {
  width: 100%;
  font-size: 12px;
  padding: 9px 14px;
}
#cancel:hover:not(:disabled),
#delete:hover:not(:disabled) {
  color: var(--red);
  border-color: var(--red);
  background: rgba(255, 92, 122, 0.08);
  box-shadow: 0 0 16px -6px rgba(255, 92, 122, 0.6);
}
#resume {
  color: var(--green);
  border-color: rgba(52, 245, 176, 0.45);
}
#resume:hover:not(:disabled) {
  color: var(--green);
  border-color: var(--green);
  background: rgba(52, 245, 176, 0.08);
  box-shadow: 0 0 16px -6px rgba(52, 245, 176, 0.6);
}

/* ---------- Activity log (terminal) ---------- */
.log-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.log-heading h3 {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-soft);
  margin: 0;
}
.log-heading h3::before {
  content: "$ ";
  color: var(--cyan);
}
#log-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
}
#logs {
  list-style: none;
  padding: 10px 12px;
  margin: 8px 0 0;
  max-height: 280px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  background: rgba(3, 7, 18, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}
#logs li {
  padding: 4px 0;
  display: flex;
  gap: 8px;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  word-break: break-word;
}
#logs li:last-child {
  border-bottom: 0;
}
#logs li.empty {
  color: var(--text-mute);
  font-style: italic;
  border: 0;
}
#logs li::before {
  content: ">";
  color: var(--cyan);
  flex-shrink: 0;
  opacity: 0.8;
}
#logs time {
  color: var(--text-mute);
  font-size: 10.5px;
  flex-shrink: 0;
}
#logs::-webkit-scrollbar,
#jobs::-webkit-scrollbar {
  width: 4px;
}
#logs::-webkit-scrollbar-thumb,
#jobs::-webkit-scrollbar-thumb {
  background: rgba(120, 160, 255, 0.25);
  border-radius: 4px;
}

/* ---------- Document Generation & Modal ---------- */
select {
  width: 100%;
  height: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(5, 9, 20, 0.85)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 24 24' stroke='%2322d3ee' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E")
    no-repeat right 12px center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 8px 36px 8px 12px;
  outline: 0;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;
}
select:hover {
  border-color: rgba(34, 211, 238, 0.5);
  background-color: rgba(8, 16, 36, 0.95);
}
select:focus {
  border-color: var(--cyan);
  box-shadow:
    0 0 0 2px rgba(34, 211, 238, 0.15),
    0 0 16px -4px rgba(34, 211, 238, 0.45);
}
select option {
  background: #090e1f;
  color: #f1f5f9;
  padding: 10px 14px;
  font-size: 13px;
}
.field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.doc-options {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(6, 11, 24, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  margin: 0;
}
.radio-label:hover {
  background: rgba(12, 20, 40, 0.75);
  border-color: rgba(34, 211, 238, 0.35);
}
.radio-label:has(input[type="radio"]:checked) {
  background: rgba(34, 211, 238, 0.06);
  border-color: var(--cyan);
  box-shadow: 0 0 14px -4px rgba(34, 211, 238, 0.3);
}
.radio-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: rgba(5, 9, 20, 0.9);
  display: grid;
  place-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
}
.radio-label input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.18s ease-in-out;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}
.radio-label input[type="radio"]:checked {
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.45);
}
.radio-label input[type="radio"]:checked::before {
  transform: scale(1);
}
.radio-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.radio-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.radio-desc {
  font-size: 11px;
  color: var(--text-mute);
  line-height: 1.35;
}
.radio-label:has(input[type="radio"]:checked) .radio-title {
  color: #fff;
}
.upload-box {
  margin: 4px 0 6px;
  padding: 0;
  border: none;
  background: none;
}
.upload-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(5, 10, 22, 0.7);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.06);
  box-shadow: 0 0 16px -6px rgba(34, 211, 238, 0.35);
}
.upload-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.4));
}
.upload-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.upload-main-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cyan);
}
.upload-sub-text {
  font-size: 11px;
  color: var(--text-mute);
}
.upload-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-chosen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: var(--radius-sm);
}
.file-name-tag {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--cyan);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.remove-file-btn {
  background: none;
  border: none;
  color: var(--text-mute);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: all 0.2s;
}
.remove-file-btn:hover {
  color: var(--red);
  background: rgba(255, 92, 122, 0.15);
}

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop[hidden] {
  display: none;
}
.modal-card {
  background: #0b1120;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  width: 100%;
  max-width: 900px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 25px 60px -15px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.modal-card-sm {
  max-width: 440px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-header h2 {
  font-size: 15px;
  margin: 0;
  color: var(--text);
  letter-spacing: 0.3px;
}
.modal-actions {
  display: flex;
  gap: 8px;
}
.modal-body {
  padding: 16px;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #181d24;
}
.modal-body .transcript-sheet {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transform-origin: top center;
}

/* Password Modal specific */
.modal-body-form {
  padding: 18px 20px 22px;
}
.modal-hint {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0 0 14px;
}
.modal-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.pwd-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.pwd-input-wrap input {
  padding-right: 42px;
}
.toggle-pwd-btn {
  position: absolute;
  right: 6px;
  height: 30px;
  width: 30px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--text-soft);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition:
    color 0.2s,
    background 0.2s;
}
.toggle-pwd-btn:hover {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}
.modal-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.modal-actions-row button {
  flex: 1;
  padding: 9px 12px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
}

/* ---------- Responsive Layout (Mobile / Tablet / Desktop) ---------- */
@media (max-width: 900px) {
  main {
    padding: 16px 14px 20px;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .progress {
    position: static;
  }
}

@media (max-width: 600px), (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]),
  select {
    /* iOS may zoom the viewport when focusing a smaller form control. */
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  header {
    height: 50px;
    padding: 0 12px;
  }
  .brand {
    font-size: 16px;
    gap: 8px;
  }
  .brand span {
    display: none;
  }
  .header-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
  .badge {
    padding: 4px 9px;
    font-size: 11px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 14px 14px;
  }
  .actions {
    flex-direction: column;
  }
  .actions button {
    width: 100%;
  }
  .modal-actions-row {
    flex-direction: column;
  }
  footer {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}
