@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500&display=swap');

:root {
  --primary: #4a69bd; /* A more vibrant blue for primary actions */
  --primary-ink: #1a202c; /* Darker, almost black for main text */
  --secondary: #78909c; /* A subtle secondary color */
  --accent: #f06292; /* A soft pink accent for highlights */

  --ink: #1a202c;
  --ink-2: #4a5568;
  --ink-3: #718096;
  --border: #e2e8f0; /* Lighter border */
  --bg: #f7fafc; /* Very light grey background */
  --card: #ffffff;
  --success: #48bb78; /* Brighter green */
  --error: #ef4444;
  --warning: #f6ad55; /* Added warning color */

  --radius: 10px; /* Slightly smaller, more modern radius */
  --radius-sm: 6px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* More pronounced shadow */
  --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.12); /* Shadow for hover states */

  --pad: 1rem;
  --pad-lg: 1.5rem;

  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-menu: 'Space Grotesk', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  /* Resume Refiner specific variables (fixing undefined issues) */
  --rr-primary: var(--primary);
  --rr-secondary: var(--secondary);
  --rr-radius: var(--radius);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  line-height: 1.6; /* Slightly increased line height for readability */
  color: var(--ink-2);
  background-color: var(--bg);
}

main.container { max-width: 1200px; margin: 2rem auto; padding: 1rem; } /* Wider container, more margin/padding */

/* Utilities */
.hidden { display: none !important; }
.d-flex { display: flex; }
.text-center { text-align: center; }
.text-light { color: var(--ink-3); }
.required-star { color: var(--error); margin-left: 4px; }
.margin-bottom-sm { margin-bottom: 0.8rem; } /* Increased spacing */
.margin-top-sm { margin-top: 0.8rem; }
.margin-bottom-md { margin-bottom: 1.2rem; }
.padding-top-0 { padding-top: 0; }
.full-width { width: 100%; }
.text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-error-zone { margin-bottom: 1.2rem; }
.client-error-zone:empty { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Highlight badge (yellow) */
.badge-highlight {
  display: inline-block;
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  font-weight: 700;
}

/* Layout aids */
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: 1.3fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.stack-on-mobile { grid-template-columns: 1fr 1fr; }

/* Header */
.header { text-align: center; margin-bottom: 2rem; } /* More spacing */
h1 { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 900; color: var(--primary-ink); margin-bottom: 0.5rem; line-height: 1.1; } /* Larger, bolder heading */
.header p { font-size: 1.1rem; color: var(--ink-3); max-width: 700px; margin: 0 auto; } /* Larger, centered paragraph */

.optional-account-card {
  display: flex;
  align-items: center; /* Center align items */
  gap: 1.2rem; /* Increased gap */
  padding: 1.2rem 1.5rem; /* Increased padding */
  margin-bottom: 1.5rem; /* Increased margin */
  background: #e0ecff; /* Lighter blue background */
  border: 1px solid #a7c7ed; /* Softer border */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.optional-account-card__icon {
  width: 50px; /* Larger icon */
  height: 50px;
  border-radius: var(--radius-sm); /* Square with subtle rounding */
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem; /* Larger icon font size */
  flex-shrink: 0;
}
.optional-account-card h2 {
  font-size: 1.2rem; /* Slightly larger heading */
  margin-bottom: 0.2rem;
  color: var(--primary-ink);
}
.optional-account-card p {
  margin: 0;
  color: var(--ink-2);
  font-weight: 400; /* Lighter font weight */
}
.optional-account-card a {
  font-weight: 600; /* Slightly less bold */
  color: var(--primary);
  text-decoration: none;
}
.optional-account-card a:hover { text-decoration: underline; }
.optional-account-card--signed-in {
  background: #d4edda; /* Softer green background */
  border-color: #8bc34a; /* Softer green border */
}
.optional-account-card--signed-in .optional-account-card__icon {
  background: var(--success);
}

.refine-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.refine-column {
  flex: 1 1 auto;
  min-width: 0;
}
#results-wrapper[data-hidden="true"] {
  display: none;
}
.section-card h2 {
  margin: 0 0 0.2rem;
  font-size: 1.35rem;
  color: var(--primary-ink);
}
.card-step-header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.card-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1d4ed8;
  background: #e0ecff;
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.results-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--pad-lg); /* Consistent padding */
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.2rem; /* Increased gap */
  box-shadow: var(--shadow);
}
.results-card__header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.8rem; /* Increased padding */
}
.results-card__header h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem; /* Larger heading */
  margin-bottom: 0.3rem;
  color: var(--primary-ink);
}
.results-card__eyebrow {
  font-size: 0.85rem; /* Slightly larger */
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.4rem;
}
.results-card__actions {
  padding-top: 0;
  border-top: none;
}
/* Sections / Cards */
.form-section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
  padding: var(--pad-lg);
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--pad); /* Consistent padding */
  margin-bottom: 1.2rem; /* Increased margin */
  background: var(--card);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease-in-out;
}
.card:hover {
  box-shadow: var(--shadow-hover);
}
.card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem; /* Slightly larger title */
  font-weight: 700;
  color: var(--primary-ink);
  margin-bottom: 1rem; /* Increased margin */
  display: flex;
  align-items: center;
  gap: 0.6rem; /* Increased gap */
}

