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

:root {
  --bg: #f5f0eb;
  --surface: #ffffff;
  --surface-alt: #faf8f5;
  --ink: #1a1a1a;
  --ink-light: #6b6560;
  --ink-muted: #a09890;
  --accent: #c45d3e;
  --accent-light: #f8ebe6;
  --accent-hover: #a84a2f;
  --border: #e5ddd5;
  --border-focus: #c45d3e;
  --green: #2a9d5c;
  --green-light: #e6f5ed;
  --yellow: #e6a817;
  --yellow-light: #fdf5e1;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --transition: 0.2s ease;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */
.page-header {
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
}
.page-header .inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.5px;
  user-select: none;
}
.logo span { color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

/* ═══════════════════════════════════════
   LOGO LINK
   ═══════════════════════════════════════ */
.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

/* ═══════════════════════════════════════
   HEADER NAV
   ═══════════════════════════════════════ */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all var(--transition);
}
.nav-link:hover {
  color: var(--ink);
  background: var(--surface-alt);
}
.nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
}

/* ═══════════════════════════════════════
   PROFILE DROPDOWN
   ═══════════════════════════════════════ */
.profile-dropdown { position: relative; }
.profile-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 28px;
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  transition: all var(--transition);
}
.profile-trigger:hover { border-color: var(--ink-muted); background: var(--surface-alt); }
.profile-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.profile-avatar-lg { width: 38px; height: 38px; font-size: 14px; }
.profile-chevron {
  color: var(--ink-muted);
  transition: transform 0.2s;
}
.profile-chevron.flipped { transform: rotate(180deg); }

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  animation: menuIn 0.15s ease;
  z-index: 200;
}
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}
.profile-menu-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.profile-menu-email {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.profile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}
.profile-menu-item:hover { background: var(--surface-alt); color: var(--accent); }
.profile-menu-item--muted { color: var(--ink-muted); }
.pmi-icon { font-size: 15px; width: 20px; text-align: center; }

/* ═══════════════════════════════════════
   SAVE INDICATOR
   ═══════════════════════════════════════ */
.save-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: all 0.3s ease;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}
.save-indicator.saved { color: var(--green); background: var(--green-light); border-color: #c3e6d1; }
.save-indicator.saving { color: var(--accent); background: var(--accent-light); border-color: #e8c9be; }
.save-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-muted);
  transition: background 0.3s;
}
.save-indicator.saved .save-dot { background: var(--green); }
.save-indicator.saving .save-dot { background: var(--accent); animation: pulse 0.8s infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-ghost {
  background: transparent;
  color: var(--ink-light);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-alt); color: var(--ink); border-color: var(--ink-muted); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(196,93,62,0.3); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ═══════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════ */
.container { max-width: 820px; margin: 0 auto; padding: 40px 32px 100px; }

.editor-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

/* ═══════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════ */
.progress-bar { display: flex; gap: 6px; margin-bottom: 56px; }
.progress-step {
  flex: 1; height: 6px; border-radius: 4px;
  background: var(--border);
  position: relative; cursor: pointer;
  transition: all var(--transition);
}
.progress-step:hover { transform: scaleY(1.6); }
.progress-step.complete { background: var(--green); }
.progress-step.partial { background: var(--yellow); }
.progress-step.empty { background: var(--border); }

.step-icon {
  position: absolute;
  top: -8px; right: -4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  line-height: 1;
  border: 2px solid var(--bg);
  transition: all var(--transition);
  pointer-events: none;
}
.progress-step.complete .step-icon { background: var(--green); color: #fff; }
.progress-step.partial .step-icon { background: var(--yellow); color: #fff; }

.progress-step .tooltip {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 500;
  padding: 4px 10px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.progress-step .tooltip::before {
  content: '';
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--ink);
}
.progress-step:hover .tooltip { opacity: 1; }

/* ═══════════════════════════════════════
   DASHBOARD PAGE
   ═══════════════════════════════════════ */
.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  animation: fadeUp 0.4s ease both;
}
.dash-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.dash-subtitle {
  font-size: 15px;
  color: var(--ink-light);
  margin-top: 4px;
}

/* Progress card */
.dash-progress-card {
  display: flex;
  gap: 36px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.4s ease 0.05s both;
}
.progress-ring-wrap {
  position: relative;
  width: 120px; height: 120px;
  flex-shrink: 0;
}
.progress-ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.progress-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 10;
}
.progress-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  transition: stroke-dashoffset 0.6s ease;
}
.progress-ring-label {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
}
.progress-details h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.progress-details p {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

/* Steps list inside progress card */
.dash-steps-list { display: flex; flex-direction: column; gap: 8px; }
.dash-step-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.dash-step-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.dash-step-row.complete .dash-step-icon { background: var(--green-light); color: var(--green); }
.dash-step-row.partial .dash-step-icon { background: var(--yellow-light); color: var(--yellow); }
.dash-step-row.empty .dash-step-icon { background: var(--surface-alt); color: var(--ink-muted); border: 1.5px solid var(--border); }

.dash-step-label { flex: 1; font-weight: 500; }

.dash-step-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  text-transform: capitalize;
}
.dash-step-row.complete .dash-step-badge { background: var(--green-light); color: var(--green); }
.dash-step-row.partial .dash-step-badge { background: var(--yellow-light); color: #b8860b; }
.dash-step-row.empty .dash-step-badge { background: var(--surface-alt); color: var(--ink-muted); }

/* Quick info cards */
.dash-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
  animation: fadeUp 0.4s ease 0.1s both;
}
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.dash-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.dash-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.dash-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dash-card-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}

