:root {
  --background: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f9fafb;

  --text: #111827;
  --muted: #6b7280;

  --border: #e5e7eb;

  --primary: #2563eb;
  --primary-dark: #1d4ed8;

  --radius: 14px;

  --shadow:
    0 4px 18px rgba(15, 23, 42, 0.06);
}


* {
  box-sizing: border-box;
}


body {
  margin: 0;

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);
  background: var(--background);
}


button,
input,
textarea,
select {
  font: inherit;
}


button {
  cursor: pointer;
}


.hidden {
  display: none !important;
}


/* =========================
   LOGIN
   ========================= */

.auth-page {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 30px;

  background:
    radial-gradient(
      circle at top left,
      #dbeafe,
      transparent 35%
    ),
    var(--background);
}


.auth-card {
  width: 100%;
  max-width: 420px;

  background: white;

  padding: 38px;

  border: 1px solid var(--border);
  border-radius: 20px;

  box-shadow: var(--shadow);
}


.brand {
  display: flex;
  align-items: center;

  gap: 12px;

  margin-bottom: 8px;
}


.brand h1 {
  margin: 0;
  font-size: 30px;
}


.brand-icon {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 11px;

  background: var(--primary);
  color: white;

  font-weight: 700;
  font-size: 20px;
}


.subtitle {
  color: var(--muted);
  line-height: 1.6;

  margin-bottom: 30px;
}


label {
  display: block;

  margin-top: 18px;
  margin-bottom: 7px;

  font-size: 14px;
  font-weight: 600;
}


input,
textarea,
select {
  width: 100%;

  padding: 12px 14px;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: white;

  outline: none;
}


input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
}


textarea {
  min-height: 110px;
  resize: vertical;
}


.auth-card button,
.primary-button {
  width: 100%;

  margin-top: 24px;

  padding: 13px 18px;

  border: 0;
  border-radius: 10px;

  background: var(--primary);
  color: white;

  font-weight: 600;
}


.auth-card button:hover,
.primary-button:hover {
  background: var(--primary-dark);
}


/* =========================
   APP LAYOUT
   ========================= */

#app-view {
  min-height: 100vh;
}


.sidebar {
  position: fixed;

  top: 0;
  left: 0;
  bottom: 0;

  width: 240px;

  padding: 28px 20px;

  background: #111827;

  color: white;

  display: flex;
  flex-direction: column;
}


.sidebar-brand {
  display: flex;
  align-items: center;

  gap: 11px;

  font-size: 20px;
  font-weight: 700;

  margin-bottom: 36px;
}


.sidebar nav {
  display: flex;
  flex-direction: column;

  gap: 7px;
}


.nav-item,
.logout-button {
  width: 100%;

  padding: 11px 13px;

  text-align: left;

  border: 0;
  border-radius: 9px;

  background: transparent;
  color: #d1d5db;
}


.nav-item:hover,
.nav-item.active {
  background: #1f2937;
  color: white;
}


.logout-button {
  margin-top: auto;
}


.main-content {
  margin-left: 240px;

  padding: 42px;

  min-height: 100vh;
}


.page-view {
  max-width: 1320px;
  margin: 0 auto;
}


.page-header {
  display: flex;
  justify-content: space-between;

  margin-bottom: 30px;
}


.page-header h1 {
  margin: 4px 0 8px;

  font-size: 32px;
}


.page-header p {
  color: var(--muted);

  margin-top: 5px;
}


.eyebrow {
  margin: 0 !important;

  color: var(--primary) !important;

  font-size: 12px;
  font-weight: 700;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* =========================
   DASHBOARD
   ========================= */

.stats-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 18px;

  margin-bottom: 25px;
}


.stat-card,
.content-card,
.form-section {
  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: var(--radius);

  box-shadow: var(--shadow);
}


.stat-card {
  padding: 22px;
}


.stat-card span {
  display: block;

  color: var(--muted);

  font-size: 13px;
}


.stat-card strong {
  display: block;

  margin-top: 10px;

  font-size: 30px;
}


