/* Fonts (Inter, Space Grotesk) are loaded by views/partials/header.ejs. */

:root {
  /* Premium Palette */
  --primary: #4f46e5;
  /* Indigo 600 - distinct premium blue */
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --secondary: #64748b;
  /* Slate 500 */
  --accent: #ec4899;
  /* Pink 500 */
  --success: #10b981;
  /* Emerald 500 */
  --warning: #f59e0b;
  /* Amber 500 */
  --error: #ef4444;
  /* Red 500 */

  --bg-body: #f8fafc;
  /* Slate 50 */
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  /* Slate 100 */

  --text-main: #0f172a;
  /* Slate 900 */
  --text-muted: #64748b;
  /* Slate 500 */
  --text-light: #94a3b8;
  /* Slate 400 */

  --border: #e2e8f0;
  /* Slate 200 */
  --radius: 12px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);

  /* New Redesign Tokens */
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 80px;
  --dashboard-gap: 2rem;
  --card-bg: rgba(255, 255, 255, 0.9);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

@keyframes rr-spin {
  to {
    transform: rotate(360deg);
  }
}

.ti-spin {
  display: inline-block;
  animation: rr-spin 1s linear infinite;
}

/* Updated Dashboard Layout Shell */
.dashboard-shell-v2 {
  min-height: calc(100vh - 56px);
  margin-top: 56px; /* Offset for existing top navbar */
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.dashboard-main-content {
  padding: 1.8rem 1.6rem 2.4rem;
  min-height: calc(100vh - 56px);
}

@media (max-width: 1024px) {
  .dashboard-main-content {
    padding: 1.5rem;
  }
}

.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-stat-grid-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.dashboard-stat-card {
  position: relative;
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dashboard-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dashboard-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-light);
}

.dashboard-stat-card:hover::before {
  opacity: 1;
}

.dashboard-stat-card__icon {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.dashboard-stat-card span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.dashboard-stat-card strong {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.dashboard-stat-card small {
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* Base Resume Sidebar Card Enhancement */
.sidebar-card.dashboard-rail-card {
  background: white;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04);
  padding: 1.75rem;
  transition: all 0.3s ease;
}

.dashboard-rail-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.07);
}

.dashboard-status-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.dashboard-status-pill--ready {
  background: #ecfdf5;
  color: #059669;
}

.dashboard-status-pill--warning {
  background: #fffbeb;
  color: #d97706;
}

.dashboard-main {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .dashboard-main {
    grid-template-columns: 1fr;
  }
}

.section-title-modern {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* Document Cards (List View) */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.2s ease;
}

.doc-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.doc-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.doc-info {
  flex: 1;
  min-width: 0;
  /* Truncate text properly */
}

.doc-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.doc-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

.doc-actions {
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.doc-card:hover .doc-actions {
  opacity: 1;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-icon:hover {
  background: var(--bg-subtle);
  color: var(--primary);
}

.btn-icon.danger:hover {
  background: #fef2f2;
  color: var(--error);
}

/* Sidebar Cards */
.sidebar-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}



/* 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-body--loading {
  min-height: 160px;
  display: flex;
  align-items: center;
}

.cover-letter-loading {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px dashed rgba(79, 70, 229, 0.35);
  background: rgba(238, 242, 255, 0.6);
  color: var(--ink-2);
  width: 100%;
}

.cover-letter-loading strong {
  display: block;
  color: var(--primary-ink);
  margin-bottom: 0.15rem;
}

.cover-letter-loading .ti {
  font-size: 1.3rem;
  color: var(--primary);
}

.cover-letter-error {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px dashed rgba(220, 38, 38, 0.35);
  background: rgba(254, 242, 242, 0.7);
  color: var(--ink-2);
  width: 100%;
}

.cover-letter-error strong {
  display: block;
  color: #b91c1c;
  margin-bottom: 0.15rem;
}

.cover-letter-error .ti {
  font-size: 1.25rem;
  color: #dc2626;
}

.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:
    radial-gradient(520px 220px at 0% 0%, rgba(96, 165, 250, 0.14), transparent 70%),
    linear-gradient(135deg, #0b1220 0%, #132238 52%, #1b2d46 100%);
  color: #e6eef8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 1.15rem 0 0.8rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.footer-brand {
  min-width: 0;
}

.footer-kicker {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #f8fbff;
}

.footer-brand .footer-contact-link {
  margin-top: 0.35rem;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
}

.footer-contact-link,
.footer-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #c9d7ea;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.footer-contact-link:hover,
.footer-home-link:hover {
  color: #ffffff;
}

.footer-app-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.footer-app-badge {
  display: block;
  width: auto;
  height: 42px;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.34);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.92rem;
  color: #9fb2c9;
}

/* 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.35rem 1.4rem 1.45rem;
  width: 100%;
  max-width: 520px;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.12), transparent 38%),
    linear-gradient(180deg, #ffffff, #f8fcfb);
}

.progress-kicker {
  margin: 0 0 0.4rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--primary);
}

.progress-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--primary-ink);
  text-align: center;
  margin-bottom: 0.5rem;
}

.progress-subtitle {
  margin: 0 0 0.85rem;
  text-align: center;
  line-height: 1.55;
}

.progress-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.progress-dots span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.22);
  animation: progressDotPulse 1.15s ease-in-out infinite;
}

.progress-dots span:nth-child(2) {
  animation-delay: 0.18s;
}

.progress-dots span:nth-child(3) {
  animation-delay: 0.36s;
}

.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;
  position: relative;
  overflow: hidden;
}

.progress-bar__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(-100%);
  animation: progressSheen 1.5s linear infinite;
}

.progress-stage {
  margin: 0.8rem 0 0.3rem;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary-ink);
}

.progress-percent {
  text-align: center;
  font-weight: 800;
  color: var(--primary-ink);
  margin-top: 0.25rem;
  font-size: 1rem;
}

@keyframes progressDotPulse {
  0%, 80%, 100% {
    transform: scale(0.82);
    opacity: 0.45;
  }
  40% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes progressSheen {
  100% {
    transform: translateX(100%);
  }
}

/* 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;
}

/* --- Modern Dashboard Redesign --- */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  /* Reduced padding */
  border: 1px solid var(--border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  /* Reduced gap */
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
  /* Less intense shadow */
}

.stat-icon {
  width: 40px;
  /* Smaller icon container */
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  /* Smaller icon font */
  background: var(--bg);
  color: var(--primary);
}

.stat-icon.purple {
  background: #f3e8ff;
  color: #9333ea;
}

.stat-icon.blue {
  background: #e0f2fe;
  color: #0284c7;
}

.stat-icon.green {
  background: #dcfce7;
  color: #16a34a;
}

.stat-content h3 {
  font-size: 0.8rem;
  /* Smaller label */
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 0.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-content .value {
  font-size: 1.4rem;
  /* Smaller value */
  font-weight: 800;
  color: var(--primary-ink);
  line-height: 1;
}

.dashboard-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .dashboard-main {
    grid-template-columns: 1fr;
  }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-title-modern {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-ink);
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  /* Reduced gap between cards */
}

.doc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  /* Slightly tighter radius */
  padding: 1rem;
  /* Compact padding */
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Reduced gap */
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.doc-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.doc-icon {
  width: 40px;
  /* Smaller icon container */
  height: 40px;
  border-radius: 8px;
  /* Tighter radius */
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  /* Smaller icon font */
  color: #64748b;
  flex-shrink: 0;
}

.doc-card:hover .doc-icon {
  background: #e0e7ff;
  color: var(--primary);
}

.doc-info {
  flex-grow: 1;
  min-width: 0;
}

.doc-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-ink);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-subtitle {
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-bottom: 0.25rem;
}

.doc-meta {
  font-size: 0.8rem;
  color: var(--ink-3);
  display: flex;
  gap: 0.8rem;
}

.doc-actions {
  display: flex;
  gap: 0.5rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.doc-card:hover .doc-actions {
  opacity: 1;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f8fafc;
}

.btn-icon.danger:hover {
  border-color: var(--error);
  color: var(--error);
  background: #fef2f2;
}

.sidebar-card {
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  /* Compact padding */
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  /* Reduced margin */
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-ink);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.base-resume-status {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed var(--border);
  text-align: center;
}

.base-resume-status.active {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.empty-state-modern {
  text-align: center;
  padding: 4rem 2rem;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px dashed var(--border);
}

.empty-icon {
  font-size: 3rem;
  color: var(--ink-3);
  margin-bottom: 1rem;
}

/* Tab like toggles for simpler switching if needed */
.tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
}

.tab {
  padding: 0.8rem 1.2rem;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}


/* --- Menu Improvements --- */
.nav-spacer {
  flex-grow: 1;
}

.btn-sm {
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
}

.nav-primary-action.btn-sm {
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
}

/* Animated underline on nav links */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.25s ease, left 0.25s ease;
}

.nav-link:hover::after {
  width: 80%;
  left: 10%;
}

/* Logout turns red on hover */
.nav-link-subtle:hover {
  color: var(--error);
}

.nav-link-subtle:hover::after {
  background-color: var(--error);
}

/* --- Modern Authentication Pages --- */
.auth-page-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  /* Better vertical centering */
  padding: 1rem;
  background: var(--bg);
}

.auth-card {
  background: white;
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid white;
  /* Subtle border for clean look */
  position: relative;
  overflow: hidden;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-icon-circle {
  width: 60px;
  height: 60px;
  background: #eff6ff;
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1.2rem;
  box-shadow: inset 0 0 0 1px rgba(74, 105, 189, 0.1);
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-ink);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  color: var(--ink-3);
  font-size: 0.95rem;
}

.form-group-modern {
  margin-bottom: 1.4rem;
}

.form-group-modern label {
  display: block;
  font-weight: 600;
  color: var(--primary-ink);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.forgot-link {
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.forgot-link:hover {
  text-decoration: underline;
  color: var(--primary-ink);
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  font-size: 1.2rem;
  pointer-events: none;
  z-index: 2;
}

.form-control-modern {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 3rem !important;
  /* Force padding for icon */
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #f9fafb;
  color: var(--ink);
  font-family: var(--font-body);
}

.form-control-modern::placeholder {
  color: #a0aec0;
}

.form-control-modern:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(74, 105, 189, 0.1);
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  box-shadow: 0 4px 6px rgba(74, 105, 189, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(74, 105, 189, 0.25);
  background: #405cbd;
  /* Slightly darker shift */
}

.auth-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-3);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
  color: var(--primary-ink);
}

/* --- Refine Page Redesign --- */

/* Hero Section */
.refine-hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.refine-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--primary-ink) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.refine-hero p {
  font-size: 1.1rem;
  color: var(--ink-3);
  line-height: 1.6;
}

/* Steps Visualization */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.step-badge {
  background: var(--primary);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.step-line {
  width: 40px;
  height: 2px;
  background: var(--border);
}

/* Modern Form Cards */
.modern-card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.modern-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  /* Subtle lift */
}

.card-header-modern {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f0f7ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.card-title-group h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-ink);
  margin-bottom: 0.25rem;
}

.card-title-group p {
  color: var(--ink-3);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
  position: relative;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: #f0f7ff;
}

.upload-zone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-content i {
  font-size: 2.5rem;
  color: var(--ink-3);
  margin-bottom: 1rem;
  display: block;
}

.upload-text-primary {
  font-weight: 600;
  color: var(--primary);
  display: block;
  margin-bottom: 0.25rem;
}

.upload-text-secondary {
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* Selectable Cards (Radio replacement) */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
}

.options-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.option-card {
  position: relative;
  cursor: pointer;
}

.option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-content {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  transition: all 0.2s;
  height: 100%;
  background: white;
}

.option-card input[type="radio"]:checked+.option-content {
  border-color: var(--primary);
  background: #f0f7ff;
  box-shadow: 0 0 0 1px var(--primary);
  /* Inner ring */
}

.option-card input[type="checkbox"]:checked+.option-content {
  border-color: var(--primary);
  background: #f0f7ff;
  box-shadow: 0 0 0 1px var(--primary);
}

.option-icon {
  font-size: 1.05rem;
  color: var(--ink-3);
  margin-top: 2px;
}

.option-card input[type="radio"]:checked+.option-content .option-icon {
  color: var(--primary);
}

.option-card input[type="checkbox"]:checked+.option-content .option-icon {
  color: var(--primary);
}

.option-info strong {
  display: block;
  color: var(--primary-ink);
  margin-bottom: 0.15rem;
  font-size: 0.9rem;
}

.option-info small {
  color: var(--ink-3);
  font-size: 0.78rem;
  line-height: 1.3;
  display: block;
}

.option-card--toggle .option-content {
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.option-card--toggle .option-info {
  flex: 1;
}

.option-pill {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  border: 1px solid rgba(79, 70, 229, 0.3);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toggle-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: var(--primary-ink);
  font-size: 0.95rem;
}

.toggle-subtitle {
  color: var(--ink-3);
  font-size: 0.8rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5f5;
  transition: 0.2s;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
  background-color: #4f46e5;
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

@media (max-width: 520px) {
  .toggle-row {
    align-items: flex-start;
  }
  .switch {
    margin-top: 0.25rem;
  }
}

/* Textarea Enhancements */
.textarea-modern {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  width: 100%;
  min-height: 160px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.2s;
  background: #fafafa;
}

.textarea-modern:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(74, 105, 189, 0.1);
  outline: none;
}

/* Action Bar */
.sticky-action-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  z-index: 50;
  margin: 0 -1rem -1rem -1rem;
  /* Negative margin to stretch */
}

/* Or Divider */
.or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--ink-3);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.or-divider:not(:empty)::before {
  margin-right: .5em;
}

.or-divider:not(:empty)::after {
  margin-left: .5em;
}


/* --- Mobile Responsiveness Adjustments --- */

