:root {
  --ink: #0b0f1a;
  --text: #1a1f35;
  --muted: #6b7fa3;
  --line: #e8ecf2;
  --line-heavy: #cdd3e0;
  --surface: #ffffff;
  --surface-alt: #f4f6fa;
  --surface-dark: #0b1221;
  --surface-dark-2: #11192e;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-light: #fef3c7;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.04);
  --shadow: 0 4px 12px -2px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.03);
  --shadow-md: 0 10px 24px -4px rgb(0 0 0 / 0.08), 0 4px 8px -4px rgb(0 0 0 / 0.03);
  --shadow-lg: 0 20px 40px -8px rgb(0 0 0 / 0.12), 0 8px 16px -8px rgb(0 0 0 / 0.06);
  --shadow-xl: 0 30px 60px -12px rgb(0 0 0 / 0.18), 0 12px 24px -12px rgb(0 0 0 / 0.08);
  --shadow-glow: 0 0 30px var(--accent-glow);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface-alt);
}

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

button, a, input, select, textarea {
  outline-offset: 2px;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

.muted, .help {
  color: var(--muted);
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.brand-dot {
  color: var(--accent);
  margin-left: -10px;
}

/* ─── App Shell ─── */
.app-shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}

/* ─── Sidebar ─── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 20px 20px;
  background: linear-gradient(175deg, var(--surface-dark) 0%, var(--surface-dark-2) 100%);
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.05);
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}

.sidebar .wordmark {
  color: #f1f5f9;
}

.workspace {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #4a5568;
  margin: 28px 4px 12px;
  text-transform: uppercase;
  font-weight: 600;
}

nav {
  display: grid;
  gap: 3px;
}

nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: #cbd5e1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a span {
  font-size: 18px;
  width: 22px;
  text-align: center;
  transition: transform 0.2s;
}

nav a.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

nav a:not(.active):hover {
  background: rgba(255,255,255,0.06);
  color: #f1f5f9;
}

nav a:not(.active):hover span {
  transform: translateX(3px);
}

.sidebar-bottom {
  margin-top: auto;
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 16px;
}

.sidebar-bottom > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  color: #94a3b8;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.sidebar-bottom > a:hover {
  background: rgba(255,255,255,0.05);
  color: #f1f5f9;
}

.sidebar-note {
  padding: 12px 4px 16px;
  font-size: 11px;
  color: #4a5568;
}

.sidebar-note p {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.5;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.logout {
  background: none;
  color: #94a3b8;
  padding: 10px 4px;
  width: 100%;
  text-align: left;
  font-size: 12px;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.logout:hover {
  background: rgba(255,255,255,0.05);
  color: #f1f5f9;
}

.logout span {
  float: right;
}

/* ─── Main ─── */
main {
  min-width: 0;
}

.topbar {
  height: 64px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: var(--surface);
}

.topbar b {
  color: var(--text);
  font-weight: 600;
}

.top-slash {
  margin: 0 12px;
  color: #cbd5e1;
}

.today {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.content {
  padding: 32px 36px;
  max-width: 1400px;
  margin: 0 auto;
  animation: reveal 0.3s ease-out;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Typography ─── */
h1 {
  font-size: 30px;
  letter-spacing: -0.8px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.2;
}

h2 {
  font-size: 21px;
  letter-spacing: -0.3px;
  font-weight: 700;
  margin: 0 0 8px;
}

h3 {
  font-size: 15px;
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--text);
}

p {
  line-height: 1.6;
}

/* ─── Buttons ─── */
.primary, .secondary {
  padding: 11px 18px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.secondary {
  background: var(--surface);
  border: 1px solid var(--line-heavy);
  color: var(--text);
}

.secondary:hover {
  background: var(--surface-alt);
  border-color: var(--accent);
  color: var(--accent);
}

.wide {
  width: 100%;
  justify-content: space-between;
}

/* ─── Page Heading ─── */
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.page-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 500px;
}

/* ─── Stats ─── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat {
  background: var(--surface);
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all 0.2s;
}

.stat:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.stat:first-child {
  background: linear-gradient(135deg, var(--accent-light) 0%, #fff 100%);
  border-color: rgba(245, 158, 11, 0.3);
}

.stat span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.stat strong {
  display: block;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin: 8px 0 4px;
  color: var(--ink);
}

.stat small {
  font-size: 11px;
  color: var(--muted);
}

.stat .stat-icon {
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 20px;
  color: #94a3b8;
}

/* ─── Panels ─── */
.panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  background: var(--surface-alt);
}

.toolbar input, .toolbar select {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
  margin-top: 0;
}

.toolbar .count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

/* ─── Tables ─── */
.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}