/* CTA banner */
.dash-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.4s ease 0.15s both;
}
.dash-cta p {
  font-size: 14px;
  color: var(--ink-light);
  flex: 1;
}

/* ═══════════════════════════════════════
   DASHBOARD — JOB TRACKER WIDGETS
   ═══════════════════════════════════════ */
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  margin-bottom: 20px;
  animation: fadeUp 0.4s ease 0.2s both;
}
.dash-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* Pipeline card */
.dash-pipeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.4s ease 0.25s both;
}
.dash-pipeline-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 16px;
}
.dash-pipeline-bar {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 16px;
}
.dash-pipeline-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  transition: flex 0.4s ease;
}
.pipe-count {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.pipe-lead, .dash-pipeline-legend .pipe-lead { background: var(--ink-muted); }
.pipe-applied, .dash-pipeline-legend .pipe-applied { background: #3b82f6; }
.pipe-screening, .dash-pipeline-legend .pipe-screening { background: #eab308; }
.pipe-interview, .dash-pipeline-legend .pipe-interview { background: #8b5cf6; }
.pipe-offer, .dash-pipeline-legend .pipe-offer { background: var(--green); }

.dash-pipeline-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.pipe-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.pipe-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.pipe-legend-label { color: var(--ink-light); }
.pipe-legend-count { font-weight: 700; color: var(--ink); }

/* Recent applications */
.dash-recent {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.4s ease 0.3s both;
  margin-bottom: 20px;
}
.dash-recent-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  padding: 18px 24px 0;
}
.dash-recent-list { padding: 12px 0; }
.dash-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  cursor: pointer;
  transition: background 0.15s;
}
.dash-recent-item:hover { background: var(--surface-alt); }
.dash-recent-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dash-recent-company {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-recent-position {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-recent-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.dash-recent-date {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ═══════════════════════════════════════
   SECTION CARDS
   ═══════════════════════════════════════ */
.section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
  animation: fadeUp 0.4s ease both;
}
.section:hover { box-shadow: var(--shadow-md); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.section-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 600; letter-spacing: -0.3px;
}
.section-subtitle { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }

/* ═══════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════ */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-light); letter-spacing: 0.02em; }
.field label .optional { font-weight: 400; color: var(--ink-muted); font-style: italic; }

input[type="text"], input[type="email"], input[type="tel"],
input[type="url"], input[type="date"], textarea, select {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; color: var(--ink);
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  border-radius: 8px; padding: 11px 14px;
  transition: all var(--transition);
  outline: none; width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--border-focus); background: #fff;
  box-shadow: 0 0 0 3px rgba(196,93,62,0.1);
}
input::placeholder, textarea::placeholder { color: var(--ink-muted); font-style: italic; }
textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

/* ═══════════════════════════════════════
   ENTRY CARDS (Experience / Education)
   ═══════════════════════════════════════ */
.entry-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px; position: relative;
  transition: all var(--transition);
  margin-bottom: 20px;
}
.entry-card:hover { border-color: var(--ink-muted); }
.remove-btn {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border-radius: 50%;
  border: none; background: transparent;
  color: var(--ink-muted); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.remove-btn:hover { background: var(--accent-light); color: var(--accent); }

.add-entry-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%; padding: 14px;
  border: 2px dashed var(--border);
  border-radius: var(--radius); background: transparent;
  color: var(--ink-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  margin-top: 4px;
}
.add-entry-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* ═══════════════════════════════════════
   CHECKBOX
   ═══════════════════════════════════════ */
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.checkbox-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.checkbox-row label { font-size: 13px; color: var(--ink-light); font-weight: 500; cursor: pointer; }

/* ═══════════════════════════════════════
   SKILL TAGS
   ═══════════════════════════════════════ */
.skills-input-row { display: flex; gap: 10px; margin-bottom: 16px; }
.skills-input-row input { flex: 1; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-light); color: var(--accent);
  font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 20px;
  animation: popIn 0.2s ease;
}
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.skill-tag .remove-skill {
  width: 16px; height: 16px; border-radius: 50%; border: none;
  background: rgba(196,93,62,0.2); color: var(--accent);
  font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.skill-tag .remove-skill:hover { background: var(--accent); color: #fff; }
.skill-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.skill-suggestions span {
  font-size: 12px; color: var(--ink-muted);
  padding: 4px 12px; border: 1px solid var(--border);
  border-radius: 16px; cursor: pointer; transition: all var(--transition);
}
.skill-suggestions span:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* ═══════════════════════════════════════
   UPLOAD SECTION
   ═══════════════════════════════════════ */
.upload-section { margin-bottom: 32px; }

.upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--surface-alt);
}
.upload-dropzone:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.upload-dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: scale(1.01);
  box-shadow: 0 0 0 4px rgba(196,93,62,0.12);
}
.upload-icon { color: var(--ink-muted); transition: color 0.2s; }
.upload-dropzone:hover .upload-icon,
.upload-dropzone.dragging .upload-icon { color: var(--accent); }

