*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f2f5;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  height: 92vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  overflow: hidden;
}

.header {
  padding: 12px 20px;
  background: #1a73e8;
  color: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-brand h1 { font-size: 1.4rem; font-weight: 700; }
.header-brand p  { font-size: 0.85rem; opacity: 0.85; margin-top: 2px; }

.hidden { display: none !important; }

.main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid #e8eaed;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow-y: auto;
  transition: width 0.18s ease;
}

.nav-list {
  list-style: none;
  padding: 8px 0;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  margin: 2px 8px;
  color: #202124;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
  outline-offset: 2px;
}

.nav-item:hover { background: #f1f3f4; }

.nav-item.active {
  background: #e8f0fe;
  color: #1a73e8;
  font-weight: 500;
}

.nav-subitem {
  padding-left: 34px;
  font-size: 0.84rem;
}

/* ── Collapsible groups ──────────────────────────────────── */
.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 16px);
  margin: 2px 8px;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #202124;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
  outline-offset: 2px;
}

.nav-group-toggle:hover { background: #f1f3f4; }

.nav-chevron {
  margin-left: auto;
  font-size: 0.75rem;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.nav-group-toggle[aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
}

.nav-group-items {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.18s ease;
}

.nav-group-items.expanded {
  max-height: 200px;
}

/* ── Sidebar footer ──────────────────────────────────────── */
.nav-footer {
  border-top: 1px solid #e8eaed;
  padding: 12px;
  flex-shrink: 0;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nav-user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #202124;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-logout {
  font-size: 0.78rem;
  color: #5f6368;
  text-decoration: none;
}

.nav-logout:hover { color: #d93025; text-decoration: underline; }

.nav-signin { padding: 4px 0; }

.sign-in-btn {
  background: #1a73e8;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  transition: background 0.2s;
  cursor: pointer;
}

.sign-in-btn:hover { background: #1557b0; }

/* ── Hamburger & backdrop ────────────────────────────────── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  line-height: 1;
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
}

/* ── Tablet: icon-only rail ──────────────────────────────── */
@media (max-width: 1023px) and (min-width: 768px) {
  .sidebar { width: 60px; }
  .nav-label, .nav-chevron, .nav-user-info, .nav-signin { display: none; }
  .nav-item, .nav-group-toggle { justify-content: center; padding: 10px 0; margin: 2px 4px; }
  .nav-subitem { display: none; }
  .nav-avatar { width: 28px; height: 28px; }
  .nav-footer { padding: 8px 0; display: flex; justify-content: center; }
  .nav-user { justify-content: center; }
}

/* ── Mobile: hamburger drawer ────────────────────────────── */
@media (max-width: 767px) {
  .nav-hamburger { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .nav-backdrop { display: block; }
}

/* ── Home dashboard ──────────────────────────────────────── */
.content-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  overflow-y: auto;
}

.content-section.hidden { display: none; }

.home-signin-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 24px;
  text-align: center;
  flex: 1;
}

.home-signin-state h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #202124;
}

.home-signin-state p {
  font-size: 0.95rem;
  color: #5f6368;
  max-width: 360px;
  line-height: 1.6;
}

.home-signin-state.hidden { display: none; }

.home-welcome {
  font-size: 1.3rem;
  font-weight: 600;
  color: #202124;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  background: #fafafa;
}

.stat-label {
  font-size: 0.78rem;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #202124;
  line-height: 1;
}

.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-action-btn {
  padding: 9px 18px;
  background: #fff;
  color: #1a73e8;
  border: 1px solid #1a73e8;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.quick-action-btn:hover {
  background: #e8f0fe;
}

/* ── Pipeline Distribution Chart ─────────────────────────── */
.home-chart-section {
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 16px 20px 12px;
  background: #fff;
}

.home-chart-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.home-chart-wrap {
  height: 300px;
  position: relative;
}

.candidature-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
}

.candidature-info {
  flex: 1;
  min-width: 0;
}

.candidature-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #202124;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.candidature-company {
  font-size: 0.8rem;
  color: #5f6368;
  margin-top: 2px;
}

.candidature-stage {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #1557b0;
  background: #e8f0fe;
  padding: 2px 8px;
  border-radius: 8px;
  margin-top: 5px;
}

.cand-stage-closed {
  color: #5f6368;
  background: #f1f3f4;
}

