/* =============================================
   JOB TRACKER — Design System
   Theme: Blue Nuance | Dark-first
   ============================================= */

/* ── 1. CSS Variables ────────────────────────── */
:root {
  /* Primary Blue */
  --primary:       #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: #dbeafe;
  --primary-dark:  #1d4ed8;
  --primary-glow:  rgba(59,130,246,.25);

  /* Accent */
  --accent:        #06b6d4;
  --accent-light:  #cffafe;

  /* Semantic */
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #6366f1;

  /* Neutral (light mode) */
  --bg-body:       #f0f4ff;
  --bg-card:       #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input:      #f1f5f9;
  --border:        #e2e8f0;
  --border-light:  #f1f5f9;
  --text-primary:  #0f172a;
  --text-secondary:#64748b;
  --text-muted:    #94a3b8;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.05);
  --shadow:        0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:     0 12px 32px rgba(0,0,0,.12);
  --shadow-glow:   0 0 20px var(--primary-glow);

  /* Layout */
  --nav-height:    64px;
  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     16px;
  --radius-xl:     20px;
  --transition:    .25s cubic-bezier(.4,0,.2,1);

  /* Status Colors */
  --status-applied:   #3b82f6;
  --status-screening: #f59e0b;
  --status-interview: #8b5cf6;
  --status-offer:     #14b8a6;
  --status-accepted:  #10b981;
  --status-rejected:  #ef4444;
  --status-ghosted:   #6b7280;
  --status-canceled:  #64748b;

  /* Type Colors */
  --type-internship:  #ef4444;
  --type-fulltime:    #8b5cf6;
  --type-wfh:         #f97316;
  --type-wfo:         #3b82f6;
  --type-hybrid:      #eab308;
  --type-parttime:    #10b981;
  --type-contract:    #a16207;
}

/* ── Dark Mode ───────────────────────────────── */
[data-theme="dark"] {
  --bg-body:       #0a0f1e;
  --bg-card:       #111827;
  --bg-card-hover: #1e293b;
  --bg-input:      #1e293b;
  --border:        #1e293b;
  --border-light:  #334155;
  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.2);
  --shadow:        0 4px 12px rgba(0,0,0,.3);
  --shadow-lg:     0 12px 32px rgba(0,0,0,.4);
  --primary-light: #1e3a5f;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; display: block; }

::selection {
  background: var(--primary);
  color: #fff;
}

/* ── 3. Typography ───────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.3; color: var(--text-primary); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ── 4. Layout ───────────────────────────────── */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 24px) 20px 40px;
}

/* ── 5. Navbar ───────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background var(--transition), border var(--transition);
}

[data-theme="dark"] .navbar {
  background: rgba(17,24,39,.85);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}
.navbar-brand:hover { color: var(--text-primary); }
.brand-icon { font-size: 1.4rem; }
.brand-accent { color: var(--primary); }

.navbar-actions { display: flex; align-items: center; gap: 8px; }

/* ── 6. Buttons ──────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 16px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}
.btn-ghost:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}

.btn-sm { padding: 6px 12px; font-size: .8rem; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1.1rem;
  position: relative;
}
.btn-icon:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Theme toggle icon visibility */
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark  { display: inline; }