.upload-text {
  font-size: 15px;
  color: var(--ink-light);
  text-align: center;
}
.upload-text strong { color: var(--ink); font-weight: 600; }
.upload-hint {
  font-size: 12px;
  color: var(--ink-muted);
}

/* Processing / Done / Error states */
.upload-status {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--surface-alt);
  border: 1px solid var(--border);
}
.upload-status--done {
  background: var(--green-light);
  border-color: #c3e6d1;
}
.upload-status--error {
  background: var(--accent-light);
  border-color: #e8c9be;
}

.upload-status-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.upload-status-text strong {
  font-size: 14px;
  color: var(--ink);
}
.upload-status-text span {
  font-size: 13px;
  color: var(--ink-light);
}
.upload-status--done .upload-status-text span { color: var(--green); }
.upload-status--error .upload-status-text span { color: var(--accent); }

.upload-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.upload-check {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.upload-error-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   JOB TRACKER
   ═══════════════════════════════════════ */
.tracker-container { max-width: 960px; }

.tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  animation: fadeUp 0.4s ease both;
}
.tracker-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 700;
  letter-spacing: -0.5px;
}
.tracker-subtitle {
  font-size: 14px; color: var(--ink-light); margin-top: 4px;
}
.tracker-actions { display: flex; gap: 10px; }

/* Loading */
.tracker-loading {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 60px 0;
  color: var(--ink-muted); font-size: 14px;
}

/* Empty state */
.tracker-empty {
  text-align: center; padding: 80px 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); animation: fadeUp 0.4s ease both;
}
.tracker-empty-icon { font-size: 48px; margin-bottom: 16px; }
.tracker-empty h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px; margin-bottom: 8px;
}
.tracker-empty p {
  font-size: 14px; color: var(--ink-muted); margin-bottom: 20px;
}

/* Grid wrapper */
.tracker-grid-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.4s ease both;
}

/* Table */
.tracker-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}
.tracker-grid thead {
  background: var(--surface-alt);
  border-bottom: 1.5px solid var(--border);
}
.tracker-grid th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  white-space: nowrap;
}
.tracker-grid td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tracker-row:last-child td { border-bottom: none; }
.tracker-row { transition: background 0.15s; }
.tracker-row:hover { background: var(--surface-alt); }

/* Column widths — expand and actions are fixed, rest fills remaining space */
.col-expand { width: 36px; min-width: 36px; max-width: 36px; text-align: center; }
.col-company { width: 20%; }
.col-position { width: 30%; }
.col-status { width: 15%; }
.col-url { width: 10%; }
.col-date { width: 12%; white-space: nowrap; }
.col-actions { width: 40px; min-width: 40px; max-width: 40px; text-align: center; }

/* Cell display */
.cell-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}
.cell-text.editable { cursor: text; }
.cell-text.editable:hover { background: rgba(196,93,62,0.06); }
.cell-text.placeholder { color: var(--ink-muted); font-style: italic; }