/* Mini card for base resume status */
.mini-card-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fcfcfd;
  min-height: 80px; /* Ensure consistent height */
}
.mini-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--border); /* Default grey */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.mini-card-icon::before {
  content: '📄'; /* Default file emoji */
  font-size: 1.1rem;
  line-height: 1;
}
.mini-card-status.uploaded .mini-card-icon {
  background-color: var(--success);
  color: white;
  border-color: var(--success);
}
.mini-card-status.uploaded .mini-card-icon::before {
  content: '✓'; /* Checkmark for uploaded */
  font-size: 1.1rem;
  font-weight: 900;
}

.mini-card-text { flex-grow: 1; }
.mini-card-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-3);
  margin-bottom: 0.2rem;
}
.mini-card-value {
  font-size: 0.95rem;
  color: var(--primary-ink);
}


/* Form */
.form-group { margin-bottom: 1rem; } /* Increased spacing */
label { display: block; margin-bottom: 0.4rem; font-weight: 600; color: var(--ink); font-size: 0.9rem; } /* Slightly lighter weight, darker color */
.form-control {
  width: 100%;
  padding: 0.7rem 1rem; /* Increased padding */
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); /* Consistent radius */
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: var(--card);
  color: var(--ink);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.2); /* Updated shadow color */
}
textarea.form-control { min-height: 140px; resize: vertical; } /* Slightly taller textarea */