@media (max-width: 768px) {

  /* General Container */
  main.container {
    padding: 1rem;
    margin: 1rem auto;
  }

  /* Auth Pages */
  .auth-page-wrapper {
    padding: 1rem 0;
    /* Remove side padding on very small screens */
    align-items: flex-start;
    /* Align to top to prevent cut-off on small screens */
    min-height: auto;
    padding-top: 2rem;
  }

  .auth-card {
    padding: 1.5rem;
    box-shadow: none;
    /* Simplify on mobile */
    border: none;
    background: transparent;
  }

  /* Give auth card a white background only if it's not transparent mode */
  .auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

  /* Refine Form */
  .refine-hero h1 {
    font-size: 1.8rem;
  }

  .modern-card {
    padding: 1.25rem;
  }

  .options-grid {
    grid-template-columns: 1fr;
    /* Stack options vertically */
  }

  .sticky-action-bar {
    position: fixed;
    /* fix to bottom viewport on mobile */
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    margin: 0;
    justify-content: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  }

  .sticky-action-bar button {
    width: 100% !important;
    /* Full width button */
  }

  /* Resume Preview */
  .resume-paper {
    padding: 1.5rem;
    font-size: 0.9rem;
    /* Slightly smaller text */
  }

  .resume-name {
    font-size: 1.8rem;
  }

  /* Dashboard */
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .resume-list {
    grid-template-columns: 1fr;
    /* Stack resume cards */
  }

  /* Adjust form grid stacking */
  .stack-on-mobile {
    grid-template-columns: 1fr !important;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  /* Card headers */
  .card-header-modern {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .card-title-group h3 {
    margin-bottom: 0.5rem;
  }
}

/* Modern Empty State */
.empty-state-modern {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.empty-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-subtle);
  border-radius: 50%;
  color: var(--text-muted);
  /* Ensure icon color is set */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.empty-state-modern h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.empty-state-modern p {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

/* Base Resume Status Indicator */
.base-resume-status {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  border: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.base-resume-status.active {
  background: #f0fdf4;
  /* Light green bg */
  border-color: #bbf7d0;
  /* Light green border */
}

/* Sidebar Specifics */
.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.15s;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sidebar-menu-btn:hover {
  background: var(--bg-card);
  color: var(--primary);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.sidebar-menu-btn i {
  font-size: 1.25rem;
}

/* Mobile Enhancement for Dashboard */
@media (max-width: 600px) {
  .dashboard-container {
    padding: 1rem;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .stat-content .value {
    font-size: 1.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .section-header .btn {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .doc-list .doc-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .doc-info {
    width: 100%;
  }

  .doc-actions {
    width: 100%;
    justify-content: flex-end;
    opacity: 1;
    /* Always show actions on mobile */
    margin-top: 0.5rem;
  }
}

/* =========================
   2026 Design Refresh Layer
   ========================= */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  --secondary: #334155;
  --accent: #0e7490;
  --success: #16a34a;
  --warning: #d97706;
  --error: #dc2626;

  --bg-body: #f7f9fc;
  --bg-card: #ffffff;
  --bg-subtle: #eef2f7;
  --bg: var(--bg-body);
  --card: var(--bg-card);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --ink: var(--text-main);
  --ink-2: #334155;
  --ink-3: #64748b;
  --primary-ink: #101828;

  --border: #dce4ec;
  --radius: 16px;
  --radius-sm: 10px;

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

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.12);
  --shadow-hover: 0 18px 36px rgba(15, 23, 42, 0.14);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;
  --font-menu: 'Space Grotesk', 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 500px at -5% -10%, rgba(101, 87, 238, 0.1), transparent 60%),
    radial-gradient(900px 450px at 105% -20%, rgba(35, 199, 217, 0.08), transparent 56%),
    linear-gradient(180deg, #f9fbfd 0%, var(--bg-body) 34%, #eef2f7 100%);
}

main.container,
.container {
  width: min(1160px, calc(100% - 2rem));
  margin: 1.5rem auto 2.25rem;
  padding: 0 0 1rem;
}

.dashboard-page-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-hover);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.hidden {
  display: none !important;
}

.text-light {
  color: var(--ink-3);
}

.text-center {
  text-align: center;
}

.full-width {
  width: 100%;
}

.d-inline {
  display: inline;
}

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.gap-2 {
  gap: 0.75rem;
}

.margin-auto {
  margin-left: auto;
  margin-right: auto;
}

.max-width-sm {
  max-width: 560px;
}

.max-width-md {
  max-width: 760px;
}

.margin-bottom-0 {
  margin-bottom: 0;
}

.margin-bottom-sm {
  margin-bottom: 0.6rem;
}

.margin-bottom-md {
  margin-bottom: 1rem;
}

.margin-bottom-lg {
  margin-bottom: 1.6rem;
}

.margin-top-sm {
  margin-top: 0.6rem;
}

.margin-top-md {
  margin-top: 1rem;
}

.margin-top-lg,
.margin-lg-top {
  margin-top: 1.6rem;
}

.padding-top-0 {
  padding-top: 0 !important;
}

.padding-lg-x {
  padding-left: 1.4rem;
  padding-right: 1.4rem;
}

.icon-lg {
  font-size: 2.8rem;
}

.font-lg {
  font-size: 1.07rem;
}

.required-star {
  color: var(--error);
}

/* Nav */
.navbar {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(248, 252, 251, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(220, 228, 236, 0.85);
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.05);
}

.nav-container {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #c2410c, #d97706);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(154, 52, 18, 0.22);
}

.nav-premium-badge:hover {
  color: #fff;
  filter: brightness(1.06);
}

.nav-premium-badge i {
  font-size: 0.85rem;
}

.nav-brand i {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.16), rgba(194, 65, 12, 0.12));
  color: var(--primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-links-mobile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-link {
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 9px;
  padding: 0.5rem 0.72rem;
  font-family: var(--font-menu);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(79, 70, 229, 0.09);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-2);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle.is-open .icon-open {
  display: none;
}

.nav-toggle.is-open .icon-close {
  display: inline;
}

.nav-user-menu {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-link-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-link-icon i {
  font-size: 1.35rem;
}

.nav-link-icon--danger {
  color: #dc2626;
}

.nav-link-icon--danger:hover {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
}

/* Hero + Sections */
.header {
  margin: 0 auto 1.25rem;
  max-width: 980px;
  background: linear-gradient(140deg, rgba(79, 70, 229, 0.11), rgba(255, 255, 255, 0.75) 60%);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.45rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 2.6vw, 2.3rem);
  line-height: 1.1;
  color: var(--primary-ink);
}

.header p {
  margin: 0.55rem 0 0;
  color: var(--ink-3);
  max-width: 72ch;
}

.optional-account-card {
  margin: 0 auto 1.2rem;
  max-width: 980px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #ffffff 0%, #f7f9f8 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1rem 1.1rem;
}

.optional-account-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(79, 70, 229, 0.14);
  color: var(--primary);
  font-size: 1.35rem;
}

.optional-account-card h2 {
  margin: 0.05rem 0 0.35rem;
  font-size: 1.1rem;
  color: var(--primary-ink);
}

.optional-account-card p {
  margin: 0.2rem 0;
  color: var(--ink-3);
}

.form-section {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(7px);
  border: 1px solid rgba(220, 228, 236, 0.88);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}

.refine-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1rem;
}

.refine-column {
  min-width: 0;
}

.refine-column[data-hidden='true'] {
  display: none;
}

.results-card {
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: clip;
}

.results-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.8rem;
  border-bottom: 1px solid rgba(220, 228, 236, 0.75);
}

.results-card__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.results-card__header--sub {
  border-top: 1px dashed rgba(220, 228, 236, 0.9);
}

.results-card__header h2 {
  margin: 0.16rem 0 0.3rem;
  color: var(--primary-ink);
  font-size: 1.18rem;
}

.results-card__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
}

.results-card__actions {
  border-top: 1px solid rgba(220, 228, 236, 0.75);
}

.client-error-zone:empty {
  display: none;
}

/* Cards */
.card,
.modern-card,
.sidebar-card,
.auth-card,
.resume-card,
.cover-letter-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.card,
.modern-card {
  padding: 1.2rem;
}

.card-title {
  margin: 0;
  font-size: 1.08rem;
  color: var(--primary-ink);
  font-family: var(--font-heading);
}

.modern-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-header-modern {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(79, 70, 229, 0.13);
  flex-shrink: 0;
}

.card-title-group h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--primary-ink);
}

.card-title-group p {
  margin: 0.25rem 0 0;
  color: var(--ink-3);
  font-size: 0.93rem;
}

/* Forms */
.form-group {
  margin-bottom: 0.95rem;
}

label {
  margin-bottom: 0.38rem;
  font-size: 0.9rem;
  color: var(--ink-2);
  font-weight: 600;
}

.form-control,
.form-control-modern,
.textarea-modern,
textarea.form-control {
  width: 100%;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: #f9fcfb;
  color: var(--ink);
  font-size: 0.96rem;
  padding: 0.72rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control-modern {
  padding-left: 2.7rem !important;
}

.form-control::placeholder,
.form-control-modern::placeholder,
.textarea-modern::placeholder,
textarea.form-control::placeholder {
  color: #94a3b8;
}

.form-control:focus,
.form-control-modern:focus,
.textarea-modern:focus,
textarea.form-control:focus {
  outline: none;
  border-color: rgba(79, 70, 229, 0.58);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
  background: #ffffff;
}

.upload-zone {
  border: 1.5px dashed #b8ccc4;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(237, 246, 243, 0.65), rgba(255, 255, 255, 0.88));
  padding: 1.5rem 1rem;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: rgba(204, 251, 241, 0.46);
}

.upload-content i {
  color: var(--primary);
}

.upload-text-primary {
  color: var(--primary-ink);
}

.upload-text-secondary {
  color: var(--ink-3);
}

.or-divider {
  color: var(--ink-3);
  margin: 1.2rem 0;
}

.or-divider::before,
.or-divider::after {
  border-bottom-color: var(--border);
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.option-content {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfdfc;
}

.option-card input[type='radio']:checked+.option-content {
  border-color: rgba(79, 70, 229, 0.7);
  background: rgba(204, 251, 241, 0.4);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.11);
}

/* Buttons */
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #6d5df4);
  color: #fff;
  padding: 0.66rem 1rem;
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow: 0 12px 20px rgba(79, 70, 229, 0.22);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border);
  color: var(--ink-2);
  box-shadow: none;
}

.btn-outline:hover {
  color: var(--primary);
  border-color: rgba(79, 70, 229, 0.46);
  background: rgba(204, 251, 241, 0.24);
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6d5df4);
}

.btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.84rem;
}

.btn-danger {
  color: var(--error);
  border-color: rgba(220, 38, 38, 0.4);
  background: #fff;
}

.btn-danger:hover {
  color: var(--error);
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.58);
}

.btn-approve {
  background: linear-gradient(135deg, #15803d, #16a34a);
  border-color: #15803d;
}

.danger-panel {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(248, 113, 113, 0.24);
  background:
    radial-gradient(360px 160px at 100% 0%, rgba(248, 113, 113, 0.08), transparent 72%),
    linear-gradient(180deg, rgba(255, 251, 251, 0.98), rgba(255, 255, 255, 0.99));
  box-shadow: 0 18px 36px rgba(127, 29, 29, 0.05);
}

.danger-panel::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #fb7185, #dc2626);
}

.danger-panel__header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.danger-panel__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.95), rgba(255, 241, 242, 0.98));
  color: #dc2626;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.22);
}

.danger-panel__eyebrow {
  margin: 0 0 0.18rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #dc2626;
}

.danger-panel h3 {
  margin: 0;
  font-size: 1.45rem;
  color: #111827;
}

.danger-panel__lead {
  margin: 0;
  max-width: 48ch;
  color: #475569;
  line-height: 1.62;
  font-size: 1rem;
}

.danger-panel__form {
  margin-top: 1.15rem;
}

.danger-panel__button {
  min-width: 220px;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.12);
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.action-buttons--downloads {
  margin-top: 0.7rem;
}

.action-buttons-container {
  margin-top: 0.9rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 251, 250, 0.92));
  padding: 0.85rem 1rem;
}

.action-note {
  margin-bottom: 0.55rem;
}

.badge-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary-ink);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ATS-safe export template gallery */
.resume-template-dialog {
  width: min(1180px, calc(100vw - 2rem));
  max-width: none;
  max-height: min(92vh, 980px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(79, 70, 229, 0.24);
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.3);
}

.resume-template-dialog::backdrop {
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(5px);
}

.resume-template-dialog__shell {
  max-height: min(92vh, 980px);
  overflow-y: auto;
  background: #f7faf9;
}

.resume-template-dialog__toolbar,
.resume-template-dialog__footer {
  position: sticky;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-color: #dfe8e5;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.resume-template-dialog__toolbar {
  top: 0;
  border-bottom: 1px solid #dfe8e5;
}

.resume-template-dialog__toolbar > div {
  display: grid;
  gap: 0.15rem;
}

.resume-template-dialog__toolbar strong {
  color: var(--ink);
  font-size: 1rem;
}

.resume-template-dialog__close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #dbe4e7;
  border-radius: 12px;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 1.25rem;
}

.resume-template-dialog__close:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.resume-template-dialog__footer {
  bottom: 0;
  justify-content: flex-end;
  border-top: 1px solid #dfe8e5;
}

