/* =========================================
   ResumeAI Pro — Page-Specific Styles
   ========================================= */

/* === AUTH PAGE === */
.auth-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}

.orb-1 { width: 400px; height: 400px; background: rgba(37,99,235,0.2); top: -100px; right: -100px; animation-delay: 0s; }
.orb-2 { width: 300px; height: 300px; background: rgba(16,185,129,0.15); bottom: -80px; left: -80px; animation-delay: 3s; }
.orb-3 { width: 250px; height: 250px; background: rgba(124,58,237,0.1); top: 50%; left: 50%; animation-delay: 5s; }

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-xl);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  justify-content: center;
}

.auth-logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--blue), var(--emerald));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo-text { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--text-primary); }
.auth-logo-accent { color: var(--blue); }

.auth-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--text-secondary); text-align: center; margin-bottom: 20px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }

.auth-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  width: 100%;
}
.auth-btn-google:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.auth-link { cursor: pointer; color: var(--blue); font-weight: 600; }
.auth-link:hover { text-decoration: underline; }

.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 16px;
}
.auth-footer a { color: var(--blue); font-weight: 600; cursor: pointer; }
.auth-footer a:hover { text-decoration: underline; }

.auth-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.auth-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.auth-badge i { width: 13px; height: 13px; color: var(--emerald); }

/* === PAGE HEADER === */
.page-header { margin-bottom: 24px; }
.page-title {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-primary);
  margin-bottom: 4px;
}
.page-description { font-size: 14px; color: var(--text-secondary); }

/* === DASHBOARD === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(16,185,129,0.04));
  border: 1px solid rgba(37,99,235,0.12);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
}

.dashboard-welcome::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(37,99,235,0.08), transparent);
  border-radius: 50%;
}

.welcome-greeting { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.welcome-title { font-size: 22px; font-weight: 800; font-family: var(--font-display); margin-bottom: 6px; }
.welcome-subtitle { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; max-width: 400px; }

.welcome-cta { display: flex; gap: 10px; flex-wrap: wrap; }

.welcome-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
}
.welcome-btn-primary:hover { box-shadow: 0 4px 16px rgba(37,99,235,0.3); transform: translateY(-1px); }
.welcome-btn-primary i { width: 15px; height: 15px; }

.welcome-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}
.welcome-btn-secondary:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.welcome-btn-secondary i { width: 15px; height: 15px; }

.welcome-visual { flex-shrink: 0; }
.welcome-score-display {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--emerald));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 24px rgba(37,99,235,0.3);
  animation: pulse-glow 3s ease-in-out infinite;
}
.welcome-score-value { font-size: 28px; font-weight: 900; font-family: var(--font-display); }
.welcome-score-label { font-size: 9px; opacity: 0.85; font-weight: 600; }

/* === RESUME BUILDER === */
.builder-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  align-items: start;
}

.builder-form-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.builder-step-content { padding: 24px; flex: 1; min-height: 400px; }

.builder-step-title {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-display);
  margin-bottom: 4px;
}
.builder-step-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }

.builder-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.builder-preview-panel { position: sticky; top: calc(var(--header-height) + 16px); }

/* Step Indicator */
.step-indicator {
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 4px;
  gap: 0;
}

.step-item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition-base);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step-circle i { width: 12px; height: 12px; }

.step-item.active .step-circle {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}

.step-item.completed .step-circle {
  background: var(--emerald);
  border-color: var(--emerald);
  color: white;
}

.step-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
}

.step-item.active .step-label { color: var(--blue); }
.step-item.completed .step-label { color: var(--emerald); }

.step-line {
  height: 2px;
  width: 32px;
  background: var(--border);
  flex-shrink: 0;
}

.step-item.completed + .step-item .step-line,
.step-item.completed .step-line { background: var(--emerald); }

/* Entry Cards (inside builder) */
.entry-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all var(--transition-base);
}
.entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.entry-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.entry-actions { display: flex; gap: 6px; }
.entry-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.entry-action-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.entry-action-btn.danger:hover { background: rgba(244,63,94,0.08); color: var(--rose); border-color: rgba(244,63,94,0.2); }
.entry-action-btn i { width: 13px; height: 13px; }

/* === ATS CHECKER === */
.ats-result-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

.ats-score-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: center;
  position: sticky;
  top: calc(var(--header-height) + 16px);
}

.ats-score-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; }

