/* HR Job Portal - Main CSS Framework */

/* CSS Custom Properties (Design System) */
:root {
  /* Color Palette */
  --primary-purple: #5512A3;
  --primary-blue: #2563EB;
  --secondary-light: #F3E8FF;
  --accent-purple: #B47CE8;
  --text-dark: #374151;
  --text-light: #6B7280;
  --background: #F9FAFB;
  --white: #FFFFFF;
  --error: #DC2626;
  --success: #16A34A;
  --success-green: #16A34A;
  --warning: #D97706;
  --warning-orange: #D97706;
  --warning-light: #FEF3C7;
  --warning-dark: #92400E;
  --danger-red: #DC2626;
  --bg-light: #F9FAFB;
  --border-light: #E5E7EB;
  --border-radius: 6px;
  
  /* Spacing Scale */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  color: var(--text-dark);
  background-color: var(--background);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--spacing-sm) 0;
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin: 0 0 var(--spacing-sm) 0;
}

/* Layout Components */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-sm {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Header/Navigation */
.header {
  background-color: var(--primary-purple);
  color: var(--white);
  padding: var(--spacing-md) 0;
  box-shadow: var(--shadow-md);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: var(--text-2xl);
  font-weight: bold;
  margin: 0;
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: var(--text-base);
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* User Dropdown Menu */
.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-dropdown-toggle {
  background: none;
  border: none;
  color: var(--white);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  transition: background-color 0.2s;
  font-size: var(--text-base);
  min-height: 40px;
}

.user-dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.user-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  margin-top: var(--spacing-xs);
}

.user-dropdown.active .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-menu a {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--text-dark);
  text-decoration: none;
  transition: background-color 0.2s;
  border-radius: var(--radius-md);
  margin: var(--spacing-xs);
}

.user-dropdown-menu a:hover {
  background-color: var(--bg-light);
}

.dropdown-arrow {
  font-size: 0.8em;
  transition: transform 0.2s;
}

.user-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* Card Components */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.card-header {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid #E5E7EB;
}

.card-title {
  margin: 0;
  color: var(--text-dark);
}

/* Form Components */
.form-container {
  max-width: 400px;
  margin: var(--spacing-xl) auto;
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--text-dark);
}

.form-input,
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.form-input:focus,
.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input:invalid,
input:invalid {
  border-color: var(--error);
}

/* Django form styling */
.form-group p {
  margin: 0;
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--text-dark);
}

.helptext {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-top: var(--spacing-xs);
}

.errorlist {
  list-style: none;
  padding: 0;
  margin: var(--spacing-xs) 0 0 0;
}

.errorlist li {
  color: var(--error);
  font-size: var(--text-sm);
  background-color: #FEE2E2;
  padding: var(--spacing-xs);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-xs);
}

/* Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
  min-height: 44px;
  gap: var(--spacing-xs);
  vertical-align: middle;
  box-sizing: border-box;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), #1D4ED8);
  color: var(--white);
  border: 1px solid var(--primary-blue);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1D4ED8, var(--primary-blue));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--accent-purple), #9333EA);
  color: var(--white);
  border: 1px solid var(--accent-purple);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #9333EA, var(--accent-purple));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-blue);
  border: 1px solid #93C5FD;
}

.btn-outline:hover {
  background: linear-gradient(135deg, #60A5FA, #93C5FD);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Button States */
.btn:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn:disabled:hover,
.btn[disabled]:hover {
  transform: none !important;
}

.btn-lg {
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: var(--text-lg);
  min-height: 52px;
}

.btn-sm {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: var(--text-sm);
  min-height: 24px;
  line-height: 1.1;
}

/* Additional Button Variants */
.btn-success {
  background: linear-gradient(135deg, var(--success-green), #059669);
  color: var(--white);
  border: 1px solid var(--success-green);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669, var(--success-green));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-disabled {
  background-color: var(--text-light);
  color: var(--white);
  cursor: not-allowed;
  opacity: 0.7;
  border: 1px solid var(--text-light);
}

.btn-disabled:hover {
  background-color: var(--text-light);
  transform: none;
  box-shadow: var(--shadow-sm);
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-orange), #EA580C);
  color: var(--white);
  border: 1px solid var(--warning-orange);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #EA580C, var(--warning-orange));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-red), #B91C1C);
  color: var(--white);
  border: 1px solid var(--danger-red);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #B91C1C, var(--danger-red));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-xs {
  padding: 1px var(--spacing-sm);
  font-size: var(--text-xs);
  min-height: 15px !important;
  line-height: 1;
}