/* Buttons */
.action-buttons { display: flex; gap: 0.8rem; margin-top: 1rem; flex-wrap: wrap; } /* Increased spacing */
.action-buttons.right { justify-content: flex-end; }
.action-buttons.space-between { justify-content: space-between; }
.btn {
  background: var(--primary); /* Solid primary color */
  color: white;
  padding: 0.75rem 1.4rem; /* Increased padding */
  border: none;
  border-radius: var(--radius-sm); /* Consistent radius */
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.btn:hover {
  filter: brightness(1.05); /* Slightly brighter on hover */
  transform: translateY(-2px); /* More pronounced lift */
  box-shadow: var(--shadow-hover);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-2);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Results */
#resumeResults { padding: var(--pad-lg); } /* Increased padding */
.resume-paper {
  background: var(--card);
  padding: 2rem 2.5rem; /* More generous padding */
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  max-width: 850px; /* Slightly wider */
  margin: 0 auto;
  border: 1px solid var(--border);
}
.resume-header {
  text-align: center;
  border-bottom: 2px solid var(--border);
  padding-bottom: 1rem; /* More padding */
  margin-bottom: 1.5rem; /* More margin */
}
.resume-name {
  font-family: var(--font-heading);
  font-size: 2.2rem; /* Larger name */
  font-weight: 900;
  color: var(--primary-ink);
  line-height: 1.1;
}
.resume-title {
  font-size: 1.2rem; /* Larger title */
  color: var(--ink-2);
  font-weight: 600; /* Slightly lighter weight */
  margin: 0.4rem 0 0.8rem 0;
}
.resume-contact {
  font-size: 1rem; /* Larger contact info */
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem; /* Increased gap */
}
.resume-contact a {
  color: var(--primary); /* Use primary color for links */
  text-decoration: none;
  font-weight: 600;
}
.resume-contact a:hover {
  text-decoration: underline;
}
.resume-section {
  margin-bottom: 2rem; /* Increased section spacing */
}
.section-title {
  font-family: var(--font-heading);
  font-size: 1.1rem; /* Larger section title */
  font-weight: 800;
  color: var(--primary-ink);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem; /* More padding */
  margin-bottom: 1rem; /* More margin */
  text-transform: uppercase;
  letter-spacing: 0.08em; /* More letter spacing */
}
.summary-content {
  font-size: 1.05rem; /* Slightly larger summary content */
  line-height: 1.75; /* Increased line height */
  color: var(--ink-2);
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem; /* Increased gap */
  margin-top: 0.6rem;
}
.skill-item {
  background: var(--bg);
  color: var(--ink-2);
  padding: 0.3rem 0.8rem; /* Increased padding */
  border-radius: var(--radius-sm); /* Consistent radius */
  font-size: 0.9rem; /* Slightly larger font */
  font-weight: 600;
  border: 1px solid var(--border);
}
.job-item {
  margin-bottom: 1.5rem; /* Increased margin */
}
.job-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 0.3rem; /* Increased margin */
  gap: 0.5rem; /* Increased gap */
}
.job-title {
  font-weight: 800;
  font-size: 1.1rem; /* Slightly larger font */
  color: var(--primary-ink);
}
.job-company {
  font-weight: 700;
  color: var(--ink-2);
}
.job-meta {
  color: var(--ink-3);
  font-size: 0.95rem; /* Slightly larger font */
}
.job-description {
  margin-top: 0.5rem; /* Increased margin */
}
.job-bullet {
  position: relative;
  padding-left: 1.5rem; /* Increased padding */
  margin-bottom: 0.5rem; /* Increased margin */
  font-size: 1rem; /* Slightly larger font */
  color: var(--ink-2);
}
.job-bullet:before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 1.2em;
  line-height: 1;
}

