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

:root {
  --bg-0: #f2f7f4;
  --bg-1: #e6eef7;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --ink: #15232d;
  --muted: #51606f;
  --accent: #0f766e;
  --accent-2: #d97706;
  --link: #0b5fc5;
  --yes: #0f9f66;
  --borderline: #b96a11;
  --no: #be2d2d;
  --border: rgba(21, 35, 45, 0.12);
  --shadow: 0 10px 30px rgba(15, 35, 50, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: 'Manrope', 'Avenir Next', 'Helvetica Neue', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1300px 700px at 8% -10%, rgba(15, 118, 110, 0.2), transparent 60%),
    radial-gradient(900px 560px at 96% -22%, rgba(217, 119, 6, 0.18), transparent 58%),
    linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0),
      rgba(255, 255, 255, 0) 18px,
      rgba(15, 35, 50, 0.015) 19px,
      rgba(15, 35, 50, 0.015) 20px
    );
  z-index: -1;
}

.container {
  max-width: 1700px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.4rem;
}

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
  animation: rise-in 0.46s ease both;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.72rem, 1.2rem + 2vw, 2.6rem);
  line-height: 1.14;
}

h3 {
  font-size: 1.16rem;
  margin-bottom: 0.55rem;
}

.kicker {
  font-size: 0.77rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 700;
}

nav {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #1f3343;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  padding: 0.44rem 0.88rem;
  font-size: 0.95rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  transition: transform 0.14s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

nav a:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 95, 197, 0.45);
  color: var(--link);
  background: #fff;
}

nav a.active,
nav a[aria-current='page'] {
  color: #fff;
  border-color: rgba(15, 118, 110, 0.7);
  background: linear-gradient(120deg, #0f766e, #118ab2);
  box-shadow: 0 8px 18px rgba(17, 138, 178, 0.22);
}

.profile-context-bar {
  margin-bottom: 0.9rem;
  padding: 0.6rem 0.75rem;
}

.profile-context-form {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.profile-context-form label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: #3b4b58;
}

.profile-context-form select {
  min-width: 280px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.panel {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-strong) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.92rem 0.95rem;
  box-shadow: var(--shadow);
  overflow-x: auto;
  overflow-y: visible;
  animation: rise-in 0.46s ease both;
}

.panel + .panel,
section.panel + section.panel,
div.panel + div.panel {
  margin-top: 0.9rem;
}

.panel > :first-child {
  margin-top: 0;
}

.panel > :last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.78rem;
}

.stat {
  padding: 0.9rem 0.95rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 252, 251, 0.98) 100%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(217, 119, 6, 0.08));
  border: 1px solid rgba(15, 35, 50, 0.11);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 35, 50, 0.06);
  animation: rise-in 0.46s ease both;
}

.stat strong {
  font-size: clamp(1.24rem, 1.05rem + 0.8vw, 1.6rem);
  display: block;
  margin-top: 0.18rem;
}

.muted {
  color: var(--muted);
}

.alert {
  border-radius: 12px;
  padding: 0.72rem 0.9rem;
  margin-bottom: 0.85rem;
  border: 1px solid;
  font-weight: 600;
  animation: rise-in 0.36s ease both;
}

.alert.info {
  background: #ecfbf7;
  border-color: rgba(15, 118, 110, 0.3);
  color: #0f5f58;
}

.alert.error {
  background: #fff2f2;
  border-color: rgba(190, 45, 45, 0.32);
  color: #952222;
}

form {
  margin: 0;
}

form.inline {
  display: inline-flex;
  gap: 0.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

form.inline label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.83rem;
  color: #3b4b58;
  font-weight: 700;
}

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

