:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #5d6875;
  --line: #d9e0e7;
  --accent: #1769aa;
  --accent-strong: #0f4f83;
  --good: #146c43;
  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: var(--bg); color: var(--text); }
.app-shell { width: 100%; min-height: 100vh; padding: 28px; }
.workspace { max-width: 980px; margin: 0 auto; }
.topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; padding: 0 0 18px;
}
h1 { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: 0; }
.topbar p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.status-pill {
  min-width: 110px; text-align: center; border: 1px solid var(--line);
  background: var(--panel); border-radius: 999px; padding: 8px 12px;
  font-size: 14px; color: var(--muted);
}
.status-pill.busy { color: #6f4e00; border-color: #e3c56d; background: #fff8df; }
.status-pill.done { color: var(--good); border-color: #a5d6b8; background: #effaf3; }
.status-pill.error { color: #9d1c1c; border-color: #e4a6a6; background: #fff0f0; }
.editor {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 22px; box-shadow: 0 10px 28px rgba(27, 39, 51, 0.06);
}
.review-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 22px; box-shadow: 0 10px 28px rgba(27, 39, 51, 0.06);
}
.review-heading {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.review-heading h2 { margin: 0; font-size: 22px; letter-spacing: 0; }
.review-heading p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.profile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px;
  padding-top: 20px;
}
label { display: grid; gap: 8px; margin-bottom: 18px; }
label > span:first-child { font-size: 13px; font-weight: 700; color: #2b3744; }
.upload-field { position: relative; }
.upload-field input {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  opacity: 0; pointer-events: none;
}
.file-control {
  min-height: 78px; display: flex; flex-direction: column; justify-content: center;
  gap: 5px; padding: 14px 16px; border: 1px dashed #9eabb8; border-radius: 6px;
  background: #f8fafc; cursor: pointer;
}
.file-control strong { color: var(--accent); font-size: 15px; font-weight: 700; }
.file-control small { color: var(--muted); }
textarea {
  width: 100%; min-height: 410px; resize: vertical; border: 1px solid var(--line);
  border-radius: 6px; padding: 12px 13px; font: inherit; color: var(--text);
  background: #fff; outline: none; line-height: 1.48;
}
input[type="text"], input[type="email"] {
  width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 6px;
  padding: 9px 11px; font: inherit; color: var(--text); background: #fff; outline: none;
}
textarea:focus, input:focus, .upload-field:focus-within .file-control {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.14);
}
.actions { display: flex; gap: 12px; align-items: center; }
button {
  appearance: none; border: 1px solid var(--accent); border-radius: 6px;
  padding: 11px 16px; font: inherit; font-weight: 700; cursor: pointer;
}
button[type="submit"] { background: var(--accent); color: #fff; }
button[type="submit"]:hover, #downloadBtn:hover { background: var(--accent-strong); }
#downloadBtn { background: var(--accent); color: #fff; }
button.secondary { background: #fff; color: var(--accent); }
button:disabled { cursor: not-allowed; opacity: 0.65; }
.content-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 3px 0 10px; font-size: 13px; font-weight: 700; color: #2b3744;
}
.add-controls { display: flex; gap: 8px; }
button.compact { padding: 7px 10px; font-size: 13px; }
.resume-lines {
  display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line);
  border-radius: 6px; background: #f8fafc;
}
.line-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) 36px 36px;
  gap: 7px; align-items: start;
}
.line-marker {
  min-height: 42px; display: grid; place-items: center; color: var(--muted);
  font-size: 14px; font-weight: 700;
}
.line-row.heading { margin-top: 10px; }
.line-row.heading:first-child { margin-top: 0; }
.line-row.heading .line-input { font-weight: 800; text-transform: uppercase; }
.line-input {
  min-height: 42px; height: 42px; resize: none; overflow: hidden;
  padding: 9px 10px; background: #fff;
}
.line-action {
  width: 36px; height: 42px; padding: 0; background: #fff; color: var(--muted);
  border-color: var(--line); font-size: 18px; line-height: 1;
}
.line-action:hover { border-color: var(--accent); color: var(--accent); }
.line-action.remove:hover { border-color: #bd4b4b; color: #9d1c1c; }
.review-actions {
  justify-content: flex-end; margin-top: 18px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px) {
  .app-shell { padding: 18px; }
  .topbar { display: grid; }
  textarea { min-height: 330px; }
  .actions { flex-direction: column; align-items: stretch; }
  button { width: 100%; }
  .review-heading { display: grid; }
  .profile-grid { grid-template-columns: 1fr; }
  .content-heading { align-items: flex-start; flex-direction: column; }
  .add-controls { width: 100%; }
  .add-controls button { flex: 1; }
  .line-row { grid-template-columns: 22px minmax(0, 1fr) 34px 34px; gap: 5px; }
  .line-action { width: 34px; }
}