/* Results actions */
.action-buttons-container {
  padding: var(--pad);
  border-top: 1px solid var(--border);
  background-color: var(--bg);
  position: sticky; /* Make it sticky */
  bottom: 0;
  z-index: 90;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
}
.action-buttons {
  max-width: 816px;
  margin: 0 auto;
  align-items: center;
  justify-content: center; /* Center buttons */
  gap: 0.8rem; /* Increased gap */
  flex-wrap: wrap;
}
.btn {
  background: var(--primary);
  color: white;
  padding: 0.7rem 1.2rem; /* Increased padding */
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem; /* Slightly larger font */
  font-weight: 700; /* Slightly less bold */
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem; /* Increased gap */
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.btn:hover {
  filter: brightness(1.1); /* Brighter on hover */
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.2);
  transform: none;
  box-shadow: none;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border); /* Lighter border */
  color: var(--ink-2); /* Darker text */
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.btn-approve {
  background: #0ea24c;
  border: 1px solid #0ea24c;
  color: #ffffff;
}
.btn-approve:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn-danger {
  color: var(--error);
  border-color: var(--error);
  background: transparent;
}
.btn-danger:hover {
  background-color: #fef2f2;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.results-card__header--sub {
  margin-top: 0.5rem;
  padding-top: 0.35rem;
}
.cover-letter-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  margin-top: 0.75rem;
}
.cover-letter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.65rem;
  margin-bottom: 0.8rem;
}
.cover-letter-title {
  font-size: 1.1rem;
  margin: 0.15rem 0;
  color: var(--primary-ink);
}
.cover-letter-meta {
  text-align: right;
}
.cover-letter-name {
  font-weight: 800;
  color: var(--primary-ink);
}
.cover-letter-role {
  color: var(--ink-2);
  font-weight: 700;
}
.cover-letter-body p {
  margin-bottom: 0.65rem;
  line-height: 1.65;
  color: var(--ink-2);
}
.cover-letter-gap {
  height: 0.6rem;
}
.cover-letter-actions .action-buttons {
  justify-content: flex-start;
}
.action-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.approval-hint {
  margin-top: 0.35rem;
}
.edit-inline {
  margin-top: 1rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.edit-inline__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.edit-inline__status {
  text-align: right;
}
.edit-textarea {
  min-height: 160px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}
.approval-status {
  display: block;
  margin-top: 0.25rem;
}

/* Radio group */
.radio-group { display: flex; flex-direction: column; gap: 0.6rem; }
.radio-label {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; transition: all 0.15s;
}
.radio-label:hover { background-color: #f9fafb; border-color: var(--primary); }
.radio-label input[type='radio'], .radio-label input[type='checkbox'] {
  margin-right: 0.2rem; accent-color: var(--primary); width: 1.05em; height: 1.05em;
}
.radio-label small { color: var(--ink-3); }

/* Navbar */
.navbar {
  background: var(--card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px; /* Slightly taller navbar */
  gap: 1rem;
  position: relative;
}
.nav-brand {
  font-size: 1.25rem; /* Larger brand name */
  font-weight: 900;
  color: var(--primary-ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-brand i {
  color: var(--primary);
  font-size: 1.5rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-link {
  text-decoration: none;
  color: var(--ink-2);
  font-family: var(--font-menu);
  font-weight: 400;
  transition: color 0.15s;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
}
.nav-link:hover {
  color: var(--primary);
  background-color: var(--bg);
}
.nav-links span {
  color: var(--ink-3);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-auth {
  gap: 1rem;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-link-subtle {
  color: var(--ink-3);
  font-family: var(--font-menu);
  font-weight: 400;
}
.nav-link-subtle:hover {
  color: var(--primary);
}
.nav-left {
  display: flex;
  align-items: center;
  margin-right: auto;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: 1rem;
}
.nav-primary-action {
  flex-shrink: 0;
}
.nav-menu-cta {
  box-shadow: none;
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.nav-toggle:hover,
.nav-toggle.is-open {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg);
}
.nav-toggle-icon {
  font-size: 1.2rem;
  line-height: 1;
}
.nav-toggle .icon-close {
  display: none;
}
.nav-toggle.is-open .icon-open {
  display: none;
}
.nav-toggle.is-open .icon-close {
  display: inline;
}
.nav-auth {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-link {
  text-decoration: none;
  color: var(--ink-2);
  font-family: var(--font-menu);
  font-weight: 400;
  transition: color 0.15s;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-link:hover {
  color: var(--primary);
  background-color: var(--bg);
}
.nav-link-subtle {
  color: var(--ink-3);
  font-family: var(--font-menu);
  font-weight: 400;
}
.nav-link-subtle:hover {
  color: var(--primary);
}

/* Flash messages */
.flash-message {
  padding: 0.7rem; margin-bottom: 0.9rem; border-radius: 10px;
  border: 1px solid transparent; display: flex; align-items: center;
}
.flash-message i { margin-right: 0.5rem; }
.flash-success { background-color: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.flash-error { background-color: #fef2f2; color: #991b1b; border-color: #fecaca; }

/* Dashboard */
.dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, #e8eeff, #f8fbff);
  border: 1px solid #d9e4ff;
}
.hero-title {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.8rem;
  color: var(--primary-ink);
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--ink-3);
  margin: 0;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow);
}
.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.2rem;
}
.metric-icon.success { background: #10b981; }
.metric-icon.info { background: #3b82f6; }
.metric-icon.accent { background: #f06292; }
.metric-label { margin: 0; color: var(--ink-3); font-weight: 700; font-size: 0.9rem; }
.metric-value { margin: 0; font-size: 1.4rem; font-weight: 900; color: var(--primary-ink); }

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}
.dashboard-column.slim { position: relative; }
.sticky-card { position: sticky; top: 1rem; }
.upload-card {
  background: #f7fbff;
  border: 1px dashed #c8ddff;
}
.dashboard-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.9rem; }
.empty-state { text-align: center; color: var(--ink-3); padding: 1.25rem 0.75rem; border: 2px dashed var(--border); border-radius: 10px; }
.resume-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.9rem; }
.resume-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: box-shadow 0.15s ease-in-out;
}
.resume-card:hover { box-shadow: 0 10px 22px rgba(0,0,0,0.08); }
.resume-card-content { padding: 1rem; flex-grow: 1; text-decoration: none; color: inherit; }
.resume-card-title { font-size: 1rem; font-weight: 900; color: var(--primary-ink); }
.resume-card-subtitle { color: var(--ink-2); margin: 0.2rem 0 0.55rem; }
.resume-card-date { color: var(--ink-3); font-size: 0.8rem; }
.resume-card-actions { padding: 0.75rem 1rem; border-top: 1px solid var(--border); background-color: #f9fafb; display: flex; gap: 0.5rem; justify-content: flex-end; }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.9rem; }
.btn-danger { color: var(--error); border-color: var(--error); }
.btn-danger:hover { background-color: #fef2f2; }
.dashboard-column .empty-state i { margin-right: 0.5rem; }

/* Footer */
.site-footer {
  margin-top: 2rem;
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem 0;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 700;
}
.footer-links a:hover { color: #93c5fd; }
.footer-copy { font-size: 0.95rem; color: #cbd5e1; }

/* Progress Overlay */
.loading-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(249, 250, 251, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.progress-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.4rem;
  width: 100%;
  max-width: 520px;
}
.progress-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--primary-ink);
  text-align: center;
  margin-bottom: 0.9rem;
}
.progress-subtitle {
  margin: 0 0 0.75rem;
  text-align: center;
}
.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}
.progress-bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #7c9bff);
  transition: width 0.18s ease-out;
}
.progress-percent {
  text-align: center;
  font-weight: 800;
  color: var(--primary-ink);
  margin-top: 0.6rem;
  font-size: 1rem;
}

/* Print */
@media print {
  body { background-color: #ffffff; font-size: 10pt; }
  .no-print { display: none !important; }
  main.container, .form-section, .resume-paper { margin: 0; padding: 0; box-shadow: none; border: none; }
  .resume-paper { max-width: 100%; }
  .resume-contact a { text-decoration: none; color: var(--ink-2); }
}

/* Responsive */
@media (max-width: 920px) {
  main.container { margin: 1rem auto; padding: 0.6rem; }
  .grid.two { grid-template-columns: 1fr; } /* Stack grid on smaller screens */
  .stack-on-mobile { grid-template-columns: 1fr; }
  .refine-layout { flex-direction: column; }
}

@media (max-width: 768px) {
  body { font-size: 15px; }
  .header h1 { font-size: 1.7rem; }
  .header p { font-size: 1rem; }
  .job-header { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
  .resume-paper { padding: 1rem; }
  .resume-name { font-size: 1.5rem; }
  .action-buttons { flex-direction: column; align-items: stretch; }
  .action-buttons .btn, .action-buttons .btn-outline { width: 100%; justify-content: center; }
  .nav-container { height: auto; padding: 0.5rem 0; flex-wrap: wrap; gap: 0.5rem; }
  .nav-left { flex: 1 1 auto; margin-right: 0; }
  .nav-primary-action { width: 100%; order: 3; flex: 1 0 100%; }
  .nav-toggle { display: inline-flex; order: 2; margin-left: auto; }
  .nav-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    align-items: stretch;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    gap: 0.5rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
    order: 4;
    z-index: 110;
  }
  .nav-menu .nav-link,
  .nav-menu .btn {
    width: 100%;
    justify-content: flex-start;
  }
  .nav-menu[data-open="false"] {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
  }
  .nav-menu[data-open="true"] {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .card-step-header { flex-direction: column; }
  .cover-letter-head { flex-direction: column; align-items: flex-start; }
  .cover-letter-meta { text-align: left; }
  .edit-grid { grid-template-columns: 1fr; }
}


.mini-card-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fcfcfd;
  min-height: 80px;
}

.mini-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;           /* square with subtle rounding */
  background-color: #e5e7eb;    /* neutral when not uploaded */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.02);
}

.mini-card-icon::before {
  content: '☐';                 /* empty box style when not uploaded */
  color: #4b5563;
  font-size: 1rem;
  line-height: 1;
}

.mini-card-status.uploaded .mini-card-icon {
  background-color: #0ea24c;    /* vivid green box */
  box-shadow: none;
}

.mini-card-status.uploaded .mini-card-icon::before {
  content: '✓';
  color: #ffffff;               /* white check */
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 900;
}
