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

body {
  font-family: system-ui, -apple-system, sans-serif;
  color: #2d3748;
  background: #f5f5f5;
  line-height: 1.5;
}

/* === Login Page === */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #062e30 0%, #0a5c5f 50%, #0d7377 100%);
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card h1 {
  font-size: 28px;
  color: #0d7377;
  margin-bottom: 8px;
}

.login-subtitle {
  color: #718096;
  font-size: 14px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.login-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-btn {
  display: block;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  text-align: center;
}

.google-btn {
  background: #4285f4;
  color: #fff;
}
.google-btn:hover { background: #3367d6; }

.linkedin-btn {
  background: #0077b5;
  color: #fff;
}
.linkedin-btn:hover { background: #005e93; }

/* === Login Extras === */
.login-divider {
  text-align: center;
  color: #a0aec0;
  font-size: 13px;
  position: relative;
}
.login-divider::before,
.login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #e2e8f0;
}
.login-divider::before { left: 0; }
.login-divider::after { right: 0; }

.guest-btn {
  background: transparent;
  color: #4a5568;
  border: 2px solid #e2e8f0;
  cursor: pointer;
}
.guest-btn:hover {
  border-color: #0d7377;
  color: #0d7377;
}
.guest-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === Guest Banner === */
.guest-banner {
  background: #fffff0;
  border: 1px solid #fefcbf;
  color: #744210;
  font-size: 13px;
  text-align: center;
  padding: 10px 16px;
}

.coming-soon-badge {
  display: inline-block;
  background: #edf2f7;
  color: #718096;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === Dashboard === */
.dashboard {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 32px;
}

.dashboard-header h1 {
  font-size: 22px;
  color: #0d7377;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #4a5568;
}

.dashboard-main {
  padding: 20px 0;
}

/* === Buttons === */
.btn-primary {
  padding: 10px 24px;
  background: #0d7377;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: #0a5c5f; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  padding: 8px 16px;
  background: #e2e8f0;
  color: #4a5568;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { background: #cbd5e0; }

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #0d7377;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* === Cards === */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

/* === Upload Zone === */
.upload-zone {
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  color: #718096;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: #0d7377;
  background: #e6f7f7;
  color: #0d7377;
}

/* === Tags/Skills === */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  min-height: 42px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #e6f7f7;
  color: #065f62;
  border-radius: 4px;
  font-size: 13px;
}

.tag-remove {
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #0d7377;
}

/* === Progress Bar === */
.progress-container {
  display: none;
  margin: 16px 0;
}
.progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d7377, #14b8a6);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s;
}
.progress-step {
  font-size: 12px;
  color: #718096;
  margin-top: 4px;
}

/* === CV Form === */
.form-section {
  margin-bottom: 20px;
}

.section-title {
  font-size: 16px;
  color: #0d7377;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* Profile selector */
.profile-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-select {
  padding: 8px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  min-width: 220px;
  transition: border-color 0.2s;
}
.profile-select:focus {
  outline: none;
  border-color: #0d7377;
}

/* Photo upload */
.photo-upload-zone {
  display: flex;
  justify-content: center;
  cursor: pointer;
}

.photo-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px dashed #cbd5e0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7fafc;
  transition: border-color 0.2s;
}
.photo-upload-zone:hover .photo-preview {
  border-color: #0d7377;
}

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

.photo-placeholder {
  font-size: 12px;
  color: #a0aec0;
  text-align: center;
  padding: 8px;
}

/* Dynamic entries */
.dynamic-entry {
  padding: 16px;
  border-left: 3px solid #0d7377;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.entry-header strong {
  font-size: 14px;
  color: #2d3748;
}

.btn-danger-sm {
  padding: 4px 10px;
  background: #fed7d7;
  color: #c53030;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-danger-sm:hover { background: #feb2b2; }

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

/* Bullets */
.bullets-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 6px;
}

.bullets-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bullet-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.bullet-row input {
  flex: 1;
  padding: 8px 10px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.bullet-row input:focus {
  outline: none;
  border-color: #0d7377;
}

/* Tag input inside tags-container */
.tag-input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 160px;
  padding: 4px;
  font-size: 14px;
  font-family: inherit;
}

/* Form actions */
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 0;
}
.form-actions .btn-primary,
.form-actions .btn-secondary,
.form-actions button {
  width: 100%;
  text-align: center;
}
@media (min-width: 600px) {
  .form-actions {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .form-actions .btn-primary,
  .form-actions .btn-secondary,
  .form-actions button {
    width: auto;
  }
}

/* Feedback messages */
.feedback-msg {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 12px;
  animation: feedbackIn 0.2s ease;
}
.feedback-success {
  background: #c6f6d5;
  color: #276749;
}
.feedback-error {
  background: #fed7d7;
  color: #c53030;
}
@keyframes feedbackIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Upload Zone Enhancements === */
.upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.upload-subtext {
  font-size: 12px;
  color: #a0aec0;
  margin-top: 4px;
}
.upload-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.upload-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #0d7377;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.upload-feedback {
  margin-top: 12px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
}
.upload-feedback.success {
  background: #c6f6d5;
  color: #22543d;
}
.upload-feedback.error {
  background: #fed7d7;
  color: #742a2a;
}

/* === Onboarding === */
.onboarding-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 20px;
  color: #718096;
}

