/* VVVSI Job Portal - Design System & Styling */
:root {
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-light: #ccfbf1;
  --primary-dark: #115e59;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Header & Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-dark);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.1;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-item a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-item a:hover, .nav-item a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-light);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-dark);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  color: white;
  padding: 4rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 2.25rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Search Box */
.search-card {
  background: white;
  padding: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.2fr auto;
  gap: 0.75rem;
  align-items: center;
}

.search-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.search-input-group input, .search-input-group select {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.85rem;
  font-weight: 800;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Layout Grid */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.page-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-dark);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.jobs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
}

/* Sidebar Filters */
.filter-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: sticky;
  top: 90px;
  box-shadow: var(--shadow-sm);
}

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

.filter-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.filter-option input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Job Cards List */
.jobs-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.job-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.job-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.company-logo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
}

.job-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.company-name {
  color: var(--primary-hover);
  font-weight: 600;
  font-size: 0.95rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-teal {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.badge-gold {
  background: var(--accent-light);
  color: #b45309;
}

.badge-gray {
  background: #f1f5f9;
  color: #475569;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.job-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

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

/* Modal Styling */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* Form Controls */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.form-group input, .form-group select, .form-group textarea {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* Footer */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 4rem 1.5rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: white;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid #334155;
  text-align: center;
  font-size: 0.85rem;
}

.simulator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Responsive Mobile Navigation, Layout & Utilities */
@media (max-width: 900px) {
  .simulator-grid {
    grid-template-columns: 1fr;
  }
  /* Navbar responsiveness: Multi-row layout with sideways scrollable tabs */
  .navbar {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    position: sticky;
    top: 0;
  }
  
  .brand {
    flex: 1;
    min-width: 150px;
  }
  
  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  
  .brand-text h1 {
    font-size: 1rem;
  }
  
  .brand-text span {
    display: none; /* Hide long subtitle to fit actions */
  }
  
  nav {
    width: 100%;
    order: 3; /* Push navigation links to the second row */
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.25rem 0;
    border-top: 1px solid #f1f5f9;
  }
  
  nav::-webkit-scrollbar {
    display: none;
  }
  
  .nav-links {
    display: flex !important; /* Force override display: none */
    gap: 0.5rem;
    padding: 0;
    margin: 0;
  }
  
  .nav-item a {
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 0.4rem 0.75rem;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
  }
  
  .nav-item a.active {
    background: var(--primary-light);
    color: var(--primary-dark);
  }
  
  .nav-actions {
    order: 2;
    gap: 0.4rem;
  }
  
  .nav-actions select {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    height: 34px;
  }
  
  .nav-actions .btn-primary {
    display: none; /* Hide primary "Post Job" action button to save space */
  }
  
  .nav-actions .btn-outline {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    height: 34px;
  }

  /* Main Layout & Hero Elements */
  .jobs-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .filter-card {
    position: static;
    padding: 1.2rem;
  }
  
  .hero {
    padding: 2.5rem 1rem;
  }
  
  .hero-title {
    font-size: 1.85rem;
    line-height: 1.25;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
  
  /* Hero Search Card Stacking */
  .search-card {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.75rem;
  }
  
  .search-input-group {
    padding: 0.6rem 0.85rem;
  }
  
  .search-card button {
    width: 100%;
    margin-top: 0.25rem;
  }
  
  .stats-bar {
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: space-around;
  }
  
  .stat-number {
    font-size: 1.4rem;
  }
  
  /* Footer responsive layout */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  footer {
    padding: 3rem 1rem 1.5rem 1rem;
    margin-top: 3rem;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Toast overlay docked to bottom full width on small screens */
  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
    width: auto;
  }
}

/* Scrollable container for tables on small viewports */
.responsive-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.responsive-table-container table {
  margin-bottom: 0;
  min-width: 600px; /* Force scrollable context if headers squish */
}

/* Toast Notifications Container */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 380px;
  width: 100%;
}

.toast-card {
  background: white;
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
}

.toast-card.priority-high {
  border-left-color: #dc2626;
  background: #fff5f5;
}

.toast-card.priority-low {
  border-left-color: #64748b;
}

.toast-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-muted);
}

@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Community Wall & Message HR PM Cards */
.community-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.community-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}



