/* Dashboard Styles */

:root {
  --primary: #1A1A1A;
  --accent: #E8443A;
  --bg: #fff;
  --text: #1A1A1A;
  --muted: #777;
  --border: #e8e8ea;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f5f5f5;
  color: var(--text);
}

/* Navbar — override only position for dashboard (sticky instead of fixed) */
.navbar {
  position: sticky;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Dashboard Container */
.dashboard-container {
  display: flex;
  min-height: calc(100vh - 64px);
  gap: 0;
}

/* Sidebar Navigation */
.sidebar {
  width: 240px;
  background-color: var(--bg);
  border-right: 1px solid var(--border);
  padding: 2rem 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav li {
  margin: 0;
}

.sidebar-nav a {
  display: block;
  padding: 0.875rem 1.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background-color: #f9f9f9;
  color: var(--text);
}

.sidebar-nav a.active {
  color: var(--accent);
  background-color: rgba(232, 68, 58, 0.05);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Section Titles */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: var(--primary);
}

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

.stat-card {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(232, 68, 58, 0.1);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
}

/* Chart */
.chart-card {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.chart-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 200px;
  gap: 12px;
}

.bar {
  flex: 1;
  background: linear-gradient(to top, var(--accent), #ff9890);
  border-radius: 4px 4px 0 0;
  min-height: 20px;
  transition: all 0.3s ease;
  position: relative;
}

.bar:nth-child(1) {
  height: 60%;
}

.bar:nth-child(2) {
  height: 75%;
}

.bar:nth-child(3) {
  height: 90%;
}

.bar:nth-child(4) {
  height: 100%;
}

.bar:nth-child(5) {
  height: 85%;
}

.bar:nth-child(6) {
  height: 70%;
}

.bar:nth-child(7) {
  height: 50%;
}

.bar:hover {
  opacity: 0.8;
  filter: brightness(1.1);
}

/* Activity List */
.activity-list {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.activity-item {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item:hover {
  background-color: #f9f9f9;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.activity-time {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Jobs Table */
.jobs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', 'DM Sans', sans-serif;
}

.btn-primary:hover {
  background-color: #d63a31;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232, 68, 58, 0.3);
}

.jobs-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.jobs-table thead {
  background-color: #f9f9f9;
  border-bottom: 1px solid var(--border);
}

.jobs-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.jobs-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.jobs-table tr:last-child td {
  border-bottom: none;
}

.jobs-table tr:hover {
  background-color: #f9f9f9;
}

.job-title {
  font-weight: 500;
}

.status-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-active {
  background-color: rgba(76, 175, 80, 0.1);
  color: #2e7d32;
}

.status-archive {
  background-color: rgba(158, 158, 158, 0.1);
  color: var(--muted);
}

.status-moderation {
  background-color: rgba(255, 152, 0, 0.1);
  color: #f57c00;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.action-btn:hover {
  color: var(--accent);
}

/* Applications Section */
.filter-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.filter-tab {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', 'DM Sans', sans-serif;
}

.filter-tab:hover {
  color: var(--text);
}

.filter-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.applicants-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.applicant-card {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.applicant-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(232, 68, 58, 0.1);
}

.applicant-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.applicant-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff6b5b);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.applicant-info {
  flex: 1;
}

.applicant-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.applicant-spec {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.applicant-position {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.applicant-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.applicant-status {
  display: inline-block;
  margin-top: 0.75rem;
}

.status-badge-app {
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background-color: rgba(232, 68, 58, 0.1);
  color: var(--accent);
}

.applicant-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-secondary {
  flex: 1;
  padding: 0.625rem 1rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', 'DM Sans', sans-serif;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-accept {
  flex: 1;
  padding: 0.625rem 1rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', 'DM Sans', sans-serif;
}

.btn-accept:hover {
  background-color: #d63a31;
}

/* Create Job Form */
.form-section {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Inter', 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 68, 58, 0.1);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.btn-secondary-full {
  flex: 1;
  padding: 0.875rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', 'DM Sans', sans-serif;
}

.btn-secondary-full:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary-full {
  flex: 1;
  padding: 0.875rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', 'DM Sans', sans-serif;
}

.btn-primary-full:hover {
  background-color: #d63a31;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232, 68, 58, 0.3);
}

.form-hidden {
  display: none;
}

/* Footer */
.footer {
  background-color: var(--primary);
  color: white;
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.foot-brand a {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.foot-brand p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0.5rem 0 1rem;
  line-height: 1.5;
}

.foot-social {
  display: flex;
  gap: 1rem;
}

.foot-social a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}

.foot-social a:hover {
  color: var(--accent);
}

.foot-col h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.foot-col a {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.foot-col a:hover {
  color: var(--accent);
}

.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.foot-legal {
  display: flex;
  gap: 1.5rem;
}

.foot-legal a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.foot-legal a:hover {
  color: var(--accent);
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}

.user-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.user-dropdown-trigger:hover {
  background-color: #f5f5f5;
}

.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff6b5b);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
}

.user-dropdown-trigger svg {
  color: var(--muted);
  transition: transform 0.2s ease;
}

.user-dropdown.open .user-dropdown-trigger svg {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 200;
  padding: 0.5rem 0;
}

.user-dropdown.open .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.15s ease;
}

.user-dropdown-item:hover {
  background-color: #f5f5f5;
}

.user-dropdown-item svg {
  color: var(--muted);
  flex-shrink: 0;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.375rem 0;
}

.user-dropdown-logout {
  color: var(--accent);
}

.user-dropdown-logout svg {
  color: var(--accent);
}

/* Responsive Design */

/* Tablet (1024px) */
@media (max-width: 1024px) {
  .navbar {
    padding: 1rem 1.5rem;
  }

  .main-content {
    padding: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .applicants-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Mobile (768px) */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0;
    z-index: 99;
    display: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .sidebar.mobile-open {
    display: flex;
    flex-direction: column;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: row;
    width: 100%;
  }

  .sidebar-nav li {
    flex: 1;
    min-width: 120px;
  }

  .sidebar-nav a {
    padding: 1rem;
    text-align: center;
    border-left: none;
    border-bottom: 3px solid transparent;
    font-size: 0.85rem;
  }

  .sidebar-nav a:hover {
    border-bottom-color: var(--muted);
  }

  .sidebar-nav a.active {
    border-left: none;
    border-bottom-color: var(--accent);
  }

  .dashboard-container {
    flex-direction: column;
  }

  .main-content {
    padding: 1rem;
    margin-top: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.5rem;
  }

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

  .btn-primary {
    width: 100%;
  }

  .jobs-table {
    font-size: 0.85rem;
  }

  .jobs-table th,
  .jobs-table td {
    padding: 0.75rem;
  }

  .filter-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .filter-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }

  .foot-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* Small Mobile (480px) */
@media (max-width: 480px) {
  .main-content {
    padding: 0.75rem;
  }

  .section-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .chart-card {
    padding: 1rem;
  }

  .form-section {
    padding: 1rem;
  }

  .form-section-title {
    font-size: 0.9rem;
  }

  .form-label {
    font-size: 0.85rem;
  }

  .form-input,
  .form-select,
  .form-textarea {
    font-size: 0.9rem;
    padding: 0.625rem;
  }

  .jobs-table th,
  .jobs-table td {
    padding: 0.5rem;
    font-size: 0.75rem;
  }

  .applicant-card {
    padding: 1rem;
  }

  .applicant-avatar {
    width: 40px;
    height: 40px;
  }

  .applicant-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-secondary,
  .btn-accept {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .footer {
    padding: 2rem 1rem 1rem;
  }

  .foot-grid {
    gap: 1rem;
  }

  .foot-col h4 {
    font-size: 0.85rem;
  }

  .foot-col a {
    font-size: 0.8rem;
  }
}