.cell-date { font-size: 12px; color: var(--ink-muted); }

.cell-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent); font-size: 13px;
  text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.cell-link:hover { text-decoration: underline; }
.link-icon { flex-shrink: 0; opacity: 0.6; }

/* Inline edit input */
.cell-edit { margin: -4px -4px; }
.cell-input {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  width: 100%;
  padding: 4px 8px;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(196,93,62,0.1);
}

/* Delete button */
.row-delete-btn {
  width: 28px; height: 28px;
  border: none; background: transparent;
  border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
  transition: all var(--transition);
}
.row-delete-btn:hover { background: var(--accent-light); color: var(--accent); }

/* Footer */
.tracker-footer {
  text-align: center; padding: 16px;
  font-size: 12px; color: var(--ink-muted);
}

/* ═══════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════ */
.tracker-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.filter-search-input {
  width: 100%;
  padding: 8px 32px 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--transition);
}
.filter-search-input:focus {
  outline: none;
  border-color: var(--border-focus);
}
.filter-search-input::placeholder {
  color: var(--ink-muted);
}
.filter-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 18px;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.filter-search-clear:hover { color: var(--ink); }
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  color: var(--ink-light);
  user-select: none;
}
.filter-toggle .toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.filter-toggle .toggle-input:checked + .toggle-switch {
  background: var(--accent);
}
.filter-toggle .toggle-input:checked + .toggle-switch::after {
  transform: translateX(16px);
}
.filter-toggle-label { font-weight: 500; }

/* Load More */
.tracker-load-more {
  text-align: center;
  padding: 16px 0 4px;
}
.tracker-load-more .btn {
  font-size: 13px;
  color: var(--accent);
}

/* ═══════════════════════════════════════
   EXPAND / CHEVRON
   ═══════════════════════════════════════ */
.expand-chevron {
  display: inline-block;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: transform 0.2s ease;
  user-select: none;
}
.expand-chevron.open { transform: rotate(90deg); color: var(--accent); }
.tracker-row { cursor: pointer; }
.tracker-row.expanded { background: var(--accent-light); }
.tracker-row.expanded:hover { background: var(--accent-light); }

/* ═══════════════════════════════════════
   STATUS BADGE (in grid row)
   ═══════════════════════════════════════ */
.status-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.status-lead { background: var(--surface-alt); color: var(--ink-muted); border: 1px solid var(--border); }
.status-applied { background: #e0f0ff; color: #1a6fbf; }
.status-screening { background: var(--yellow-light); color: #9a7400; }
.status-interview { background: #ede0ff; color: #6b3fa0; }
.status-offer { background: var(--green-light); color: var(--green); }

/* Outcome badge in grid */
.outcome-closed {
  background: #fde8e8;
  color: #b91c1c;
  border: 1px solid #f5c6c6;
}

/* Closed / inactive row */
.tracker-row.closed { opacity: 0.55; }
.tracker-row.closed:hover { opacity: 0.75; }
.tracker-row.closed.expanded { opacity: 1; }

/* ═══════════════════════════════════════
   OUTCOME SELECTOR
   ═══════════════════════════════════════ */
.outcome-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.outcome-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.outcome-btn:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
  background: var(--surface-alt);
}

/* Active outcome */
.outcome-btn.active.outcome-active {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green);
}

/* Negative outcomes */
.outcome-btn.active.outcome-rejected,
.outcome-btn.active.outcome-closed {
  border-color: #e53e3e;
  background: #fde8e8;
  color: #b91c1c;
}

/* ═══════════════════════════════════════
   DETAIL PANEL (expanded row)
   ═══════════════════════════════════════ */
.tracker-detail-row td {
  padding: 0 !important;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}
.detail-panel {
  padding: 28px 32px 28px 48px;
  animation: detailSlide 0.25s ease both;
}
@keyframes detailSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail-section { margin-bottom: 28px; }
.detail-section:last-child { margin-bottom: 0; }

.detail-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 12px;
}
.detail-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.detail-label-row .detail-label { margin-bottom: 0; }
.detail-edit-actions { display: flex; gap: 6px; }

/* ═══════════════════════════════════════
   STATUS PIPELINE
   ═══════════════════════════════════════ */