.resume-template-dialog .resume-template-picker {
  margin: 0;
  max-width: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.action-buttons-container--templates {
  position: static;
  padding: 1rem;
}

.resume-template-picker {
  max-width: 1120px;
  margin: 0.85rem auto 1rem;
  padding: 1rem;
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.09), transparent 34%),
    #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.resume-template-picker__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.resume-template-picker__eyebrow {
  color: var(--primary-ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.resume-template-picker__heading h3 {
  margin: 0.15rem 0 0.25rem;
  color: var(--ink);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.resume-template-picker__heading p {
  margin: 0;
  max-width: 68ch;
  color: var(--ink-2);
  font-size: 0.88rem;
  line-height: 1.5;
}

.resume-template-picker__count {
  flex: 0 0 auto;
  padding: 0.38rem 0.65rem;
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary-ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.resume-template-live-preview {
  --preview-accent: #4f46e5;
  --preview-ink: #0f172a;
  --preview-muted: #64748b;
  --preview-line: #d9e6e3;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #dfe8e5;
  border-radius: 15px;
  background: linear-gradient(145deg, #f4f8f7, #fff);
}

.resume-template-live-preview--classic { --preview-accent: #374151; --preview-ink: #111827; --preview-muted: #4b5563; --preview-line: #9ca3af; }
.resume-template-live-preview--executive { --preview-accent: #1e3a5f; --preview-ink: #102a43; --preview-muted: #52667a; --preview-line: #b8c7d4; }
.resume-template-live-preview--minimal { --preview-accent: #27272a; --preview-ink: #18181b; --preview-muted: #71717a; --preview-line: #e4e4e7; }
.resume-template-live-preview--technical { --preview-accent: #1d4ed8; --preview-ink: #172554; --preview-muted: #475569; --preview-line: #bfdbfe; }
.resume-template-live-preview--analyst { --preview-accent: #0e7490; --preview-ink: #0f172a; --preview-muted: #475569; --preview-line: #a5f3fc; }
.resume-template-live-preview--creative { --preview-accent: #c2415a; --preview-ink: #292524; --preview-muted: #78716c; --preview-line: #fecdd3; }
.resume-template-live-preview--academic { --preview-accent: #5b3a29; --preview-ink: #292524; --preview-muted: #6b5d55; --preview-line: #d6ccc2; }
.resume-template-live-preview--compact { --preview-accent: #4338ca; --preview-ink: #1e1b4b; --preview-muted: #5b5b75; --preview-line: #c7d2fe; }
.resume-template-live-preview--impact { --preview-accent: #15803d; --preview-ink: #14261b; --preview-muted: #52635a; --preview-line: #bbf7d0; }
.resume-template-live-preview--midnight-sidebar { --preview-accent: #38bdf8; --preview-ink: #111827; --preview-muted: #64748b; --preview-line: #cbd5e1; }
.resume-template-live-preview--editorial-red { --preview-accent: #e63946; --preview-ink: #20242b; --preview-muted: #6b7280; --preview-line: #d1d5db; }
.resume-template-live-preview--coral-columns { --preview-accent: #ff6b61; --preview-ink: #20242b; --preview-muted: #6b7280; --preview-line: #20242b; }

.resume-template-live-preview__paper {
  position: relative;
  overflow: hidden;
  width: min(100%, 520px);
  min-height: 285px;
  margin: 0 auto;
  padding: 1.15rem 1.3rem;
  border: 1px solid #d9e1e5;
  background: #fff;
  color: var(--preview-ink);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.67rem;
  line-height: 1.35;
  transition: color 180ms ease, font-family 180ms ease, padding 180ms ease, background 180ms ease;
}

.resume-template-live-preview__top-rule {
  height: 3px;
  margin-bottom: 0.55rem;
  background: var(--preview-accent);
}

.resume-template-live-preview__name {
  color: var(--preview-ink);
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1;
}

.resume-template-live-preview__role {
  margin-top: 0.22rem;
  color: var(--preview-accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.resume-template-live-preview__contact {
  margin: 0.22rem 0 0.55rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--preview-line);
  color: var(--preview-muted);
  font-size: 0.55rem;
}

.resume-template-live-preview__section {
  margin: 0.52rem 0 0.25rem;
  padding-bottom: 0.12rem;
  border-bottom: 1px solid var(--preview-line);
  color: var(--preview-accent);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.resume-template-live-preview__paper p {
  margin: 0;
  color: var(--preview-ink);
}

.resume-template-live-preview__paper > strong {
  display: block;
  font-size: 0.69rem;
}

.resume-template-live-preview__paper > small {
  display: block;
  color: var(--preview-muted);
  font-size: 0.55rem;
}

.resume-template-live-preview__paper ul {
  margin: 0.22rem 0 0;
  padding-left: 1rem;
}

.resume-template-live-preview__paper li {
  margin: 0.08rem 0;
}

.resume-template-live-preview__details h4 {
  margin: 0.25rem 0 0.4rem;
  color: var(--preview-ink);
  font-size: 1.25rem;
}

.resume-template-live-preview__details > p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.86rem;
  line-height: 1.5;
}

.resume-template-live-preview__details > small {
  display: block;
  margin-top: 0.65rem;
  color: var(--ink-3);
  font-size: 0.74rem;
  line-height: 1.45;
}

.resume-template-live-preview__formats {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.resume-template-live-preview__formats span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--preview-line);
  border-radius: 999px;
  background: #fff;
  color: var(--preview-accent);
  font-size: 0.72rem;
  font-weight: 800;
}

.resume-template-live-preview--classic .resume-template-live-preview__paper,
.resume-template-live-preview--academic .resume-template-live-preview__paper {
  font-family: Georgia, 'Times New Roman', serif;
}

.resume-template-live-preview--classic .resume-template-live-preview__name,
.resume-template-live-preview--academic .resume-template-live-preview__name,
.resume-template-live-preview--creative .resume-template-live-preview__name,
.resume-template-live-preview--classic .resume-template-live-preview__role,
.resume-template-live-preview--academic .resume-template-live-preview__role,
.resume-template-live-preview--creative .resume-template-live-preview__role,
.resume-template-live-preview--classic .resume-template-live-preview__contact,
.resume-template-live-preview--academic .resume-template-live-preview__contact,
.resume-template-live-preview--creative .resume-template-live-preview__contact {
  text-align: center;
}

.resume-template-live-preview--minimal .resume-template-live-preview__top-rule,
.resume-template-live-preview--minimal .resume-template-live-preview__contact,
.resume-template-live-preview--minimal .resume-template-live-preview__section {
  border-color: transparent;
  background: transparent;
}

.resume-template-live-preview--executive .resume-template-live-preview__top-rule,
.resume-template-live-preview--impact .resume-template-live-preview__top-rule {
  height: 6px;
}

.resume-template-live-preview--executive .resume-template-live-preview__section,
.resume-template-live-preview--analyst .resume-template-live-preview__section,
.resume-template-live-preview--impact .resume-template-live-preview__section {
  border-bottom-width: 3px;
}

.resume-template-live-preview--compact .resume-template-live-preview__paper {
  min-height: 250px;
  padding: 0.8rem 1rem;
  font-size: 0.61rem;
}

.resume-template-live-preview--modern .resume-template-live-preview__paper {
  min-height: 300px;
  padding-right: 37%;
  background: linear-gradient(90deg, #fff 0 67%, #eef2ff 67%);
}

.resume-template-live-preview--modern .resume-template-live-preview__section:last-of-type,
.resume-template-live-preview--modern .resume-template-live-preview__section:last-of-type + p {
  position: absolute;
  left: 70%;
  width: 26%;
}

.resume-template-live-preview--modern .resume-template-live-preview__section:last-of-type { top: 6.2rem; }
.resume-template-live-preview--modern .resume-template-live-preview__section:last-of-type + p { top: 7.65rem; }

.resume-template-live-preview--executive .resume-template-live-preview__paper {
  min-height: 305px;
  padding-top: 1.35rem;
  background: linear-gradient(180deg, #1e3a5f 0 31%, #fff 31%);
}

.resume-template-live-preview--executive .resume-template-live-preview__name,
.resume-template-live-preview--executive .resume-template-live-preview__role,
.resume-template-live-preview--executive .resume-template-live-preview__contact {
  color: #fff;
}

.resume-template-live-preview--executive .resume-template-live-preview__contact {
  border-color: rgba(255, 255, 255, 0.4);
}

.resume-template-live-preview--executive .resume-template-live-preview__section:first-of-type {
  margin-top: 1.1rem;
}

.resume-template-live-preview--technical .resume-template-live-preview__paper {
  min-height: 305px;
  padding-left: 38%;
  background: linear-gradient(90deg, #eff6ff 0 34%, #fff 34%);
}

.resume-template-live-preview--technical .resume-template-live-preview__name,
.resume-template-live-preview--technical .resume-template-live-preview__role,
.resume-template-live-preview--technical .resume-template-live-preview__contact {
  margin-left: -52%;
}

.resume-template-live-preview--technical .resume-template-live-preview__section:last-of-type,
.resume-template-live-preview--technical .resume-template-live-preview__section:last-of-type + p {
  position: absolute;
  left: 4%;
  width: 26%;
}

.resume-template-live-preview--technical .resume-template-live-preview__section:last-of-type { top: 7.2rem; }
.resume-template-live-preview--technical .resume-template-live-preview__section:last-of-type + p { top: 8.65rem; }

.resume-template-live-preview--analyst .resume-template-live-preview__paper {
  min-height: 300px;
  padding-left: 40%;
  background: linear-gradient(90deg, #ecfeff 0 36%, #fff 36%);
}

.resume-template-live-preview--analyst .resume-template-live-preview__section:nth-of-type(5),
.resume-template-live-preview--analyst .resume-template-live-preview__section:nth-of-type(5) + p,
.resume-template-live-preview--analyst .resume-template-live-preview__section:last-of-type,
.resume-template-live-preview--analyst .resume-template-live-preview__section:last-of-type + p {
  position: absolute;
  left: 4%;
  width: 27%;
}

.resume-template-live-preview--analyst .resume-template-live-preview__section:nth-of-type(5) { top: 6.2rem; }
.resume-template-live-preview--analyst .resume-template-live-preview__section:nth-of-type(5) + p { top: 7.65rem; }
.resume-template-live-preview--analyst .resume-template-live-preview__section:last-of-type { top: 12rem; }
.resume-template-live-preview--analyst .resume-template-live-preview__section:last-of-type + p { top: 13.45rem; }

.resume-template-live-preview--compact .resume-template-live-preview__paper {
  min-height: 290px;
  padding-right: 36%;
  background: linear-gradient(90deg, #fff 0 68%, #eef2ff 68%);
}

.resume-template-live-preview--compact .resume-template-live-preview__section:last-of-type,
.resume-template-live-preview--compact .resume-template-live-preview__section:last-of-type + p {
  position: absolute;
  left: 71%;
  width: 25%;
}

.resume-template-live-preview--compact .resume-template-live-preview__section:last-of-type { top: 5.5rem; }
.resume-template-live-preview--compact .resume-template-live-preview__section:last-of-type + p { top: 6.8rem; }

.resume-template-live-preview--impact .resume-template-live-preview__paper {
  min-height: 305px;
  padding-top: 1.4rem;
  background: linear-gradient(180deg, #14532d 0 29%, #f0fdf4 29% 52%, #fff 52%);
}

.resume-template-live-preview--impact .resume-template-live-preview__name,
.resume-template-live-preview--impact .resume-template-live-preview__role,
.resume-template-live-preview--impact .resume-template-live-preview__contact {
  color: #fff;
}

.resume-template-live-preview--impact .resume-template-live-preview__section:first-of-type {
  margin-top: 1rem;
}

.resume-template-live-preview--midnight-sidebar .resume-template-live-preview__paper {
  min-height: 310px;
  padding-left: 37%;
  background: linear-gradient(90deg, #222936 0 32%, #fff 32%);
}

.resume-template-live-preview--midnight-sidebar .resume-template-live-preview__top-rule {
  position: absolute;
  top: 1.2rem;
  left: calc(16% - 34px);
  width: 68px;
  height: 68px;
  margin: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, #dbeafe 0 18%, #64748b 19% 37%, #111827 38% 100%);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.55);
}

.resume-template-live-preview--midnight-sidebar .resume-template-live-preview__name,
.resume-template-live-preview--midnight-sidebar .resume-template-live-preview__role,
.resume-template-live-preview--midnight-sidebar .resume-template-live-preview__contact {
  position: absolute;
  left: 2.5%;
  width: 27%;
  text-align: center;
}

.resume-template-live-preview--midnight-sidebar .resume-template-live-preview__name {
  top: 6.45rem;
  color: #fff;
  font-size: 0.93rem;
}

.resume-template-live-preview--midnight-sidebar .resume-template-live-preview__role {
  top: 7.75rem;
  color: #38bdf8;
  font-size: 0.57rem;
}

.resume-template-live-preview--midnight-sidebar .resume-template-live-preview__contact {
  top: 9.2rem;
  padding: 0;
  border: 0;
  color: #dbe4ee;
  font-size: 0.47rem;
  line-height: 1.5;
}

.resume-template-live-preview--editorial-red .resume-template-live-preview__paper {
  min-height: 305px;
  padding-left: 36%;
  background: linear-gradient(90deg, #f3f4f6 0 31%, #fff 31%);
}

.resume-template-live-preview--editorial-red .resume-template-live-preview__top-rule {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 31%;
  width: 2px;
  height: auto;
  margin: 0;
  background: #20242b;
}

.resume-template-live-preview--editorial-red .resume-template-live-preview__contact {
  position: absolute;
  top: 1.3rem;
  left: 3%;
  width: 25%;
  padding-bottom: 0.55rem;
  border-color: #e63946;
  color: #20242b;
  line-height: 1.55;
}

.resume-template-live-preview--editorial-red .resume-template-live-preview__section:last-of-type,
.resume-template-live-preview--editorial-red .resume-template-live-preview__section:last-of-type + p {
  position: absolute;
  left: 3%;
  width: 25%;
}

.resume-template-live-preview--editorial-red .resume-template-live-preview__section:last-of-type { top: 7rem; }
.resume-template-live-preview--editorial-red .resume-template-live-preview__section:last-of-type + p { top: 8.45rem; }

.resume-template-live-preview--coral-columns .resume-template-live-preview__paper {
  min-height: 300px;
  padding-right: 39%;
  border: 3px solid #20242b;
  background: linear-gradient(90deg, #fff 0 66%, #fff4f2 66%);
}

.resume-template-live-preview--coral-columns .resume-template-live-preview__top-rule {
  height: 5px;
}

.resume-template-live-preview--coral-columns .resume-template-live-preview__section:last-of-type,
.resume-template-live-preview--coral-columns .resume-template-live-preview__section:last-of-type + p {
  position: absolute;
  left: 69%;
  width: 27%;
}

.resume-template-live-preview--coral-columns .resume-template-live-preview__section:last-of-type { top: 6.1rem; }
.resume-template-live-preview--coral-columns .resume-template-live-preview__section:last-of-type + p { top: 7.55rem; }

.resume-template-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.resume-template-card {
  position: relative;
  display: grid;
  grid-template-rows: 142px auto;
  overflow: hidden;
  min-width: 0;
  border: 1px solid #dce4e7;
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.resume-template-card--modern { --template-accent: #4f46e5; --template-ink: #0f172a; --template-line: #d9e6e3; }
.resume-template-card--classic { --template-accent: #374151; --template-ink: #111827; --template-line: #9ca3af; }
.resume-template-card--executive { --template-accent: #1e3a5f; --template-ink: #102a43; --template-line: #b8c7d4; }
.resume-template-card--minimal { --template-accent: #27272a; --template-ink: #18181b; --template-line: #e4e4e7; }
.resume-template-card--technical { --template-accent: #1d4ed8; --template-ink: #172554; --template-line: #bfdbfe; }
.resume-template-card--analyst { --template-accent: #0e7490; --template-ink: #0f172a; --template-line: #a5f3fc; }
.resume-template-card--creative { --template-accent: #c2415a; --template-ink: #292524; --template-line: #fecdd3; }
.resume-template-card--academic { --template-accent: #5b3a29; --template-ink: #292524; --template-line: #d6ccc2; }
.resume-template-card--compact { --template-accent: #4338ca; --template-ink: #1e1b4b; --template-line: #c7d2fe; }
.resume-template-card--impact { --template-accent: #15803d; --template-ink: #14261b; --template-line: #bbf7d0; }
.resume-template-card--midnight-sidebar { --template-accent: #38bdf8; --template-ink: #222936; --template-line: #64748b; }
.resume-template-card--editorial-red { --template-accent: #e63946; --template-ink: #20242b; --template-line: #d1d5db; }
.resume-template-card--coral-columns { --template-accent: #ff6b61; --template-ink: #20242b; --template-line: #20242b; }

.resume-template-card:hover {
  transform: translateY(-2px);
  border-color: var(--template-accent);
  box-shadow: 0 11px 23px rgba(15, 23, 42, 0.1);
}

.resume-template-card:focus-within {
  outline: 3px solid color-mix(in srgb, var(--template-accent) 25%, transparent);
  outline-offset: 2px;
}

.resume-template-card:has(input:checked) {
  border-color: var(--template-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--template-accent) 20%, transparent), 0 11px 23px rgba(15, 23, 42, 0.11);
}

.resume-template-card input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.resume-template-card__check {
  position: absolute;
  z-index: 2;
  top: 0.5rem;
  right: 0.5rem;
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: transparent;
  font-size: 0.78rem;
}

.resume-template-card input:checked ~ .resume-template-card__check {
  border-color: var(--template-accent);
  background: var(--template-accent);
  color: #fff;
}

.resume-template-mini {
  display: flex;
  flex-direction: column;
  width: 92px;
  height: 120px;
  margin: 11px auto;
  padding: 13px 10px 9px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 4px 11px rgba(15, 23, 42, 0.09);
}

.resume-template-mini__name,
.resume-template-mini__contact,
.resume-template-mini__section,
.resume-template-mini__line {
  display: block;
  border-radius: 999px;
}

.resume-template-mini__name {
  width: 58%;
  height: 5px;
  background: var(--template-ink);
}

.resume-template-mini__contact {
  width: 77%;
  height: 2px;
  margin-top: 4px;
  background: #94a3b8;
}

.resume-template-mini__rule {
  display: block;
  width: 100%;
  height: 1px;
  margin: 7px 0 5px;
  background: var(--template-line);
}

.resume-template-mini__section {
  width: 36%;
  height: 3px;
  margin-bottom: 5px;
  background: var(--template-accent);
}

.resume-template-mini__section--second {
  margin-top: 7px;
}

.resume-template-mini__line {
  width: 72%;
  height: 2px;
  margin-bottom: 3px;
  background: #cbd5e1;
}

.resume-template-mini__line--long {
  width: 100%;
}

.resume-template-mini--center .resume-template-mini__name,
.resume-template-mini--double-rule .resume-template-mini__name,
.resume-template-mini--accent-rule .resume-template-mini__name {
  align-self: center;
}

.resume-template-mini--band {
  border-top: 18px solid var(--template-accent);
  padding-top: 8px;
}

.resume-template-mini--none .resume-template-mini__rule {
  visibility: hidden;
}

.resume-template-mini--sidebar {
  padding-left: 37px;
  border-left: 28px solid #222936;
}

.resume-template-mini--sidebar .resume-template-mini__name {
  width: 82%;
}

.resume-template-mini--split-header {
  padding-top: 28px;
  background: linear-gradient(180deg, #f3f4f6 0 25px, #fff 25px);
}

.resume-template-mini--split-header .resume-template-mini__rule {
  background: var(--template-accent);
}

.resume-template-mini--columns {
  background: linear-gradient(90deg, #fff 0 64%, #fff4f2 64%);
  box-shadow: inset 0 0 0 2px #20242b, 0 4px 11px rgba(15, 23, 42, 0.09);
}

.resume-template-mini--tech-grid {
  padding-left: 38px;
  background: linear-gradient(90deg, #eff6ff 0 32px, #fff 32px);
}

.resume-template-mini--analysis-grid {
  background: linear-gradient(90deg, #fff 0 60%, #ecfeff 60%);
}

.resume-template-mini--cards {
  padding-top: 28px;
  background: linear-gradient(180deg, var(--template-ink) 0 23px, #f0fdf4 23px 48px, #fff 48px);
}

.resume-template-mini--cards .resume-template-mini__name,
.resume-template-mini--cards .resume-template-mini__contact {
  position: relative;
  top: -20px;
  background: #fff;
}

.resume-template-card__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.7rem;
  border-top: 1px solid #edf1f2;
}

.resume-template-card__copy strong {
  overflow: hidden;
  color: var(--template-ink);
  font-size: 0.88rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resume-template-card__copy small {
  margin: 0.18rem 0 0.4rem;
  color: var(--template-accent);
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.3;
}

.resume-template-card__copy > span {
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.35;
}

.resume-template-picker__selection {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  margin: 0.85rem 0 0;
  color: var(--ink-2);
  font-size: 0.82rem;
}

.resume-template-picker__selection i,
.resume-template-picker__selection strong {
  color: var(--primary-ink);
}

.dashboard-template-download {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.dashboard-template-download label {
  display: grid;
  gap: 0.28rem;
  min-width: min(300px, 100%);
  color: var(--ink-2);
  font-size: 0.76rem;
  font-weight: 750;
  text-align: left;
}

.dashboard-template-download select {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 2.2rem 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
}

@media (max-width: 980px) {
  .resume-template-live-preview {
    grid-template-columns: 1fr;
  }

  .resume-template-live-preview__details {
    text-align: center;
  }

  .resume-template-live-preview__formats {
    justify-content: center;
  }

  .resume-template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .resume-template-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .resume-template-dialog__shell {
    max-height: 100dvh;
  }

  .resume-template-dialog__toolbar,
  .resume-template-dialog__footer {
    padding: 0.7rem 0.8rem;
  }

  .resume-template-picker {
    padding: 0.8rem;
  }

  .resume-template-picker__heading {
    display: block;
  }

  .resume-template-picker__count {
    display: inline-block;
    margin-top: 0.55rem;
  }

  .resume-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resume-template-card {
    grid-template-rows: 130px auto;
  }

  .resume-template-picker__selection {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.sticky-action-bar {
  margin: 0 -1rem -1rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  background: rgba(252, 255, 254, 0.92);
  backdrop-filter: blur(8px);
}

/* Dashboard */
.dashboard-container {
  padding: 0.4rem;
}

.dashboard-container--enhanced {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 0.9rem;
}

.dashboard-stats {
  gap: 1rem;
}

.stat-card {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #f9fcfb);
  box-shadow: var(--shadow-sm);
}

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

.stat-icon {
  border-radius: 10px;
}

.dashboard-main {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.2rem;
}

.section-title-modern {
  color: var(--primary-ink);
}

.doc-card {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.doc-card:hover {
  border-color: rgba(79, 70, 229, 0.4);
}

.doc-title {
  color: var(--primary-ink);
}

.doc-subtitle,
.doc-meta {
  color: var(--ink-3);
}

.doc-actions {
  opacity: 0.9;
}

.sidebar-menu-btn {
  border-radius: 10px;
}

.sidebar-menu-btn:hover {
  background: rgba(79, 70, 229, 0.09);
  border-color: rgba(79, 70, 229, 0.24);
}

.empty-state,
.empty-state-modern {
  border-radius: 14px;
  border: 1px dashed #b8ccc4;
  background: rgba(238, 245, 243, 0.65);
  color: var(--ink-3);
}

/* Resume + Cover Preview */
#resumeResults {
  padding: 1rem;
}

.resume-paper {
  max-width: 880px;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  background: #fff;
}

.resume-name {
  color: var(--primary-ink);
}

.section-title {
  color: var(--primary-ink);
}

.skill-item {
  background: #f0f6f4;
}

.cover-letter-head {
  border-bottom: 1px solid var(--border);
}

.cover-letter-title {
  margin-bottom: 0.28rem;
}

/* Alerts + Flash */
.flash-message {
  border-radius: 10px;
  margin-bottom: 0.8rem;
  padding: 0.65rem 0.8rem;
}

.alert {
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  margin-bottom: 0.8rem;
}

.alert-info {
  color: #155e75;
  background: #ecfeff;
  border-color: #a5f3fc;
}

/* Auth */
.auth-page-wrapper {
  padding: 1rem;
}

.auth-card {
  max-width: 440px;
  padding: 1.45rem;
}

.auth-icon-circle {
  background: rgba(79, 70, 229, 0.13);
  color: var(--primary);
  box-shadow: none;
}

.auth-title {
  color: var(--primary-ink);
}

.auth-subtitle {
  color: var(--ink-3);
}

.auth-footer {
  margin-top: 1.35rem;
  padding-top: 1rem;
}

/* Errors + Loading */
.error-page {
  max-width: 760px;
  margin: 0 auto;
}

.error-icon {
  color: var(--ink-3);
}

.error-title {
  color: var(--primary-ink);
}

.error-description {
  color: var(--ink-3);
}

.loading-container {
  background: rgba(243, 248, 246, 0.86);
  backdrop-filter: blur(6px);
}

.loading-container.hidden {
  display: none !important;
}

.progress-card {
  border: 1px solid var(--border);
  border-radius: 14px;
}

.progress-title {
  color: var(--primary-ink);
}

.progress-bar__fill {
  background: linear-gradient(90deg, var(--primary), #6d5df4);
}

/* Footer */
.site-footer {
  background:
    linear-gradient(110deg, #0f172a 0%, #102a43 60%, #1e293b 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.26);
  margin-top: 1.5rem;
  padding: 1.25rem 0;
}

.footer-links a {
  font-weight: 600;
}

/* Gentle motion */
.header,
.optional-account-card,
.form-section,
.auth-card,
.stat-card,
.modern-card,
.doc-card,
.sidebar-card,
.resume-paper,
.cover-letter-card {
  animation: rise-in 0.45s ease-out both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .refine-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {

  main.container,
  .container {
    width: calc(100% - 1rem);
    margin-top: 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links-mobile {
    position: absolute;
    top: 72px;
    /* Matches nav-container height */
    left: 0;
    right: 0;
    flex-direction: column;
    width: 100%;
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--border);
    border-top: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    padding: 1rem;
    gap: 0.5rem;
    display: none;
    /* Hidden by default, toggled via JS */
    z-index: 100;
  }

  .nav-links-mobile.is-open {
    display: flex;
  }

  .nav-links-mobile .nav-link,
  .nav-links-mobile .btn {
    width: 100%;
    justify-content: center;
  }

  .nav-user-menu {
    width: 100%;
    justify-content: center;
    gap: 0.6rem;
  }

  .nav-user-menu .nav-link {
    flex: 1;
    max-width: 120px;
  }

  .header {
    padding: 1.1rem;
  }

  .header h1 {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }

  .optional-account-card {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: 0.75rem;
  }

  .card,
  .modern-card,
  .sidebar-card,
  .auth-card,
  .results-card {
    border-radius: 13px;
  }

  .card-header-modern {
    flex-direction: column;
    gap: 0.55rem;
    align-items: flex-start;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .action-buttons .btn,
  .action-buttons .btn-outline,
  .action-buttons .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .action-buttons form {
    width: 100%;
  }

  .sticky-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    border-radius: 0;
    z-index: 85;
  }

  body {
    padding-bottom: 86px;
  }

  .doc-card {
    flex-wrap: wrap;
  }

  .doc-actions {
    width: 100%;
    justify-content: flex-end;
    opacity: 1;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .footer-actions,
  .footer-bottom {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-hero-banner__actions {
    width: 100%;
  }

  .dashboard-hero-banner__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .footer-actions,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-app-badge {
    height: 40px;
  }
}

/* Resume refinement experience: evidence-first quality flow */
.refine-hero {
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2.2rem);
  border-color: rgba(79, 70, 229, 0.24);
  box-shadow: 0 22px 60px rgba(15, 45, 59, 0.09);
}

.refine-hero__copy {
  align-self: center;
  padding: clamp(0.25rem, 1.5vw, 1rem);
}

.refine-hero .home-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.refine-hero .home-hero__title {
  max-width: 15ch;
  font-size: clamp(2rem, 4.7vw, 3.4rem);
  letter-spacing: -0.045em;
}

.refine-hero .home-hero__subtitle {
  max-width: 62ch;
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 1.7;
}

.home-stage {
  margin-top: 0.25rem;
  padding: clamp(0.8rem, 2vw, 1.25rem);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(15, 45, 59, 0.07);
}

.home-stage .wizard-progress {
  margin-bottom: 1rem;
}

.input-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
  color: var(--ink-3);
  font-size: 0.78rem;
  line-height: 1.45;
}

.input-meta span:last-child {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink-2);
}

.options-grid--quality {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.options-grid--quality .option-content {
  min-height: 124px;
}

.resume-quality-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
  margin: 1rem;
  padding: 1.1rem;
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(79, 70, 229, 0.11), transparent 34%),
    linear-gradient(145deg, #f8fffc, #f8fafc);
}

.resume-quality-summary.hidden {
  display: none;
}

.quality-score {
  width: 86px;
  height: 86px;
  padding: 7px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--quality-score), rgba(79, 70, 229, 0.12) 0);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.13);
}

.quality-score > div {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: #fff;
}

.quality-score strong {
  display: block;
  color: var(--primary-ink);
  font-size: 1.55rem;
  line-height: 1;
}

.quality-score span {
  color: var(--ink-3);
  font-size: 0.7rem;
}

.quality-summary__title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin: 0.15rem 0 0.65rem;
}

.quality-summary__title-row h3 {
  margin: 0;
  color: var(--primary-ink);
  font-size: 1.12rem;
}

.quality-verdict {
  display: inline-flex;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.quality-verdict--needs_work {
  background: #fffbeb;
  color: #b45309;
}

.quality-verdict--fail {
  background: #fef2f2;
  color: #b91c1c;
}

.quality-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.quality-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.55rem;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-2);
  font-size: 0.76rem;
}

.quality-notes {
  display: grid;
  gap: 0.4rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.quality-notes li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.42rem;
  color: var(--ink-2);
  font-size: 0.8rem;
}

.quality-notes--strengths i {
  color: #059669;
}

.quality-review {
  margin-top: 0.7rem;
  color: var(--ink-2);
  font-size: 0.82rem;
}

.quality-review summary {
  cursor: pointer;
  color: #b45309;
  font-weight: 700;
}

.quality-notes--warnings i {
  color: #d97706;
}

@media (max-width: 768px) {
  .options-grid--quality {
    grid-template-columns: 1fr;
  }

  .input-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .resume-quality-summary {
    grid-template-columns: 1fr;
  }

  .quality-score {
    width: 76px;
    height: 76px;
  }

  .quality-summary__title-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .resume-paper {
    padding: 1rem;
  }

  .resume-name {
    font-size: 1.7rem;
  }

  .progress-card {
    margin: 0 0.7rem;
    width: calc(100% - 1.4rem);
  }
}

@media print {
  body {
    background: #fff;
    padding-bottom: 0;
  }

  .header,
  .form-section,
  .card,
  .modern-card,
  .site-footer {
    box-shadow: none !important;
    background: #fff !important;
    border-color: #e5e7eb !important;
  }
}

/* ===============================
   Surface Focus: Home/Dashboard/Auth
   =============================== */
.home-page {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.home-hero {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(79, 70, 229, 0.2);
  background:
    radial-gradient(620px 230px at 15% 0%, rgba(79, 70, 229, 0.2), transparent 70%),
    radial-gradient(540px 240px at 90% 20%, rgba(194, 65, 12, 0.18), transparent 74%),
    linear-gradient(140deg, #ffffff 0%, #f2faf7 100%);
  padding: clamp(1.1rem, 2vw, 1.8rem);
  box-shadow: var(--shadow-sm);
}

.home-hero__eyebrow {
  margin: 0;
  font-family: var(--font-menu);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
}

.home-hero__title {
  margin: 0.45rem 0 0.4rem;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.06;
  color: var(--primary-ink);
}

.home-hero__subtitle {
  margin: 0;
  max-width: 76ch;
  color: var(--ink-2);
}

.home-hero__pills {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.home-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.36rem 0.68rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-ink);
  border: 1px solid rgba(79, 70, 229, 0.24);
  background: rgba(255, 255, 255, 0.84);
}

.home-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.home-step-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.8rem 0.9rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.home-step-card__index {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #6d5df4);
}

.home-step-card h3 {
  margin: 0.5rem 0 0.3rem;
  font-size: 0.95rem;
  color: var(--primary-ink);
}

.home-step-card p {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.86rem;
  line-height: 1.4;
}

.home-stage {
  border-radius: calc(var(--radius) + 3px);
}

.dashboard-container--enhanced .section-title-modern i {
  color: var(--primary);
}

.dashboard-shell-v2 {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.dashboard-overview {
  border: 1px solid rgba(79, 70, 229, 0.18);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  background:
    radial-gradient(520px 220px at 8% 0%, rgba(79, 70, 229, 0.14), transparent 70%),
    linear-gradient(145deg, #ffffff 0%, #f6fbf9 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.dashboard-overview__main {
  min-width: 0;
  max-width: 72ch;
}

.dashboard-kicker,
.dashboard-mini-kicker,
.dashboard-panel__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.dashboard-overview h1 {
  margin: 0.25rem 0 0.3rem;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #0f2d3b;
}

.dashboard-overview__lead {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.45;
  color: #49657a;
}

.dashboard-inline-link {
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.dashboard-inline-link:hover {
  color: #4338ca;
}

.dashboard-action-stack {
  display: grid;
  gap: 0.55rem;
}

.dashboard-action-stack--centered {
  max-width: 280px;
  margin: 1rem auto 0;
}

.btn-create-scratch {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: rgba(37, 99, 235, 0.24);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.btn-create-scratch:hover {
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.22);
}

.dashboard-create-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.1rem 1rem 2.4rem;
}

.dashboard-create-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 1.25rem 1.3rem;
  border: 1px solid rgba(220, 228, 236, 0.88);
  border-radius: 28px;
  background:
    radial-gradient(420px 180px at 8% 0%, rgba(79, 70, 229, 0.1), transparent 72%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 251, 249, 0.96));
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.05);
}

.dashboard-create-hero__copy {
  min-width: 0;
}

.dashboard-create-hero h1 {
  margin: 0.35rem 0 0.45rem;
  color: #0f2d3b;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.dashboard-create-hero__lead {
  max-width: 64ch;
  margin: 0;
  color: #4c677a;
  font-size: 1rem;
  line-height: 1.62;
}

.dashboard-create-hero__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.dashboard-create-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 0.88rem;
  border-radius: 999px;
  border: 1px solid rgba(79, 70, 229, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: #0f2d3b;
  font-size: 0.88rem;
  font-weight: 700;
}

.dashboard-create-chip i {
  color: var(--primary);
  font-size: 1rem;
}

.dashboard-create-stage {
  padding: 1rem;
}

.dashboard-create-form {
  display: grid;
  gap: 1rem;
}

.create-section-card {
  padding: 1.2rem 1.25rem;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 250, 0.95));
}

.create-section-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(220, 228, 236, 0.72);
}

.create-section-card__lede {
  max-width: 68ch;
  margin: 0.25rem 0 0;
  color: #587185;
  font-size: 0.95rem;
  line-height: 1.58;
}

.create-grid {
  display: grid;
  gap: 0.95rem;
}

.create-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.create-textarea {
  resize: vertical;
}

.create-textarea--summary {
  min-height: 170px;
}

.create-textarea--bullets {
  min-height: 145px;
}

.create-collection {
  display: grid;
  gap: 1rem;
}

.create-item-card {
  padding: 1rem 1rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(220, 228, 236, 0.88);
  background:
    linear-gradient(180deg, rgba(252, 255, 254, 0.98), rgba(246, 251, 249, 0.96));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.create-item-card--compact {
  padding-bottom: 0.95rem;
}

.create-item-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.95rem;
}

.create-item-card__badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.create-add-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 1rem;
}

.create-add-row .btn {
  min-width: 180px;
}

.create-savebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(220, 228, 236, 0.88);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248, 252, 251, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
}

.create-savebar__copy strong {
  display: block;
  color: #0f2d3b;
  font-size: 1rem;
}

.create-savebar__copy p {
  margin: 0.22rem 0 0;
  color: #60798c;
  font-size: 0.9rem;
  line-height: 1.55;
}

.create-savebar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dashboard-stat-grid-v2 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.dashboard-stat-card {
  min-width: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  border: 1px solid rgba(220, 228, 236, 0.86);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 250, 0.94));
  padding: 0.78rem 0.85rem 0.82rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.06);
  border-color: rgba(79, 70, 229, 0.3);
}

.dashboard-stat-card__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin-bottom: 0.65rem;
  border-radius: 10px;
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary);
  font-size: 1rem;
}

.dashboard-stat-card span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #63798b;
}

.dashboard-stat-card strong {
  display: block;
  margin-top: 0.18rem;
  font-size: 1.28rem;
  color: #102d3c;
  line-height: 1.1;
}

.dashboard-stat-card small {
  display: block;
  margin-top: 0.18rem;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.dashboard-stat-card--link {
  cursor: pointer;
}

.dashboard-layout-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 0.8rem;
  align-items: start;
}

.dashboard-top-rail {
  min-width: 0;
  width: min(1040px, 100%);
  justify-self: center;
}

.dashboard-panels-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: start;
}

.dashboard-content--v2,
.dashboard-sidebar--v2 {
  min-width: 0;
}

.dashboard-content--v2 {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.dashboard-panel {
  border-radius: 14px;
  border: 1px solid rgba(220, 228, 236, 0.82);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 250, 0.88));
  padding: 0.82rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.dashboard-panel--primary {
  background:
    radial-gradient(430px 180px at 0% 0%, rgba(79, 70, 229, 0.18), transparent 66%),
    linear-gradient(180deg, rgba(244, 253, 250, 0.98), rgba(233, 247, 242, 0.92));
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.08);
}

.dashboard-panel--letters {
  background:
    radial-gradient(440px 180px at 100% 0%, rgba(37, 99, 235, 0.18), transparent 66%),
    linear-gradient(180deg, rgba(245, 248, 255, 0.99), rgba(232, 240, 255, 0.93));
  border-color: rgba(147, 197, 253, 0.68);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
}

.dashboard-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.dashboard-panel__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dashboard-panel__lede {
  margin: 0.18rem 0 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.35;
}

.dashboard-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.26rem 0.56rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(79, 70, 229, 0.18);
  color: #14516b;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-pager-form {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.22rem 0.26rem 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(220, 228, 236, 0.86);
  background: rgba(255, 255, 255, 0.9);
}

.dashboard-pager-form__label {
  margin: 0;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
}

.dashboard-pager-form__select.select-modern {
  min-width: 74px;
  padding: 0.28rem 1.9rem 0.28rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background-color: #f7faf9;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: none;
}

.dashboard-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(220, 228, 236, 0.72);
}

.dashboard-pager__summary {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.dashboard-pager__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.dashboard-pager__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 0.4rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(220, 228, 236, 0.88);
  background: rgba(255, 255, 255, 0.94);
  color: #264559;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.dashboard-pager__button:hover {
  background: #f3fbfa;
  border-color: rgba(79, 70, 229, 0.26);
  color: #4f46e5;
}

.dashboard-pager__button.is-disabled {
  pointer-events: none;
  opacity: 0.48;
}

.section-header--hidden {
  display: none;
}

.doc-list--dashboard {
  gap: 0.5rem;
}

.doc-list--dashboard .doc-card {
  border-radius: 12px;
  padding: 0.58rem 0.65rem 0.58rem 0.58rem;
  background: rgba(255, 255, 255, 0.92);
  position: relative;
  gap: 0.72rem;
}

.doc-list--dashboard .doc-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.9);
  font-size: 0.98rem;
}

.doc-list--dashboard .doc-title {
  font-size: 0.88rem;
  margin-bottom: 0.04rem;
  line-height: 1.15;
}

.doc-list--dashboard .doc-subtitle,
.doc-list--dashboard .doc-meta {
  color: #64748b;
  font-size: 0.75rem;
  line-height: 1.2;
}

.doc-list--dashboard .doc-subtitle {
  margin-bottom: 0.08rem;
}

.doc-list--dashboard .doc-meta {
  gap: 0.55rem;
  align-items: center;
}

.doc-list--dashboard .doc-meta i {
  font-size: 0.88rem;
}

.doc-list--dashboard .doc-actions {
  gap: 0.35rem;
  align-items: center;
}

.doc-list--dashboard .btn-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border-color: rgba(220, 228, 236, 0.92);
  background: rgba(255, 255, 255, 0.96);
  color: #4b6175;
}

.doc-list--dashboard .btn-icon i {
  font-size: 0.92rem;
}

.doc-list--dashboard .btn-icon:hover {
  background: #f9fbfd;
}

.doc-list--dashboard .btn-icon--open {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border-color: rgba(79, 70, 229, 0.28);
  background: linear-gradient(135deg, #f3fbfa, #dff5f2);
  color: #4f46e5;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.1);
}

.doc-list--dashboard .btn-icon--open i {
  font-size: 0.92rem;
  font-weight: 700;
}

.doc-list--dashboard .btn-icon--open:hover {
  border-color: rgba(79, 70, 229, 0.45);
  background: linear-gradient(135deg, #e9faf6, #d5f4ef);
  color: #4338ca;
  box-shadow: 0 6px 12px rgba(79, 70, 229, 0.12);
}

.doc-list--dashboard .btn-icon.danger:hover {
  background: #fff4f4;
}

.dashboard-sidebar--v2 {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.dashboard-rail-card {
  border-radius: 14px;
  padding: 0.82rem;
  margin-bottom: 0;
}

.dashboard-rail-card--top {
  width: 100%;
}

.dashboard-rail-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.72rem;
}

.dashboard-rail-card__body {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1.08fr);
  gap: 0.75rem;
  align-items: stretch;
}

.dashboard-rail-card__body--source-unified {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-rail-card__lede {
  margin: 0.4rem 0 0;
  max-width: 54ch;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
  font-weight: 500;
}

.dashboard-rail-card .sidebar-title {
  margin: 0.14rem 0 0;
  font-size: 1rem;
}

.dashboard-rail-card .sidebar-title.dashboard-rail-card__title {
  font-size: 1.02rem;
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-status-pill--ready {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.dashboard-status-pill--warning {
  background: rgba(217, 119, 6, 0.14);
  color: #92400e;
}

.base-resume-library {
  border-radius: 12px;
  border: 1px solid rgba(220, 228, 236, 0.82);
  background: rgba(255, 255, 255, 0.86);
  padding: 0.68rem;
  height: 100%;
}

.base-resume-library__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.55rem;
  color: #123247;
  font-size: 0.8rem;
  font-weight: 700;
}

.base-resume-library--unified .base-resume-library__head {
  margin-bottom: 0.62rem;
}

.base-resume-library__head small {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
}

.base-resume-library__list {
  display: grid;
  gap: 0.45rem;
  max-height: 196px;
  overflow-y: auto;
}

.base-resume-library__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(220, 228, 236, 0.75);
  background: linear-gradient(180deg, rgba(248, 251, 250, 0.96), rgba(255, 255, 255, 0.98));
  padding: 0.56rem 0.65rem;
}

.base-resume-library__item.is-latest {
  border-color: rgba(79, 70, 229, 0.28);
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.base-resume-library__item.is-default-featured {
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.72rem 0.78rem;
}

.base-resume-library__featured-kicker {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #4f46e5;
}

.base-resume-library__item-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}

.base-resume-library__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.base-resume-library__actions .btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.875rem;
}

.base-resume-library__featured-hint {
  margin: 0;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(79, 70, 229, 0.14);
  font-size: 0.74rem;
  line-height: 1.42;
  color: #64748b;
}

.base-resume-library__item-copy {
  min-width: 0;
}

.base-resume-library__item-copy strong {
  display: block;
  color: #123247;
  font-size: 0.86rem;
}

.base-resume-library__item-copy small {
  display: block;
  margin-top: 0.1rem;
  color: #64748b;
  font-size: 0.74rem;
  line-height: 1.4;
}

.base-resume-library__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.46rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.dashboard-rail-card .base-resume-status {
  padding: 0.82rem;
  border-radius: 12px;
  height: 100%;
  justify-content: center;
}

.dashboard-rail-card .base-resume-status strong {
  font-size: 0.94rem;
}

.dashboard-rail-card--soft {
  background:
    radial-gradient(300px 140px at 100% 0%, rgba(14, 165, 233, 0.1), transparent 68%),
    linear-gradient(180deg, rgba(248, 252, 255, 0.95), rgba(246, 250, 249, 0.92));
}

.dashboard-note-list {
  display: grid;
  gap: 0.7rem;
}

.dashboard-note-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: flex-start;
  border-radius: 13px;
  padding: 0.72rem 0.8rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(220, 228, 236, 0.72);
  color: #456174;
}

.dashboard-note-item i {
  color: var(--primary);
  margin-top: 0.05rem;
}

.dashboard-hero-banner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: calc(var(--radius) + 3px);
  padding: 1rem;
  background:
    radial-gradient(340px 180px at 6% 0%, rgba(79, 70, 229, 0.16), transparent 70%),
    linear-gradient(140deg, #ffffff, #f4faf8);
}

.dashboard-hero-banner h1 {
  margin: 0.28rem 0 0.36rem;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  color: var(--primary-ink);
}

.dashboard-hero-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.dashboard-hero-banner__chipset {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.dashboard-chip {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  padding: 0.65rem 0.75rem;
}

.dashboard-chip span {
  display: block;
  font-size: 0.79rem;
  color: var(--ink-3);
}

.dashboard-chip strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.2rem;
  color: var(--primary-ink);
}

.dashboard-chip--link {
  text-decoration: none;
  color: inherit;
}

.dashboard-chip--link:hover {
  border-color: rgba(79, 70, 229, 0.42);
  background: rgba(204, 251, 241, 0.34);
}

.dashboard-section {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(220, 228, 236, 0.74);
  border-radius: 14px;
  padding: 0.85rem;
}

.stat-card--interactive {
  color: inherit;
  text-decoration: none;
}

.doc-link-wrap {
  color: inherit;
  text-decoration: none;
  display: block;
}

.empty-state-modern--compact {
  padding: 1.15rem 0.85rem;
}

.base-resume-status__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}

.base-resume-status__icon.success {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.12);
}

.base-resume-status__icon.warning {
  color: #d97706;
  background: rgba(217, 119, 6, 0.14);
}

.base-resume-status__meta {
  margin-bottom: 0;
  font-size: 0.78rem;
}

.base-resume-status__note {
  margin: 0.28rem 0 0;
  font-size: 0.76rem;
  line-height: 1.35;
}

.base-upload-form {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.base-upload-form__label {
  font-size: 0.76rem;
}

.dashboard-panel .section-title-modern,
.dashboard-rail-card .section-title-modern {
  font-size: 1.18rem;
}

.dashboard-panel .section-title-modern i {
  font-size: 0.98rem;
}

.dashboard-rail-card .dashboard-mini-kicker,
.dashboard-overview .dashboard-kicker,
.dashboard-panel__eyebrow {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
}

.dashboard-panel .empty-state-modern {
  padding: 1.5rem 1rem;
  border-radius: 12px;
}

.dashboard-panel .empty-icon {
  width: 46px;
  height: 46px;
  font-size: 1.35rem;
  margin-bottom: 0.7rem;
}

.dashboard-panel .empty-state-modern h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.dashboard-panel .empty-state-modern p {
  max-width: 34ch;
  margin-bottom: 0.9rem;
  font-size: 0.84rem;
}

.dashboard-action-stack .btn {
  padding-block: 0.58rem;
}

.dashboard-action-stack--rail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(840px, 100%);
  margin: 0 auto;
}

.dashboard-action-stack--balanced {
  margin-top: 0.35rem;
}

.dashboard-action-stack--balanced .btn.full-width {
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.12);
}

.dashboard-action-stack--balanced .btn-outline.full-width {
  border-width: 1.5px;
  font-weight: 600;
}

.sidebar-menu-btn--danger {
  color: var(--error);
}

.sidebar-menu-btn--danger:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.28);
}

.auth-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.auth-aside {
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(79, 70, 229, 0.22);
  background:
    radial-gradient(420px 220px at 15% 0%, rgba(79, 70, 229, 0.18), transparent 72%),
    linear-gradient(145deg, #f5fcf9 0%, #f8fbff 100%);
  padding: 1.1rem 1rem;
  box-shadow: var(--shadow-sm);
}

.auth-aside__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.14);
  color: var(--primary-ink);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-aside__title {
  margin: 0.75rem 0 0.35rem;
  font-size: 1.3rem;
  line-height: 1.15;
  color: var(--primary-ink);
}

.auth-aside__subtitle {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.92rem;
  line-height: 1.52;
}

.auth-benefits {
  list-style: none;
  margin: 0.95rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.auth-benefits i {
  color: var(--primary);
}

.auth-shell .auth-page-wrapper {
  min-height: auto;
  padding: 0;
  align-items: stretch;
}

.auth-card--wide {
  max-width: none;
  width: 100%;
  padding: 1.45rem;
}

.auth-field-note {
  font-weight: 400;
  color: var(--ink-3);
  font-size: 0.85em;
}

.auth-field-hint {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--ink-3);
}

@media (max-width: 980px) {
  .home-steps {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-grid-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-panels-grid,
  .dashboard-layout-v2 {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-banner__chipset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    display: none;
  }
}

@media (max-width: 640px) {
  .dashboard-stat-grid-v2 {
    grid-template-columns: 1fr;
  }

  .dashboard-panel__head,
  .dashboard-rail-card__head {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-action-stack--rail {
    grid-template-columns: 1fr;
  }

  .dashboard-overview__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-hero-banner__chipset {
    grid-template-columns: 1fr;
  }

  .home-hero__pills {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 960px) {
  .dashboard-top-rail {
    width: 100%;
  }

  .dashboard-rail-card__body,
  .dashboard-action-stack--rail,
  .dashboard-panels-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dashboard-panel__tools,
  .dashboard-pager,
  .dashboard-pager__actions {
    width: 100%;
  }

  .dashboard-panel__tools,
  .dashboard-pager {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-pager-form {
    justify-content: space-between;
  }

  .dashboard-pager__button {
    flex: 1;
  }
}

/* Balashahr Login */
.balashahr-auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1rem;
  align-items: stretch;
}

.balashahr-auth-intro {
  border-radius: 18px;
  border: 1px solid rgba(11, 78, 156, 0.2);
  background:
    radial-gradient(700px 240px at 15% -8%, rgba(14, 165, 233, 0.2), transparent 70%),
    radial-gradient(550px 220px at 100% 0%, rgba(37, 99, 235, 0.2), transparent 70%),
    linear-gradient(170deg, #0b1728 0%, #12203a 100%);
  color: #dbeafe;
  padding: 1.3rem 1.2rem;
  box-shadow: 0 22px 50px rgba(2, 6, 23, 0.24);
}

.balashahr-auth-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 700;
  color: #7dd3fc;
}

.balashahr-auth-intro h1 {
  margin: 0.45rem 0;
  color: #f8fafc;
  font-size: clamp(1.35rem, 2.2vw, 2.05rem);
}

.balashahr-auth-intro p {
  margin: 0;
  color: #bfdbfe;
}

.balashahr-auth-points {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.balashahr-auth-points li {
  border-radius: 10px;
  border: 1px solid rgba(147, 197, 253, 0.24);
  background: rgba(15, 23, 42, 0.56);
  color: #dbeafe;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
}

.balashahr-auth-points li i {
  color: #7dd3fc;
}

.balashahr-auth-card {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  padding: 1.2rem;
  box-shadow: 0 24px 50px rgba(2, 6, 23, 0.22);
}

.balashahr-auth-card__head {
  margin-bottom: 0.8rem;
}

.balashahr-auth-card__head h2 {
  margin: 0.35rem 0 0.15rem;
  color: #f8fafc;
  font-size: 1.2rem;
}

.balashahr-auth-card__head p {
  margin: 0;
  color: #94a3b8;
}

.balashahr-auth-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, 0.45);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(37, 99, 235, 0.2));
}

.balashahr-auth-form {
  margin-top: 0.7rem;
}

.balashahr-auth-form label {
  color: #cbd5e1;
}

.balashahr-auth-form .form-control-modern {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.65);
  color: #f8fafc;
}

.balashahr-auth-form .form-control-modern::placeholder {
  color: #64748b;
}

.balashahr-auth-meta {
  margin: 0.8rem 0 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .balashahr-auth-shell {
    grid-template-columns: 1fr;
  }
}

/* Admin Dashboard */
.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;
}

.admin-shell {
  position: relative;
  min-height: calc(100vh - 56px);
  padding: 1.2rem clamp(0.8rem, 1.6vw, 1.25rem) 2rem;
  background:
    radial-gradient(900px 360px at -10% -5%, rgba(13, 148, 136, 0.14), transparent 70%),
    radial-gradient(800px 340px at 105% 0%, rgba(249, 115, 22, 0.12), transparent 68%),
    linear-gradient(180deg, #f7fbfb 0%, #eef4f3 48%, #f8fbfc 100%);
  color: #0f172a;
  overflow: hidden;
}

.admin-shell::before,
.admin-shell::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.7;
  pointer-events: none;
}

.admin-shell::before {
  width: 280px;
  height: 280px;
  top: 5rem;
  right: -80px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 72%);
}

.admin-shell::after {
  width: 360px;
  height: 360px;
  bottom: -120px;
  left: -140px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 72%);
}

.admin-shell > * {
  position: relative;
  z-index: 1;
}

.admin-shell .flash-message {
  max-width: 1480px;
  margin: 0 auto 0.75rem;
}

.admin-shell .text-light {
  color: #64748b;
}

.admin-shell code {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: #4f46e5;
}

.admin-console-header,
.admin-console-grid,
.admin-panel--featured {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.admin-console-header {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
  gap: 0.95rem;
  margin-bottom: 1rem;
}

.admin-console-header__copy,
.admin-metric-card,
.admin-panel {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 20px 45px -28px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(14px);
}

.admin-console-header__copy {
  padding: clamp(1rem, 2vw, 1.35rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 247, 0.92)),
    linear-gradient(90deg, rgba(79, 70, 229, 0.08), rgba(245, 158, 11, 0.06));
}

.admin-console-header__copy::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 88%);
  pointer-events: none;
}

.admin-console-badge-row,
.admin-console-highlight-row,
.admin-user-topline,
.admin-user-meta-row,
.admin-admin-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-console-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(13, 148, 136, 0.18);
  background: rgba(238, 242, 255, 0.92);
  color: #4f46e5;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-console-badge--muted {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #475569;
}

.admin-console-eyebrow,
.admin-panel__eyebrow {
  margin: 0.8rem 0 0.42rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #4f46e5;
  font-weight: 800;
}

.admin-console-header h1 {
  position: relative;
  margin: 0;
  max-width: 14ch;
  color: #0f172a;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.04;
}

.admin-console-intro {
  position: relative;
  margin: 0.65rem 0 0;
  max-width: 62ch;
  color: #334155;
  font-size: 0.9rem;
}

.admin-console-highlight-row {
  position: relative;
  margin-top: 1rem;
}

.admin-console-highlight {
  flex: 1 1 180px;
  min-width: 0;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

.admin-console-highlight span,
.admin-metric-card span,
.admin-featured-stat span,
.admin-intel-card span,
.admin-resume-summary span {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.admin-console-highlight strong,
.admin-metric-card strong,
.admin-featured-stat strong,
.admin-intel-card strong {
  display: block;
  margin-top: 0.18rem;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1.05;
}

.admin-console-highlight small,
.admin-metric-card small,
.admin-featured-stat small,
.admin-intel-card small,
.admin-resume-summary small,
.admin-note-item span {
  display: block;
  margin-top: 0.28rem;
  color: #64748b;
  font-size: 0.74rem;
  line-height: 1.35;
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.admin-metric-card {
  padding: 0.9rem 0.9rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(249, 250, 251, 0.92)),
    linear-gradient(135deg, rgba(14, 165, 233, 0.08), transparent 60%);
}

.admin-metric-card::before,
.admin-panel::before {
  content: '';
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.85), rgba(37, 99, 235, 0.75), rgba(249, 115, 22, 0.72));
  opacity: 0.9;
}

.admin-metric-card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(37, 99, 235, 0.1));
  color: #4f46e5;
  font-size: 1.05rem;
}

.admin-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(320px, 0.9fr);
  gap: 0.95rem;
  align-items: start;
}

.admin-console-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.admin-console-grid > * {
  min-width: 0;
}

.admin-side-stack {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  position: sticky;
  top: 84px;
  align-self: start;
}

.admin-panel {
  padding: 0.9rem;
}

.admin-panel--embedded {
  margin-top: 0.8rem;
}

.admin-panel h2,
.admin-panel h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.98rem;
}

.admin-panel h2 i,
.admin-panel h3 i {
  margin-right: 0.35rem;
  color: #4f46e5;
}

.admin-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.admin-panel__head--featured {
  align-items: center;
}

.admin-panel__head--directory {
  margin-bottom: 0.85rem;
}

.admin-panel__title-stack {
  min-width: 0;
}

.admin-panel__eyebrow {
  margin-top: 0;
}

.admin-panel__lede {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.82rem;
}

.admin-form-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.admin-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.55rem;
  min-width: min(100%, 400px);
  align-self: stretch;
}

.admin-search-box {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.92);
  min-height: 2.5rem;
}

.admin-search-box i {
  color: #64748b;
  font-size: 0.88rem;
}

.admin-shell .form-control {
  width: 100%;
  min-height: 2.5rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(248, 250, 252, 0.95);
  color: #0f172a;
  box-shadow: none;
}

.admin-search-box .form-control {
  min-height: auto;
  padding-left: 0;
  padding-right: 0;
  border: none;
  background: transparent;
}

.admin-shell .form-control::placeholder {
  color: #94a3b8;
}

.admin-jobs-toolbar {
  display: grid;
  gap: 1.25rem;
}

.admin-jobs-filter-form,
.admin-jobs-run-form {
  display: grid;
  gap: 0.85rem;
}

.admin-jobs-filter-grid,
.admin-jobs-run-grid {
  display: grid;
  gap: 1rem;
}

.admin-jobs-filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-jobs-run-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-jobs-action-row,
.admin-job-card__footer,
.admin-job-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.admin-jobs-list {
  display: grid;
  gap: 1rem;
}

.admin-job-card {
  padding: 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.94));
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
}

.admin-job-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.admin-job-card__eyebrow {
  margin: 0 0 0.25rem;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-job-card h3 {
  margin: 0;
}

.admin-job-card__company,
.admin-job-card__summary,
.admin-job-card__error {
  margin: 0.45rem 0 0;
}

.admin-job-card__company {
  color: #4b5563;
}

.admin-job-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  margin-top: 0.85rem;
  color: #6b7280;
  font-size: 0.88rem;
}

.admin-job-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.admin-job-card__summary {
  color: #374151;
  line-height: 1.6;
}

.admin-job-card__error {
  color: #b91c1c;
  font-size: 0.92rem;
}

.admin-job-status,
.admin-job-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-job-status {
  text-transform: capitalize;
}

.admin-job-status--pending {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

.admin-job-status--published {
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
}

.admin-job-status--failed {
  background: rgba(220, 38, 38, 0.14);
  color: #991b1b;
}

.admin-job-chip {
  background: rgba(14, 116, 144, 0.12);
  color: #155e75;
}

.admin-shell label {
  color: #334155;
  font-weight: 600;
  font-size: 0.8rem;
}

.admin-shell .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.45rem;
  border-color: transparent;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #ffffff;
  box-shadow: 0 10px 20px -18px rgba(37, 99, 235, 0.7);
  font-size: 0.84rem;
}

.admin-shell .btn:hover {
  color: #ffffff;
}

.admin-shell .btn.btn-outline {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(148, 163, 184, 0.28);
  color: #0f172a;
  box-shadow: none;
}

.admin-sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-sort-link:hover {
  color: #4f46e5;
}

.admin-sort-link i {
  font-size: 0.9rem;
  opacity: 0.35;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.admin-sort-link i.active,
.admin-sort-link:hover i {
  opacity: 1;
  color: #4f46e5;
}

.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
}

.admin-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-table th,
.admin-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  vertical-align: top;
  font-size: 0.82rem;
  color: #0f172a;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(10px);
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.64rem;
  white-space: nowrap;
}

.admin-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.72);
}

.admin-table tbody tr:hover td {
  background: rgba(238, 242, 255, 0.62);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table__empty {
  padding: 1rem;
  text-align: center;
}

.admin-directory-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.7rem;
  padding: 0.2rem 0.25rem 0;
}

.admin-directory-footer__summary {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
}

.admin-directory-footer__actions,
.admin-pagination {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.admin-page-size-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-page-size-form__label {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-chart-select--compact {
  min-height: 2.2rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  min-width: 72px;
}

.admin-pagination__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
}

.admin-pagination__button:hover {
  color: #4f46e5;
  border-color: rgba(13, 148, 136, 0.22);
}

.admin-pagination__button.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.admin-user-card {
  display: flex;
  gap: 0.65rem;
}

.admin-user-avatar {
  flex: 0 0 2.2rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.admin-user-card__body {
  min-width: 0;
}

.admin-user-topline {
  align-items: center;
  margin-bottom: 0.12rem;
}

.admin-user-topline strong {
  font-size: 0.84rem;
}

.admin-user-subline {
  color: #475569;
  font-size: 0.76rem;
}

.admin-user-meta-row {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.72rem;
}

.admin-user-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.48rem;
  border: 1px solid transparent;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-chip--emerald {
  color: #047857;
  background: rgba(209, 250, 229, 0.92);
  border-color: rgba(16, 185, 129, 0.18);
}

.admin-chip--sky {
  color: #0369a1;
  background: rgba(224, 242, 254, 0.92);
  border-color: rgba(14, 165, 233, 0.18);
}

.admin-chip--amber {
  color: #b45309;
  background: rgba(254, 243, 199, 0.92);
  border-color: rgba(245, 158, 11, 0.22);
}

.admin-chip--premium {
  color: #9a3412;
  background: linear-gradient(135deg, rgba(254, 215, 170, 0.95), rgba(253, 230, 138, 0.9));
  border-color: rgba(194, 65, 12, 0.28);
  gap: 0.28rem;
}

.admin-chip--muted {
  color: #475569;
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(148, 163, 184, 0.28);
}

.admin-plan-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}

.admin-plan-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.admin-plan-filter:hover {
  border-color: rgba(13, 148, 136, 0.35);
  color: #4f46e5;
}

.admin-plan-filter.is-active {
  border-color: rgba(194, 65, 12, 0.35);
  background: linear-gradient(135deg, rgba(254, 215, 170, 0.55), rgba(255, 247, 237, 0.95));
  color: #9a3412;
}

.admin-table__row--premium .admin-user-avatar {
  background: linear-gradient(135deg, rgba(194, 65, 12, 0.18), rgba(217, 119, 6, 0.16));
  color: #9a3412;
}

.admin-resume-summary {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.admin-resume-summary strong {
  font-size: 1.05rem;
  line-height: 1;
}

.admin-progress {
  display: flex;
  overflow: hidden;
  height: 0.44rem;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.85);
}

.admin-progress__segment {
  display: block;
  height: 100%;
}

.admin-progress__segment--base {
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.72), rgba(20, 184, 166, 0.62));
}

.admin-progress__segment--refined {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.85), rgba(59, 130, 246, 0.62));
}