/* ── 7. Forms ────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: .9rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}

.form-input::placeholder { color: var(--text-muted); }

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

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

/* Checkbox group */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.checkbox-label:hover { border-color: var(--primary); }
.checkbox-label input { display: none; }
.checkbox-label.checked {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
[data-theme="dark"] .checkbox-label.checked {
  background: rgba(59,130,246,.15);
}

/* ── 8. Cards ────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.card:hover {
  box-shadow: var(--shadow);
}

/* ── 9. Page Header ──────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.page-header h1 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-header .counter {
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
}
[data-theme="dark"] .page-header .counter {
  background: rgba(59,130,246,.15);
}

/* ── 10. Search Bar ──────────────────────────── */
/* ── 10. Filter Bar & Search ─────────────────── */
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr 2fr auto;
  align-items: center;
  gap: 12px;
}
.search-bar-wrapper {
  position: relative;
  width: 100%;
}
.search-bar-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--text-muted);
  pointer-events: none;
}
.search-bar-wrapper input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--transition);
}
.search-bar-wrapper input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.filter-group {
  width: 100%;
}
.select-sm, .input-sm {
  padding: 8px 12px;
  font-size: 0.85rem;
  height: 38px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-input);
  border: 1.5px solid var(--border);
}
.select-sm {
  background-position: right 8px center;
  padding-right: 28px;
}
.date-range-group {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.date-range-group input {
  flex: 1;
  width: 100%;
}
.date-sep {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── 10.1 Sortable Headers ───────────────────── */
.table-wrapper thead th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 24px;
  transition: color var(--transition), background-color var(--transition);
}
.table-wrapper thead th.sortable:hover {
  color: var(--text-primary);
  background: var(--border-light);
}
.table-wrapper thead th.sortable .sort-icon {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: inline-block;
  margin-left: 4px;
}
.table-wrapper thead th.sortable.asc .sort-icon,
.table-wrapper thead th.sortable.desc .sort-icon {
  color: var(--primary);
  font-weight: bold;
}

/* ── 10.2 Inline Edit Styling ────────────────── */
.editable-cell {
  cursor: pointer;
  position: relative;
  padding-right: 24px !important;
  border-bottom: 1.5px dashed transparent;
  transition: border-color var(--transition), background var(--transition);
}
.editable-cell:hover {
  border-bottom-color: var(--primary);
  background: rgba(59, 130, 246, 0.08) !important;
}
.editable-cell::after {
  content: "✏️";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.editable-cell:hover::after {
  opacity: 0.6;
}

.inline-input,
.inline-select {
  width: 100%;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* ── 10.3 Pagination ─────────────────────────── */
.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.pagination-info {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  font-size: 0.775rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.page-number:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}
.page-number.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}


/* ── 11. Table ───────────────────────────────── */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrapper thead th {
  padding: 14px 16px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  background: var(--bg-input);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.table-wrapper tbody td {
  padding: 14px 16px;
  font-size: .875rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.table-wrapper tbody tr {
  transition: background var(--transition);
}
.table-wrapper tbody tr:hover {
  background: var(--bg-card-hover);
}
.table-wrapper tbody tr:last-child td {
  border-bottom: none;
}

.td-company {
  font-weight: 600;
  color: var(--text-primary);
}
.td-position {
  color: var(--text-secondary);
}
.td-date {
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: .8rem;
}
.td-actions {
  white-space: nowrap;
}
.actions-wrapper {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ── 12. Badges ──────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
}

.badge-status-applied    { background: rgba(59,130,246,.12); color: var(--status-applied); }
.badge-status-screening  { background: rgba(245,158,11,.12); color: var(--status-screening); }
.badge-status-interview  { background: rgba(139,92,246,.12); color: var(--status-interview); }
.badge-status-offer      { background: rgba(20,184,166,.12); color: var(--status-offer); }
.badge-status-accepted   { background: rgba(16,185,129,.12); color: var(--status-accepted); }
.badge-status-rejected   { background: rgba(239,68,68,.12);  color: var(--status-rejected); }
.badge-status-ghosted    { background: rgba(107,114,128,.12);color: var(--status-ghosted); }
.badge-status-canceled   { background: rgba(100,116,139,.12);color: var(--status-canceled); }

.badge-type-internship   { background: rgba(239,68,68,.12);  color: var(--type-internship); }
.badge-type-full-time    { background: rgba(139,92,246,.12); color: var(--type-fulltime); }
.badge-type-wfh          { background: rgba(249,115,22,.12); color: var(--type-wfh); }
.badge-type-wfo          { background: rgba(59,130,246,.12); color: var(--type-wfo); }
.badge-type-hybrid       { background: rgba(234,179,8,.12);  color: var(--type-hybrid); }
.badge-type-part-time    { background: rgba(16,185,129,.12); color: var(--type-parttime); }
.badge-type-contract     { background: rgba(161,98,7,.12);   color: var(--type-contract); }

.badge-group { display: flex; flex-wrap: wrap; gap: 4px; }

/* ── 13. Modal ───────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.97);
  transition: transform .3s ease;
}
.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-size: 1.15rem;
}
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: var(--bg-input);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.modal-close:hover {
  background: var(--danger);
  color: #fff;
}

.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ── 14. Toast ───────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: .875rem;
  font-weight: 500;
  pointer-events: auto;
  animation: toastIn .4s ease;
  min-width: 280px;
  max-width: 420px;
}
.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error   { border-left: 4px solid var(--danger); }
.toast.toast-info    { border-left: 4px solid var(--primary); }

.toast.removing { animation: toastOut .3s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ── 15. Empty State ─────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: .6;
}
.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 24px;
}

/* ── 16. Loading Spinner ─────────────────────── */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

/* ── 17. Confirm Dialog ──────────────────────── */
.confirm-dialog .modal { max-width: 400px; text-align: center; }
.confirm-dialog .modal-body { padding: 32px 24px; }
.confirm-dialog .confirm-icon { font-size: 2.5rem; margin-bottom: 12px; }
.confirm-dialog .confirm-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.confirm-dialog .confirm-msg { color: var(--text-secondary); font-size: .9rem; margin-bottom: 24px; }
.confirm-dialog .confirm-actions { display: flex; gap: 10px; justify-content: center; }

/* ── 18. Responsive ──────────────────────────── */
@media (max-width: 768px) {
  .main-content { padding: calc(var(--nav-height) + 16px) 16px 32px; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header .btn-primary { width: 100%; justify-content: center; }
  h1 { font-size: 1.4rem; }

  .filter-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .date-range-group {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  /* Table → Card transform */
  .table-wrapper { background: transparent; border: none; box-shadow: none; overflow: visible; }
  .table-wrapper table,
  .table-wrapper thead,
  .table-wrapper tbody,
  .table-wrapper th,
  .table-wrapper td,
  .table-wrapper tr { display: block; }

  .table-wrapper thead { display: none; }

  .table-wrapper tbody tr {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
  }

  .table-wrapper tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: .85rem;
  }
  .table-wrapper tbody td:last-child { border-bottom: none; }

  .table-wrapper tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: .75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
    flex-shrink: 0;
    margin-right: 12px;
  }

  .actions-wrapper { justify-content: flex-end; width: 100%; }

  /* Modal full-width on mobile */
  .modal-overlay { padding: 12px; align-items: flex-end; }
  .modal {
    max-height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  /* Toast */
  .toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: auto; }
}

/* ── 19. Animations ──────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .4s ease; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* ── 20. Utilities ───────────────────────────── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ── 21. Auth Pages ──────────────────────────── */
.auth-main {
  padding-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-page {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}
.auth-header .auth-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}
.auth-header h1 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.auth-header p {
  font-size: .9rem;
}

.auth-error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  margin-bottom: 16px;
  animation: fadeIn .3s ease;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: .875rem;
  color: var(--text-secondary);
}
.auth-footer a {
  font-weight: 600;
}

.btn-full {
  width: 100%;
  padding: 12px 20px;
  font-size: .95rem;
}

/* ── 22. User Menu (Navbar) ──────────────────── */
.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-name {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
}


@media (max-width: 768px) {
  .auth-card { padding: 32px 24px; }
  .user-name { display: none; }
  .auth-main { padding: 16px; align-items: center; }
}

/* ── 23. Nav Links ───────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-input);
}
.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}
[data-theme="dark"] .nav-link.active {
  background: rgba(59,130,246,.12);
}

/* ── 24. Header Actions ──────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── 25. Dashboard ───────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}
.stat-total::before { background: var(--primary); }
.stat-interview::before { background: var(--status-interview); }
.stat-offer::before { background: var(--status-offer); }
.stat-ghosted::before { background: var(--status-ghosted); }

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}
.stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 500;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.dash-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}
.dash-card-body {
  padding: 20px;
}

/* Chart toggle */
.chart-toggle {
  display: flex;
  gap: 4px;
}
.chart-toggle .btn.active {
  background: var(--primary-light);
  color: var(--primary);
}
[data-theme="dark"] .chart-toggle .btn.active {
  background: rgba(59,130,246,.12);
}

/* Chart canvas */
.dash-card canvas {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

/* Funnel chart */
.funnel-step {
  margin-bottom: 12px;
  animation: fadeIn .4s ease both;
  animation-delay: var(--delay, 0s);
}
.funnel-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  margin-bottom: 4px;
  color: var(--text-secondary);
}
.funnel-label strong {
  color: var(--text-primary);
  font-size: 1rem;
}
.funnel-bar-track {
  height: 28px;
  background: var(--bg-input);
  border-radius: 6px;
  overflow: hidden;
}
.funnel-bar {
  height: 100%;
  border-radius: 6px;
  animation: barGrow .8s cubic-bezier(.4,0,.2,1) both;
  animation-delay: var(--delay, 0s);
}
@keyframes barGrow {
  from { width: 0 !important; }
}

/* Chart legend */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  justify-content: center;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--text-secondary);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* Portal bars */
.portal-bar-row {
  margin-bottom: 10px;
  animation: fadeIn .4s ease both;
  animation-delay: var(--delay, 0s);
}
.portal-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  margin-bottom: 3px;
  color: var(--text-secondary);
}
.portal-bar-label strong {
  color: var(--text-primary);
}
.portal-bar-track {
  height: 20px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}
.portal-bar-fill {
  height: 100%;
  border-radius: 4px;
  animation: barGrow .6s cubic-bezier(.4,0,.2,1) both;
}

/* Follow-up list */
.followup-list, .recent-list {
  max-height: 320px;
  overflow-y: auto;
}
.followup-item, .recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}
.followup-item:last-child, .recent-item:last-child { border-bottom: none; }
.followup-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.followup-info strong, .recent-info strong {
  font-size: .85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.followup-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.recent-item {
  gap: 10px;
}
.recent-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.recent-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.empty-mini {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
}

/* ── 26. Timeline ────────────────────────────── */
.modal-lg { max-width: 720px; }

.activity-form {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 12px;
}
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.timeline {
  position: relative;
  padding-left: 36px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 20px;
}
.timeline-dot {
  position: absolute;
  left: -36px;
  top: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--bg-card);
}
.timeline-content {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  position: relative;
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.timeline-type {
  font-weight: 600;
  font-size: .85rem;
  color: var(--primary);
}
.timeline-date {
  font-size: .75rem;
  color: var(--text-muted);
}
.timeline-desc {
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.timeline-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  transition: opacity var(--transition);
}
.timeline-content:hover .timeline-delete {
  opacity: 1;
}
.timeline-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}
.timeline-empty .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