.content-card {
  padding: 25px;
}


.section-heading {
  display: flex;
  justify-content: space-between;

  margin-bottom: 20px;
}


.section-heading h2 {
  margin: 0 0 5px;
}


.section-heading p {
  margin: 0;
  color: var(--muted);
}


/* =========================
   FILTERS
   ========================= */

.filters {
  display: grid;

  grid-template-columns:
    2fr 1fr 1fr 1fr;

  gap: 12px;

  margin-bottom: 22px;
}


/* =========================
   JOBS
   ========================= */

.jobs-list {
  display: grid;
  gap: 15px;
}


.job-card {
  padding: 22px;

  background: white;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  box-shadow: var(--shadow);
}


.empty-state {
  padding: 35px;

  text-align: center;

  color: var(--muted);

  border: 1px dashed #d1d5db;
  border-radius: 12px;
}


/* =========================
   APPLICATION PIPELINE
   ========================= */

.pipeline {
  display: grid;

  grid-template-columns:
    repeat(5, minmax(210px, 1fr));

  gap: 14px;

  overflow-x: auto;
}


.pipeline-column {
  min-height: 420px;

  padding: 15px;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--surface-soft);
}


.pipeline-column h3 {
  margin-top: 0;
}


/* =========================
   PROFILE
   ========================= */

.profile-form {
  display: grid;

  gap: 20px;
}


.form-section {
  padding: 24px;
}


.form-section h2 {
  margin-top: 0;
  font-size: 18px;
}


.country-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 9px;

  margin-top: 18px;
}


.country-option {
  display: flex;
  align-items: center;

  gap: 8px;

  padding: 10px;

  border: 1px solid var(--border);
  border-radius: 9px;
}


.country-option input {
  width: auto;
  margin: 0;
}


.range-row {
  display: flex;
  align-items: center;

  gap: 20px;
}


.range-row input {
  padding: 0;
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1000px) {

  .sidebar {
    width: 190px;
  }

  .main-content {
    margin-left: 190px;
    padding: 28px;
  }

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

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

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

}


@media (max-width: 700px) {

  .sidebar {
    position: static;

    width: 100%;

    min-height: auto;
  }

  .sidebar nav {
    display: grid;

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

  .main-content {
    margin-left: 0;

    padding: 20px;
  }

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

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

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

}

/* =========================================================
   RADAR JOB CARDS
   ========================================================= */

.job-card-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.job-card h2 {
  margin: 5px 0;
  font-size: 19px;
  line-height: 1.35;
}

.job-meta {
  color: var(--muted);
  font-size: 13px;
}

.institution {
  margin: 5px 0 12px;
  color: var(--muted);
}

.match-score {
  min-width: 78px;
  height: 64px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--border);
  border-radius: 12px;

  font-size: 20px;
  font-weight: 700;
}

.match-score small {
  margin-top: 2px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

.match-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;

  margin: 15px 0;
}

.match-reasons span {
  padding: 6px 9px;

  border-radius: 7px;

  background: #f0fdf4;

  font-size: 12px;
}

.job-actions {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-top: 18px;
}

.job-actions select {
  width: auto;
  min-width: 135px;

  margin-left: auto;
}

.job-link {
  display: inline-block;

  padding: 9px 13px;

  border: 1px solid var(--border);
  border-radius: 8px;

  color: var(--primary);
  text-decoration: none;

  font-size: 13px;
  font-weight: 600;
}

.job-link:hover {
  background: #f8fafc;
}

.deadline-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;

  padding: 15px 0;

  border-bottom: 1px solid var(--border);
}

.deadline-item:last-child {
  border-bottom: 0;
}


/* mobile */

@media (max-width: 700px) {

  .job-card-top {
    flex-direction: column;
  }

  .match-score {
    width: 80px;
  }

  .job-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .job-actions select {
    width: 100%;
    margin-left: 0;
  }

  .deadline-item {
    flex-direction: column;
  }

}