.admin-data-stack {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: #475569;
  font-size: 0.74rem;
}

.admin-data-stack strong {
  color: #0f172a;
  font-size: 0.78rem;
}

.admin-password-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
}

.admin-password-form .form-control {
  min-width: 0;
}

.admin-chart-toggle-group {
  display: inline-flex;
  padding: 0.22rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.88);
}

.admin-chart-toggle-btn {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.admin-chart-toggle-btn:hover {
  color: #0f172a;
}

.admin-chart-toggle-btn.active {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.14), rgba(37, 99, 235, 0.12));
  color: #4f46e5;
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.14);
}

.admin-chart-content {
  display: none;
}

.admin-chart-content.active {
  display: block;
}

.admin-panel--featured {
  margin-bottom: 1rem;
  padding: 0.9rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 252, 0.92)),
    linear-gradient(135deg, rgba(13, 148, 136, 0.06), rgba(249, 115, 22, 0.05));
}

.admin-featured-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.admin-featured-stat,
.admin-intel-card {
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.78);
}

.admin-chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(248, 250, 252, 0.88);
}

.admin-chart-meta__label {
  display: block;
  color: #64748b;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-chart-meta strong {
  display: block;
  margin-top: 0.12rem;
  color: #0f172a;
  font-size: 0.9rem;
}