/* ── 27. Notifications ───────────────────────── */
.notif-wrapper {
  position: relative;
}
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 2px solid var(--bg-card);
}

.bell-shake {
  animation: bellShake .5s ease;
}
@keyframes bellShake {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(15deg); }
  30% { transform: rotate(-15deg); }
  45% { transform: rotate(10deg); }
  60% { transform: rotate(-10deg); }
  75% { transform: rotate(5deg); }
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.notif-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.notif-list {
  overflow-y: auto;
  flex: 1;
}
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}
.notif-item:hover {
  background: var(--bg-card-hover);
}
.notif-item.unread {
  background: rgba(59,130,246,.04);
  border-left: 3px solid var(--primary);
}
.notif-item.read {
  opacity: .7;
}
.notif-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.notif-content {
  flex: 1;
  min-width: 0;
}
.notif-title {
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.notif-msg {
  font-size: .78rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-time {
  margin-top: 4px;
}
.notif-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}

/* ── 28. Import/Export ───────────────────────── */
.csv-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.csv-dropzone:hover, .csv-dropzone.drag-over {
  border-color: var(--primary);
  background: rgba(59,130,246,.04);
}
.dropzone-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.dropzone-text {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.preview-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}
.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.preview-table th, .preview-table td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.preview-table th {
  background: var(--bg-input);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: .7rem;
}

.import-result-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 16px;
}
.import-result-card h4 {
  margin-bottom: 16px;
}
.import-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
}
.import-stat {
  text-align: center;
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}
.import-stat.success { border: 1px solid var(--success); }
.import-stat.warning { border: 1px solid var(--warning); }
.import-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  display: block;
}
.import-stat.success .import-stat-value { color: var(--success); }
.import-stat.warning .import-stat-value { color: var(--warning); }
.import-stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.import-errors {
  margin-top: 12px;
  font-size: .8rem;
  color: var(--text-secondary);
}
.import-errors ul {
  margin-top: 4px;
  padding-left: 20px;
}

