/* ── Job Kit — Minimal, clean UI ── */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --success: #16a34a;
  --error: #dc2626;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, 'Segoe UI', 'Noto Sans SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ── */
.app-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px;
}

header {
  text-align: center;
  padding: 32px 0 24px;
}
header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
header p {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 4px;
}

/* ── Steps indicator ── */
.steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}
.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  background: var(--border);
  color: var(--text-muted);
  transition: all 0.3s;
}
.step-dot.active {
  background: var(--primary);
  color: white;
}
.step-dot.done {
  background: var(--success);
  color: white;
}
.step-line {
  width: 48px;
  height: 2px;
  background: var(--border);
  align-self: center;
  transition: background 0.3s;
}
.step-line.done { background: var(--success); }

/* ── Cards / Sections ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.card h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}
.card p.hint {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
}

/* ── Forms ── */
textarea, input[type="text"], input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s;
}
textarea:focus, input:focus {
  outline: none;
  border-color: var(--primary);
}
textarea { min-height: 200px; }

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}
.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); }

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* ── Loading ── */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result cards ── */
.result-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
}
.result-card h3 {
  color: var(--success);
  font-size: 16px;
  margin-bottom: 8px;
}
.result-card a {
  color: var(--primary);
  font-weight: 500;
}

.error-card {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  color: var(--error);
  font-size: 14px;
}

/* ── Job list ── */
.job-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
.job-item:hover { border-color: var(--primary); }
.job-title {
  font-weight: 600;
  font-size: 15px;
}
.job-meta {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}
.job-score {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}
.job-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.job-actions button {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
}
.job-actions button:hover { background: var(--bg); }

/* ── Auth screen ── */
.auth-screen {
  text-align: center;
  padding: 60px 20px;
}
.auth-screen input {
  max-width: 300px;
  margin: 0 auto;
  text-align: center;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--text-muted);
  transition: all 0.2s;
}
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ── Hidden views & steps ── */
.view { display: none; }
.view.active { display: block; }
.step-content { display: none; }
.step-content.active { display: block; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .app-container { padding: 16px 12px; }
  header h1 { font-size: 22px; }
  .btn-group { flex-direction: column; }
}