/* Additional Button Utilities */
.btn-full {
  width: 100%;
}

.btn-group {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.btn-group .btn {
  flex: 1;
  min-width: 0;
}

/* Ensure buttons maintain consistency when styled inline */
.btn[style*="width"] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Fix modal close button consistency */
.modal-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--spacing-xs);
  line-height: 1;
  transition: color 0.2s;
}

/* Message Components */
.message {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

.message-success {
  background-color: #DCFCE7;
  color: var(--success);
  border: 1px solid #BBF7D0;
}

.message-error {
  background-color: #FEE2E2;
  color: var(--error);
  border: 1px solid #FECACA;
}

.message-warning {
  background-color: #FEF3C7;
  color: var(--warning);
  border: 1px solid #FDE68A;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
  color: var(--white);
  text-align: center;
  padding: var(--spacing-xl) 0;
}

.hero-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--spacing-sm);
}

.hero-subtitle {
  font-size: var(--text-lg);
  margin-bottom: var(--spacing-lg);
  opacity: 0.9;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .header-content {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    text-align: center;
  }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .form-container {
    margin: var(--spacing-md) auto;
  }
  
  .card {
    padding: var(--spacing-md);
  }
  
  .btn {
    width: 100%;
    margin-bottom: var(--spacing-xs);
  }
}

@media (max-width: 480px) {
  .hero {
    padding: var(--spacing-lg) 0;
  }
  
  .hero-title {
    font-size: var(--text-2xl);
  }
  
  .card {
    padding: var(--spacing-sm);
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--white);
  padding: 0;
  border-radius: var(--radius-lg);
  max-width: 90%;
  max-height: 90%;
  width: 800px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
  color: var(--white);
  padding: var(--spacing-lg);
  position: relative;
}

.modal-title {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 600;
}

.modal-close {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: none;
  border: none;
  color: var(--white);
  font-size: var(--text-2xl);
  cursor: pointer;
  padding: var(--spacing-xs);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: var(--spacing-lg);
  max-height: 70vh;
  overflow-y: auto;
  color: var(--text-dark);
}

.modal-body h2 {
  color: var(--primary-purple);
  font-size: var(--text-xl);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.modal-body h2:first-child {
  margin-top: 0;
}

.modal-body p, .modal-body li {
  line-height: 1.6;
  margin-bottom: var(--spacing-sm);
}

.modal-body ul {
  margin-left: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.modal-body strong {
  color: var(--primary-purple);
}

.modal-body a {
  color: var(--primary-blue);
  text-decoration: none;
}

.modal-body a:hover {
  text-decoration: underline;
}

/* Modal responsive styles */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95%;
    max-height: 95%;
  }
  
  .modal-header {
    padding: var(--spacing-md);
  }
  
  .modal-title {
    font-size: var(--text-xl);
    margin-right: var(--spacing-xl);
  }
  
  .modal-body {
    padding: var(--spacing-md);
    max-height: 75vh;
  }
  
  .modal-body h2 {
    font-size: var(--text-lg);
  }
}

/* Jobs Table Styles */
.jobs-table-container {
  overflow-x: visible;
  margin: var(--spacing-md) 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  background: #FEFEFE;
  border: 1px solid #F0F0F0;
}

.jobs-table {
  width: 100%;
  border-collapse: collapse;
  background: #FEFEFE;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.jobs-table thead {
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
  color: var(--white);
}

.jobs-table thead th {
  padding: var(--spacing-md);
  text-align: left;
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.jobs-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.jobs-table tbody tr:hover {
  background: #F8F6FF;
  transform: scale(1.01);
}

.jobs-table tbody tr:last-child {
  border-bottom: none;
}

.jobs-table td {
  padding: var(--spacing-sm) var(--spacing-md);
  vertical-align: middle;
}

/* Company Logo Cell */
.company-logo-cell {
  width: 8%;
  text-align: center;
  padding: var(--spacing-xs) var(--spacing-sm);
}

.company-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--border-light);
}

.company-logo-placeholder {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-purple), var(--primary-blue));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: var(--text-xs);
  margin: 0 auto;
}

