/* ============================================================
   public/css/app.css  – SurgeonCV global styles
   ============================================================ */

:root {
  --primary:   #1a3a5c;
  --accent:    #c0392b;
  --bg:        #f0f4f8;
  --sidebar-w: 220px;
  --toolbar-h: 56px;
}

/* ─── Body & Layout ─────────────────────────────────────────── */
body { background: var(--bg); font-family: 'Segoe UI', system-ui, sans-serif; }

/* ─── Auth Pages ─────────────────────────────────────────────── */
.auth-body {
  background: linear-gradient(135deg, #1a3a5c 0%, #16213e 100%);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
}
.auth-wrapper { width: 100%; max-width: 420px; padding: 16px; }
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.auth-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.4rem; font-weight: 800; color: var(--primary);
  margin-bottom: 24px;
}
.auth-logo i { font-size: 1.8rem; color: var(--accent); }
.auth-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 20px; color: #1a1a1a; }

/* ─── Navbar ─────────────────────────────────────────────────── */
.navbar {
  background: var(--primary) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.navbar-brand { font-weight: 800; font-size: 1.2rem; letter-spacing: -.3px; }
.navbar-brand i { color: var(--accent); }

/* ─── Dashboard Stats ────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  height: 100%;
}
.stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.bg-primary-soft { background: #e8f0fb; }
.bg-success-soft { background: #e6f4ea; }
.bg-warning-soft { background: #fef3e2; }
.bg-info-soft    { background: #e3f4fb; }
.bg-danger-soft  { background: #fde8e8; }
.stat-value { font-size: 1.7rem; font-weight: 800; color: #1a1a1a; line-height: 1; }
.stat-label { font-size: .78rem; color: #666; margin-top: 3px; }

/* ─── Cards ──────────────────────────────────────────────────── */
.card { border: none; border-radius: 12px; }
.card-header {
  background: #fff; border-bottom: 1px solid #eee;
  border-radius: 12px 12px 0 0 !important;
  padding: 14px 18px;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn { border-radius: 8px; font-weight: 500; }
.btn-xs {
  padding: 2px 7px; font-size: .75rem;
  border-radius: 5px; line-height: 1.4;
}
.btn-primary   { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: #143059; border-color: #143059; }

/* ─── ATS Optimizer ──────────────────────────────────────────── */
.ats-score-header {
  display: flex; align-items: center; gap: 20px;
}
.ats-score-circle {
  width: 90px; height: 90px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
  position: relative;
}
.ats-score-circle::after {
  content: ''; position: absolute; inset: 6px;
  border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ats-score-circle span {
  position: relative; z-index: 1;
  color: #1a1a1a; font-size: 1.5rem; font-weight: 800;
}

/* Keyword chips */
.keyword-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  display: inline-block; font-size: .72rem; font-weight: 600;
  border-radius: 20px; padding: 2px 9px;
}
.chip-match { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.chip-miss  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.chip-boost { background: #cce5ff; color: #004085; border: 1px solid #b8daff; }

/* ─── Export Page ────────────────────────────────────────────── */
.export-btn { min-width: 160px; }

/* ─── Cover Letter Preview ───────────────────────────────────── */
.cover-letter-preview {
  padding: 20px;
  background: #fafafa;
  min-height: 400px;
}
.preview-letter-paper {
  background: #fff;
  padding: 30px 36px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  border-radius: 4px;
  font-family: Georgia, serif;
  font-size: .875rem;
  line-height: 1.7;
  color: #1a1a1a;
}
.preview-date   { color: #888; margin-bottom: 16px; font-size: .8rem; }
.preview-recip  { margin-bottom: 14px; }
.preview-re     { font-weight: 700; margin-bottom: 14px; color: #1a3a5c; }
.preview-letter-paper p { margin-bottom: 12px; text-align: justify; }

/* ─── Paragraph block (cover letter) ────────────────────────── */
.paragraph-block { margin-bottom: 12px; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; }
.paragraph-header {
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  padding: 6px 10px;
  display: flex; align-items: center; gap: 8px;
  cursor: grab;
}
.paragraph-num { font-size: .78rem; color: #888; font-weight: 600; }
.paragraph-text { border: none !important; border-radius: 0 !important; resize: vertical; min-height: 90px; }

/* ─── Toast notifications ────────────────────────────────────── */
.toast-notification {
  position: fixed; bottom: 24px; right: 24px;
  background: #1a3a5c; color: #fff;
  padding: 12px 20px; border-radius: 8px;
  font-size: .875rem; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 9999;
  animation: slideInUp .25s ease;
}
@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ─── Theme Cards (Appearance tab) ──────────────────────────── */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; padding: 8px; border-radius: 8px;
  border: 2px solid transparent; transition: all .15s;
}
.theme-card:hover  { border-color: #aaa; }
.theme-card.selected { border-color: var(--primary); background: #e8f0fb; }
.theme-preview {
  width: 100%; aspect-ratio: 3/2; border-radius: 5px;
  background: var(--tc); display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8); font-size: 1.3rem;
}
.theme-card span { font-size: .78rem; font-weight: 600; color: #444; }

/* ─── Color input ────────────────────────────────────────────── */
.color-input-wrap { position: relative; display: flex; gap: 8px; align-items: center; }
.color-swatch {
  width: 36px; height: 36px; border-radius: 6px; flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.15); cursor: pointer;
}

/* ─── Skill bars ─────────────────────────────────────────────── */
.skill-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: #fff; border-radius: 6px;
  border: 1px solid #eee; margin-bottom: 5px;
}
.skill-name { flex: 0 0 140px; font-size: .85rem; font-weight: 500; }
.skill-bar-wrap {
  flex: 1; height: 6px; background: #eee; border-radius: 3px; overflow: hidden;
}
.skill-bar { height: 100%; background: var(--primary); border-radius: 3px; }
.skill-level-label { flex: 0 0 80px; font-size: .75rem; color: #888; }
.skill-category { }
.skill-cat-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: #888; margin-bottom: 5px;
}

/* ─── Bullet row (experience modal) ─────────────────────────── */
.bullet-input-row {
  display: flex; align-items: center; gap: 6px; margin-bottom: 5px;
}
.bullet-input-row input { flex: 1; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-card  { padding: 28px 20px; }
}