.status-pipeline {
  display: flex;
  align-items: center;
  position: relative;
  padding: 8px 0;
}
.pipeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  cursor: pointer;
  transition: all 0.15s;
}
.pipeline-step:hover .pipeline-dot {
  transform: scale(1.3);
  box-shadow: 0 0 0 4px rgba(196,93,62,0.12);
}
.pipeline-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  background: var(--surface);
  transition: all 0.25s ease;
}
.pipeline-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color 0.2s;
}

/* Pipeline connector line */
.pipeline-line {
  position: absolute;
  top: 18px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  z-index: 1;
}
.pipeline-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.35s ease;
}

/* Pipeline states */
.pipeline-step.status-done .pipeline-dot {
  background: var(--accent);
  border-color: var(--accent);
}
.pipeline-step.status-done .pipeline-label { color: var(--accent); }

.pipeline-step.status-current .pipeline-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(196,93,62,0.15);
}
.pipeline-step.status-current .pipeline-label {
  color: var(--accent);
  font-weight: 700;
}

.pipeline-step.status-pending .pipeline-dot {
  background: var(--surface);
  border-color: var(--border);
}

/* ═══════════════════════════════════════
   JOB DESCRIPTION
   ═══════════════════════════════════════ */
.detail-description {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-light);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  max-height: 400px;
  overflow-y: auto;
}
.detail-textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  width: 100%;
  min-height: 200px;
  padding: 16px 20px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  background: #fff;
  outline: none;
  resize: vertical;
  box-shadow: 0 0 0 3px rgba(196,93,62,0.1);
}
.detail-empty {
  font-size: 14px;
  color: var(--ink-muted);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ═══════════════════════════════════════
   RESUME ACTION CARD
   ═══════════════════════════════════════ */
.detail-resume-action { margin-top: 4px; }
.resume-action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.resume-action-ready {
  border-color: #c3e6d1;
  background: var(--green-light);
}
.resume-action-incomplete {
  border-color: var(--border);
  background: var(--surface-alt);
}
.resume-action-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.resume-action-body { flex: 1; }
.resume-action-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.resume-action-desc {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.5;
}
.resume-action-ready .resume-action-desc { color: #1a6b3a; }
.resume-action-card .btn {
  flex-shrink: 0;
  white-space: nowrap;
}
.resume-action-generating {
  border-color: #e8c9be;
  background: var(--accent-light);
}
.resume-action-error {
  border-color: var(--accent);
  background: var(--accent-light);
}
.resume-action-error .resume-action-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.resume-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  align-items: flex-end;
}

/* ═══════════════════════════════════════
   ATTACHMENTS
   ═══════════════════════════════════════ */
.attach-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--surface);
  margin-bottom: 12px;
}
.attach-dropzone:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.attach-dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: scale(1.01);
  box-shadow: 0 0 0 3px rgba(196,93,62,0.1);
}
.attach-dropzone.uploading {
  pointer-events: none;
  opacity: 0.7;
}
.attach-drop-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}
.attach-drop-content strong { color: var(--accent); font-weight: 600; }
.attach-drop-icon { font-size: 18px; }
.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all var(--transition);
}
.attachment-item:hover {
  border-color: var(--ink-muted);
  box-shadow: var(--shadow-sm);
}
.attachment-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.attachment-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.attachment-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attachment-name:hover { text-decoration: underline; }
.attachment-meta {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   TIMELINE
   ═══════════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  padding-bottom: 18px;
  display: flex;
  gap: 0;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -24px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--accent);
  flex-shrink: 0;
  z-index: 1;
}
.timeline-item:first-child .timeline-dot {
  background: var(--accent);
  border-color: var(--accent);
}
.timeline-content { flex: 1; }
.timeline-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}
.timeline-desc {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.5;
}