.overall-fit {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.fit-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.fit-score-number {
  font-size: 48px;
  font-weight: 700;
}
.fit-score-label {
  font-size: 14px;
  color: #718096;
}
.score-high { color: #22543d; }
.score-medium { color: #975a16; }
.score-low { color: #742a2a; }
.fit-summary {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.5;
}

.onboarding-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.observation-card {
  border-left: 4px solid #cbd5e0;
  transition: opacity 0.3s;
}
.obs-incongruence { border-left-color: #e53e3e; }
.obs-improve { border-left-color: #d69e2e; }
.obs-valorize { border-left-color: #38a169; }

.obs-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.obs-badge-incongruence { background: #fed7d7; color: #742a2a; }
.obs-badge-improve { background: #fefcbf; color: #744210; }
.obs-badge-valorize { background: #c6f6d5; color: #22543d; }

.obs-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #2d3748;
}
.obs-detail {
  font-size: 13px;
  color: #4a5568;
  margin-bottom: 8px;
  line-height: 1.5;
}
.obs-advice {
  font-size: 13px;
  color: #0d7377;
  font-style: italic;
  margin-bottom: 12px;
}

.obs-edit-field {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  margin-bottom: 12px;
  resize: vertical;
}
.obs-edit-field:focus {
  outline: none;
  border-color: #0d7377;
}

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

.obs-actioned {
  opacity: 0.6;
}
.obs-done-label {
  display: inline-block;
  padding: 4px 10px;
  background: #e6f7f7;
  color: #065f62;
  border-radius: 4px;
  font-size: 12px;
  margin-top: 8px;
}

.btn-danger-small {
  padding: 6px 14px;
  background: #e53e3e;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger-small:hover { background: #c53030; }

.onboarding-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.onboarding-counter {
  font-size: 13px;
  color: #718096;
}
.onboarding-footer .btn-primary.ready {
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 115, 119, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(13, 115, 119, 0); }
}

/* === Generation Step === */
.generation-step {
  max-width: 700px;
  margin: 0 auto;
}
.generation-step h2 {
  font-size: 22px;
  color: #0d7377;
  margin-bottom: 24px;
}
.jd-textarea {
  min-height: 200px !important;
}

.lang-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.lang-selector label {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
}
.lang-btn {
  padding: 8px 20px;
  border: 2px solid #0d7377;
  background: #fff;
  color: #0d7377;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn.active {
  background: #0d7377;
  color: #fff;
}

.style-selector {
  margin-bottom: 24px;
}
.style-selector label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
}
.styles-row {
  display: flex;
  gap: 16px;
}
.style-preview {
  flex: 1;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.style-preview.active {
  border-color: #0d7377;
  box-shadow: 0 0 0 2px rgba(13, 115, 119, 0.2);
}
.style-preview:hover {
  border-color: #0d7377;
}
.style-mock-header {
  height: 20px;
  border-radius: 3px;
  margin-bottom: 8px;
}
.style-mock-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.style-mock-line {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  border-left: 2px solid transparent;
}
.style-label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
}

.btn-generate {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-top: 16px;
}

.generation-status {
  text-align: center;
  padding: 8px;
  font-size: 13px;
  margin-top: 8px;
}
.generation-status.success { color: #22543d; }
.generation-status.error { color: #742a2a; }

/* === Editor Toolbar === */
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  max-width: 210mm;
  margin: 0 auto;
}

.editor-toolbar .btn-edit {
  padding: 10px 24px;
  background: #fff;
  color: #0d7377;
  border: 2px solid #0d7377;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.editor-toolbar .btn-edit:hover {
  background: #e6f7f7;
}
.editor-toolbar .btn-edit.active {
  background: #0d7377;
  color: #fff;
}
.editor-toolbar .btn-edit.active:hover {
  background: #0a5c5f;
}

/* Edit banner */
.edit-banner {
  display: none;
  background: #fef3cd;
  color: #856404;
  border: 1px solid #ffc107;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  max-width: 210mm;
  margin: 0 auto 8px auto;
  border-radius: 6px;
}
.edit-banner.visible {
  display: block;
}

/* === Export Buttons === */
.export-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  max-width: 210mm;
  margin: 0 auto;
}
.export-buttons button {
  width: 100%;
}
@media (min-width: 600px) {
  .export-buttons {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .export-buttons button { width: auto; }
}

.btn-download,
.btn-print,
.btn-save-db {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-download {
  background: #0d7377;
  color: #fff;
}
.btn-download:hover {
  background: #0a5c5f;
}

.btn-print {
  background: #e2e8f0;
  color: #2d3748;
}
.btn-print:hover {
  background: #cbd5e0;
}

.btn-save-db {
  background: #2b6cb0;
  color: #fff;
}
.btn-save-db:hover {
  background: #2c5282;
}
.btn-save-db:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media print {
  .dashboard-header,
  .editor-toolbar,
  .edit-banner,
  .export-buttons,
  .ats-panel,
  .guest-banner,
  .btn-secondary {
    display: none !important;
  }
  .dashboard {
    padding: 0;
    max-width: none;
  }
  .dashboard-main {
    padding: 0;
  }
  .cv-preview-wrapper {
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
}

/* === ATS Panel === */
.ats-panel {
  margin-top: 24px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ats-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0;
  color: #718096;
  font-size: 14px;
}

.ats-gauges {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin: 16px 0;
}

.ats-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ats-gauge-label {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
}

.ats-grade {
  display: block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  margin: 8px auto 16px;
  width: fit-content;
}
.ats-grade.strong {
  background: #c6f6d5;
  color: #22543d;
}
.ats-grade.moderate {
  background: #fefcbf;
  color: #744210;
}
.ats-grade.weak {
  background: #fed7d7;
  color: #742a2a;
}

.ats-breakdown {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}
.ats-breakdown th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid #e2e8f0;
  color: #4a5568;
  font-weight: 600;
}
.ats-breakdown td {
  padding: 6px 12px;
  border-bottom: 1px solid #edf2f7;
  color: #2d3748;
}
.ats-breakdown tbody tr:hover {
  background: #f7fafc;
}

.ats-keywords {
  margin: 16px 0;
}
.ats-keywords h4 {
  font-size: 14px;
  color: #2d3748;
  margin-bottom: 8px;
}

.ats-keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ats-kw-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: default;
}
.ats-kw-tag input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}
.ats-kw-tag.exact {
  background: #c6f6d5;
  color: #22543d;
}
.ats-kw-tag.semantic {
  background: #e9d5ff;
  color: #553c9a;
}
.ats-kw-tag.missing {
  background: #fed7d7;
  color: #742a2a;
}

.ats-optimize-btn {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  font-size: 15px;
}

.ats-tip {
  margin: 12px 0;
  padding: 10px 14px;
  background: #ebf8ff;
  border-left: 3px solid #3182ce;
  border-radius: 4px;
  font-size: 13px;
  color: #2a4365;
  line-height: 1.5;
}

.ats-changelog {
  margin: 16px 0;
  padding: 16px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.ats-changelog h4 {
  font-size: 14px;
  color: #2d3748;
  margin-bottom: 12px;
}

.ats-changelog-item {
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}
.ats-changelog-item:last-child {
  border-bottom: none;
}

.ats-changelog-field {
  font-size: 12px;
  font-weight: 700;
  color: #0d7377;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ats-changelog-before {
  font-size: 13px;
  color: #742a2a;
  background: #fff5f5;
  padding: 4px 8px;
  border-radius: 3px;
  margin-bottom: 4px;
}
.ats-changelog-before strong { color: #c53030; }

.ats-changelog-after {
  font-size: 13px;
  color: #22543d;
  background: #f0fff4;
  padding: 4px 8px;
  border-radius: 3px;
}
.ats-changelog-after strong { color: #276749; }

/* === Keyword Review Panel === */
.keyword-review-panel {
  margin-top: 20px;
  animation: feedbackIn 0.3s ease;
}
.kw-review-header {
  margin-bottom: 8px;
}
.kw-review-header h3 {
  font-size: 18px;
  color: #0d7377;
  margin-bottom: 4px;
}
.kw-review-subtitle {
  font-size: 13px;
  color: #718096;
}
.kw-review-desc {
  font-size: 13px;
  color: #4a5568;
  margin-bottom: 16px;
  line-height: 1.5;
}

.kw-priority-group {
  margin-bottom: 14px;
}
.kw-group-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
}
.kw-group-label.kw-priority-high {
  background: #c6f6d5;
  color: #22543d;
}
.kw-group-label.kw-priority-medium {
  background: #fefcbf;
  color: #744210;
}
.kw-group-label.kw-priority-low {
  background: #e2e8f0;
  color: #718096;
}

.kw-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kw-review-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.kw-review-tag input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}
.kw-review-tag.kw-priority-high {
  background: #f0fff4;
  border-color: #c6f6d5;
  color: #22543d;
}
.kw-review-tag.kw-priority-medium {
  background: #fffff0;
  border-color: #fefcbf;
  color: #744210;
}
.kw-review-tag.kw-priority-low {
  background: #f7fafc;
  border-color: #e2e8f0;
  color: #718096;
}
.kw-review-tag:hover {
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.kw-cat-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0,0,0,0.06);
  color: inherit;
  opacity: 0.7;
}

.kw-review-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

/* ATS Targeted Banner */
.ats-targeted-banner {
  background: #ebf8ff;
  border: 1px solid #bee3f8;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #2a4365;
  margin: 12px 0;
  text-align: center;
}

/* Targeted keyword indicator on ATS tags */
.ats-kw-tag.kw-targeted {
  border: 1px dashed #0d7377;
}
.ats-kw-tag.kw-targeted::after {
  content: '\2691';
  font-size: 10px;
  margin-left: 2px;
  opacity: 0.6;
}

/* === App Header — Mobile First === */
.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 16px 0;
  background: #fff;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-logo {
  order: 1;
  font-size: 18px;
  color: #0d7377;
  font-weight: 700;
  letter-spacing: -0.5px;
  cursor: pointer;
  white-space: nowrap;
}

.app-user-area {
  order: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0d7377;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-username {
  display: none;
  font-size: 13px;
  color: #4a5568;
  font-weight: 600;
  white-space: nowrap;
}

.btn-logout {
  padding: 5px 10px;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  color: #718096;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-logout:hover {
  border-color: #e53e3e;
  color: #e53e3e;
}

/* Tabs — full width second row on mobile */
.app-tabs {
  order: 3;
  display: flex;
  width: 100%;
  margin-top: 8px;
}

.tab-btn {
  flex: 1;
  padding: 10px 4px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: #718096;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
}
.tab-btn:hover { color: #0d7377; }
.tab-btn.active {
  color: #0d7377;
  border-bottom-color: #0d7377;
}
.tab-btn.tab-locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.tab-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 12px;
}

/* === Tablet (≥600px) === */
@media (min-width: 600px) {
  .header-username { display: inline; }
  .tab-content { padding: 20px 16px; }
  .tab-btn { font-size: 14px; }
}

/* === Desktop (≥768px) — single row: logo | tabs | user === */
@media (min-width: 768px) {
  .app-header {
    flex-wrap: nowrap;
    padding: 0 24px;
    gap: 16px;
  }
  .app-logo {
    order: 1;
    font-size: 20px;
    flex-shrink: 0;
    padding: 12px 0;
  }
  .app-tabs {
    order: 2;
    width: auto;
    flex: 1;
    justify-content: center;
    margin-top: 0;
    gap: 4px;
  }
  .app-user-area {
    order: 3;
    flex-shrink: 0;
    margin-left: 0;
  }
  .tab-btn {
    flex: none;
    padding: 14px 20px;
  }
  .header-avatar { width: 32px; height: 32px; font-size: 14px; }
  .tab-content { padding: 24px 20px; }
}

/* === Login Trust Line === */
.login-trust {
  margin-top: 20px;
  font-size: 11px;
  color: #a0aec0;
  line-height: 1.5;
}

/* === Account Page === */
.account-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.account-section h2 {
  font-size: 18px;
  color: #2d3748;
  margin-bottom: 12px;
}

.account-hint {
  display: block;
  font-size: 12px;
  color: #a0aec0;
  margin-bottom: 16px;
}

.account-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .account-form { grid-template-columns: 1fr 1fr; gap: 16px; }
}

.account-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-feedback {
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
}
.account-feedback.success { color: #38a169; }
.account-feedback.error { color: #e53e3e; }

.account-empty {
  color: #a0aec0;
  font-size: 14px;
  padding: 16px 0;
}

.profiles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.profile-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-gen-count {
  font-size: 12px;
  color: #a0aec0;
}

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

.account-info-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.account-providers {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.provider-badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.provider-badge.linked {
  background: #c6f6d5;
  color: #276749;
}
.provider-badge.unlinked {
  background: #fed7d7;
  color: #9b2c2c;
}

.account-since {
  font-size: 13px;
  color: #718096;
}

.account-danger {
  border-top: 1px solid #fed7d7;
  padding-top: 16px;
}

.btn-danger {
  padding: 8px 20px;
  background: #fff5f5;
  color: #e53e3e;
  border: 1px solid #feb2b2;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover {
  background: #e53e3e;
  color: #fff;
}

/* === Candidature Page === */
.candidature-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.candidature-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.candidature-search {
  width: 100%;
  padding: 10px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
@media (min-width: 600px) {
  .candidature-search { width: auto; flex: 1; }
}
.candidature-search:focus {
  border-color: #0d7377;
}

.candidature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.candidature-empty {
  text-align: center;
  color: #a0aec0;
  padding: 40px 0;
  font-size: 14px;
}

.candidature-card {
  padding: 16px 20px;
}

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

.candidature-title {
  font-size: 16px;
  font-weight: 700;
  color: #2d3748;
}

.status-select {
  padding: 4px 8px;
  border: 2px solid #ccc;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  outline: none;
}

.candidature-meta {
  font-size: 13px;
  color: #718096;
  margin-bottom: 10px;
}

.candidature-notes {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.notes-label {
  font-size: 12px;
  color: #a0aec0;
  white-space: nowrap;
}

.notes-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.notes-input:focus {
  border-color: #0d7377;
}

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