th {
  padding: 14px 20px;
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}

td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

.click-row {
  cursor: pointer;
  transition: background 0.15s;
}

.click-row:hover {
  background: var(--surface-alt);
}

.company-cell {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #475569;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.cell-main {
  font-weight: 600;
  display: block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-sub {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

/* ─── Score Badge ─── */
.score {
  font-family: ui-monospace, monospace;
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 4px 9px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
}

.score.zero {
  background: var(--surface-alt);
  color: var(--muted);
  border-color: var(--line);
}

/* ─── Pills / Badges ─── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.15s;
}

.pill:hover {
  transform: scale(1.05);
}

.pill.interesante, .pill.completed, .pill.found {
  background: var(--success-light);
  color: var(--success);
}

.pill.investigar, .pill.partial, .pill.sin_verificar {
  background: var(--warning-light);
  color: var(--warning);
}

.pill.contactada {
  background: var(--info-light);
  color: var(--info);
}

.pill.descartada, .pill.failed, .pill.error {
  background: var(--danger-light);
  color: var(--danger);
}

.pill.running {
  background: var(--success-light);
  color: var(--success);
}

.pill.linkedin {
  background: #dbeafe;
  color: #2563eb;
}

.row-arrow {
  color: #94a3b8;
  font-size: 16px;
  transition: transform 0.2s;
}

.click-row:hover .row-arrow {
  transform: translateX(3px);
}

/* ─── Pagination ─── */
.pagination {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  align-items: center;
}

.pagination button {
  background: var(--surface);
  border: 1px solid var(--line-heavy);
  border-radius: var(--radius);
  padding: 6px 14px;
  color: var(--text);
  font-weight: 500;
  transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.pagination div {
  display: flex;
  gap: 8px;
}

/* ─── Info Strip ─── */
.info-strip {
  margin-top: 20px;
  padding: 14px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  border-top: 1px solid var(--line);
}

.info-strip b {
  color: var(--text);
}

/* ─── Campaign Cards ─── */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.campaign-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.campaign-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #fbbf24);
  opacity: 0;
  transition: opacity 0.2s;
}

.campaign-card:hover::before {
  opacity: 1;
}

.campaign-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-3px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-icon {
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  color: var(--accent);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.campaign-card h3 {
  font-size: 16px;
  line-height: 1.4;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
}

.tag {
  border: 1px solid var(--line-heavy);
  color: var(--muted);
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.card-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
  gap: 10px;
}

/* ─── Empty State ─── */
.empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}

.empty h3 {
  color: var(--text);
  font-size: 18px;
}

.empty p {
  max-width: 400px;
  margin: 10px auto 20px;
}

/* ─── Runs ─── */
.run-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.run-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(245, 158, 11, 0.2);
}

.run-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.run-card p {
  font-size: 13px;
  color: var(--muted);
}

.run-card small {
  font-size: 11px;
  color: var(--muted);
}

/* ─── Forms ─── */
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 16px 0 0;
  color: var(--text);
}

label .muted {
  font-weight: 400;
  float: right;
}

input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  background: var(--surface);
  border: 1.5px solid var(--line-heavy);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  transition: all 0.2s;
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.toolbar input, .toolbar select {
  margin-top: 0;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 18px 0 0;
  padding: 16px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

legend {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  padding: 0 6px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin: 0;
  font-weight: 400;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 0;
}

.auto-contact {
  margin-top: 20px;
}

.help {
  font-size: 11px;
  line-height: 1.5;
  margin-top: 4px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ─── Dialogs ─── */
details {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-height: 90vh;
  max-width: calc(100vw - 40px);
  color: var(--text);
  box-shadow: var(--shadow-xl);
  background: var(--surface);
  margin: auto;
}

dialog::backdrop {
  background: rgba(11, 15, 26, 0.7);
  backdrop-filter: blur(6px);
}

.campaign-dialog {
  width: 640px;
  max-width: 95vw;
  overflow-y: auto;
  max-height: 90vh;
}

#detail-content {
  overflow-y: auto;
  max-height: calc(90vh - 64px);
}

.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialog-top button {
  background: var(--surface-alt);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.dialog-top button:hover {
  background: var(--line);
  color: var(--text);
  transform: scale(1.1);
}

/* ─── Detail View ─── */
.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
}

.detail-header .avatar {
  width: 56px;
  height: 56px;
  font-size: 18px;
}

.detail-header h2 {
  margin: 0 0 4px;
}

.detail-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.detail-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

.detail-job {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  background: var(--surface-alt);
  transition: all 0.2s;
}

.detail-job:hover {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: var(--shadow-sm);
}

.detail-job h3 {
  font-size: 14px;
  line-height: 1.4;
}

.detail-job p {
  font-size: 12px;
  color: var(--muted);
}

.detail-job a {
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
}

.detail-job .secondary {
  margin-top: 10px;
  font-size: 11px;
  padding: 6px 12px;
}

.contact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-top: 10px;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}