input,
select,
textarea {
  border: 1px solid rgba(15, 35, 50, 0.18);
  background: #fff;
  border-radius: var(--radius-md);
  padding: 0.52rem 0.62rem;
  color: var(--ink);
  min-height: 2.38rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

textarea {
  min-height: 8.4rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(17, 138, 178, 0.7);
  box-shadow: 0 0 0 3px rgba(17, 138, 178, 0.16);
  outline: none;
}

button {
  border: 1px solid rgba(10, 95, 143, 0.4);
  border-radius: 12px;
  background: linear-gradient(120deg, #0b5fc5, #118ab2);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.5rem 0.86rem;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(17, 138, 178, 0.24);
  filter: saturate(1.05);
}

button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.secondary {
  background: #fff;
  border-color: rgba(15, 35, 50, 0.2);
  color: #253744;
  box-shadow: none;
}

button.secondary:hover {
  border-color: rgba(11, 95, 197, 0.4);
  color: #144272;
  box-shadow: 0 7px 14px rgba(17, 138, 178, 0.11);
}

table {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom: 1px solid rgba(15, 35, 50, 0.09);
  text-align: left;
  padding: 0.68rem 0.62rem;
  font-size: 0.92rem;
  vertical-align: top;
}

thead th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #3e4f5e;
  background: rgba(238, 245, 248, 0.8);
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:nth-child(even) td {
  background: rgba(248, 251, 252, 0.6);
}

tbody tr:hover td {
  background: rgba(228, 242, 247, 0.84);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 0.2rem 0.54rem;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
}

.badge.yes {
  color: #0a7f49;
  border-color: rgba(15, 159, 102, 0.35);
  background: #e9fdf3;
}

.badge.created {
  color: #0f6b3c;
  border-color: rgba(15, 159, 102, 0.3);
  background: #ebfbf2;
}

.badge.path_set {
  color: #8a5b0d;
  border-color: rgba(185, 106, 17, 0.3);
  background: #fff8e9;
}

.badge.missing {
  color: #5f6b76;
  border-color: rgba(95, 107, 118, 0.25);
  background: #f7f9fb;
}

.badge.borderline {
  color: var(--borderline);
  border-color: rgba(185, 106, 17, 0.32);
  background: #fff7e8;
}

.badge.no {
  color: var(--no);
  border-color: rgba(190, 45, 45, 0.3);
  background: #fff1f1;
}

.badge.to_apply,
.badge.review,
.badge.applied,
.badge.skipped {
  border-color: rgba(51, 67, 84, 0.24);
  background: #f2f7fb;
  color: #344354;
}

.columns-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 0.86rem;
}

.columns-2 table {
  min-width: 0;
}

.applied-table th:last-child,
.applied-table td:last-child {
  width: 170px;
  white-space: nowrap;
}

.jobs-top-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.drawer-link {
  font-weight: 800;
  white-space: nowrap;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 35, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 40;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.applied-drawer {
  position: fixed;
  right: 0;
  top: 0;
  width: min(760px, 94vw);
  height: 100vh;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, #ffffff 100%);
  border-left: 1px solid var(--border);
  box-shadow: -16px 0 34px rgba(13, 29, 42, 0.2);
  transform: translateX(104%);
  transition: transform 0.24s ease;
  z-index: 41;
  padding: 0.95rem 1rem 1.1rem;
  overflow: auto;
}

.applied-drawer.open {
  transform: translateX(0);
}

.applied-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(15, 35, 50, 0.08);
  padding-bottom: 0.5rem;
  margin-bottom: 0.45rem;
  z-index: 2;
}

.applied-drawer-content {
  overflow: auto;
}

body.drawer-open {
  overflow: hidden;
}

code,
code.path {
  font-family: 'IBM Plex Mono', 'Menlo', 'Consolas', monospace;
  word-break: break-all;
  font-size: 0.8rem;
  background: #f2f7fb;
  border: 1px solid rgba(15, 35, 50, 0.14);
  border-radius: 6px;
  padding: 0.13rem 0.3rem;
}

pre.desc {
  white-space: pre-wrap;
  background: #fbfdff;
  border: 1px solid rgba(15, 35, 50, 0.14);
  padding: 0.85rem;
  border-radius: 10px;
  max-height: 460px;
  overflow: auto;
  line-height: 1.4;
}

details {
  border: 1px solid rgba(15, 35, 50, 0.13);
  border-radius: 11px;
  padding: 0.55rem 0.68rem;
  background: rgba(255, 255, 255, 0.7);
}

summary {
  cursor: pointer;
}

.login-page .container {
  max-width: 560px;
  margin-top: 8vh;
}

.login-page .panel {
  padding: 1.2rem 1.15rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .container {
    padding: 1rem 0.75rem 1.6rem;
  }

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

  form.inline {
    display: flex;
    width: 100%;
    align-items: stretch;
  }

  form.inline > * {
    width: 100%;
  }

  nav {
    width: 100%;
  }

  nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .jobs-top-actions {
    align-items: flex-start;
  }

  .profile-context-form select {
    min-width: 100%;
  }

  table {
    min-width: 100%;
  }

  button,
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .applied-drawer {
    width: 100vw;
    max-width: 100vw;
    border-left: 0;
    box-shadow: none;
  }
}

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

  .applied-table th:last-child,
  .applied-table td:last-child {
    white-space: normal;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}