/* ── 29. Responsive (Fase 4-7) ───────────────── */
/* Email Templates */
.email-template-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.email-template-toolbar .search-bar-wrapper .search-icon {
  font-size: .7rem;
  font-weight: 700;
}

.template-name-cell {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.template-body-preview {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-template-category {
  background: rgba(6,182,212,.12);
  color: var(--accent);
}
.badge-template-variable {
  background: rgba(99,102,241,.12);
  color: var(--info);
  text-transform: none;
  letter-spacing: 0;
}

.variable-panel {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}
.variable-panel-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.variable-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.variable-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--primary);
  padding: 6px 10px;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.variable-chip:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.email-template-body-input {
  min-height: 260px;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.55;
}

.selected-template-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.variable-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.variable-input-grid .form-group {
  margin-bottom: 0;
}
.email-template-preview {
  min-height: 260px;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.55;
  resize: vertical;
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 14px 16px; }
  .stat-value { font-size: 1.4rem; }
  .stat-icon { font-size: 1.5rem; }

  .nav-links { display: none; }
  
  .form-row-3 { grid-template-columns: 1fr; }
  .email-template-toolbar,
  .variable-input-grid {
    grid-template-columns: 1fr;
  }
  .template-body-preview {
    max-width: 100%;
  }

  .notif-dropdown {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - var(--nav-height));
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .header-actions {
    width: 100%;
    justify-content: stretch;
  }
  .header-actions .btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   30. CV Builder
   ═══════════════════════════════════════════════ */

/* Controls bar */
.cv-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}
.cv-action-buttons {
  display: flex;
  gap: 8px;
}