/* ═══════════════════════════════════════
   MODAL
   ═══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  animation: modalFadeIn 0.2s ease;
  padding: 20px;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px;
  animation: modalSlideUp 0.25s ease;
  overflow: hidden;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px 0;
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 600;
}
.modal-close {
  width: 32px; height: 32px; border: none;
  background: var(--surface-alt);
  border-radius: 8px; font-size: 18px;
  color: var(--ink-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--accent-light); color: var(--accent); }

.modal-body { padding: 20px 28px; }
.modal-desc { font-size: 13px; color: var(--ink-light); margin-bottom: 20px; line-height: 1.6; }
.modal-error {
  margin-top: 12px; padding: 10px 14px;
  background: var(--accent-light); color: var(--accent);
  border-radius: 8px; font-size: 13px; font-weight: 500;
}
.modal-duplicate-warning {
  margin-top: 12px; padding: 14px 16px;
  background: #fef9ec; border: 1px solid #f0d78c;
  border-radius: 8px; font-size: 13px; color: #6b5a10;
}
.modal-duplicate-text { line-height: 1.5; }
.modal-duplicate-text em { font-style: normal; font-weight: 600; }
.modal-duplicate-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.modal-checkbox {
  margin-top: 16px;
}
.modal-checkbox .checkbox-row span {
  font-size: 14px;
  color: var(--ink);
}
.modal-checkbox--hint {
  margin-top: 12px;
}
.modal-hint {
  font-size: 12px;
  color: var(--ink-muted);
  font-style: italic;
}

.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 28px 24px;
}

.btn-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 640px) {
  .container { padding: 24px 16px 80px; }
  .section { padding: 24px 20px; }
  .field-grid { grid-template-columns: 1fr; }
  .page-header .inner { padding: 0 16px; }
  .logo { font-size: 16px; }
  .header-nav { display: none; }
  .dash-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .dash-title { font-size: 26px; }
  .dash-progress-card { flex-direction: column; text-align: center; }
  .dash-cards { grid-template-columns: 1fr; }
  .dash-cta { flex-direction: column; text-align: center; }
  .editor-top-bar { flex-direction: column; gap: 10px; align-items: flex-start; }
  .upload-dropzone { padding: 32px 20px; }
  .tracker-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .tracker-title { font-size: 24px; }
  .tracker-filters { flex-direction: column; align-items: stretch; }
  .tracker-grid-wrap { overflow-x: auto; }
  .tracker-grid { min-width: 700px; }
  .modal-card { max-width: 100%; }
  .dash-section-header { margin-top: 28px; }
  .dash-pipeline-legend { gap: 12px; }
  .dash-recent-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .dash-recent-right { align-self: flex-end; }
}

/* ═══════════════════════════════════════
   AUTH PAGE
   ═══════════════════════════════════════ */
.auth-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.auth-loading-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
}

.auth-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 30%, rgba(196,93,62,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 60% at 80% 70%, rgba(42,157,92,0.04) 0%, transparent 70%),
    var(--bg);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 36px 36px;
  box-shadow: var(--shadow-lg);
}

.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.auth-logo span { color: var(--accent); }

.auth-tagline {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.auth-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.4;
}
.auth-error svg { flex-shrink: 0; }

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.auth-field {
  margin-bottom: 18px;
}
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196,93,62,0.1);
}
.auth-field input::placeholder {
  color: var(--ink-muted);
}

.auth-submit {
  width: 100%;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
}
.auth-submit:hover:not(:disabled) {
  background: var(--accent-hover);
}
.auth-submit:active:not(:disabled) {
  transform: scale(0.98);
}
.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

.auth-toggle {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-muted);
}
.auth-toggle button {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 0;
  margin-left: 4px;
}
.auth-toggle button:hover {
  text-decoration: underline;
}

.auth-footer {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  font-size: 12px;
  color: var(--ink-muted);
  opacity: 0.7;
}

/* ═══════════════════════════════════════
   AUTH — VERIFICATION STATES
   ═══════════════════════════════════════ */
.auth-verify-message {
  text-align: center;
  padding: 8px 0 16px;
}
.auth-verify-message h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
}
.auth-verify-message p {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.6;
  margin: 0 0 8px;
}
.auth-verify-message p strong {
  color: var(--ink);
  font-weight: 600;
}
.auth-verify-hint {
  font-size: 13px !important;
  color: var(--ink-muted) !important;
  margin-top: 12px !important;
}
.auth-verify-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 20px;
}
.auth-verify-success {
  background: var(--green-light);
  color: var(--green);
}
.auth-verify-pending {
  background: var(--accent-light);
  color: var(--accent);
}
.auth-verify-expired {
  background: var(--yellow-light);
  color: var(--yellow);
}
.auth-verify-error {
  background: #fde8e8;
  color: #b91c1c;
}
.auth-submit-ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.auth-submit-ghost:hover:not(:disabled) {
  background: var(--accent-light);
}
.auth-success {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--green);
  background: var(--green-light);
}

/* Logout/danger menu item */
.profile-menu-item--danger {
  color: #b91c1c !important;
}
.profile-menu-item--danger:hover {
  background: #fef2f2 !important;
}

@media (max-width: 640px) {
  .auth-card { padding: 32px 24px 28px; }
  .auth-row { grid-template-columns: 1fr; }
  .auth-logo { font-size: 24px; }
}