/* Company Name */
.company-name {
  font-weight: 600;
  color: var(--text-dark);
  width: 15%;
}

/* Job Title Cell */
.job-title {
  width: 25%;
}

.job-title strong {
  color: var(--primary-purple);
  font-size: var(--text-base);
  display: block;
  margin-bottom: 2px;
}

.job-meta {
  font-size: var(--text-xs);
  color: var(--text-light);
  line-height: 1.2;
}

/* Skills Cell */
.skills-cell {
  width: 25%;
}

.skills-display {
  font-size: var(--text-xs);
  color: var(--text-dark);
  line-height: 1.3;
}

.skill-tag {
  display: inline-block;
  background: var(--secondary-light);
  color: var(--primary-purple);
  padding: 2px 8px;
  margin: 2px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
}

/* Deadline Cell */
.deadline-cell {
  width: 12%;
}

.deadline {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  text-align: center;
  display: inline-block;
}

.deadline-active {
  background: var(--warning-light);
  color: var(--warning-dark);
  border: 1px solid var(--warning);
}

.deadline-passed {
  background: #FEE2E2;
  color: var(--danger-red);
  border: 1px solid var(--danger-red);
}

/* Apply Cell */
.apply-cell {
  width: 15%;
  text-align: center;
}

.btn-disabled {
  background-color: var(--text-light);
  color: var(--white);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-success {
  background-color: var(--success-green);
  color: var(--white);
  cursor: not-allowed;
  opacity: 0.8;
}

/* Text utilities for table */
.text-muted {
  color: var(--text-light);
  font-style: italic;
  font-size: var(--text-sm);
}

/* Responsive Table */
@media (max-width: 1024px) {
  .jobs-table-container {
    margin: 0 -var(--spacing-md);
  }
  
  .jobs-table {
    font-size: var(--text-sm);
  }
  
  .jobs-table th,
  .jobs-table td {
    padding: var(--spacing-xs) var(--spacing-sm);
  }
  
  .company-logo,
  .company-logo-placeholder {
    width: 36px;
    height: 36px;
  }
  
  .job-title strong {
    font-size: var(--text-sm);
  }
}

@media (max-width: 768px) {
  .jobs-table thead th {
    font-size: var(--text-xs);
    padding: var(--spacing-xs);
  }
  
  .jobs-table td {
    padding: var(--spacing-xs);
  }
  
  .company-logo,
  .company-logo-placeholder {
    width: 28px;
    height: 28px;
  }
  
  .company-logo-placeholder {
    font-size: var(--text-xs);
  }
  
  .job-title,
  .company-name,
  .skills-cell,
  .deadline-cell {
    min-width: auto;
  }
  
  .skills-display {
    font-size: var(--text-xs);
  }
  
  .btn-sm {
    padding: var(--spacing-xs) 6px;
    font-size: var(--text-xs);
    min-height: 22px;
  }
  
  .job-title strong {
    font-size: var(--text-xs);
  }
  
  .job-meta {
    font-size: 10px;
  }
}

/* Pagination Styles */
.pagination-container {
  margin: var(--spacing-lg) 0;
  border-top: 1px solid var(--border-light);
  padding-top: var(--spacing-md);
}

.pagination-info {
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.pagination-info p {
  color: var(--text-light);
  font-size: var(--text-sm);
  margin: 0;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.pagination-btn {
  padding: var(--spacing-xs) var(--spacing-md);
  border: 1px solid var(--border-light);
  background: var(--white);
  color: var(--primary-purple);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 60px;
  text-align: center;
}

.pagination-btn:hover {
  background: var(--primary-purple);
  color: var(--white);
  border-color: var(--primary-purple);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.pagination-current {
  padding: var(--spacing-xs) var(--spacing-md);
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
  color: var(--white);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  min-width: 120px;
  text-align: center;
}

/* Responsive Pagination */
@media (max-width: 768px) {
  .pagination {
    gap: var(--spacing-xs);
  }
  
  .pagination-btn,
  .pagination-current {
    padding: 6px var(--spacing-sm);
    font-size: var(--text-xs);
    min-width: 50px;
  }
  
  .pagination-current {
    min-width: 100px;
  }
}

/* Jobs Browse Layout with Sidebar */
.jobs-browse-container {
  display: flex;
  gap: var(--spacing-lg);
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--spacing-md);
}

/* Filter Sidebar */
.filter-sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  height: fit-content;
  position: sticky;
  top: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border-light);
}

.filter-header h3 {
  color: var(--primary-purple);
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0;
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-input,
.filter-select,
.filter-group input[type="text"],
.filter-group select {
  width: 100%;
  padding: var(--spacing-xs);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  transition: all 0.2s ease;
  height: 38px;
  line-height: 1.5;
  box-sizing: border-box;
}

.filter-input:focus,
.filter-select:focus,
.filter-group input[type="text"]:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 2px rgba(85, 18, 163, 0.1);
}

.filter-apply-btn {
  margin-top: var(--spacing-sm);
  width: 100%;
  justify-content: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: var(--text-xs);
}

/* Skills Filter Components */
.skills-input-container {
  position: relative;
}

.skills-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
}