.ats-issue-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.ats-issue-item:last-child { border-bottom: none; }
.ats-issue-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ats-issue-icon i { width: 14px; height: 14px; }
.ats-issue-icon.success { background: rgba(16,185,129,0.1); color: var(--emerald); }
.ats-issue-icon.warning { background: rgba(245,158,11,0.1); color: var(--amber); }
.ats-issue-icon.error { background: rgba(244,63,94,0.1); color: var(--rose); }
.ats-issue-icon.info { background: rgba(37,99,235,0.1); color: var(--blue); }
.ats-issue-title { font-size: 13px; font-weight: 600; }
.ats-issue-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.5; }

/* === KANBAN === */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-column {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  min-width: 200px;
  min-height: 200px;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.kanban-column-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.kanban-column-count {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
  transition: all var(--transition-base);
  cursor: pointer;
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--border-strong); }
.kanban-card-company { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.kanban-card-role { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; }
.kanban-card-footer { display: flex; align-items: center; justify-content: space-between; }
.kanban-card-date { font-size: 10px; color: var(--text-muted); }

/* === SETTINGS === */
.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

.settings-nav {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 8px;
  position: sticky;
  top: calc(var(--header-height) + 16px);
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
}
.settings-nav-item i { width: 16px; height: 16px; flex-shrink: 0; }
.settings-nav-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.settings-nav-item.active { background: rgba(37,99,235,0.08); color: var(--blue); font-weight: 600; }

.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.settings-section-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.settings-section-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.settings-section-desc { font-size: 12px; color: var(--text-secondary); }

.settings-section-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 0; }

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label h4 { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.settings-row-label p { font-size: 12px; color: var(--text-secondary); }

/* === RESUME CARDS === */
.resume-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}
.resume-card-preview {
  height: 140px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: hidden;
}
.resume-card-body { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.resume-card-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.resume-card-meta { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.resume-card-footer {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.resume-card-score { font-size: 12px; font-weight: 700; }
.resume-card-actions { display: flex; gap: 4px; }
.resume-action-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: var(--text-muted);
}
.resume-action-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.resume-action-btn.danger:hover { background: rgba(244,63,94,0.08); color: var(--rose); }
.resume-action-btn i { width: 13px; height: 13px; }

/* === TEMPLATE PICKER === */
.template-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}
.template-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }
.template-card.selected { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.template-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  background: var(--blue);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 2;
}
.template-card.selected .template-check { display: flex; }
.template-check i { width: 12px; height: 12px; }
.template-preview { height: 140px; overflow: hidden; }
.template-info { padding: 10px 12px; border-top: 1px solid var(--border); }
.template-name { font-size: 13px; font-weight: 700; }
.template-desc { font-size: 11px; color: var(--text-secondary); }

/* === COVER LETTER === */
.cover-letter-preview {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  font-family: 'Times New Roman', serif;
  font-size: 13px;
  line-height: 1.8;
  color: #1a1a1a;
  min-height: 400px;
  white-space: pre-wrap;
}

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

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px;
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}
.admin-tab i { width: 15px; height: 15px; }
.admin-tab.active { background: var(--bg-secondary); color: var(--text-primary); font-weight: 700; box-shadow: var(--shadow-sm); }
.admin-tab:hover:not(.active) { color: var(--text-primary); }

/* === PORTFOLIO === */
.portfolio-preview-frame {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* === MOBILE === */
.mobile-bottom-nav {
  display: none;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  padding: 8px 4px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}
.mobile-nav-item i { width: 20px; height: 20px; }
.mobile-nav-item.active { color: var(--blue); }
.mobile-nav-item:hover { color: var(--text-primary); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .builder-layout { grid-template-columns: 1fr; }
  .builder-preview-panel { display: none; }
  .kanban-board { grid-template-columns: repeat(3, 220px); }
  .ats-result-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
}

@media (max-width: 768px) {
  .app-shell { grid-template-columns: 0 1fr !important; }
  .sidebar {
    position: fixed;
    left: -280px;
    width: 260px;
    transition: left var(--transition-slow);
    z-index: 200;
  }
  .sidebar.mobile-open { left: 0; box-shadow: 0 0 0 100vw rgba(0,0,0,0.5); }
  .main-wrapper { margin-left: 0 !important; }
  .mobile-menu-btn { display: flex !important; }
  .mobile-bottom-nav { display: flex !important; }
  .page-content { padding: 16px; padding-bottom: 80px; }
  .header-search { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .kanban-board { grid-template-columns: repeat(3, 200px); }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-welcome { flex-direction: column; text-align: center; }
  .welcome-visual { display: none; }
  .auth-card { padding: 24px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 20px; }
  .kanban-board { grid-template-columns: repeat(2, 200px); }
}

/* === HIDDEN CLASS === */
.hidden { display: none !important; }

/* === PAGE ENTER ANIMATION === */
.page-enter { animation: fadeInUp 0.3s ease both; }