.match-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.match-badge.green  { background: #e6f4ea; color: #137333; }
.match-badge.amber  { background: #fef7e0; color: #b06000; }
.match-badge.red    { background: #fce8e6; color: #c5221f; }
.match-badge.none   { background: #f1f3f4; color: #5f6368; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 20px;
  color: #80868b;
  font-size: 0.95rem;
  text-align: center;
}

.empty-state.hidden { display: none; }

/* ── Profile forms ───────────────────────────────────────── */
.section-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #202124;
  margin-bottom: 4px;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-group input,
.field-group select,
.field-group textarea {
  padding: 9px 12px;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #202124;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
  resize: vertical;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus { border-color: #1a73e8; }

.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.save-btn {
  padding: 9px 22px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.save-btn:hover { background: #1557b0; }

.analyse-btn {
  padding: 9px 22px;
  background: #fff;
  color: #1a73e8;
  border: 1px solid #1a73e8;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.analyse-btn:hover:not(:disabled) { background: #e8f0fe; }

.analyse-btn:disabled {
  color: #80868b;
  border-color: #e8eaed;
  cursor: not-allowed;
}

.form-hint {
  font-size: 0.8rem;
  color: #80868b;
  margin: 0;
}

.toast {
  font-size: 0.82rem;
  color: #137333;
  font-weight: 500;
}

/* ── CV Upload zone ──────────────────────────────────────── */
.section-description {
  font-size: 0.875rem;
  color: #5f6368;
  margin-bottom: 16px;
  max-width: 560px;
}

.upload-zone {
  position: relative;
  border: 2px dashed #dadce0;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  max-width: 560px;
  background: #fafafa;
}

.upload-zone:hover,
.upload-zone.dragover { border-color: #1a73e8; background: #e8f0fe; }

.upload-zone.hidden { display: none; }

.upload-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-zone-inner { pointer-events: none; }

.upload-icon { font-size: 2rem; margin-bottom: 8px; }

.upload-label { font-size: 0.9rem; color: #3c4043; margin: 0 0 4px; }

.upload-label strong { color: #1a73e8; }

.upload-format-hint { font-size: 0.8rem; color: #80868b; margin: 0; }

.upload-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  font-size: 0.875rem;
  color: #5f6368;
  max-width: 560px;
}

.upload-status.hidden { display: none; }

.upload-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e8eaed;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.upload-progress-track {
  height: 4px;
  background: #e8eaed;
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}

.upload-progress-track.hidden { display: none; }

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: #1a73e8;
  border-radius: 2px;
  transition: width 0.4s ease;
}

@keyframes spin { to { transform: rotate(360deg); } }

.upload-file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  max-width: 560px;
  background: #f8f9fa;
}

.upload-file-info.hidden { display: none; }

.file-doc-icon { font-size: 1.2rem; }

.file-name {
  font-size: 0.875rem;
  color: #202124;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replace-btn {
  background: none;
  border: 1px solid #dadce0;
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 0.8rem;
  color: #5f6368;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}

.replace-btn:hover { background: #f1f3f4; }

.upload-error {
  padding: 12px 16px;
  border: 1px solid #f5c2be;
  border-radius: 8px;
  background: #fef7f6;
  max-width: 560px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.upload-error.hidden { display: none; }

.upload-error-msg {
  font-size: 0.875rem;
  color: #c5221f;
  margin: 0;
  flex: 1;
  padding-top: 2px;
}

/* ── Analysis results ─────────────────────────────────────── */
.analysis-results {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.analysis-results.hidden { display: none; }

.results-section h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #202124;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-chip {
  padding: 4px 10px;
  background: #e8f0fe;
  color: #1a73e8;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.results-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}

.results-list li {
  font-size: 0.875rem;
  color: #202124;
  padding-left: 16px;
  position: relative;
}

.results-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #5f6368;
}

.ats-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ats-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e8eaed;
  font-size: 0.85rem;
}

.ats-item.pass { border-color: #ceead6; background: #f6fef7; }
.ats-item.warn { border-color: #fde8a8; background: #fffbec; }
.ats-item.fail { border-color: #f5c2be; background: #fef7f6; }

.ats-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  text-transform: uppercase;
}

.ats-item.pass .ats-badge { background: #ceead6; color: #137333; }
.ats-item.warn .ats-badge { background: #fde8a8; color: #b06000; }
.ats-item.fail .ats-badge { background: #f5c2be; color: #c5221f; }

.ats-content { display: flex; flex-direction: column; gap: 2px; }
.ats-item-label { font-weight: 500; color: #202124; }
.ats-item-suggestion { color: #5f6368; font-size: 0.82rem; }

/* ── CV link status banner ───────────────────────────────── */
.cv-link-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  max-width: 560px;
}

.cv-link-status.hidden { display: none; }

.cv-link-status.linked {
  background: #f6fef7;
  border: 1px solid #ceead6;
  color: #137333;
}

.cv-link-status.missing {
  background: #fef7e0;
  border: 1px solid #fde8a8;
  color: #7a5200;
}

.cv-link-status a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Collapsible explainer ────────────────────────────────── */
.collapsible-explainer {
  border: 1px solid #e8eaed;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.collapsible-explainer summary {
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a73e8;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.collapsible-explainer summary::-webkit-details-marker { display: none; }
.collapsible-explainer summary::before { content: '▸ '; font-size: 0.75rem; }
.collapsible-explainer[open] summary::before { content: '▾ '; }

.explainer-body {
  padding: 12px 16px;
  border-top: 1px solid #e8eaed;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fafafa;
  max-height: 280px;
  overflow-y: auto;
}

.explainer-body p { font-size: 0.85rem; color: #3c4043; line-height: 1.55; }

/* ── Download button ──────────────────────────────────────── */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #1a73e8;
  border-radius: 6px;
  color: #1a73e8;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
}
.download-btn:hover { background: #e8f0fe; text-decoration: none; }
.download-btn.hidden { display: none !important; }

/* ── Recommendation cards ─────────────────────────────────── */
.recommendation-card {
  padding: 14px 16px;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rec-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rec-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #202124;
  flex: 1;
}

.priority-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  text-transform: uppercase;
}

.priority-badge.high   { background: #fce8e6; color: #c5221f; }
.priority-badge.medium { background: #fef7e0; color: #b06000; }
.priority-badge.low    { background: #e8f0fe; color: #1a73e8; }

.rec-rationale {
  font-size: 0.85rem;
  color: #5f6368;
  line-height: 1.5;
}

.analysis-note {
  font-size: 0.82rem;
  color: #80868b;
  font-style: italic;
  margin-bottom: 8px;
}

/* ── Chat section ────────────────────────────────────────── */
.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.chat-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #80868b;
  font-size: 0.95rem;
}

.chat-placeholder.hidden { display: none; }

.chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: none;
  flex-direction: column;
  gap: 12px;
}

.chat-window.visible { display: flex; }

.bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.bubble.model {
  align-self: flex-start;
  background: #f1f3f4;
  color: #202124;
  border-bottom-left-radius: 4px;
}

.bubble.user {
  align-self: flex-end;
  background: #1a73e8;
  color: #fff;
  border-bottom-right-radius: 4px;
  white-space: pre-wrap;
}

.bubble.typing { opacity: 0.5; font-style: italic; }

.input-area {
  border-top: 1px solid #e8eaed;
  padding: 16px 24px;
  display: none;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  flex-shrink: 0;
}

.input-area.visible { display: flex; }

.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-row.hidden { display: none; }

.upload-label {
  background: #f1f3f4;
  color: #1a73e8;
  border: 1px solid #1a73e8;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
}

.upload-label:hover { background: #e8f0fe; }

#cvUpload { display: none; }

#uploadStatus { font-size: 0.8rem; color: #5f6368; }

.message-row {
  display: flex;
  gap: 10px;
}

#messageInput {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e8eaed;
  border-radius: 24px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

#messageInput:focus { border-color: #1a73e8; }

#sendBtn {
  padding: 10px 22px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

#sendBtn:hover { background: #1557b0; }
#sendBtn:disabled { background: #a8c7fa; cursor: not-allowed; }

/* ── Cookie consent ──────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #202124;
  color: #e8eaed;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 900;
  flex-wrap: wrap;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
}

.cookie-text {
  font-size: 0.85rem;
  line-height: 1.5;
  flex: 1;
  min-width: 200px;
}

.cookie-policy-link {
  color: #8ab4f8;
  text-decoration: underline;
  margin-left: 4px;
}

.cookie-policy-link:hover { color: #aecbfa; }

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  white-space: nowrap;
}

.cookie-btn-accept { background: #1a73e8; color: #fff; }
.cookie-btn-accept:hover { background: #1557b0; }

.cookie-btn-decline {
  background: transparent;
  color: #e8eaed;
  border: 1px solid #5f6368;
}

.cookie-btn-decline:hover { background: rgba(255,255,255,0.08); }

/* ── My Candidatures section ─────────────────────────────── */
.cand-view { display: block; }
.cand-view.hidden { display: none; }

.cand-list-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.optional-label {
  font-size: 0.78rem;
  color: #80868b;
  font-weight: 400;
}

/* Candidature list cards */
.cand-list-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 10px;
  cursor: default;
}

.cand-card-info { flex: 1; min-width: 0; }

.cand-card-role {
  font-size: 0.9rem;
  font-weight: 600;
  color: #202124;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cand-card-company {
  font-size: 0.82rem;
  color: #5f6368;
  margin-top: 2px;
}

.cand-card-stage {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #1557b0;
  background: #e8f0fe;
  padding: 2px 8px;
  border-radius: 8px;
  margin-top: 5px;
}

/* Match circle hero */
.cand-match-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border: 1px solid #e8eaed;
  border-radius: 12px;
  background: #fff;
  margin-bottom: 20px;
}

.match-circle {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #e8eaed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.match-circle.match-circle-green { border-color: #34a853; }
.match-circle.match-circle-amber { border-color: #f9ab00; }
.match-circle.match-circle-red   { border-color: #ea4335; }
.match-circle.match-circle-none  { border-color: #e8eaed; }

.match-circle-pct {
  font-size: 1.4rem;
  font-weight: 700;
  color: #202124;
  line-height: 1;
}

.match-circle.match-circle-green .match-circle-pct { color: #137333; }
.match-circle.match-circle-amber .match-circle-pct { color: #b06000; }
.match-circle.match-circle-red   .match-circle-pct { color: #c5221f; }
.match-circle.match-circle-none  .match-circle-pct { color: #80868b; }

.match-circle-label {
  font-size: 0.7rem;
  color: #80868b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cand-hero-info { flex: 1; min-width: 0; }

.cand-hero-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #202124;
  margin: 0 0 4px;
}

.cand-hero-meta {
  font-size: 0.85rem;
  color: #5f6368;
  margin: 0;
}

/* Analysis cards */
.analysis-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.analysis-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.analysis-card-body { font-size: 0.875rem; color: #202124; }

/* ATS keywords table */
.ats-kw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ats-kw-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #5f6368;
  border-bottom: 1px solid #e8eaed;
}

.ats-kw-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: top;
}

.ats-kw-keyword {
  font-weight: 600;
  color: #1a73e8;
  width: 30%;
  white-space: nowrap;
}

.ats-kw-tip { color: #3c4043; }

/* Role meta row */
.role-meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.role-meta-label {
  font-size: 0.78rem;
  color: #80868b;
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-meta-value {
  font-size: 0.85rem;
  color: #202124;
  font-weight: 500;
  margin-right: 12px;
}

.card-meta {
  font-size: 0.82rem;
  color: #5f6368;
  margin: 4px 0 0;
}

/* No-profile banner */
.cand-no-profile-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fef7e0;
  border: 1px solid #fde8a8;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #7a5200;
  margin-bottom: 16px;
}

.cand-no-profile-banner.hidden { display: none; }

.cand-banner-dismiss {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #7a5200;
  cursor: pointer;
  padding: 0 4px;
  margin-left: auto;
  line-height: 1;
}

/* Results top action bar */
.cand-results-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.cand-delete-btn {
  background: none;
  border: 1px solid #ea4335;
  color: #ea4335;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.cand-delete-btn:hover { background: #fce8e6; }

/* Card right column (match badge + action buttons) */
.cand-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.cand-card-actions {
  display: flex;
  gap: 6px;
}

.cand-card-action-btn {
  background: none;
  border: 1px solid #dadce0;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 0.75rem;
  color: #5f6368;
  cursor: pointer;
  transition: background 0.15s;
}

.cand-card-action-btn:hover { background: #f1f3f4; }
.cand-card-action-btn.del { border-color: #f5c2be; color: #c5221f; }
.cand-card-action-btn.del:hover { background: #fce8e6; }

/* Networking guidance accent */
.networking-card { border-left: 4px solid #00897b; }

/* ── Selection Process ────────────────────────────────────── */
.sp-candidature-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8eaed;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.sp-candidature-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sp-candidature-select {
  flex: 1;
  min-width: 200px;
  max-width: 480px;
  padding: 8px 12px;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #202124;
  background: #fff;
  outline: none;
  font-family: inherit;
  cursor: pointer;
}

.sp-candidature-select:focus { border-color: #1a73e8; }

/* Accordion */
#spStageAccordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-accordion-item {
  border: 1px solid #e8eaed;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.sp-accordion-item.current { border-color: #1a73e8; }

.sp-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  font-family: inherit;
}

.sp-accordion-header:hover { background: #f8f9fa; }

.sp-accordion-item.current .sp-accordion-header { background: #f0f4ff; }

.sp-accordion-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f3f4;
  color: #5f6368;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sp-accordion-item.current .sp-accordion-num {
  background: #1a73e8;
  color: #fff;
}

.sp-accordion-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: #202124;
}

.sp-accordion-chevron {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: #5f6368;
  transition: transform 0.18s ease;
}

.sp-accordion-item.expanded .sp-accordion-chevron { transform: rotate(180deg); }

.sp-accordion-body {
  display: none;
  border-top: 1px solid #e8eaed;
}

.sp-accordion-item.expanded .sp-accordion-body { display: block; }

.sp-body-inner {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sp-body-top {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.sp-field-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sp-field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sp-stage-status-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  text-transform: capitalize;
}

.sp-stage-status-pill.pending   { background: #f1f3f4; color: #5f6368; }
.sp-stage-status-pill.scheduled { background: #e8f0fe; color: #1a73e8; }
.sp-stage-status-pill.completed { background: #e6f4ea; color: #137333; }
.sp-stage-status-pill.skipped   { background: #fce8e6; color: #c5221f; }

.sp-status-select {
  padding: 7px 10px;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #202124;
  background: #fff;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

.sp-status-select:focus { border-color: #1a73e8; }

.sp-dates {
  display: flex;
  gap: 20px;
  font-size: 0.82rem;
  color: #80868b;
  flex-wrap: wrap;
}

.sp-notes-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sp-notes {
  padding: 10px 12px;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #202124;
  font-family: inherit;
  resize: vertical;
  min-height: 90px;
  outline: none;
  transition: border-color 0.15s;
}

.sp-notes:focus { border-color: #1a73e8; }

.sp-notes-saved {
  font-size: 0.8rem;
  color: #137333;
  font-weight: 500;
  align-self: flex-end;
}

/* AI prep badge shown in accordion header when prep is stored */
.sp-ai-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  background: #e6f4ea;
  color: #137333;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Action row: prep + download buttons side by side */
.sp-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

.sp-pdf-btn {
  padding: 8px 14px;
  border: 1.5px solid #1a73e8;
  border-radius: 8px;
  background: #fff;
  color: #1a73e8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.sp-pdf-btn:hover { background: #e8f0fe; }

/* Full PDF button in candidature bar */
.sp-full-pdf-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Generation progress bar */
.sp-gen-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0 4px;
}

.sp-gen-prog-track {
  height: 6px;
  border-radius: 999px;
  background: #e8eaed;
  overflow: hidden;
}

.sp-gen-prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1a73e8 0%, #34a853 100%);
  width: 0%;
  transition: width 0.6s ease;
}

.sp-gen-prog-fill.done { background: #34a853; }

.sp-gen-prog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.sp-gen-prog-step {
  font-size: 0.78rem;
  color: #5f6368;
  font-style: italic;
}

.sp-gen-prog-pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a73e8;
}

.sp-empty {
  color: #80868b;
  font-size: 0.875rem;
  text-align: center;
  padding: 40px 0;
}

.sp-empty a { color: #1a73e8; }

.sp-loading {
  color: #80868b;
  font-size: 0.875rem;
  padding: 16px 0;
}

.sp-prep-overview {
  background: #fafafa;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  color: #3c4043;
  line-height: 1.6;
}

.sp-prep-section-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.sp-prep-questions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sp-prep-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-prep-q {
  font-size: 0.9rem;
  font-weight: 600;
  color: #202124;
}

.sp-prep-tip {
  font-size: 0.85rem;
  color: #1557b0;
  background: #e8f0fe;
  padding: 7px 10px;
  border-radius: 6px;
  line-height: 1.5;
}

.sp-prep-tip::before { content: '💡 '; }

.sp-prep-answer {
  font-size: 0.85rem;
  color: #3c4043;
  line-height: 1.6;
}

/* ── Footer ──────────────────────────────────────────────── */
.app-footer {
  background: #fff;
  border-top: 1px solid #e8eaed;
  padding: 8px 24px;
  text-align: right;
  flex-shrink: 0;
}

.cookie-settings-link {
  font-size: 0.78rem;
  color: #80868b;
  text-decoration: none;
}

.cookie-settings-link:hover {
  color: #1a73e8;
  text-decoration: underline;
}

/* ── Closing ── */
.closing-desc {
  font-size: 0.875rem;
  color: #5f6368;
  margin-bottom: 20px;
}

.closing-step-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #5f6368;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.closing-cand-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  max-height: 280px;
  overflow-y: auto;
}

.closing-cand-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}

.closing-cand-item:hover { background: #f8f9fa; }
.closing-cand-item.selected { border-color: #1a73e8; background: #f0f4ff; }

.closing-cand-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #dadce0;
  flex-shrink: 0;
  margin-top: 2px;
  transition: border-color 0.15s, background 0.15s;
}

.closing-cand-item.selected .closing-cand-radio {
  border-color: #1a73e8;
  background: #1a73e8;
  box-shadow: inset 0 0 0 3px #fff;
}

.closing-cand-info { flex: 1; min-width: 0; }
.closing-cand-title { font-size: 0.9rem; font-weight: 500; color: #202124; }
.closing-cand-company { font-weight: 400; color: #5f6368; }
.closing-cand-meta { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.closing-cand-date { font-size: 0.75rem; color: #80868b; }

/* Close form */
.closing-form-card {
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.field-optional {
  font-size: 0.78rem;
  color: #80868b;
  font-weight: 400;
}

/* Rating card */
.closing-rating-card {
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 24px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
  text-align: center;
}

.closing-success-msg {
  font-size: 0.875rem;
  font-weight: 600;
  color: #137333;
  background: #e6f4ea;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-block;
  align-self: center;
}

.closing-rating-title {
  font-size: 1rem;
  font-weight: 600;
  color: #202124;
  margin: 0;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.star-btn {
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #dadce0;
  transition: color 0.1s, transform 0.1s;
  padding: 0;
  line-height: 1;
}

.star-btn:hover, .star-btn.active { color: #f9ab00; }
.star-btn:hover { transform: scale(1.15); }

.closing-rating-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* History */
.closing-history-details {
  border: 1px solid #e8eaed;
  border-radius: 10px;
  overflow: hidden;
}

.closing-history-summary {
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #5f6368;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: #f8f9fa;
}

.closing-history-summary::marker { display: none; }
.closing-history-summary::-webkit-details-marker { display: none; }

.closing-history-list {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.closing-history-item {
  padding: 10px 12px;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  background: #fff;
}

.closing-history-title { font-size: 0.875rem; font-weight: 500; color: #202124; }
.closing-history-reason { font-size: 0.8rem; color: #1a73e8; margin-top: 3px; }
.closing-history-feedback { font-size: 0.78rem; color: #5f6368; font-style: italic; margin-top: 3px; }

/* ── Job Preferences ── */

.jp-form-wrap { margin: 20px 0; }
.jp-form-title { font-size: 1rem; font-weight: 600; color: #1a1a1a; margin: 0 0 16px; }
.jp-list { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.jp-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px 18px;
  transition: box-shadow 0.15s;
}
.jp-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.jp-card-main { flex: 1; min-width: 0; }
.jp-card-role { font-size: 1rem; font-weight: 700; color: #1a1a1a; }
.jp-card-meta { font-size: 0.8rem; color: #5f6368; margin-top: 3px; }
.jp-card-salary { font-size: 0.8rem; color: #188038; margin-top: 3px; font-weight: 500; }
.jp-card-companies { font-size: 0.78rem; color: #1a73e8; margin-top: 3px; }
.jp-card-actions { display: flex; gap: 8px; flex-shrink: 0; }
.jp-card-actions .del { color: #d93025; border-color: #d93025; }
.jp-card-actions .del:hover { background: #fce8e6; }
.glossary-form-actions { display: flex; gap: 10px; margin-top: 16px; }
.field-optional { font-size: 0.75rem; color: #9aa0a6; font-weight: normal; }

/* ── Glossary ── */

.glossary-desc {
  font-size: 0.875rem;
  color: #5f6368;
  margin-bottom: 20px;
}

.glossary-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.glossary-toolbar .sp-candidature-select {
  flex: 1;
  min-width: 200px;
}

.glossary-form {
  border: 1px solid #e8eaed;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
  margin-bottom: 20px;
}

.glossary-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 600px) {
  .glossary-form-grid { grid-template-columns: 1fr; }
}

.glossary-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.glossary-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0 24px;
}

.glossary-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: #202124;
}

.glossary-progress-pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1a73e8;
}

.glossary-progress-track {
  width: 100%;
  height: 8px;
  background: #e8eaed;
  border-radius: 4px;
  overflow: hidden;
}

.glossary-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1a73e8, #4285f4);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.glossary-progress-step {
  font-size: 0.78rem;
  color: #5f6368;
  font-style: italic;
}

.glossary-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.glossary-search-bar input {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
}

.glossary-search-bar input:focus { border-color: #1a73e8; }

.glossary-term-count {
  font-size: 0.8rem;
  color: #80868b;
  white-space: nowrap;
}

.glossary-terms-table-wrap {
  overflow-x: auto;
  margin-top: 4px;
}

.glossary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.glossary-table thead tr {
  background: #1a73e8;
  color: #fff;
}

.glossary-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.glossary-th-term { width: 18%; }
.glossary-th-def  { width: 37%; }
.glossary-th-ex   { width: 45%; }

.glossary-table td {
  padding: 10px 12px;
  vertical-align: top;
  border-bottom: 1px solid #e8eaed;
  line-height: 1.5;
}

.glossary-tr-alt { background: #f8f9fa; }

.glossary-td-term {
  font-weight: 700;
  color: #1a73e8;
  white-space: nowrap;
}

.glossary-td-def  { color: #202124; }
.glossary-td-ex   { color: #5f6368; font-style: italic; }

.glossary-table tbody tr:hover { background: #e8f0fe; }

.glossary-card {
  border: 1px solid #e8eaed;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s;
}

.glossary-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.glossary-term {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a73e8;
  letter-spacing: 0.01em;
}

.glossary-definition {
  font-size: 0.82rem;
  color: #202124;
  line-height: 1.5;
}

.glossary-context {
  font-size: 0.78rem;
  color: #5f6368;
  font-style: italic;
  line-height: 1.4;
  border-top: 1px solid #f1f3f4;
  padding-top: 6px;
  margin-top: 2px;
}

/* ── Quizzes ── */

.quiz-config { margin-bottom: 24px; }
.quiz-config .save-btn { margin-top: 16px; }

.quiz-question-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.quiz-question-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 14px;
  line-height: 1.5;
}

.quiz-q-num {
  color: #1a73e8;
  margin-right: 4px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-option-btn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f8f9fa;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  font-size: 0.875rem;
  color: #202124;
  transition: background 0.12s, border-color 0.12s;
  width: 100%;
}

.quiz-option-btn:hover:not(:disabled) {
  background: #e8f0fe;
  border-color: #1a73e8;
}

.quiz-option-btn.selected {
  background: #e8f0fe;
  border-color: #1a73e8;
}

.quiz-option-btn.correct {
  background: #e6f4ea;
  border-color: #188038;
  color: #1e4620;
}

.quiz-option-btn.incorrect {
  background: #fce8e6;
  border-color: #d93025;
  color: #6b1c1c;
}

.quiz-option-btn:disabled { cursor: default; }

.quiz-option-label {
  font-weight: 700;
  color: #1a73e8;
  flex-shrink: 0;
  min-width: 18px;
}

.quiz-option-btn.correct .quiz-option-label { color: #188038; }
.quiz-option-btn.incorrect .quiz-option-label { color: #d93025; }

.quiz-option-text { line-height: 1.4; }

.quiz-explanation {
  margin-top: 14px;
  padding: 10px 14px;
  background: #f8f9fa;
  border-left: 3px solid #1a73e8;
  border-radius: 0 6px 6px 0;
  font-size: 0.83rem;
  color: #3c4043;
  line-height: 1.5;
}

.quiz-exp-icon {
  font-weight: 700;
  margin-right: 4px;
}

.quiz-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #e8eaed;
  gap: 12px;
  flex-wrap: wrap;
}

.quiz-answered-count {
  font-size: 0.85rem;
  color: #5f6368;
}

.quiz-score-card {
  text-align: center;
  padding: 28px 20px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  margin-bottom: 28px;
}

.quiz-score-num {
  font-size: 3rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1;
}

.quiz-score-msg {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 8px;
}

.score-high { color: #188038; }
.score-mid  { color: #e37400; }
.score-low  { color: #d93025; }

.quiz-new-row {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}
