/* ============================================
   ResumePro User Dashboard — Styles
   Reuses landing page design tokens
   ============================================ */

/* --- Design Tokens (from landing page) --- */
:root {
  --color-bg: #ffffff;
  --color-text: #1e1e2d;
  --color-text-muted: #6c757d;
  --color-brand: #2563EB;
  --color-brand-hover: #1D4ED8;
  --color-surface: #f8f9fa;
  --color-border: #e9ecef;
  --color-shadow: rgba(0, 0, 0, 0.08);
  --color-shadow-hover: rgba(0, 0, 0, 0.14);
  --color-success: #28a745;
  --color-warning: #ffc107;
  --color-danger: #dc3545;
  --color-info: #17a2b8;
  --font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --transition: 0.25s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-family);
  background: var(--color-surface);
  color: var(--color-text);
  line-height: 1.5;
}

a { color: var(--color-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Login Page --- */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-surface);
}

.login-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px var(--color-shadow);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-card h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-card h1 span { color: var(--color-brand); }

.login-logo-link {
  color: inherit;
  text-decoration: none;
}

.login-tagline {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.login-card .subtitle {
  color: var(--color-text-muted);
  margin-bottom: 24px;
  font-size: 14px;
}

.login-error {
  background: #f8d7da;
  color: var(--color-danger);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.login-footer {
  margin-top: 24px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.login-footer a { font-weight: 500; }

/* Google sign-in button */
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-google:hover:not(:disabled) {
  background: var(--color-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-google:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Dashboard Header --- */
.dash-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.dash-header-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.dash-header-logo span { color: var(--color-brand); }
.dash-header-logo:hover { text-decoration: none; }

.dash-header-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  padding-left: 16px;
  margin-left: 16px;
  border-left: 1px solid var(--color-border);
}

.dash-header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.dash-header-nav a {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.dash-header-nav a:hover {
  color: var(--color-text);
  text-decoration: none;
}

.dash-header-nav a.active {
  color: var(--color-brand);
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dash-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.dash-avatar-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.dash-user-name {
  font-size: 14px;
  font-weight: 500;
}

.btn-signout {
  background: none;
  border: 1px solid var(--color-border);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-signout:hover {
  color: var(--color-danger);
  border-color: var(--color-danger);
}

/* --- Main Content --- */
.dash-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 88px 24px 48px;
}

.dash-greeting {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
}

/* --- Cards --- */
.dash-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.dash-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px var(--color-shadow);
  padding: 24px;
}

.dash-card h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}

.dash-card-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.dash-card-sub {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Plan badge */
.plan-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.plan-badge-free {
  background: #e2e3e5;
  color: #383d41;
}

.plan-badge-pro {
  background: #DBEAFE;
  color: #1E40AF;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

.status-active { background: #d4edda; color: #155724; }
.status-cancelling { background: #fff3cd; color: #856404; }
.status-expired { background: #f8d7da; color: #721c24; }

.plan-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border);
}

.plan-detail-row:last-child { border-bottom: none; }
.plan-detail-label { color: var(--color-text-muted); }

/* Usage bar */
.usage-bar-wrap {
  margin: 12px 0 8px;
}

.usage-bar {
  background: var(--color-border);
  border-radius: 8px;
  height: 12px;
  overflow: hidden;
}

.usage-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.4s ease;
}

.usage-bar-fill.green { background: var(--color-success); }
.usage-bar-fill.yellow { background: var(--color-warning); }
.usage-bar-fill.red { background: var(--color-danger); }

.usage-text {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.usage-exhausted {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fff3cd;
  border-radius: 6px;
  font-size: 13px;
  color: #856404;
}

/* Upgrade CTA */
.upgrade-cta {
  margin-top: 16px;
  padding: 16px;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  text-align: center;
}

.upgrade-cta p {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.plan-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.plan-picker-card {
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  transition: border-color var(--transition);
}

.plan-picker-card:hover {
  border-color: var(--color-brand);
}

.plan-picker-name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.plan-picker-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-brand);
}

.plan-picker-price span {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-muted);
}

.plan-picker-limit {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--color-brand);
  color: white;
}
.btn-primary:hover { background: var(--color-brand-hover); }

.btn-secondary {
  background: var(--color-border);
  color: var(--color-text);
}
.btn-secondary:hover { background: #dee2e6; }

.btn-danger-outline {
  background: transparent;
  border: 1px solid var(--color-danger);
  color: var(--color-danger);
}
.btn-danger-outline:hover {
  background: var(--color-danger);
  color: white;
}

.btn-sm { padding: 4px 10px; font-size: 13px; }

/* --- Applications Table --- */
.dash-section {
  margin-bottom: 32px;
}

.dash-section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px var(--color-shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--color-border);
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

tbody tr:hover { background: rgba(0, 0, 0, 0.02); }
tbody tr:last-child td { border-bottom: none; }

.match-score {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.match-high { background: #d4edda; color: #155724; }
.match-medium { background: #fff3cd; color: #856404; }
.match-low { background: #f8d7da; color: #721c24; }

.btn-download {
  background: none;
  border: 1px solid var(--color-border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-download:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 16px;
  font-size: 14px;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

.pagination button:hover:not(:disabled) { background: var(--color-surface); }

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

.pagination .page-info { color: var(--color-text-muted); }

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

.empty-state h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--color-text);
}

.empty-state p { font-size: 14px; }

/* --- Account Section --- */
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.account-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border);
}

.account-detail-row:last-child { border-bottom: none; }
.account-detail-label { color: var(--color-text-muted); }

.cancel-notice {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fff3cd;
  border-radius: 6px;
  font-size: 13px;
  color: #856404;
}

/* --- Modal --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-backdrop.hidden { display: none; }

.modal {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  padding: 24px;
  width: 90%;
  max-width: 440px;
}

.modal h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* --- Loading & States --- */
.loading {
  text-align: center;
  padding: 48px;
  color: var(--color-text-muted);
}

.loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

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

.error-state {
  text-align: center;
  padding: 48px 24px;
}

.error-state p {
  color: var(--color-danger);
  margin-bottom: 16px;
}

.success-banner {
  background: #d4edda;
  color: #155724;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.success-banner button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #155724;
  padding: 0 4px;
}

/* --- Resume Status --- */
.resume-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #d4edda;
  color: #155724;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.resume-status-badge::before {
  content: '\2713';
  font-weight: 700;
}

.resume-status-date {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.resume-upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.resume-upload-zone:hover {
  border-color: var(--color-brand);
  background: rgba(37, 99, 235, 0.03);
}

.resume-upload-zone p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.resume-upload-zone .upload-hint {
  font-size: 12px;
  color: var(--color-text-muted);
}

.resume-upload-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 6px;
  font-size: 13px;
}

/* --- Customize Form --- */
.form-group {
  margin-bottom: 16px;
}

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

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-family);
  color: var(--color-text);
  transition: border-color var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-family);
  color: var(--color-text);
  min-height: 200px;
  resize: vertical;
  transition: border-color var(--transition);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.form-error {
  padding: 10px 14px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
}

.form-result {
  padding: 14px;
  background: #d4edda;
  color: #155724;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}

.form-result .match-score-display {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.btn-customize {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  justify-content: center;
}

.btn-customize:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-replace {
  background: none;
  border: 1px solid var(--color-border);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-replace:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

/* --- Interview Prep --- */

.prep-subtitle {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.product-card-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.product-info h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text);
}

.product-price-tag {
  text-align: center;
  min-width: 100px;
}

.product-price {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-brand);
}

.product-price-label {
  font-size: 12px;
  color: var(--color-text-muted);
}

.prep-warning {
  background: #fff3cd;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.prep-warning h3 {
  font-size: 16px;
  font-weight: 600;
  color: #856404;
  margin-bottom: 8px;
}

.prep-warning p {
  font-size: 14px;
  color: #856404;
  margin-bottom: 16px;
}

.cancelled-banner {
  background: #fff3cd;
  color: #856404;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cancelled-banner button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #856404;
  padding: 0 4px;
}

/* Generating state */
.generating-spinner {
  text-align: center;
  padding: 48px 24px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px var(--color-shadow);
  margin-bottom: 24px;
}

.generating-spinner h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 8px;
  transition: opacity 0.3s ease;
}

.generating-spinner p {
  transition: opacity 0.3s ease;
}

/* Static info band — base style shared by:
   1. The "refresh to check" tip inside #generatingState (never fades — the !important
      defends against updateStatusMessage() which fades every <p> inside the spinner).
   2. The "workflow could take time" heads-up shown below the form, before submission. */
.generating-spinner-tip {
  margin-top: 24px;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  opacity: 1 !important;
  transition: none;
}

/* Placement tweak when used outside the spinner (inside the form card). */
.workflow-duration-note {
  margin-top: 16px;
  margin-bottom: 0;
}

/* Results header */
.prep-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.prep-results-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.prep-actions {
  display: flex;
  gap: 8px;
}

/* Question sections */
.question-section {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px var(--color-shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.question-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-brand);
  margin-bottom: 4px;
}

.question-section-hint {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.question-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.question-item:last-child { border-bottom: none; }

.question-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-brand);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-content { flex: 1; }

.question-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 8px;
}

.question-why {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  padding-left: 12px;
  border-left: 3px solid var(--color-border);
}

.question-guidance {
  font-size: 13px;
  color: #333;
  background: var(--color-surface);
  padding: 10px 14px;
  border-radius: 6px;
  line-height: 1.5;
}

/* Mentor note */
.mentor-note {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px var(--color-shadow);
  padding: 24px;
  margin-bottom: 24px;
  border-left: 4px solid var(--color-brand);
}

.mentor-note-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--color-brand);
}

.mentor-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.mentor-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.mentor-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.mentor-section p {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  white-space: pre-line;
}

/* Celebration check animation */
.celebration-check {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  background: var(--color-success);
  color: #fff;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
  animation: pop-in 0.4s ease forwards;
}

@keyframes pop-in {
  0% { transform: scale(0); opacity: 0; }
  80% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Customization Progress --- */
.customize-progress {
  text-align: center;
  padding: 48px 24px;
}

.customize-progress h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 16px;
  margin-bottom: 8px;
  transition: opacity 0.3s ease;
}

.customize-progress p {
  font-size: 14px;
  color: var(--color-text-muted);
  transition: opacity 0.3s ease;
}

/* Static "refresh to check Applications" tip band. Unlike the cycling
   progress message above it, this copy never changes — it sets expectations
   for the full 2-minute ceiling and provides a recovery path. */
.customize-progress-tip {
  margin: 24px auto 0;
  max-width: 520px;
  padding: 12px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
  text-align: left;
  /* Prevent the parent's cycling-message opacity transition from touching it */
  transition: none;
  opacity: 1 !important;
}

/* --- Dual Download Buttons --- */
.customize-downloads {
  display: flex;
  gap: 10px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.btn-secondary-outline {
  background: transparent;
  border: 2px solid #1a365d;
  color: #1a365d;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary-outline:hover {
  background: #1a365d;
  color: #ffffff;
}

/* ATS Explainer */
.ats-explainer {
  font-size: 13px;
  color: var(--color-text-muted);
  background: #f0f4f8;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 8px 0 12px;
  line-height: 1.5;
  border-left: 3px solid var(--color-info);
}

.ats-explainer strong {
  color: var(--color-text);
}

/* Changelog Section */
.changelog-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 12px;
  background: var(--color-bg);
}

.changelog-section summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  padding: 4px 0;
  user-select: none;
}

