/* Dashboard Styles */

/* Logout Button */
.logout-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.support-btn {
  padding: 8px 16px;
  background: #fff;
  color: #000;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.support-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.upgrade-btn {
  padding: 8px 20px;
  background: #c9a86c;
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.upgrade-btn:hover {
  background: #b8985c;
  transform: translateY(-1px);
}

.dashboard-main {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

.dashboard-header {
  text-align: center;
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 2.5rem;
  color: #3d2b1f;
  margin-bottom: 0.5rem;
}

.dashboard-header p {
  color: #666;
  font-size: 1.1rem;
}

/* Navigation */
.nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: #3d2b1f;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-link:hover {
  background: rgba(61, 43, 31, 0.1);
}

.nav-link.active {
  background: #3d2b1f;
  color: #fff;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #3d2b1f;
  margin-bottom: 0.5rem;
}

.metric-label {
  color: #666;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Table Container */
.table-container {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.table-header h2 {
  font-size: 1.3rem;
  color: #3d2b1f;
}

.add-btn {
  background: #c9a86c;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.add-btn:hover {
  background: #b8985c;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: #3d2b1f;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: #666;
  margin-bottom: 1.5rem;
}

.cta-btn {
  display: inline-block;
  background: #c9a86c;
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}

.cta-btn:hover {
  background: #b8985c;
}

/* Applications Table */
.applications-table {
  width: 100%;
  border-collapse: collapse;
  display: none;
}

.applications-table.visible {
  display: table;
}

.applications-table th,
.applications-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.applications-table th {
  font-weight: 600;
  color: #3d2b1f;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.applications-table td {
  color: #333;
}

.applications-table tr:hover {
  background: #fafafa;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-research {
  background: #e3f2fd;
  color: #1565c0;
}
.status-applied {
  background: #fff3e0;
  color: #ef6c00;
}
.status-screening {
  background: #f3e5f5;
  color: #7b1fa2;
}
.status-interview1,
.status-interview2 {
  background: #e8f5e9;
  color: #2e7d32;
}
.status-offer {
  background: #fff9c4;
  color: #f9a825;
}
.status-accepted {
  background: #c8e6c9;
  color: #1b5e20;
}
.status-rejected {
  background: #ffcdd2;
  color: #c62828;
}

/* ATS Score */
.ats-score {
  font-weight: 600;
}

.ats-score.high {
  color: #2e7d32;
}
.ats-score.medium {
  color: #ef6c00;
}
.ats-score.low {
  color: #c62828;
}

/* Action Buttons */
.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.action-btn:hover {
  background: #f0f0f0;
}

.action-btn.edit {
  color: #1565c0;
}
.action-btn.delete {
  color: #c62828;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
}

.modal-header h3 {
  color: #3d2b1f;
  font-size: 1.2rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

#applicationForm {
  padding: 1.5rem;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #3d2b1f;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #c9a86c;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.cancel-btn {
  background: #f0f0f0;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.save-btn {
  background: #c9a86c;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.save-btn:hover {
  background: #b8985c;
}

/* My Resumes Section */
.resumes-section {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.5rem;
  color: #3d2b1f;
  margin: 0;
}

.section-divider {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 2rem 0;
}

.btn-create-cv {
  padding: 10px 20px;
  background: #3d2b1f;
  color: white;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-create-cv:hover {
  background: #5a4332;
  transform: translateY(-1px);
}

.resumes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.resume-card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s;
}

.resume-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.resume-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.resume-card-name {
  font-weight: 600;
  font-size: 1rem;
  color: #3d2b1f;
  margin: 0;
}

.resume-card-template {
  font-size: 0.75rem;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  color: #64748b;
  text-transform: capitalize;
}

.resume-card-meta {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 12px;
}

.resume-card-score {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.resume-card-score.high {
  background: #dcfce7;
  color: #16a34a;
}

.resume-card-score.medium {
  background: #fef3c7;
  color: #d97706;
}

.resume-card-score.low {
  background: #fee2e2;
  color: #dc2626;
}

.resume-card-actions {
  display: flex;
  gap: 8px;
}

.resume-card-actions a,
.resume-card-actions button {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.resume-card-actions .btn-edit {
  background: #f1f5f9;
  color: #3d2b1f;
  border: none;
}

.resume-card-actions .btn-edit:hover {
  background: #e2e8f0;
}

.resume-card-actions .btn-use {
  background: #3d2b1f;
  color: white;
  border: none;
}

.resume-card-actions .btn-use:hover {
  background: #5a4332;
}

.resumes-empty {
  text-align: center;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px dashed #e5e5e5;
}

.resumes-empty p {
  color: #64748b;
  margin-bottom: 1rem;
}

.btn-create-cv-large {
  display: inline-block;
  padding: 14px 28px;
  background: #3d2b1f;
  color: white;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-create-cv-large:hover {
  background: #5a4332;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 900px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .resumes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .resumes-grid {
    grid-template-columns: 1fr;
  }

  .applications-table {
    display: block;
    overflow-x: auto;
  }

  .table-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}