.skill-category {
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--bg-light);
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}

.skill-item {
  padding: var(--spacing-xs) var(--spacing-sm);
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  font-size: var(--text-sm);
  transition: background-color 0.2s ease;
}

.skill-item:hover {
  background: var(--secondary-light);
  color: var(--primary-purple);
}

.skill-item:last-child {
  border-bottom: none;
}

.selected-skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-xs);
}

.selected-skill {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  background: var(--secondary-light);
  color: var(--primary-purple);
  padding: 2px var(--spacing-xs);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
}

.skill-remove {
  cursor: pointer;
  color: var(--danger-red);
  font-weight: bold;
  font-size: var(--text-sm);
  line-height: 1;
  padding: 2px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.skill-remove:hover {
  background: var(--danger-red);
  color: var(--white);
}

/* Main Content Area */
.jobs-main-content {
  flex: 1;
  min-width: 0; /* Allow flex shrinking */
}

.jobs-main-content .card {
  background: #FEFEFE;
  border: 1px solid #F0F0F0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .filter-sidebar {
    width: 200px;
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .jobs-browse-container {
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
  }
  
  .filter-sidebar {
    width: 100%;
    min-width: unset;
    position: static;
    order: 2; /* Show filters below main content on mobile */
  }
  
  .jobs-main-content {
    order: 1;
  }
  
  .filter-header {
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: stretch;
  }
  
  .filter-apply-btn {
    margin-top: var(--spacing-sm);
  }
}

/* Mobile Filter Toggle (optional enhancement) */
@media (max-width: 768px) {
  .filter-sidebar {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border: none;
    transition: all 0.3s ease;
  }
  
  .filter-sidebar.active {
    max-height: 1000px;
    padding: var(--spacing-lg);
    border: 1px solid var(--border-light);
  }
  
  .mobile-filter-toggle {
    display: block;
    width: 100%;
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  .mobile-filter-toggle:hover {
    background: var(--primary-blue);
  }
}

@media (min-width: 769px) {
  .mobile-filter-toggle {
    display: none;
  }
}

/* Clickable Links in Jobs Table */
.company-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s ease;
}

.company-link:hover {
  color: var(--primary-purple);
  transform: scale(1.05);
}

.company-link:hover .company-logo {
  border-color: var(--primary-purple);
  box-shadow: 0 2px 8px rgba(85, 18, 163, 0.2);
}

.company-link:hover .company-logo-placeholder {
  background: linear-gradient(135deg, var(--primary-purple), var(--primary-blue));
  box-shadow: 0 2px 8px rgba(85, 18, 163, 0.3);
}

.job-title-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s ease;
}

.job-title-link:hover {
  color: var(--primary-blue);
}

.job-title-link:hover strong {
  color: var(--primary-blue);
  text-decoration: underline;
}

/* Enhanced hover effects for table rows with clickable content */
.jobs-table tbody tr:hover .company-link,
.jobs-table tbody tr:hover .job-title-link {
  color: var(--primary-purple);
}

.jobs-table tbody tr:hover .job-title-link strong {
  color: var(--primary-blue);
}

/* Cursor styling */
.company-logo-cell,
.company-name,
.job-title {
  cursor: pointer;
}

/* Responsive clickable elements */
@media (max-width: 768px) {
  .company-link,
  .job-title-link {
    padding: 4px;
    border-radius: var(--radius-sm);
  }
  
  .company-link:hover,
  .job-title-link:hover {
    background: var(--secondary-light);
  }
}