:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #11151d;
  --panel-strong: #171c27;
  --border: #2a3140;
  --text: #f4f6fa;
  --muted: #96a0b3;
  --accent: #78a9ff;
  --accent-strong: #4e8df7;
  --error: #ff8787;
  --success: #55d6a0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(78, 141, 247, 0.13), transparent 34rem),
    var(--bg);
  color: var(--text);
}

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

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(17, 21, 29, 0.94);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.login-card {
  width: min(470px, 100%);
  margin: 10vh auto 0;
  padding: 36px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-strong);
  color: white;
  font-weight: 800;
  letter-spacing: -0.04em;
}

h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -0.04em; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.16em; }
label { display: block; margin-bottom: 8px; font-weight: 700; }

.password-row { display: flex; gap: 10px; }
input[type="password"] {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b0e14;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}
input[type="password"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(120, 169, 255, 0.15); }

.button, .password-row button {
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent-strong);
  padding: 11px 17px;
  font-weight: 750;
  cursor: pointer;
}
.button:hover, .password-row button:hover { filter: brightness(1.1); }
.button:disabled { cursor: not-allowed; opacity: 0.48; }
.button.secondary { border-color: var(--border); background: var(--panel-strong); }
.button.compact { padding: 7px 11px; font-size: 0.88rem; }

.app-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.app-header .muted { margin-bottom: 0; }
.work-card { padding: 24px; }

.drop-zone {
  display: flex;
  width: 100%;
  min-height: 270px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 1.5px dashed #465269;
  border-radius: 14px;
  background: rgba(120, 169, 255, 0.035);
  cursor: pointer;
  transition: border-color 120ms, background 120ms, transform 120ms;
}
.drop-zone:hover, .drop-zone.dragging {
  border-color: var(--accent);
  background: rgba(120, 169, 255, 0.1);
  transform: translateY(-1px);
}
.drop-zone span:last-child { color: var(--muted); }
.upload-icon { font-size: 2.4rem; color: var(--accent); line-height: 1; }

.job-panel { min-height: 270px; }
.file-row, .status-row, .transcript-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.file-details { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.file-details strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-details span { font-size: 0.88rem; }
.status-row { margin-top: 26px; font-size: 0.92rem; }
#progressText { color: var(--muted); font-variant-numeric: tabular-nums; }

.progress-track {
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #242b38;
}
.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-strong), #79d2ff);
  transition: width 240ms ease;
}
.progress-track.complete .progress-bar { background: var(--success); }
.progress-track.error .progress-bar { background: var(--error); }

.transcript-heading { margin-top: 26px; }
.transcript-heading label { margin: 0; }
textarea {
  display: block;
  width: 100%;
  min-height: 360px;
  max-height: 75vh;
  margin-top: 10px;
  resize: both;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #090c12;
  color: var(--text);
  padding: 16px;
  line-height: 1.55;
}
textarea:focus { border-color: var(--accent); }
.error { min-height: 1.3em; margin: 12px 0 0; color: var(--error); }

[hidden] { display: none !important; }

@media (max-width: 640px) {
  .shell { width: min(100% - 20px, 1040px); padding: 24px 0; }
  .login-card, .work-card { padding: 20px; }
  .login-card { margin-top: 5vh; }
  .app-header { align-items: stretch; flex-direction: column; }
  .app-header > button { align-self: flex-start; }
  .password-row { flex-direction: column; }
  .drop-zone { min-height: 220px; }
  .file-row { align-items: flex-start; }
  textarea { min-height: 300px; resize: vertical; }
}
