/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
  padding: 0 var(--s20);
  height: 44px;
  border-radius: var(--r8);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: all var(--t-base);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #0c0e14;
}
.btn-primary:hover {
  background: #f7b84a;
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-ghost {
  color: var(--text-secondary);
  background: transparent;
  padding: 0 var(--s12);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-elevated); }

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border: 1.5px solid rgba(239,68,68,0.2);
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }

.btn-sm { height: 34px; padding: 0 var(--s14); font-size: 13px; }
.btn-lg { height: 52px; padding: 0 var(--s28); font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ── Inputs ── */
.form-group { display: flex; flex-direction: column; gap: var(--s8); }
.form-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.form-input, .form-select, .form-textarea {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--r8);
  color: var(--text-primary);
  padding: 0 var(--s16);
  height: 48px;
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}
.form-textarea {
  height: auto;
  min-height: 120px;
  padding: var(--s12) var(--s16);
  resize: vertical;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238892ab' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-input { padding-left: 44px; }
.input-icon-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.form-error {
  font-size: 13px;
  color: var(--red);
  margin-top: var(--s4);
}
.form-hint { font-size: 13px; color: var(--text-muted); margin-top: var(--s4); }

/* ── Cards ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r16);
  padding: var(--s24);
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.card:hover { border-color: var(--border); }
.card-interactive:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
  transform: translateY(-2px);
  cursor: pointer;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-accent   { background: var(--accent-soft);  color: var(--accent); }
.badge-green    { background: var(--green-soft);   color: var(--green); }
.badge-blue     { background: var(--blue-soft);    color: var(--blue); }
.badge-purple   { background: var(--purple-soft);  color: var(--purple); }
.badge-red      { background: var(--red-soft);     color: var(--red); }
.badge-muted    { background: var(--bg-elevated);  color: var(--text-secondary); }

/* ── Job Card ── */
.job-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r16);
  padding: var(--s20) var(--s24);
  transition: all var(--t-base);
  cursor: pointer;
  position: relative;
}
.job-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow-md);
  transform: translateY(-2px);
}
.job-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s16);
  margin-bottom: var(--s16);
}
.job-card-company {
  display: flex;
  align-items: center;
  gap: var(--s12);
}
.company-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--r8);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}
.company-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.company-name {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.job-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--s8);
  line-height: 1.3;
}
.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s6);
  margin-bottom: var(--s16);
}
.job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s8);
}
.job-salary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
}
.job-posted {
  font-size: 12px;
  color: var(--text-muted);
}
.save-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.save-btn:hover, .save-btn.saved {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.save-btn.saved svg { fill: var(--accent); }

/* ── Filter chips ── */
.filter-chips {
  display: flex;
  gap: var(--s8);
  flex-wrap: wrap;
  align-items: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s6);
  padding: var(--s6) var(--s14);
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  background: var(--bg-surface);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--s24) 0;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: var(--s12);
  color: var(--text-muted);
  font-size: 13px;
}
.divider-text::before, .divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ── Avatar ── */
.avatar {
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #0c0e14;
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-md { width: 44px; height: 44px; font-size: 16px; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar-xl { width: 88px; height: 88px; font-size: 32px; }

/* ── Stat block ── */
.stat-block {
  background: var(--bg-elevated);
  border-radius: var(--r12);
  padding: var(--s16) var(--s20);
  border: 1px solid var(--border-subtle);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: var(--s4);
}

/* ── Section title ── */
.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--s20);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title .see-all {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  transition: opacity var(--t-fast);
}
.section-title .see-all:hover { opacity: 0.7; }

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

/* ── Tag input ── */
.tag-list { display: flex; flex-wrap: wrap; gap: var(--s8); margin-top: var(--s8); }
.tag-item {
  display: inline-flex;
  align-items: center;
  gap: var(--s6);
  padding: var(--s4) var(--s12);
  background: var(--accent-soft);
  border: 1.5px solid var(--accent-glow);
  border-radius: var(--r-full);
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.tag-remove {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--t-fast);
}
.tag-remove:hover { opacity: 1; }

/* ── Toast ── */
.toast {
  display: flex;
  align-items: center;
  gap: var(--s12);
  padding: var(--s12) var(--s16);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r12);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  min-width: 240px;
  max-width: 360px;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}
.toast-success { border-color: rgba(34,197,94,0.3); }
.toast-success .toast-dot { background: var(--green); }
.toast-error { border-color: rgba(239,68,68,0.3); }
.toast-error .toast-dot { background: var(--red); }
.toast-info .toast-dot { background: var(--blue); }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: var(--s64) var(--s24);
}
.empty-icon {
  width: 64px; height: 64px;
  background: var(--bg-elevated);
  border-radius: var(--r16);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s20);
  color: var(--text-muted);
}
.empty-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--s8);
}
.empty-desc { color: var(--text-secondary); font-size: 14px; }

/* ── Progress bar ── */
.progress-track {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-full);
  transition: width var(--t-slow);
}

/* ── Step indicator ── */
.step-dots {
  display: flex;
  gap: var(--s8);
  justify-content: center;
}
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  transition: all var(--t-base);
}
.step-dot.active {
  width: 24px;
  border-radius: var(--r-full);
  background: var(--accent);
  border-color: var(--accent);
}
.step-dot.done { background: var(--accent); border-color: var(--accent); }

/* ── App status tag ── */
.app-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-display);
}
.app-status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
}
.status-applied    { background: var(--blue-soft);   color: var(--blue);   }
.status-applied::before    { background: var(--blue); }
.status-reviewing  { background: var(--purple-soft); color: var(--purple); }
.status-reviewing::before  { background: var(--purple); }
.status-interview  { background: var(--accent-soft); color: var(--accent); }
.status-interview::before  { background: var(--accent); }
.status-offer      { background: var(--green-soft);  color: var(--green);  }
.status-offer::before      { background: var(--green); }
.status-rejected   { background: var(--red-soft);    color: var(--red);    }
.status-rejected::before   { background: var(--red); }