.changelog-section summary:hover {
  color: var(--color-brand);
}

.changelog-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.changelog-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  line-height: 1.5;
}

.changelog-list li:last-child {
  border-bottom: none;
}

.changelog-list li strong {
  color: var(--color-brand);
}

.changelog-list li em {
  color: var(--color-text-muted);
}

/* Table dual download buttons */
.table-download-btns {
  display: flex;
  gap: 4px;
}

/* --- Status Strip (compact plan + usage) --- */
.status-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px var(--color-shadow);
  padding: 12px 20px;
  margin-bottom: 24px;
}

.status-strip .plan-badge {
  margin-bottom: 0;
}

.status-strip__count {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--color-text);
}

.status-strip__bar {
  flex: 1;
  background: var(--color-border);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
  min-width: 80px;
}

.status-strip__bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}

.status-strip__bar-fill.green { background: var(--color-success); }
.status-strip__bar-fill.yellow { background: var(--color-warning); }
.status-strip__bar-fill.red { background: var(--color-danger); }

.status-strip__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-strip__exhausted {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-danger);
  white-space: nowrap;
}

/* Account details (collapsible bottom section) */
.account-details summary {
  cursor: pointer;
  user-select: none;
}

.account-details summary:hover {
  color: var(--color-brand);
}

/* --- Mobile hamburger (dashboard) --- */
.dash-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.dash-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.dash-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.dash-hamburger.active span:nth-child(2) { opacity: 0; }
.dash-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.dash-mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 12px var(--color-shadow);
  padding: 8px 16px;
  z-index: 99;
}