.contact a {
  display: block;
  margin-top: 6px;
  font-weight: 600;
}

.contact small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

/* ─── Notes ─── */
.note-editor {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 18px;
  height: max-content;
  border: 1px solid var(--line);
}

.note-editor label:first-child {
  margin-top: 0;
}

/* ─── Match Evidence ─── */
.match-evidence {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin: 10px 0;
  font-size: 11px;
  transition: all 0.15s;
}

.match-evidence:hover {
  border-color: var(--line-heavy);
}

.match-evidence.confirmed {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.match-evidence.contradicted {
  background: #fff7ed;
  border-color: #fdba74;
}

.match-evidence p {
  margin: 5px 0;
  color: var(--muted);
}

.match-evidence blockquote {
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 3px solid #34d399;
  color: #065f46;
  font-size: 12px;
  line-height: 1.6;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.match-evidence small {
  color: var(--muted);
}

/* ─── Login ─── */
.login-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}

.login-story {
  background: linear-gradient(175deg, var(--surface-dark) 0%, #0a0f1e 100%);
  color: #cbd5e1;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-story::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.login-story .wordmark {
  font-size: 22px;
  color: #f1f5f9;
}

.login-story .eyebrow {
  color: #fbbf24;
}

.login-story h1 {
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: #f8fafc;
}

.login-story h1 em {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--accent);
  font-weight: 400;
  font-style: italic;
}

.login-story p {
  color: #94a3b8;
  font-size: 14px;
  margin-top: 24px;
  max-width: 380px;
}

.login-story small {
  font-size: 9px;
  letter-spacing: 2px;
  color: #4a5568;
  text-transform: uppercase;
  font-weight: 600;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 60px;
  background: var(--surface);
}

.login-panel form {
  max-width: 340px;
  width: 100%;
}

.login-panel h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.login-panel p {
  font-size: 13px;
}

.login-panel .primary {
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.login-panel small {
  font-size: 11px;
  color: var(--muted);
}

/* ─── Toast ─── */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--surface-dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  max-width: 90vw;
  animation: slideUp 0.3s ease-out;
}

#toast.bad {
  background: var(--danger);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Settings ─── */
.settings-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: start;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.settings-card:hover {
  box-shadow: var(--shadow);
}

.settings-card p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

/* ─── Error ─── */
.error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--danger-light);
  border-radius: var(--radius);
  font-weight: 500;
}

/* ─── Responsive ─── */
@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 190px 1fr;
  }
  .sidebar { padding: 20px 14px; }
  .content { padding: 24px; }
  .topbar { padding: 0 20px; }
  .stats { gap: 12px; }
  .stat { padding: 16px; }
  .cards, .settings-grid { grid-template-columns: 1fr; }
  .stat strong { font-size: 26px; }
}

@media (max-width: 720px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .wordmark { font-size: 20px; }
  .workspace, .sidebar-bottom, .today { display: none; }
  nav {
    display: flex;
    overflow: auto;
    gap: 2px;
    margin-top: 10px;
  }
  nav a { font-size: 12px; padding: 9px; white-space: nowrap; }
  nav a span { display: none; }
  .topbar { height: 50px; padding: 0 16px; }
  .content { padding: 20px 16px; }
  .page-heading h1 { font-size: 24px; }
  .page-heading p { font-size: 13px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .toolbar { padding: 12px; }
  .toolbar input { max-width: 100%; width: 100%; }
  .toolbar select { max-width: 100%; flex: 1; }
  .toolbar .count { display: none; }
  .detail-body, .login-shell { grid-template-columns: 1fr; }
  .detail-dialog, .campaign-dialog { padding: 20px; }
  .login-story { padding: 32px; min-height: 260px; }
  .login-story h1 { font-size: 32px; margin-top: 18px; }
  .login-story > small,
  .login-story > div > p:not(.eyebrow) { display: none; }
  .login-panel { padding: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-body { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Preserve line breaks in the original job description. */
.job-original { white-space: pre-wrap; overflow-wrap: anywhere; }