.admin-chart-select-wrap {
  min-width: min(100%, 220px);
}

.admin-chart-select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font: inherit;
}

.admin-chart-flex {
  max-width: 100%;
}

.admin-bar-chart-card {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.82));
  padding: 0.8rem;
}

.admin-bar-chart-shell {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}

.admin-bar-chart-axis {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding-top: 0.15rem;
  color: #b832a3;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.05;
}

.admin-bar-chart-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.admin-bar-chart-list::-webkit-scrollbar {
  width: 6px;
}

.admin-bar-chart-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 999px;
}

.admin-bar-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 34px;
  gap: 0.7rem;
  align-items: center;
}

.admin-bar-row__label {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.admin-bar-row__track {
  position: relative;
  height: 1.7rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.admin-bar-row__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5f7ae8 0%, #8250b8 100%);
}

.admin-bar-row__value {
  text-align: right;
  color: #1f245f;
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-intel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.admin-admin-list {
  margin-top: 0.7rem;
}

.admin-admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  background: rgba(238, 242, 255, 0.88);
  border: 1px solid rgba(13, 148, 136, 0.14);
  color: #4f46e5;
  font-size: 0.72rem;
}

.admin-note-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.admin-note-item {
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.admin-note-item strong {
  display: block;
  color: #0f172a;
  font-size: 0.8rem;
}

@media (max-width: 1200px) {
  .admin-console-header,
  .admin-console-grid {
    grid-template-columns: 1fr;
  }

  .admin-side-stack {
    position: static;
    top: auto;
  }
}

@media (max-width: 900px) {
  .admin-featured-stats {
    grid-template-columns: 1fr;
  }

  .admin-chart-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-panel__head,
  .admin-panel__head--featured,
  .admin-panel__head--directory {
    flex-direction: column;
  }

  .admin-search-form {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .admin-jobs-filter-grid,
  .admin-jobs-run-grid {
    grid-template-columns: 1fr;
  }

  .admin-bar-chart-shell {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .admin-directory-footer,
  .admin-directory-footer__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-bar-chart-axis {
    flex-direction: row;
    gap: 0.35rem;
    align-items: baseline;
  }

  .admin-bar-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .admin-bar-row__value {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .admin-shell {
    padding: 0.9rem 0.75rem 1.5rem;
  }

  .admin-console-header {
    gap: 0.75rem;
  }

  .admin-console-header h1 {
    max-width: none;
  }

  .admin-metric-grid,
  .admin-intel-grid {
    grid-template-columns: 1fr;
  }

  .admin-console-highlight-row {
    flex-direction: column;
  }

  .admin-console-highlight,
  .admin-featured-stat {
    width: 100%;
  }

  .admin-panel,
  .admin-panel--featured,
  .admin-console-header__copy,
  .admin-metric-card {
    border-radius: 16px;
  }

  .admin-search-form {
    gap: 0.6rem;
  }

  .admin-password-form {
    grid-template-columns: 1fr;
  }

  .admin-job-card__header {
    flex-direction: column;
  }

  .admin-chart-select-wrap {
    width: 100%;
  }

  .admin-table-wrap {
    overflow: visible;
    border: none;
    background: transparent;
  }

  .admin-table {
    min-width: 0;
    border-spacing: 0;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tbody {
    display: grid;
    gap: 0.75rem;
  }

  .admin-table__row {
    display: grid;
    gap: 0.7rem;
    padding: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 28px -26px rgba(15, 23, 42, 0.4);
  }

  .admin-table__row td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.6rem;
    align-items: start;
    padding: 0;
    border: none;
    background: transparent !important;
  }

  .admin-table__row td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.4;
    padding-top: 0.15rem;
  }

  .admin-table__row .admin-table__primary {
    display: block;
  }

  .admin-table__row .admin-table__primary::before {
    display: none;
  }

  .admin-table__empty {
    display: block;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
  }

  .admin-user-card {
    gap: 0.7rem;
  }

  .admin-user-avatar {
    flex-basis: 2.35rem;
    width: 2.35rem;
    height: 2.35rem;
  }

  .admin-user-topline {
    gap: 0.35rem;
  }

  .admin-user-topline strong {
    font-size: 0.88rem;
    word-break: break-word;
  }

  .admin-user-subline {
    font-size: 0.78rem;
  }

  .admin-user-meta-row {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }

  .admin-password-form {
    grid-template-columns: 1fr;
  }

  .admin-password-form .btn {
    width: 100%;
  }

  .admin-page-size-form,
  .admin-pagination {
    width: 100%;
  }

  .admin-pagination__button {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .nav-brand {
    font-size: 1rem;
  }

  .nav-premium-badge {
    font-size: 0.62rem;
    padding: 0.18rem 0.48rem;
  }

  .nav-brand i {
    width: 30px;
    height: 30px;
  }

  .admin-console-highlight {
    flex-basis: 100%;
  }

  .admin-table__row {
    padding: 0.7rem;
  }

  .admin-table__row td {
    grid-template-columns: 1fr;
    gap: 0.32rem;
  }

  .admin-table__row td::before {
    padding-top: 0;
  }

  .admin-bar-row__track {
    height: 1.55rem;
  }
}
/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

.modal-content {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius);
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  animation: slideUp 0.3s forwards;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-header {
  margin-bottom: 1rem;
}

.modal-body p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .modal-content {
    width: min(94vw, 420px);
    padding: 1.35rem 1rem 1.1rem;
  }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes slideUp {
  to { transform: translateY(0); }
}

/* Wizard flow */
.wizard-stage {
  max-width: 980px;
  margin: 0 auto;
}

.refinement-mode-chooser {
  padding: clamp(1.1rem, 3vw, 1.65rem);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.11), transparent 34%),
    linear-gradient(180deg, #fff, #f8fbfa);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.refinement-mode-chooser__heading {
  max-width: 680px;
  margin: 0 auto 1.2rem;
  text-align: center;
}

.refinement-mode-chooser__heading h2 {
  margin: 0.35rem 0 0.4rem;
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.refinement-mode-chooser__heading > p:last-child {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
}

.refinement-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.refinement-mode-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  min-height: 164px;
  padding: 1.1rem;
  border: 2px solid #dbe5e2;
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.refinement-mode-card:hover,
.refinement-mode-card:focus-within {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.12);
}

.refinement-mode-card:has(input:checked) {
  border-color: var(--primary);
  background: linear-gradient(145deg, rgba(238, 242, 255, 0.9), #fff 68%);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.refinement-mode-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.refinement-mode-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  font-size: 1.55rem;
}

.refinement-mode-card--targeted .refinement-mode-card__icon {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}

.refinement-mode-card__content {
  display: grid;
  gap: 0.32rem;
}

.refinement-mode-card__content strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.refinement-mode-card__content > span {
  color: var(--ink-2);
  font-size: 0.88rem;
  line-height: 1.5;
}

.refinement-mode-card__content small {
  color: var(--ink-3);
  font-size: 0.75rem;
  line-height: 1.4;
}

.refinement-mode-card__arrow {
  color: var(--ink-3);
  font-size: 1.2rem;
  transition: transform 160ms ease, color 160ms ease;
}

.refinement-mode-card:hover .refinement-mode-card__arrow,
.refinement-mode-card:has(input:checked) .refinement-mode-card__arrow {
  transform: translateX(3px);
  color: var(--primary);
}

.refinement-mode-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.2rem;
  padding: 0.68rem 0.9rem;
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 12px;
  background: rgba(238, 242, 255, 0.74);
  color: var(--primary-ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.refinement-mode-summary > div {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.btn-link {
  padding: 0.2rem;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  .refinement-mode-grid {
    grid-template-columns: 1fr;
  }

  .refinement-mode-card {
    min-height: 0;
  }
}

.wizard-form {
  display: grid;
  gap: 1rem;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.wizard-progress__item {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(220, 228, 236, 0.9);
  background: rgba(255, 255, 255, 0.72);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.wizard-progress__item strong {
  display: block;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.wizard-progress__item p {
  margin: 0.18rem 0 0;
  color: var(--ink-3);
  font-size: 0.82rem;
  line-height: 1.45;
}

.wizard-progress__index {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(148, 163, 184, 0.16);
  color: var(--ink-2);
  font-weight: 800;
  flex-shrink: 0;
}

.wizard-progress__item.is-active {
  border-color: rgba(79, 70, 229, 0.36);
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.82), rgba(255, 255, 255, 0.98));
  transform: translateY(-1px);
}

.wizard-progress__item.is-active .wizard-progress__index,
.wizard-progress__item.is-complete .wizard-progress__index {
  background: linear-gradient(135deg, var(--primary), #6d5df4);
  color: #fff;
}

.wizard-progress__item.is-active strong,
.wizard-progress__item.is-complete strong {
  color: var(--primary-ink);
}

.wizard-panel {
  display: grid;
  gap: 1rem;
}

.wizard-card {
  padding: 1.35rem;
}

.wizard-card--resume {
  min-height: 0;
}

.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
}

.wizard-actions--between {
  align-items: flex-end;
}

.wizard-actions__copy {
  max-width: 440px;
}

.wizard-actions__copy strong {
  display: block;
  color: var(--primary-ink);
  font-size: 0.94rem;
}

.wizard-actions__copy p {
  margin: 0.22rem 0 0;
  color: var(--ink-3);
  font-size: 0.85rem;
}

.wizard-actions__copy--right {
  text-align: right;
  margin-left: auto;
}

.wizard-results-card {
  overflow: visible;
}

.wizard-edit-btn {
  flex-shrink: 0;
}

/* Refine surface refresh */
.home-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 1rem;
  align-items: stretch;
}

.home-hero__panel {
  border-radius: 16px;
  border: 1px solid rgba(79, 70, 229, 0.2);
  background: rgba(255, 255, 255, 0.78);
  padding: 1rem;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.home-hero__panel-label {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero-metric-list {
  display: grid;
  gap: 0.75rem;
}

.hero-metric {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(241, 248, 246, 0.95), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(79, 70, 229, 0.14);
}

.hero-metric strong {
  display: block;
  margin-bottom: 0.22rem;
  color: var(--primary-ink);
  font-size: 0.95rem;
}

.hero-metric span {
  display: block;
  color: var(--ink-2);
  font-size: 0.87rem;
  line-height: 1.48;
}

.saved-resume-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(180deg, #eff6ff, #f8fbff);
  color: #1d4ed8;
}

.saved-resume-banner i {
  font-size: 1.1rem;
  margin-top: 0.1rem;
}

.saved-resume-banner__content strong {
  display: block;
  margin-bottom: 0.18rem;
}

.saved-resume-banner__content p {
  margin: 0;
  color: inherit;
}

.saved-resume-picker {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.field-label {
  margin: 0;
  color: var(--primary-ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.select-modern {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f9fcfb;
  color: var(--ink);
  font-size: 0.96rem;
  padding: 0.78rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.select-modern:focus {
  outline: none;
  border-color: rgba(79, 70, 229, 0.58);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
  background: #ffffff;
}

.upload-status-stack {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

#resume-upload-spinner,
#resume-upload-success,
#resume-input-error {
  display: none;
}

.upload-status {
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.upload-status i {
  font-size: 1rem;
  margin-top: 0.15rem;
}

.upload-status strong {
  display: block;
  margin-bottom: 0.12rem;
}

.upload-status p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-3);
}

.upload-status--loading {
  color: var(--ink-2);
  background: #f8fafc;
}

.upload-status--success {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.field-note {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.field-note--muted {
  color: var(--ink-3);
  font-size: 0.83rem;
}

.field-heading {
  margin-bottom: 0.8rem;
}

.field-heading h4,
.field-title {
  margin: 0 0 0.35rem;
  color: var(--primary-ink);
  font-size: 1rem;
}

.field-heading p {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.88rem;
}

.textarea-modern--job {
  min-height: 220px;
}

.settings-stack {
  display: grid;
  gap: 1.25rem;
}

.form-quality-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.3rem 0 0.1rem;
}

.quality-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(79, 70, 229, 0.2);
  background: linear-gradient(180deg, rgba(244, 253, 250, 0.92), rgba(236, 253, 250, 0.72));
  color: var(--primary-ink);
  font-size: 0.8rem;
  font-weight: 600;
}

.settings-divider {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.settings-group {
  display: grid;
  gap: 0.8rem;
}

.settings-group__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.settings-group__header p {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.84rem;
  line-height: 1.45;
}

.options-grid--scope {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.options-grid--creativity {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-card {
  display: block;
}

.option-content {
  position: relative;
  min-height: 112px;
  border: 1px solid #dbe7e2;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
  padding: 1rem 1.05rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.85rem;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.option-card:hover .option-content {
  transform: translateY(-1px);
  border-color: rgba(79, 70, 229, 0.28);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.option-card input[type='radio']:checked+.option-content {
  border-color: rgba(37, 99, 235, 0.72);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.92));
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.1),
    0 14px 28px rgba(37, 99, 235, 0.1);
}

.option-icon-wrap {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--ink-3);
  flex-shrink: 0;
}

.alert-warning {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
}

.sticky-action-bar {
  border-top: 1px solid rgba(220, 228, 236, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 252, 250, 0.96));
}

.sticky-action-bar__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sticky-action-copy strong {
  display: block;
  color: var(--primary-ink);
  font-size: 0.95rem;
}

.sticky-action-copy p {
  margin: 0.2rem 0 0;
  color: var(--ink-3);
  font-size: 0.84rem;
}

.primary-submit {
  min-width: 240px;
  border-radius: 12px;
  font-size: 1.02rem;
  padding: 0.92rem 1.5rem;
}

.results-placeholder {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.results-placeholder__checklist {
  display: grid;
  gap: 0.75rem;
}

.results-tip-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(79, 70, 229, 0.14);
  background: linear-gradient(180deg, rgba(247, 251, 250, 0.94), rgba(255, 255, 255, 0.98));
}

.results-tip-card__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary);
  font-size: 1.1rem;
}

.results-tip-card h3 {
  margin: 0 0 0.22rem;
  font-size: 0.95rem;
  color: var(--primary-ink);
}

.results-tip-card p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.48;
  color: var(--ink-3);
}

.field-hint {
  display: block;
  margin-top: 0.25rem;
}

.cert-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.cert-row__main {
  flex: 1 1 auto;
  min-width: 0;
}

.action-buttons--flush {
  flex-shrink: 0;
  margin-bottom: 0;
}

.option-icon {
  margin-top: 0;
  font-size: 1.35rem;
  color: inherit;
}

.option-info strong {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.2rem;
  color: var(--primary-ink);
  font-size: 0.98rem;
  line-height: 1.25;
}

.option-info small {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.45;
}

.option-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.45rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.option-card input[type='radio']:checked+.option-content .option-icon-wrap {
  background: rgba(37, 99, 235, 0.14);
  color: #2563eb;
}

@media (max-width: 980px) {
  .wizard-progress {
    grid-template-columns: 1fr;
  }

  .home-hero__grid {
    grid-template-columns: 1fr;
  }

  .dashboard-create-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .create-grid--two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-create-shell {
    padding-inline: 0.8rem;
  }

  .dashboard-create-hero,
  .create-section-card,
  .create-savebar {
    padding: 1rem;
    border-radius: 20px;
  }

  .dashboard-create-hero__checks {
    gap: 0.55rem;
  }

  .dashboard-create-chip {
    width: 100%;
    justify-content: center;
  }

  .results-card__header {
    flex-direction: column;
    align-items: stretch;
  }

  .results-card__header-actions {
    justify-content: flex-start;
  }

  .options-grid--scope,
  .options-grid--creativity {
    grid-template-columns: 1fr;
  }

  .cert-row {
    flex-direction: column;
    align-items: stretch;
  }

  .create-item-card__head,
  .create-savebar,
  .create-savebar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .create-add-row .btn,
  .action-buttons--flush {
    width: 100%;
  }

  .create-savebar__actions .btn,
  .action-buttons--flush .btn {
    width: 100%;
  }

  .wizard-actions,
  .wizard-actions--between {
    flex-direction: column;
    align-items: stretch;
  }

  .wizard-actions__copy,
  .wizard-actions__copy--right {
    max-width: none;
    text-align: left;
    margin-left: 0;
  }

  .sticky-action-bar__content {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-submit {
    width: 100%;
    min-width: 0;
  }
}

/* ---------- Workspace hub (post-login) ---------- */
.workspace-page-main {
  min-height: calc(100vh - 120px);
}

.workspace-hub {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.75rem;
}

.workspace-hub__header {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 2rem;
}

.workspace-hub__title {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(1.65rem, 3.5vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #0f2d3b;
}

.workspace-hub__subtitle {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #5a7184;
}

.workspace-hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.05rem;
}

.workspace-hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 1.35rem 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.workspace-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.09);
  border-color: rgba(79, 70, 229, 0.28);
}

.workspace-hub-card--create {
  border-top: 4px solid #2563eb;
}

.workspace-hub-card--refine {
  border-top: 4px solid #6557ee;
}

.workspace-hub-card--dashboard {
  border-top: 4px solid #64748b;
}

.workspace-hub-card__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.65rem;
  border-radius: 14px;
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  font-size: 1.45rem;
}

.workspace-hub-card--create .workspace-hub-card__icon {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.workspace-hub-card--dashboard .workspace-hub-card__icon {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.workspace-hub-card__heading {
  margin: 0 0 0.45rem;
  font-size: 1.12rem;
  line-height: 1.25;
  color: #0f2d3b;
}

.workspace-hub-card__text {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.52;
  color: #516b7d;
  flex: 1 1 auto;
}

.workspace-hub-card__cta {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.88rem;
  color: #4f46e5;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.workspace-hub-card--create .workspace-hub-card__cta {
  color: #1d4ed8;
}

.workspace-hub-card--dashboard .workspace-hub-card__cta {
  color: #475569;
}

/* ---------- Dashboard quick nav & summary ---------- */
.dashboard-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1.15rem;
}

.dashboard-quick-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(79, 70, 229, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: #0f2d3b;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dashboard-quick-nav__link:hover {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.38);
}

.dashboard-quick-nav__link i {
  color: #4f46e5;
  font-size: 1.05rem;
}

.dashboard-summary-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin: 0 0 1.45rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.06);
  border: 1px solid rgba(79, 70, 229, 0.12);
  font-size: 0.9rem;
  color: #3d5a6e;
}

.dashboard-summary-line strong {
  color: #0f2d3b;
  font-weight: 700;
}

.dashboard-summary-line .ti {
  color: #4f46e5;
  vertical-align: -0.1em;
}

.dashboard-summary-line__dot {
  color: rgba(71, 85, 105, 0.45);
  user-select: none;
}

.dashboard-overview--simple .dashboard-overview__lead {
  max-width: 52ch;
}

@media (max-width: 640px) {
  .dashboard-quick-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-quick-nav__link {
    justify-content: center;
  }
}

/* Keep the refinement shell overrides last in the cascade. */
.home-page .refine-hero {
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2.2rem);
  border-color: rgba(79, 70, 229, 0.24);
  box-shadow: 0 22px 60px rgba(15, 45, 59, 0.09);
}

.form-section.home-stage {
  margin-top: 0.25rem;
  padding: clamp(0.8rem, 2vw, 1.25rem);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(15, 45, 59, 0.07);
}
/* ---------- Daily AI job finder ---------- */
.job-finder-main { max-width: none; padding: 0; }
.job-finder-shell { width: min(1460px, calc(100% - 40px)); margin: 32px auto 70px; color: #132d3b; }
.job-finder-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 36px; align-items: center; padding: 46px; border: 1px solid #d4e5e1; border-radius: 28px; background: radial-gradient(circle at 85% 10%, rgba(31, 180, 158, .22), transparent 31%), linear-gradient(135deg, #effaf7 0%, #fff 58%, #eef6f8 100%); box-shadow: 0 22px 60px rgba(13, 53, 63, .09); }
.job-finder-hero::after { content: ''; position: absolute; right: -70px; bottom: -120px; width: 300px; height: 300px; border: 44px solid rgba(14, 143, 131, .07); border-radius: 50%; }
.job-finder-hero__copy { position: relative; z-index: 1; max-width: 870px; }
.job-finder-kicker { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 10px; color: #087f75; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.job-finder-hero h1 { margin: 0; max-width: 800px; color: #0d2938; font-size: clamp(2rem, 4vw, 3.55rem); line-height: 1.02; letter-spacing: -.045em; }
.job-finder-hero__copy > p { max-width: 760px; margin: 18px 0 22px; color: #506875; font-size: 1.05rem; line-height: 1.65; }
.job-finder-trust { display: flex; flex-wrap: wrap; gap: 10px; }
.job-finder-trust span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border: 1px solid #d5e7e3; border-radius: 999px; background: rgba(255,255,255,.8); color: #365864; font-size: .8rem; font-weight: 700; }
.job-finder-trust i { color: #0f8f83; }
.job-finder-hero__metric { position: relative; z-index: 1; display: grid; justify-items: center; padding: 26px 18px; border: 1px solid rgba(255,255,255,.85); border-radius: 22px; background: rgba(255,255,255,.72); box-shadow: 0 15px 35px rgba(12,73,74,.08); backdrop-filter: blur(8px); text-align: center; }
.job-finder-hero__metric strong { color: #0b8e81; font-size: 3.5rem; line-height: 1; letter-spacing: -.06em; }
.job-finder-hero__metric span { margin-top: 7px; font-weight: 800; }
.job-finder-hero__metric small { margin-top: 5px; color: #617681; }
.job-finder-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 30px; }
.job-alert-panel { display: grid; gap: 20px; position: sticky; top: 18px; }
.job-finder-card { border: 1px solid #dce7e5; border-radius: 20px; background: #fff; box-shadow: 0 12px 34px rgba(18,54,65,.06); }
.job-alert-create, .saved-alerts { padding: 22px; }
.job-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.job-card-heading--compact { margin-bottom: 14px; }
.job-card-icon { display: grid; flex: 0 0 42px; height: 42px; place-items: center; border-radius: 12px; background: #e9f7f4; color: #0c8c80; font-size: 1.25rem; }
.job-card-heading h2 { margin: 0; font-size: 1.1rem; }
.job-card-heading p { margin: 3px 0 0; color: #70828b; font-size: .8rem; }
.job-alert-form { display: grid; gap: 17px; }
.job-alert-form label > span:first-child, .job-scope-picker legend { display: block; margin-bottom: 7px; color: #314b57; font-size: .78rem; font-weight: 800; }
.job-alert-form input[type='text'], .job-alert-form select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #d5e2e0; border-radius: 10px; background: #fbfdfd; color: #152f3c; font: inherit; }
.job-alert-form input:focus, .job-alert-form select:focus { outline: 3px solid rgba(15,143,131,.13); border-color: #0f8f83; }
.job-scope-picker { display: grid; gap: 8px; padding: 0; border: 0; }
.job-scope-option { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #dfe9e7; border-radius: 11px; cursor: pointer; }
.job-scope-option:has(input:checked) { border-color: #0f8f83; background: #effaf8; box-shadow: inset 0 0 0 1px #0f8f83; }
.job-scope-option input { accent-color: #0f8f83; }
.job-scope-option span { display: grid; }
.job-scope-option strong { font-size: .84rem; }
.job-scope-option small, .job-email-toggle small { color: #74868e; font-size: .7rem; }
.job-alert-form__row { display: grid; grid-template-columns: 1fr 105px; gap: 10px; transition: opacity .2s; }
.job-alert-form__row.is-disabled { opacity: .35; pointer-events: none; }
.job-email-toggle { display: flex; align-items: center; gap: 10px; }
.job-email-toggle input { width: 18px; height: 18px; accent-color: #0f8f83; }
.job-email-toggle span { display: grid; }
.job-alert-submit { justify-content: center; background: #0f8f83; }
.saved-alert-list { display: grid; gap: 8px; }
.saved-alert { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border: 1px solid transparent; border-radius: 11px; color: inherit; text-decoration: none; }
.saved-alert:hover, .saved-alert.is-selected { border-color: #b9ddd7; background: #f0faf8; }
.saved-alert.is-paused { opacity: .58; }
.saved-alert__main { display: grid; min-width: 0; }
.saved-alert__main strong, .saved-alert__main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-alert__main small { color: #70828b; }
.saved-alert__state { padding: 4px 7px; border-radius: 999px; background: #e6f6f2; color: #087b71; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.job-results-panel { min-width: 0; }
.job-results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 6px 4px 20px; }
.job-results-toolbar h2 { margin: 0 0 3px; font-size: 1.65rem; }
.job-results-toolbar > div > span { color: #677c86; font-size: .85rem; }
.job-results-toolbar__actions { display: flex; align-items: center; gap: 8px; }
.job-results-toolbar__actions form { margin: 0; }
.job-coverage-note { display: flex; gap: 11px; margin-bottom: 15px; padding: 13px 15px; border: 1px solid #eadcae; border-radius: 12px; background: #fffaf0; color: #6e5a20; font-size: .83rem; }
.job-coverage-note i { margin-top: 2px; }
.job-result-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; align-items: end; margin-bottom: 15px; padding: 14px; border: 1px solid #dce7e5; border-radius: 16px; background: #f9fcfb; }
.job-result-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.job-result-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 11px; border: 1px solid #d8e5e2; border-radius: 10px; background: #fff; color: #49636e; font-size: .78rem; font-weight: 800; text-decoration: none; }
.job-result-tabs a:hover, .job-result-tabs a.is-active { border-color: #0f8f83; background: #eaf7f4; color: #087b71; }
.job-result-tabs a span { display: grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border-radius: 999px; background: #edf3f2; font-size: .67rem; }
.job-result-tabs a.is-active span { background: #fff; }
.job-result-sort { display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-end; gap: 8px; margin: 0; }
.job-result-sort label { display: grid; gap: 4px; }
.job-result-sort label > span { color: #627984; font-size: .67rem; font-weight: 800; }
.job-result-sort select { min-height: 38px; padding: 7px 28px 7px 9px; border: 1px solid #d5e2e0; border-radius: 9px; background: #fff; color: #233f4c; font: inherit; font-size: .78rem; }
.job-result-sort .btn { min-height: 38px; padding: 7px 11px; }
.job-result-filters > p { grid-column: 1 / -1; margin: -3px 0 0; color: #71848d; font-size: .72rem; }
.job-result-filters > p a { margin-left: 7px; color: #087f75; font-weight: 800; }
.job-results-list { display: grid; gap: 15px; }
.job-result-card { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 20px; padding: 24px; border: 1px solid #dce7e5; border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(18,54,65,.055); transition: transform .2s, border-color .2s, box-shadow .2s; }
.job-result-card:hover { transform: translateY(-2px); border-color: #b8dcd6; box-shadow: 0 16px 34px rgba(18,54,65,.09); }
.job-result-card__score { display: grid; align-content: center; justify-items: center; width: 80px; height: 80px; border: 7px solid #d9f1ec; border-top-color: #10a392; border-radius: 50%; background: #f8fdfc; color: #0d8277; }
.job-result-card__score strong { font-size: 1.5rem; line-height: 1; }
.job-result-card__score span { margin-top: 3px; font-size: .61rem; font-weight: 800; text-transform: uppercase; }
.job-result-card__topline { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.job-result-card h3 { margin: 0; color: #112f3d; font-size: 1.2rem; }
.job-result-card__topline p { display: flex; flex-wrap: wrap; gap: 6px; margin: 5px 0 0; color: #637781; font-size: .85rem; }
.job-match-reasons { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0 11px; }
.job-match-reasons span { padding: 5px 8px; border-radius: 7px; background: #edf8f6; color: #19766e; font-size: .72rem; font-weight: 700; }
.job-result-summary { display: -webkit-box; overflow: hidden; margin: 0 0 13px; color: #526975; font-size: .86rem; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.job-result-meta { display: flex; flex-wrap: wrap; gap: 13px; color: #73858d; font-size: .73rem; }
.job-result-meta span { display: inline-flex; align-items: center; gap: 4px; }
.job-link-state--valid { color: #07836f; font-weight: 800; }
.job-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.job-result-actions form { margin: 0; }
.job-apply-button { background: #0f8f83; }
.btn-quiet { border: 0; background: #f0f5f4; color: #3f5e68; box-shadow: none; }
.job-status-badge { padding: 5px 8px; border-radius: 999px; background: #eef4f5; color: #4d6872; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.job-status-badge--applied { background: #e6f6ed; color: #247744; }
.job-attribution { display: inline-block; margin-top: 12px; color: #7c8d94; font-size: .68rem; }
.job-empty-state { display: grid; justify-items: center; padding: 90px 30px; border: 1px dashed #bfd5d1; border-radius: 20px; background: #f9fcfb; text-align: center; }
.job-empty-state > span { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 18px; background: #e8f5f2; color: #0e8e81; font-size: 1.8rem; }
.job-empty-state h2 { margin: 16px 0 6px; }
.job-empty-state p { max-width: 540px; margin: 0; color: #667b85; line-height: 1.55; }
.job-empty-state .btn { margin-top: 18px; }
.job-safety-note { display: flex; justify-content: center; gap: 7px; margin: 28px auto 0; color: #6d8089; font-size: .76rem; text-align: center; }
@media (max-width: 1050px) { .job-finder-layout { grid-template-columns: 320px minmax(0,1fr); } .job-result-card { grid-template-columns: 1fr; } .job-result-card__score { width: auto; height: auto; grid-auto-flow: column; justify-content: start; gap: 4px; padding: 7px 10px; border: 0; border-radius: 9px; } }
@media (max-width: 820px) { .job-finder-shell { width: min(100% - 24px, 700px); margin-top: 18px; } .job-finder-hero { grid-template-columns: 1fr; padding: 28px 22px; } .job-finder-hero__metric { justify-items: start; text-align: left; } .job-finder-layout { grid-template-columns: 1fr; } .job-alert-panel { position: static; } .job-results-toolbar { align-items: start; flex-direction: column; } .job-result-filters { grid-template-columns: 1fr; } .job-result-sort { justify-content: flex-start; } }
@media (max-width: 560px) { .job-finder-hero h1 { font-size: 2rem; } .job-results-toolbar__actions { width: 100%; flex-wrap: wrap; } .job-result-tabs { display: grid; grid-template-columns: 1fr 1fr; } .job-result-tabs a { justify-content: space-between; } .job-result-sort label { flex: 1 1 120px; } .job-result-sort select { width: 100%; } .job-result-sort .btn { width: 100%; justify-content: center; } .job-result-card { padding: 18px; } .job-result-card__topline { flex-direction: column; } .job-result-actions .btn, .job-result-actions form { width: 100%; } .job-result-actions form .btn { width: 100%; justify-content: center; } }

/* =========================================================================
   Responsive & UI polish layer
   Appended last so it resolves conflicts from the earlier stacked layers.
   Breakpoints: 1024 (tablet) / 768 (small tablet) / 560 (phone) / 400 (small phone)
   ========================================================================= */

/* ---------- 1. Global safety nets ---------- */

/* User-supplied content (emails, URLs, pasted resume text) must never widen
   the page. Long unbreakable strings previously blew the layout out past the
   viewport on phones. */
.resume-paper,
.cover-letter-body,
.doc-info,
.job-result-card__body,
.saved-alert,
.admin-table,
.status-page {
  overflow-wrap: anywhere;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

pre {
  max-width: 100%;
  overflow-x: auto;
}

/* Grid/flex children default to `min-width: auto`, which makes them refuse to
   shrink below their content's min-content width. These are the page-level
   shells where that caused horizontal scrolling. */
.home-page > *,
.dashboard-container > *,
.dashboard-panels-grid > *,
.dashboard-create-shell > *,
.auth-shell > *,
.job-finder-layout > *,
.admin-shell > * {
  min-width: 0;
}

.dashboard-container--enhanced {
  grid-template-columns: minmax(0, 1fr);
}

.form-section,
.modern-card,
.card,
.results-card,
.dashboard-panel,
.job-finder-card {
  max-width: 100%;
}

/* ---------- 2. Resume preview ---------- */

/* Contact line: real flex items with CSS separators, so items wrap cleanly on
   narrow screens instead of stranding a bullet at the start of a line. */
.resume-contact {
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  row-gap: 0.3rem;
}

.resume-contact__item {
  display: inline-flex;
  align-items: baseline;
  max-width: 100%;
}

.resume-contact__item + .resume-contact__item::before {
  content: '•';
  margin-right: 0.75rem;
  color: var(--text-light);
}

@media (max-width: 560px) {
  .resume-contact {
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.9rem;
  }

  .resume-contact__item + .resume-contact__item::before {
    content: none;
  }
}

@media (max-width: 768px) {
  .resume-paper {
    padding: 1.25rem 1.1rem;
  }

  .job-header {
    display: block;
  }

  .job-meta {
    margin-top: 0.15rem;
  }
}

/* ---------- 3. Refinement mode chooser ---------- */

@media (max-width: 900px) {
  .refinement-mode-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  /* The icon | copy | arrow track squeezed the copy to ~55% width and produced
     five-line wraps. Stack instead. */
  .refinement-mode-card {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'icon arrow'
      'copy copy';
    align-items: center;
    min-height: 0;
    gap: 0.75rem;
    padding: 1rem;
  }

  .refinement-mode-card__icon {
    grid-area: icon;
  }

  .refinement-mode-card__content {
    grid-area: copy;
  }

  .refinement-mode-card__arrow {
    grid-area: arrow;
    justify-self: end;
  }

  .refinement-mode-summary {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* ---------- 4. Wizard, forms, options ---------- */

@media (max-width: 768px) {
  .wizard-progress {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .wizard-actions,
  .wizard-actions--between {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .wizard-actions .btn,
  .wizard-actions--between .btn {
    width: 100%;
    justify-content: center;
  }

  .wizard-actions__copy--right {
    text-align: left;
  }

  .options-grid,
  .options-grid--quality,
  .options-grid--scope,
  .options-grid--creativity {
    grid-template-columns: minmax(0, 1fr);
  }

  .create-grid--two {
    grid-template-columns: minmax(0, 1fr);
  }

  .toggle-row {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .input-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .create-savebar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
  }

  .create-savebar__actions .btn {
    justify-content: center;
  }
}

/* ---------- 5. Dashboard ---------- */

/* `white-space: nowrap` on the title set a min-content floor that pushed the
   whole dashboard ~75px past the viewport on a 390px phone. Clamp to two lines
   instead of truncating to one. */
.doc-title {
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Pills and badges are inline chips, not full-width bars. Several sit inside
   stretch-aligned flex/grid parents that stretched them edge to edge. */
.dashboard-count-badge,
.dashboard-status-pill,
.base-resume-library__badge,
.job-status-badge {
  align-self: flex-start;
  justify-self: start;
  width: auto;
  flex: 0 0 auto;
}

@media (max-width: 1024px) {
  .dashboard-panels-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-top-rail {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .dashboard-main-content {
    padding: 1rem 0.85rem 2rem;
  }

  .dashboard-rail-card__head,
  .dashboard-panel__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .dashboard-panel__tools {
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
  }

  .base-resume-library__item-main {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .base-resume-library__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-pager {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .dashboard-pager__actions {
    display: flex;
    gap: 0.5rem;
  }

  .dashboard-pager__button {
    flex: 1 1 0;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .dashboard-quick-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .dashboard-quick-nav__link {
    justify-content: center;
    text-align: center;
  }

  .dashboard-summary-line {
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
  }

  .dashboard-summary-line__dot {
    display: none;
  }

  /* Card body on top, actions on their own full-width row underneath. */
  .doc-list--dashboard .doc-card,
  .doc-list .doc-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'icon info'
      'actions actions';
    align-items: start;
    gap: 0.6rem 0.7rem;
  }

  .doc-card .doc-icon {
    grid-area: icon;
  }

  .doc-card .doc-info {
    grid-area: info;
  }

  .doc-card .doc-actions {
    grid-area: actions;
    justify-content: flex-end;
    opacity: 1;
    padding-top: 0.15rem;
    border-top: 1px solid var(--border);
  }

  .dashboard-action-stack--rail .btn,
  .dashboard-action-stack--centered .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- 6. Workspace hub ---------- */

@media (max-width: 900px) {
  .workspace-hub__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 7. Document / action toolbars ---------- */

@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .action-buttons .btn,
  .action-buttons form,
  .action-buttons form .btn {
    width: 100%;
    justify-content: center;
  }

  .action-buttons--approval,
  .action-buttons--downloads {
    flex-direction: column;
  }

  .dashboard-template-download {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .dashboard-template-download label,
  .dashboard-template-download select,
  .dashboard-template-download .btn {
    width: 100%;
  }

  .results-card__header,
  .results-card__header--sub {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .results-card__header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
  }

  .results-card__header-actions .btn {
    flex: 1 1 140px;
    justify-content: center;
  }

  .cover-letter-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .cover-letter-meta {
    text-align: left;
  }
}

/* ---------- 8. Auth pages ---------- */

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-aside {
    display: none;
  }
}

@media (max-width: 560px) {
  .auth-card {
    padding: 1.4rem 1.15rem;
  }

  .label-row {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
}

/* ---------- 9. Admin console ---------- */

@media (max-width: 1024px) {
  .admin-console-header {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-console-highlight-row {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .admin-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-metric-card {
    padding: 0.75rem;
  }

  .admin-metric-card strong {
    font-size: 1.35rem;
  }

  /* Keep wide admin tables usable: scroll the table, not the page. */
  .admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 560px) {
  .admin-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .admin-console-highlight-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .balashahr-auth-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .balashahr-auth-intro {
    display: none;
  }
}

/* ---------- 10. Job finder ---------- */

@media (max-width: 560px) {
  .job-finder-shell {
    width: calc(100% - 20px);
  }

  .job-alert-create,
  .saved-alerts {
    padding: 16px;
  }

  .job-alert-form__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .job-result-meta {
    gap: 6px 12px;
  }

  .saved-alert {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
}

/* ---------- 11. Status / error pages ---------- */

.status-page-main {
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: min(560px, 100%);
  min-height: min(58vh, 460px);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem) 1.25rem;
  text-align: center;
}

.status-page__icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 0.4rem;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-light);
  font-size: 2.2rem;
}

.status-page__icon--warning {
  background: rgba(217, 119, 6, 0.12);
  color: var(--warning);
}

.status-page__icon--error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--error);
}

.status-page__code {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: clamp(3.25rem, 14vw, 5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.status-page__code--error {
  color: var(--error);
}

.status-page__title {
  margin: 0.35rem 0 0;
  color: var(--primary-ink);
  font-size: clamp(1.25rem, 4vw, 1.6rem);
}

.status-page__description {
  margin: 0;
  max-width: 42ch;
  color: var(--ink-3);
  line-height: 1.6;
}

.status-page__detail {
  width: 100%;
  margin: 0.5rem 0 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--ink-2);
  font-size: 0.8rem;
  text-align: left;
  white-space: pre-wrap;
}

.status-page__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

@media (max-width: 560px) {
  .status-page__actions {
    flex-direction: column;
    align-self: stretch;
  }

  .status-page__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- 12. Touch targets & motion ---------- */

@media (pointer: coarse) {
  /* Selectors are scoped rather than bare so they outrank the section-level
     button rules (e.g. `.admin-shell .btn`) that set a smaller min-height. */
  .btn,
  .btn-sm,
  .btn-icon,
  .nav-link,
  .admin-shell .btn,
  .admin-shell .btn-icon,
  .job-finder-shell .btn,
  .job-finder-shell .btn-icon,
  .dashboard-pager__button,
  .admin-pagination__button,
  .job-result-tabs a,
  .job-result-sort select,
  .job-result-sort .btn,
  .create-add-row .btn,
  .base-resume-library__actions .btn-sm,
  .admin-console-badge,
  select,
  .select-modern,
  .dashboard-pager-form__select.select-modern {
    min-height: 44px;
  }

  .admin-console-badge {
    display: inline-flex;
    align-items: center;
  }

  /* Labels wrapping a styled radio/checkbox are the real hit area. */
  .job-email-toggle,
  .job-scope-option,
  .option-card,
  .refinement-mode-card {
    min-height: 44px;
  }

  .btn-icon {
    min-width: 44px;
  }

  /* Hover-reveal controls are unreachable without a pointer. */
  .doc-actions {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 13. Post-review corrections ---------- */

/* The 196px cap fits ~2 compact desktop rows, but a stacked mobile row is
   taller than the whole box, so the default entry was cut mid-sentence with no
   visible scroll affordance. */
@media (max-width: 768px) {
  .base-resume-library__list {
    max-height: none;
    overflow-y: visible;
  }
}

/* The refine hero was centred by a leftover rule from the older single-column
   hero. In the current two-column grid, left-aligned copy scans better and
   stops the subtitle from ragging on both edges. */
.refine-hero,
.home-hero {
  text-align: left;
}

.refine-hero .home-hero__title {
  max-width: 20ch;
}

.home-hero__subtitle {
  max-width: 56ch;
}

/* Benefit chips should wrap, not stack one per line. */
@media (max-width: 640px) {
  .home-hero__pills {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

@media (max-width: 560px) {
  .refine-hero .home-hero__title {
    max-width: none;
  }
}

/* With the duplicate title removed, the letterhead is the only thing left in
   the head, so anchor it to the left like a real letter. */
.cover-letter-meta {
  text-align: left;
}

/* "DEFAULT FOR REFINEMENTS" already labels the featured entry; the extra chip
   only adds a stray row once the item stacks. */
@media (max-width: 560px) {
  .base-resume-library__item.is-default-featured .base-resume-library__badge {
    display: none;
  }
}

/* `.sticky-action-bar` is no longer rendered by any view, but the 86px of body
   padding reserved for it remained — leaving a dead band under the footer on
   every mobile page. */
@media (max-width: 640px) {
  body {
    padding-bottom: 0;
  }
}

/* =========================================================================
   Plans, billing & usage metering
   ========================================================================= */

/* ---------- Nav plan chip ---------- */
.nav-plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(79, 70, 229, 0.28);
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.nav-plan-chip:hover {
  background: rgba(79, 70, 229, 0.15);
  border-color: rgba(79, 70, 229, 0.45);
}

.nav-plan-chip--pro {
  border-color: rgba(194, 65, 12, 0.32);
  background: linear-gradient(135deg, rgba(194, 65, 12, 0.12), rgba(217, 119, 6, 0.12));
  color: #9a3412;
}

/* ---------- Inline weekly usage meter ---------- */
.plan-usage-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0 0 1.15rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.95), rgba(248, 251, 250, 0.9));
}

.plan-usage-bar.is-low {
  border-color: rgba(217, 119, 6, 0.4);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(254, 252, 245, 0.92));
}

.plan-usage-bar.is-out {
  border-color: rgba(220, 38, 38, 0.35);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.96), rgba(254, 249, 249, 0.92));
}

.plan-usage-bar__copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.75rem;
  min-width: 0;
}

.plan-usage-bar__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-ink);
  font-size: 0.86rem;
  font-weight: 600;
}

.plan-usage-bar__label strong {
  font-weight: 800;
}

.plan-usage-bar.is-out .plan-usage-bar__label {
  color: #991b1b;
}

.plan-usage-bar__reset {
  color: var(--ink-3);
  font-size: 0.76rem;
}

.plan-usage-bar__meter {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.plan-usage-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.3s ease;
}

.plan-usage-bar.is-low .plan-usage-bar__fill {
  background: var(--warning);
}

.plan-usage-bar.is-out .plan-usage-bar__fill {
  background: var(--error);
}

.plan-usage-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.plan-usage-bar__cta:hover {
  background: var(--primary-hover);
}

@media (max-width: 560px) {
  .plan-usage-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .plan-usage-bar__cta {
    justify-content: center;
  }
}

/* ---------- Billing page ---------- */
.billing-page {
  width: min(1000px, 100%);
  margin: 0 auto;
}

.billing-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.billing-header h1 {
  margin: 0.3rem 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  letter-spacing: -0.03em;
  color: var(--primary-ink);
}

.billing-header__lead {
  max-width: 58ch;
  margin: 0 auto;
  color: var(--ink-3);
  line-height: 1.6;
}

.billing-usage {
  margin-bottom: 1.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.billing-usage__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.billing-usage__head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: var(--primary-ink);
}

.billing-usage__head p {
  margin: 0;
  max-width: 52ch;
  color: var(--ink-3);
  font-size: 0.85rem;
  line-height: 1.5;
}

.billing-usage__count {
  flex: 0 0 auto;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--primary-ink);
  font-size: 0.82rem;
  white-space: nowrap;
}

.billing-meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.billing-meter__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.3s ease;
}

.billing-meter__fill.is-empty {
  background: var(--error);
}

.billing-usage__note {
  margin: 0.6rem 0 0;
  color: var(--ink-3);
  font-size: 0.82rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.plan-card {
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.plan-card--pro {
  border-color: rgba(79, 70, 229, 0.45);
  background:
    radial-gradient(520px 200px at 100% 0%, rgba(79, 70, 229, 0.12), transparent 65%),
    linear-gradient(180deg, #ffffff, #f7fdfb);
  box-shadow: 0 16px 38px rgba(79, 70, 229, 0.1);
}

.plan-card.is-current {
  outline: 2px solid rgba(79, 70, 229, 0.35);
  outline-offset: -2px;
}

.plan-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.plan-card__name {
  margin: 0;
  font-size: 1.2rem;
  color: var(--primary-ink);
}

.plan-card__badge {
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--ink-3);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-card__badge--pro {
  background: rgba(79, 70, 229, 0.14);
  color: var(--primary);
}

.plan-card__price {
  margin: 0 0 1rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.plan-card__amount {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--primary-ink);
}

.plan-card__interval {
  color: var(--ink-3);
  font-size: 0.88rem;
}

.plan-feature-list {
  flex: 1 1 auto;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.plan-feature-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.45;
}

.plan-feature-list i {
  margin-top: 0.15rem;
  color: var(--success);
}

.plan-card__form {
  margin: 0;
}

.plan-card__status {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(22, 163, 74, 0.09);
}

.plan-card__status p {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  color: #14532d;
  font-size: 0.84rem;
  line-height: 1.45;
}

.plan-card__footnote {
  margin: 0.6rem 0 0;
  color: var(--text-light);
  font-size: 0.76rem;
  text-align: center;
}

.billing-disabled-note {
  margin: 0;
}

.billing-fineprint {
  margin: 1.5rem 0 0;
  color: var(--text-light);
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 768px) {
  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .billing-usage__head {
    flex-direction: column;
    gap: 0.6rem;
  }
}

/* ---------- Locked job matches teaser ---------- */
.job-locked-panel {
  position: relative;
  margin-top: 15px;
  padding: 26px 24px;
  border: 1px dashed rgba(79, 70, 229, 0.45);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.85), rgba(255, 255, 255, 0.95));
  overflow: hidden;
}

/* Ghosted card edges hinting at the results hidden underneath. */
.job-locked-panel__stack {
  position: absolute;
  inset: 0 24px auto 24px;
  display: grid;
  gap: 6px;
  padding-top: 8px;
  opacity: 0.5;
  pointer-events: none;
}

.job-locked-panel__stack span {
  display: block;
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.16), rgba(79, 70, 229, 0.03));
}

.job-locked-panel__stack span:nth-child(2) { opacity: 0.6; }
.job-locked-panel__stack span:nth-child(3) { opacity: 0.3; }

.job-locked-panel__copy {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding-top: 34px;
  text-align: center;
}

.job-locked-panel__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary);
  font-size: 1.25rem;
}

.job-locked-panel h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--primary-ink);
}

.job-locked-panel p {
  max-width: 54ch;
  margin: 0;
  color: var(--ink-3);
  font-size: 0.88rem;
  line-height: 1.55;
}

.job-locked-panel .btn {
  margin-top: 0.5rem;
}

/* ---------- Quota-reached dialog ---------- */
.quota-dialog {
  width: min(460px, calc(100% - 2rem));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
}

.quota-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.quota-dialog__inner {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
}

.quota-dialog__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.14);
  color: var(--warning);
  font-size: 1.6rem;
}

.quota-dialog h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--primary-ink);
}

.quota-dialog p {
  margin: 0;
  color: var(--ink-3);
  font-size: 0.9rem;
  line-height: 1.55;
}

.quota-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  width: 100%;
}

@media (max-width: 560px) {
  .quota-dialog__actions {
    flex-direction: column;
  }

  .quota-dialog__actions .btn {
    width: 100%;
    justify-content: center;
  }
}


/* ---------- CSP-safe proportional widths ----------
   `style-src` intentionally omits 'unsafe-inline', so a `style="width:x%"`
   attribute is dropped by the browser and the element falls back to its full
   auto width — which silently renders every meter as 100%. These bucketed
   classes give server-rendered bars a real width without weakening the CSP.
   Values round to the nearest 5%, which is imperceptible on a progress bar.
   (JS may still set `el.style.width` directly; CSSOM writes are not blocked.) */
.pct-w-0 { width: 0%; }
.pct-w-5 { width: 5%; }
.pct-w-10 { width: 10%; }
.pct-w-15 { width: 15%; }
.pct-w-20 { width: 20%; }
.pct-w-25 { width: 25%; }
.pct-w-30 { width: 30%; }
.pct-w-35 { width: 35%; }
.pct-w-40 { width: 40%; }
.pct-w-45 { width: 45%; }
.pct-w-50 { width: 50%; }
.pct-w-55 { width: 55%; }
.pct-w-60 { width: 60%; }
.pct-w-65 { width: 65%; }
.pct-w-70 { width: 70%; }
.pct-w-75 { width: 75%; }
.pct-w-80 { width: 80%; }
.pct-w-85 { width: 85%; }
.pct-w-90 { width: 90%; }
.pct-w-95 { width: 95%; }
.pct-w-100 { width: 100%; }