.dash-mobile-nav.open { display: block; }

.dash-mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}

.dash-mobile-nav a:last-child { border-bottom: none; }
.dash-mobile-nav a.active { color: var(--color-brand); }
.dash-mobile-nav a:hover { color: var(--color-text); text-decoration: none; }

.hidden { display: none !important; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .dash-cards-row {
    grid-template-columns: 1fr;
  }

  .status-strip {
    flex-wrap: wrap;
    gap: 10px;
  }

  .status-strip__bar {
    order: 3;
    flex-basis: 100%;
  }

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

  .dash-header { padding: 0 16px; }
  .dash-main { padding: 80px 16px 32px; }

  .dash-hamburger { display: flex; }
  .dash-header-nav { display: none; }
  .dash-user-name { display: none; }

  .dash-greeting { font-size: 18px; }
}

/* ============================================
   Candidate Comparison — Styles
   ============================================ */

/* --- Criteria textarea (shorter) --- */
.cc-criteria { min-height: 80px; resize: vertical; }
.form-hint-inline { font-weight: 400; color: var(--color-text-muted); font-size: 13px; }

/* --- Drag & Drop Zone --- */
.cc-drop-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.cc-drop-zone:hover,
.cc-drop-zone--active {
  border-color: var(--color-brand);
  background: rgba(37, 99, 235, 0.04);
}