/* Two-column editor */
.cv-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* Tab navigation */
.cv-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
}
.cv-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.cv-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-input);
}
.cv-tab-btn.active {
  color: var(--primary);
  background: var(--primary-light);
}
[data-theme="dark"] .cv-tab-btn.active {
  background: rgba(59,130,246,.12);
}

/* Tab content */
.cv-tab-content { display: none; }
.cv-tab-content.active { display: block; animation: fadeIn .3s ease; }

/* Section titles */
.cv-section-title {
  font-size: 1.05rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cv-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cv-section-header .cv-section-title { margin-bottom: 0; }

/* Repeater items */
.repeater-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}
.repeater-item-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.repeater-remove {
  font-size: .75rem;
}
.repeater-empty {
  text-align: center;
  padding: 24px 16px;
}

.text-danger { color: var(--danger) !important; }

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  cursor: pointer;
  padding-top: 8px;
}
.checkbox-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* Skill tags input */
.skill-input-wrapper {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  transition: all var(--transition);
}
.skill-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.skill-input-wrapper .form-input {
  border: none;
  background: transparent;
  padding: 4px 6px;
  font-size: .85rem;
  box-shadow: none;
}
.skill-input-wrapper .form-input:focus {
  box-shadow: none;
  border: none;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.skill-tag:hover {
  background: var(--danger);
  color: #fff;
}
[data-theme="dark"] .skill-tag {
  background: rgba(59,130,246,.15);
}

/* Photo section */
.cv-photo-section {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.cv-photo-preview {
  width: 100px;
  height: 130px;
  background: var(--bg-input);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition);
  flex-shrink: 0;
}
.cv-photo-preview:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.cv-photo-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.6;
}
.cv-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cv-photo-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* Photo adjust modal */
.photo-adjust-container {
  display: flex;
  justify-content: center;
}
.photo-adjust-preview {
  width: 200px;
  height: 260px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg-input);
}
.photo-adjust-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.form-range {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Preview panel */
.cv-preview-panel {
  position: sticky;
  top: calc(var(--nav-height) + 16px);
}
.cv-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cv-preview-header h3 {
  font-size: .95rem;
  font-weight: 600;
}
.cv-preview-frame-wrapper {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cv-preview-frame {
  width: 100%;
  min-height: 700px;
  border: none;
  display: block;
  background: #fff;
}

/* Saved CV list */
.cv-saved-header {
  margin-bottom: 12px;
}
.cv-saved-header h3 {
  font-size: 1rem;
  font-weight: 600;
}
.cv-saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.cv-saved-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.cv-saved-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.cv-saved-card-body {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.cv-saved-card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.cv-saved-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cv-saved-card-info strong {
  font-size: .85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cv-saved-card-info small {
  font-size: .72rem;
}
.cv-saved-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* ── CV Builder Responsive ── */
@media (max-width: 1024px) {
  .cv-editor-grid {
    grid-template-columns: 1fr;
  }
  .cv-preview-panel {
    position: static;
  }
  .cv-preview-frame {
    min-height: 500px;
  }
}

@media (max-width: 768px) {
  .cv-controls-grid {
    grid-template-columns: 1fr;
  }
  .cv-action-buttons {
    width: 100%;
  }
  .cv-action-buttons .btn {
    flex: 1;
  }
  .cv-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .cv-photo-section {
    flex-direction: column;
    align-items: center;
  }
  .cv-saved-grid {
    grid-template-columns: 1fr;
  }
}
