@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary-navy: #0f172a;
  --secondary-slate: #1e293b;
  --brand-blue: #1d4ed8;
  --brand-blue-hover: #1e40af;
  --accent-orange: #ea580c;
  --accent-green: #15803d;
  --accent-purple: #7e22ce;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
  --border-subtle: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-hover: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Bar */
.top-bar {
  background-color: var(--primary-navy);
  color: #e2e8f0;
  font-size: 13px;
  padding: 8px 0;
}

.top-bar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-sync-sm {
  background-color: rgba(255,255,255,0.15);
  color: #ffffff;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s;
}

.btn-sync-sm:hover {
  background-color: var(--brand-blue);
}

/* Header Navbar */
header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
}

.nav-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background-color: var(--brand-blue);
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.brand-text h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--primary-navy);
}

.brand-text h1 span {
  color: var(--brand-blue);
}

.brand-text p {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
}

.nav-search {
  flex: 1;
  max-width: 580px;
  position: relative;
}

.nav-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 15px;
}

.nav-search input {
  width: 100%;
  padding: 11px 16px 11px 44px;
  border-radius: 30px;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-page);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.nav-search input:focus {
  border-color: var(--brand-blue);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

/* Main Wrapper */
.main-wrapper {
  padding: 24px 20px 48px 20px;
}

/* Filter Box */
.filter-box {
  background-color: #ffffff;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Type Pills */
.type-pills {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.type-pill {
  padding: 8px 18px;
  border-radius: 20px;
  background-color: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.type-pill:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.type-pill.active {
  background-color: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

/* Sector Chips */
.sector-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sector-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 6px 14px;
  border-radius: 16px;
  background-color: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.chip:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.chip.active {
  background-color: var(--primary-navy);
  color: #ffffff;
  border-color: var(--primary-navy);
}

/* Urgent Banner */
.urgent-banner {
  background-color: #fff7ed;
  border: 1px solid #ffedd5;
  border-left: 4px solid var(--accent-orange);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.urgent-tag {
  background-color: var(--accent-orange);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

.urgent-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #9a3412;
}

/* Meta Bar */
.meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s;
  cursor: pointer;
}

.card:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-blue);
  background-color: #eff6ff;
  padding: 2px 7px;
  border-radius: 4px;
}

.ai-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: #7e22ce;
  background-color: #faf5ff;
  border: 1px solid #e9d5ff;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.official-badge {
  font-size: 10.5px;
  font-weight: 800;
  color: #15803d;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.type-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.type-tag.job { background-color: #eff6ff; color: var(--brand-blue); }
.type-tag.admit_card { background-color: #faf5ff; color: var(--accent-purple); }
.type-tag.result { background-color: #f0fdf4; color: var(--accent-green); }

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-navy);
  line-height: 1.4;
  margin-bottom: 14px;
  text-decoration: none;

.card-title:hover {
  color: var(--brand-blue);
}

/* Expired Card Styling (Faded out for passed deadlines) */
.card.expired-card {
  opacity: 0.62;
  filter: grayscale(35%);
  background-color: #f8fafc;
  border-color: #cbd5e1;
  transition: all 0.2s ease;
}

.card.expired-card:hover {
  opacity: 0.95;
  filter: grayscale(0%);
  transform: translateY(-2px);
}

.expired-badge {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.last-date-box.expired {
  background-color: #f1f5f9;
  border-left-color: #94a3b8;
}

.last-date-box.expired .date-val {
  color: #64748b;
  text-decoration: line-through;
}

/* Prominent Last Date Box */
.last-date-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: #f8fafc;
  border-left: 3px solid var(--brand-blue);
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.last-date-box.urgent {
  background-color: #fff1f2;
  border-left-color: #e11d48;
}

.date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.date-lbl {
  color: var(--text-muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.date-val {
  font-weight: 700;
  color: var(--text-dark);
}

.extended-badge {
  font-size: 11px;
  font-weight: 800;
  color: #c2410c;
  background-color: #fff7ed;
  border: 1px solid #ffedd5;
  padding: 3px 8px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

/* Modal Overlay & Glassmorphic Job Card */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  background-color: #ffffff;
  width: 100%;
  max-width: 620px;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  animation: slideUp 0.25s ease-out;
}

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

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #f1f5f9;
  border: none;
  font-size: 24px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.modal-header {
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.type-pills, .status-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.status-pill {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-pill:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.status-pill.active {
  background-color: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 10px;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-summary-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--brand-blue);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #334155;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.modal-grid-item {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.m-lbl {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.m-val {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.modal-timeline {
  background-color: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 14px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-footer {
  padding: 16px 24px;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-apply-lg {
  background-color: var(--brand-blue);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
}

.btn-apply-lg:hover {
  background-color: var(--brand-blue-hover);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }
}

.last-date-box.normal .date-val {
  color: var(--accent-green);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--border-light);
}

.source-lbl {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
}

.btn-apply {
  background-color: var(--brand-blue);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s;
}

.btn-apply:hover {
  background-color: var(--brand-blue-hover);
}

/* Loading & Empty States */
.state-box {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
}

.spinner {
  font-size: 36px;
  color: var(--brand-blue);
  margin-bottom: 16px;
}

.empty-icon {
  font-size: 48px;
  color: var(--text-light);
  margin-bottom: 16px;
}

/* Footer */
footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* Breakpoints */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .cards-grid { grid-template-columns: 1fr; }
  .filter-box { padding: 12px; }
  .type-pills { overflow-x: auto; scrollbar-width: none; }
}