.cc-drop-zone-content { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cc-drop-zone-content svg { color: var(--color-text-muted); }
.cc-drop-zone-content p { font-size: 14px; color: var(--color-text-muted); margin: 0; }
.cc-drop-zone-or { font-size: 12px; color: var(--color-text-muted); }
.cc-file-input { display: none; }

/* --- File Cards --- */
.cc-file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.cc-file-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.cc-file-card-info { display: flex; align-items: center; gap: 8px; }

.cc-file-card-icon {
  display: inline-block;
  padding: 2px 6px;
  background: var(--color-surface);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-brand);
}

.cc-file-card-name { font-weight: 500; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-file-card-size { color: var(--color-text-muted); font-size: 12px; }

.cc-file-card-remove {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0 4px;
  line-height: 1;
}
.cc-file-card-remove:hover { color: var(--color-danger); }

/* --- Confidence Banner --- */
.cc-confidence {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
}

.cc-confidence--high { background: rgba(40, 167, 69, 0.1); border-left: 4px solid var(--color-success); color: #1a5928; }
.cc-confidence--medium { background: rgba(255, 193, 7, 0.1); border-left: 4px solid var(--color-warning); color: #856404; }
.cc-confidence--low { background: rgba(220, 53, 69, 0.1); border-left: 4px solid var(--color-danger); color: #721c24; }

/* --- Comparison Table --- */
.cc-table-wrap { overflow-x: auto; margin-bottom: 24px; }

.cc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
}

.cc-table th, .cc-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.cc-table th {
  background: var(--color-surface);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.cc-th-sortable { cursor: pointer; user-select: none; }
.cc-th-sortable:hover { color: var(--color-brand); }
.cc-th-active { color: var(--color-brand) !important; }

.cc-rank { font-weight: 700; color: var(--color-brand); }
.cc-name { font-weight: 600; }

.cc-score { text-align: center; }
.cc-score-high { color: var(--color-success); font-weight: 700; }
.cc-score-mid { color: #e67e22; font-weight: 700; }
.cc-score-low { color: var(--color-danger); font-weight: 700; }
.cc-rating { display: block; font-size: 11px; color: var(--color-text-muted); font-weight: 400; }

/* --- Hiring Recommendation --- */
.cc-hiring-rec { margin-bottom: 24px; }
.cc-rec-title { font-size: 18px; margin-bottom: 16px; }

.cc-rec-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

.cc-rec-pick {
  padding: 16px;
  border-radius: var(--radius-sm);
}

.cc-rec-pick--top { background: rgba(40, 167, 69, 0.06); border: 1px solid rgba(40, 167, 69, 0.2); }
.cc-rec-pick--runner { background: rgba(255, 193, 7, 0.06); border: 1px solid rgba(255, 193, 7, 0.2); }

.cc-rec-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); font-weight: 600; }
.cc-rec-name { display: block; font-size: 18px; font-weight: 700; margin: 4px 0 8px; }
.cc-rec-pick p { font-size: 14px; color: var(--color-text-muted); margin: 0; }

.cc-rec-summary h4 { font-size: 14px; margin-bottom: 8px; }
.cc-rec-summary p { font-size: 14px; color: var(--color-text-muted); margin: 0; }

/* --- Candidate Detail Cards --- */
.cc-candidate-cards { display: flex; flex-direction: column; gap: 16px; }

.cc-candidate-card { padding: 20px; }

.cc-candidate-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 8px;
}

.cc-candidate-header h3 { font-size: 16px; margin: 0; }
.cc-candidate-overall { display: block; font-size: 14px; margin-top: 4px; }
.cc-candidate-summary { font-size: 14px; color: var(--color-text-muted); margin-bottom: 12px; }

.cc-candidate-details { margin-top: 16px; border-top: 1px solid var(--color-border); padding-top: 16px; }

.cc-red-flags { margin-bottom: 16px; }
.cc-red-flags h4 { font-size: 14px; color: var(--color-danger); margin-bottom: 8px; }
.cc-red-flag-item {
  padding: 8px 12px;
  background: rgba(220, 53, 69, 0.06);
  border-left: 3px solid var(--color-danger);
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 6px;
}

.cc-param-scores { margin-bottom: 16px; }
.cc-param-scores h4 { font-size: 14px; margin-bottom: 8px; }

.cc-param-score { margin-bottom: 12px; }
.cc-param-score-header { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.cc-param-rationale { font-size: 13px; color: var(--color-text-muted); margin: 0; }

.cc-interview-qs { margin-bottom: 8px; }
.cc-interview-qs h4 { font-size: 14px; margin-bottom: 8px; }
.cc-interview-q { margin-bottom: 10px; }
.cc-interview-q-text { font-size: 13px; font-weight: 500; margin: 0 0 2px; }
.cc-interview-q-why { font-size: 12px; color: var(--color-text-muted); margin: 0; }

/* --- Responsive tweaks for candidate comparison --- */
@media (max-width: 768px) {
  .cc-rec-picks { grid-template-columns: 1fr; }
  .cc-table { font-size: 12px; }
  .cc-table th, .cc-table td { padding: 8px 10px; }
  .cc-file-card-name { max-width: 120px; }
}

/* --- Small phones (480px) --- */
@media (max-width: 480px) {
  /* Header */
  .dash-header-label { display: none; }

  /* Status strip — stack vertically */
  .status-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 16px;
  }
  .status-strip__bar { width: 100%; min-width: 0; }

  /* Forms */
  .form-textarea { min-height: 120px; }

  /* Download buttons — stack vertically */
  .customize-downloads { flex-direction: column; }
  .customize-downloads .btn,
  .customize-downloads .btn-secondary-outline { width: 100%; text-align: center; }

  /* Table download buttons — stack */
  .table-download-btns { flex-direction: column; gap: 2px; }

  /* Interview Prep: product card hero */
  .product-card-hero { flex-direction: column; align-items: flex-start; gap: 12px; }
  .product-price-tag { text-align: left; }

  /* Interview Prep: results header */
  .prep-actions { flex-direction: column; width: 100%; }
  .prep-actions .btn { width: 100%; justify-content: center; }

  /* Interview Prep: word wrap safety */
  .mentor-section p { overflow-wrap: break-word; }

  /* Candidate Comparison: file cards */
  .cc-file-card-name { max-width: 140px; }

  /* Candidate Comparison: candidate header stack */
  .cc-candidate-header { flex-direction: column; gap: 4px; }

  /* Candidate Comparison: param scores */
  .cc-param-score-header { flex-direction: column; gap: 2px; }

  /* Candidate Comparison: hiring rec picks */
  .cc-rec-picks { grid-template-columns: 1fr; }

  /* Plan picker grid — single column */
  .plan-picker-grid { grid-template-columns: 1fr; }

  /* Touch-friendly buttons */
  .btn { min-height: 44px; }
  .btn-download { min-height: 36px; padding: 6px 12px; }
  .btn-replace { min-height: 44px; }

  /* Preview bottom CTA */
  .preview-bottom-cta { padding: 24px 16px; }
}

/* ============================================
   Interview Prep — Preview & Locked States
   ============================================ */

/* Preview offer divider */
.preview-offer-divider {
  margin-top: 20px;
  text-align: center;
}

.divider-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.divider-line::before,
.divider-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.preview-offer-box {
  background: #f0f7ff;
  border: 1px solid #d0e3ff;
  border-radius: var(--radius-sm);
  padding: 16px;
}

.preview-offer-text {
  margin-bottom: 10px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* Preview used badge */
.preview-used-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 12px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.badge-icon {
  font-weight: bold;
}

/* Preview banner */
.preview-banner {
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #1565c0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.preview-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
}

/* Preview watermark */
.preview-watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 120px;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.04);
  pointer-events: none;
  z-index: 1;
  white-space: nowrap;
  letter-spacing: 20px;
}

/* Anti-copy: disable text selection on preview container */
.preview-protected {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Locked question styling */
.question-locked {
  opacity: 0.75;
}

.locked-content-placeholder {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 8px;
  color: var(--color-text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lock-icon {
  font-size: 16px;
}

/* Locked mentor note sections */
.mentor-section-locked h4 {
  color: var(--color-text);
}

.mentor-section-locked .locked-content-placeholder {
  background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

/* Category badge on preview questions */
.question-category-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-brand);
  background: rgba(37, 99, 235, 0.08);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 6px;
}

/* Locked categories summary in preview */
.locked-categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.locked-category-item {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--color-text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Pulsing buy CTA button */
.btn-pulse {
  animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
}

/* Small buy button for past sessions table */
.btn-buy-small {
  background: var(--color-brand);
  color: #fff;
  border: none;
}

.btn-buy-small:hover {
  background: var(--color-brand-hover);
}

/* Preview bottom CTA card */
.preview-bottom-cta {
  background: var(--color-text);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 32px;
  margin-top: 32px;
  text-align: center;
}

.preview-bottom-cta h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.preview-bottom-cta p {
  color: #ccc;
  margin-bottom: 20px;
  font-size: 15px;
}

.preview-bottom-cta .btn {
  background: #fff;
  color: var(--color-text);
  font-weight: 600;
}

.preview-bottom-cta .btn:hover {
  background: #f0f0f0;
}

/* Block printing of preview */
@media print {
  #previewResultsSection { display: none !important; }
}

/* ─── AI Resume Score Styles ───────────────────────────────────────── */

.score-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

/* Overall score card — professional white card with left accent */
.score-overall {
  background: var(--color-bg);
  border-left: 4px solid var(--color-brand);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 24px;
  margin-bottom: 24px;
}

.score-overall-header {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 12px;
}

.score-circle {
  text-align: center;
  background: var(--color-surface);
  border-radius: 50%;
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-number {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-brand);
}

.score-label {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.score-status {
  flex: 1;
}

.score-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.score-badge.high { background: #D1FAE5; color: #065F46; }
.score-badge.medium { background: #FEF3C7; color: #92400E; }
.score-badge.low { background: #FEE2E2; color: #991B1B; }

.score-description {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* Category breakdown — numbered sections */
.score-categories {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.score-category-item {
  display: flex;
  gap: 14px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 20px;
}

.score-category-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-brand);
  color: white;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-category-content {
  flex: 1;
}

.score-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.score-category-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--color-brand);
}

.score-category-score {
  font-weight: 700;
  font-size: 18px;
}

.score-category-score.high { color: #10B981; }
.score-category-score.medium { color: #F59E0B; }
.score-category-score.low { color: #EF4444; }

.score-category-feedback {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
  padding-left: 12px;
  border-left: 3px solid var(--color-border);
}

/* Recommendations section — mentor note style */
.score-recommendations {
  background: var(--color-bg);
  border-left: 4px solid #F59E0B;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 24px;
  margin-bottom: 24px;
}

.score-recommendations h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-text);
}

.score-recommendations ol {
  margin: 0;
  padding-left: 24px;
  counter-reset: recommendation;
  list-style: none;
}

.score-recommendations li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 12px;
  position: relative;
  counter-increment: recommendation;
}

.score-recommendations li::before {
  content: counter(recommendation) ". ";
  font-weight: 700;
  color: #F59E0B;
}

.score-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.score-loading {
  text-align: center;
  padding: 48px 24px;
}

.score-loading .spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border: 4px solid #E5E7EB;
  border-top-color: #2563EB;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-note {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 8px;
}

.score-error {
  text-align: center;
  padding: 32px;
}

.error-message {
  color: #DC2626;
  margin-bottom: 16px;
}

/* ─── Profile Photo ──────────────────────────── */
.photo-upload-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 12px;
}

.photo-preview {
  width: 100px;
  height: 100px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  flex-shrink: 0;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 11px;
}

.photo-upload-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-ghost {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition);
}

.btn-ghost:hover {
  background: var(--color-surface);
}

.btn-sm {
  font-size: 12px;
  padding: 5px 12px;
}

/* ─── Razorpay Address Modal ─────────────────────────────────────── */

.rp-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: rpFadeIn 0.2s ease;
}

@keyframes rpFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.rp-modal-content {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
}

.rp-modal-header {
  margin-bottom: 24px;
}

.rp-modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.rp-modal-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
}

.rp-form-row {
  margin-bottom: 16px;
}

.rp-form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.rp-required {
  color: var(--color-danger);
}

.rp-form-row input,
.rp-form-row select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition);
}

.rp-form-row input:focus,
.rp-form-row select:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.rp-form-row-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rp-phone-input {
  display: flex;
  align-items: stretch;
}

.rp-phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.rp-phone-input input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.rp-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.rp-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.rp-form-actions .btn {
  min-width: 120px;
}

@media (max-width: 500px) {
  .rp-modal-content {
    padding: 20px;
    border-radius: var(--radius-sm);
  }
  .rp-form-row-half {
    grid-template-columns: 1fr;
  }
}
