/* Import theme system */
@import url('../../theme.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html,
body {
  height: 100%;
  width: 100%;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  letter-spacing: 0.2px;
  background-color: var(--bg-secondary, #f8f9fa);
  color: var(--text-primary, #333);
  overflow-x: hidden;
}

/* Particle Canvas */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}


/* Enhanced Header */
header {
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  color: #fff;
  padding: 25px 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(27, 67, 50, 0.3);
  position: relative;
  overflow: hidden;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.header-icon {
  font-size: 28px;
  opacity: 0.9;
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  flex: 1;
  text-align: center;
}

/* Back Button Styling */
.back-button {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.back-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.back-button:hover::before {
  left: 100%;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.back-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: headerGlow 4s ease-in-out infinite alternate;
}

@keyframes headerGlow {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 0.8; transform: scale(1.1); }
}

.container {
  height: calc(100% - 80px);
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto;
}

/* Tabs */
.tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 20px 15px;
  cursor: pointer;
  font-weight: 500;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #666;
}

.tab:hover {
  background: rgba(27, 67, 50, 0.05);
  color: #1b4332;
}

.tab.active {
  color: #1b4332;
  font-weight: 600;
  background: rgba(27, 67, 50, 0.08);
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 4px;
  background: linear-gradient(90deg, #1b4332, #2d6a4f);
  border-radius: 4px 4px 0 0;
  animation: tabSlide 0.3s ease-out;
}

@keyframes tabSlide {
  0% { width: 0; left: 50%; }
  100% { width: 50%; left: 25%; }
}

.content {
  flex: 1;
  padding: 30px 20px;
  overflow-y: auto;
  display: none;
  animation: contentFadeIn 0.4s ease-out;
}

.content.active {
  display: block;
}

@keyframes contentFadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card {
  background: var(--bg-primary, rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 32px var(--shadow-light, rgba(0, 0, 0, 0.1));
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1b4332, #2d6a4f, #40916c);
  border-radius: 16px 16px 0 0;
}

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

.card-header {
  margin-bottom: 25px;
  border-bottom: 2px solid #f8f9fa;
  padding-bottom: 15px;
}

.card-header h2 {
  color: #1b4332;
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.card-header p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

/* Form Styling */
.enhanced-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.form-group label {
  font-size: 14px;
  color: #1b4332;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group label i {
  color: #2d6a4f;
  font-size: 16px;
}

input,
textarea,
select {
  font-family: 'Inter', sans-serif;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: var(--bg-primary, rgba(255, 255, 255, 0.8));
  color: var(--text-primary, #333);
  backdrop-filter: blur(5px);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
  transform: translateY(-1px);
}

input:valid,
textarea:valid,
select:valid {
  border-color: #40916c;
}

/* Buttons */
.enhanced-btn {
  padding: 16px 40px;
  background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(45, 106, 79, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.enhanced-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.enhanced-btn:hover::before {
  left: 100%;
}

.enhanced-btn:hover {
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(45, 106, 79, 0.4);
}

.enhanced-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(45, 106, 79, 0.3);
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 40px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.section-header h2,
.section-header h3 {
  color: #1b4332;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Stats and Badges */
.job-stats,
.alert-stats {
  display: flex;
  gap: 10px;
}

.stat-badge {
  background: linear-gradient(135deg, #2d6a4f, #40916c);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.2);
}

.stat-badge.urgent {
  background: linear-gradient(135deg, #e63946, #dc2626);
}

.stat-badge.normal {
  background: linear-gradient(135deg, #0077be, #0096c7);
}

.enhanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

/* Job Cards */
.posted-job {
  background: var(--bg-primary, rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(10px);
  padding: 25px;
  border-radius: 16px;
  border: 1px solid rgba(45, 106, 79, 0.1);
  box-shadow: 0 8px 32px var(--shadow-light, rgba(0, 0, 0, 0.1));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.posted-job::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2d6a4f, #40916c);
  border-radius: 16px 16px 0 0;
}

.posted-job:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.posted-job h4 {
  margin-bottom: 12px;
  font-size: 18px;
  color: #1b4332;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #2d6a4f, #40916c);
  color: #fff;
  border-radius: 25px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: auto;
  width: fit-content;
}

.news-link:hover {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
}

/* Delete Button */
.delete-btn {
  margin-top: 15px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #e63946, #dc2626);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.delete-btn:hover {
  background: linear-gradient(135deg, #c1121f, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

/* Icon Buttons */
.icon-btn {
  background: linear-gradient(135deg, #2d6a4f, #40916c);
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.2);
}

.icon-btn:hover {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.3);
}

/* No Content Messages */
.no-content-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary, #666);
  background: var(--bg-secondary, rgba(255, 255, 255, 0.5));
  border-radius: 16px;
  border: 2px dashed #ddd;
  margin: 20px 0;
}

.no-content-message i {
  font-size: 48px;
  color: #ccc;
  margin-bottom: 15px;
}

.no-content-message h4 {
  font-size: 18px;
  color: #555;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.posted-job p i {
  color: #2d6a4f;
  width: 16px;
}

/* Alert Cards */
.alert-card {
  background: var(--bg-primary, rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(10px);
  padding: 25px;
  border-radius: 16px;
  border-left: 5px solid #2d6a4f;
  box-shadow: 0 8px 32px var(--shadow-light, rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
  position: relative;
}

.alert-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.alert-card h4 {
  margin-bottom: 10px;
  font-size: 18px;
  color: #2d6a4f;
  font-weight: 600;
}

.alert-card.urgent {
  border-left-color: #e63946;
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.05), rgba(255, 255, 255, 0.95));
}

.alert-card.urgent h4 {
  color: #e63946;
}

/* News Cards */
.news-card {
  background: var(--bg-primary, rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 32px var(--shadow-light, rgba(0, 0, 0, 0.1));
  padding: 25px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(45, 106, 79, 0.1);
  position: relative;
  overflow: hidden;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0077be, #0096c7);
  border-radius: 16px 16px 0 0;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.news-title {
  font-size: 18px;
  font-weight: 600;
  color: #1b4332;
  margin-bottom: 12px;
  line-height: 1.4;
}

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #2d6a4f, #40916c);
  color: #fff;
  border-radius: 25px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: auto;
  width: fit-content;
}

.news-link:hover {
  background-color: #1b4332;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
}

/* Delete Button */
.delete-btn {
  margin-top: 15px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #e63946, #dc2626);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.delete-btn:hover {
  background: linear-gradient(135deg, #c1121f, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

/* Icon Buttons */
.icon-btn {
  background: linear-gradient(135deg, #2d6a4f, #40916c);
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.2);
}

.error-message {
  color: red;
  font-size: 12px;
  display: block;
  margin-top: 4px;
}
.icon-btn:hover {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.3);
}

/* No Content Messages */
.no-content-message {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  border: 2px dashed #ddd;
  margin: 20px 0;
}

.no-content-message i {
  font-size: 48px;
  color: #ccc;
  margin-bottom: 15px;
}

.no-content-message h4 {
  font-size: 18px;
  color: #555;
  margin-bottom: 8px;
}

/* Loading Spinner */
.loading-spinner {
  text-align: center;
  padding: 40px;
  color: #666;
}

.loading-spinner i {
  font-size: 32px;
  color: #2d6a4f;
  margin-bottom: 15px;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.show {
  display: flex;
}

.loading-content {
  background: var(--bg-primary, white);
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 20px 60px var(--shadow-heavy, rgba(0, 0, 0, 0.3));
}

.loading-content i {
  font-size: 32px;
  color: #2d6a4f;
  margin-bottom: 15px;
}

/* Toast Notifications */
#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-primary, white);
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 32px var(--shadow-medium, rgba(0, 0, 0, 0.15));
  border-left: 4px solid #2d6a4f;
  min-width: 300px;
  animation: toastSlideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast.success {
  border-left-color: #40916c;
}

.toast.error {
  border-left-color: #e63946;
}

.toast.warning {
  border-left-color: #f77f00;
}

@keyframes toastSlideIn {
  0% { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 20px;
  }

  .header-content {
    flex-direction: row;
    gap: 10px;
    padding: 0 10px;
  }

  .header-icon {
    font-size: 24px;
  }

  .back-button {
    font-size: 12px;
    padding: 8px 15px;
    min-width: fit-content;
    white-space: nowrap;
  }

  .tab {
    font-size: 14px;
    padding: 15px 10px;
    flex-direction: column;
    gap: 4px;
  }

  .tab span {
    font-size: 12px;
  }

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

  .enhanced-btn {
    width: 100%;
  }

  .enhanced-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .job-stats,
  .alert-stats {
    flex-wrap: wrap;
  }

  #toastContainer {
    right: 10px;
    left: 10px;
  }

  .toast {
    min-width: unset;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 20px 15px;
  }

  .card {
    padding: 20px;
    margin-bottom: 20px;
  }

  .card-header h2 {
    font-size: 20px;
  }

  .posted-job,
  .alert-card,
  .news-card {
    padding: 20px;
  }

  .header-content {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }

  .header-content h1 {
    order: 1;
    font-size: 18px;
  }

  .header-icon {
    order: 0;
    font-size: 20px;
  }

  .back-button {
    order: 2;
    font-size: 11px;
    padding: 6px 12px;
    margin-top: 5px;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #2d6a4f, #40916c);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
}

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
  40%, 43% { transform: translate3d(0, -15px, 0); }
  70% { transform: translate3d(0, -7px, 0); }
  90% { transform: translate3d(0, -2px, 0); }
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-bounce {
  animation: bounce 1s;
}

/* Priority Indicators */
.priority-high {
  border-left-color: #e63946 !important;
}

.priority-medium {
  border-left-color: #f77f00 !important;
}

.priority-low {
  border-left-color: #40916c !important;
}

/* Status Indicators */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: rgba(64, 145, 108, 0.1);
  color: #40916c;
}

.status-badge.urgent {
  background: rgba(230, 57, 70, 0.1);
  color: #e63946;
}

.status-badge.completed {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.status-badge.expired {
  background: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}