:root {
  --page-bg: #f5f7fa;
  --page-bg-alt: #ebeefc;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --surface-soft: #f7f9ff;
  --line: rgba(58, 114, 211, 0.16);
  --line-strong: rgba(58, 114, 211, 0.28);
  --text: #404040;
  --muted: #666666;
  --accent: #e6b800;
  --accent-strong: #b48c00;
  --brand: #3a72d3;
  --brand-strong: #2159ba;
  --brand-soft: rgba(58, 114, 211, 0.1);
  --danger: #cf2e2e;
  --success: #00d084;
  --shadow: 0 20px 40px rgba(193, 199, 212, 0.25);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Raleway", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(58, 114, 211, 0.12), transparent 22%),
    radial-gradient(circle at top left, rgba(230, 184, 0, 0.08), transparent 18%),
    linear-gradient(180deg, #fbfcff 0%, var(--page-bg) 56%, var(--page-bg-alt) 100%);
}

body.modal-open {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

a {
  color: var(--brand);
  transition: color 0.18s ease;
}

a:hover {
  color: var(--brand-strong);
}

.app-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.top-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.top-strip__text {
  display: grid;
  gap: 2px;
}

.top-strip__text strong {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-weight: 700;
  color: var(--text);
}

.top-strip__text span {
  color: var(--muted);
  font-size: 0.92rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #ffffff;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 16px 28px rgba(58, 114, 211, 0.22);
}

.brand:hover {
  color: #ffffff;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.board-column {
  display: grid;
  gap: 18px;
}

.board-toolbar,
.board-search,
.board-summary,
.jobs-grid .job-card,
.sidecard,
.state,
.modal-card,
.toast {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.board-toolbar,
.board-search,
.board-summary {
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.board-toolbar,
.board-summary,
.sidecard {
  background: linear-gradient(180deg, rgba(235, 238, 252, 0.58) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.board-search,
.jobs-grid .job-card,
.state,
.modal-card {
  background: rgba(255, 255, 255, 0.98);
}

.board-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.board-toolbar h1,
.board-summary h2,
.sidecard h3,
.modal-header h2,
.state h2 {
  margin: 0;
}

.board-toolbar h1 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.board-toolbar h1,
.board-summary h2,
.sidecard h3,
.modal-header h2,
.state h2,
.job-card__title,
.job-detail__title {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  color: var(--text);
}

.sidecard-copy,
.board-summary__meta,
.state p,
.modal-header p,
.job-card__excerpt,
.job-card__footnote,
.job-detail__section p,
.vote-note {
  color: var(--muted);
}

.board-search {
  display: block;
}

.search-field,
.select-field,
.field {
  display: grid;
  gap: 8px;
}

.search-field span,
.select-field span,
.field span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.search-field input,
.select-field select,
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-field input:focus,
.select-field select:focus,
.field input:focus,
.field textarea:focus {
  border-color: rgba(58, 114, 211, 0.48);
  box-shadow: 0 0 0 4px rgba(58, 114, 211, 0.12);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.board-search__actions,
.auth-actions,
.view-toggle,
.filter-group,
.action-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.board-search__actions {
  justify-content: flex-end;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.toggle-btn,
.filter-chip,
.action-btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.toggle-btn:hover,
.filter-chip:hover,
.action-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(58, 114, 211, 0.2);
}

.secondary-btn,
.ghost-btn,
.toggle-btn,
.filter-chip,
.action-btn {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--line);
}

.ghost-btn {
  background: rgba(235, 238, 252, 0.45);
}

.ghost-btn--small {
  padding: 10px 12px;
  font-size: 0.88rem;
}

.toggle-btn.is-active,
.filter-chip.is-active {
  background: var(--brand);
  color: #ffffff;
  border-color: rgba(58, 114, 211, 0.35);
  box-shadow: 0 10px 20px rgba(58, 114, 211, 0.16);
}

.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1200;
  width: min(360px, calc(100vw - 24px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(33, 89, 186, 0.96);
  color: #ffffff;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: rgba(207, 46, 46, 0.96);
  border-color: rgba(207, 46, 46, 0.3);
}

.toast.is-success {
  background: rgba(0, 208, 132, 0.96);
  border-color: rgba(0, 208, 132, 0.28);
}

.toast__text {
  line-height: 1.45;
}

.toast__close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
}

.board-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.board-summary__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.board-summary__meta strong {
  color: var(--text);
}

.sidecar {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 16px;
}

.sidecard {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.sidecard__header,
.sidecard-account__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.sidecard h3 {
  font-size: 1.15rem;
}

.sidecard-account__head strong {
  font-size: 1.2rem;
}

.account-pill,
.user-chip,
.meta-pill,
.detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 0.88rem;
}

.account-pill {
  padding: 8px 12px;
  background: var(--brand-soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

.account-pill.is-active {
  background: rgba(0, 208, 132, 0.1);
  border-color: rgba(0, 208, 132, 0.24);
  color: var(--success);
}

.account-pill.is-pending {
  background: rgba(230, 184, 0, 0.12);
  border-color: rgba(230, 184, 0, 0.22);
  color: var(--accent-strong);
}

.user-chip {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--brand-soft);
  border: 1px solid rgba(58, 114, 211, 0.16);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.stat-card strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.jobs-grid[data-view="list"] {
  grid-template-columns: 1fr;
}

.job-card {
  border-radius: var(--radius-xl);
  padding: 22px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.job-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.job-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 48px rgba(58, 114, 211, 0.14);
}

.job-card--list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.job-card__content {
  display: grid;
  gap: 16px;
}

.job-card__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.job-card__title {
  margin: 0 0 8px;
  font-size: 1.3rem;
  line-height: 1.2;
}

.job-card__company {
  color: var(--brand-strong);
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.82rem;
}

.job-card__location,
.job-card__meta,
.job-card__date {
  color: var(--muted);
}

.job-card__rating {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 108px;
}

.rating-score {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-strong);
}

.rating-count {
  color: var(--muted);
  font-size: 0.84rem;
}

.job-card__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-pill,
.detail-chip {
  padding: 9px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text);
}

.job-card__excerpt,
.job-card__footnote {
  margin: 0;
  line-height: 1.68;
}

.job-card__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card--list .job-card__excerpt {
  -webkit-line-clamp: 3;
}

.job-card__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  text-decoration: none;
}

.action-btn--primary {
  background: var(--brand);
  color: #ffffff;
  border-color: rgba(58, 114, 211, 0.32);
}

.action-btn--danger {
  background: rgba(207, 46, 46, 0.08);
  color: var(--danger);
  border-color: rgba(207, 46, 46, 0.2);
}

.state {
  border-radius: var(--radius-xl);
  padding: 34px 24px;
  text-align: center;
}

.state h2 {
  margin: 14px 0 10px;
}

.state p {
  margin: 0;
}

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(58, 114, 211, 0.14);
  border-top-color: var(--brand);
  animation: spin 0.9s linear infinite;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(33, 89, 186, 0.18);
  padding: 18px;
  overflow-y: auto;
}

.modal.is-open {
  display: grid;
  place-items: center;
}

.modal-card {
  width: min(720px, 100%);
  border-radius: 28px;
  padding: 24px;
  position: relative;
}

.modal-card-wide {
  width: min(980px, 100%);
}

.modal-header {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--brand-strong);
  font-size: 1.4rem;
}

.message {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
}

.message-error {
  background: rgba(252, 238, 238, 0.96);
  border: 1px solid rgba(207, 46, 46, 0.2);
  color: var(--danger);
}

.message-success {
  background: rgba(235, 250, 244, 0.96);
  border: 1px solid rgba(0, 208, 132, 0.22);
  color: var(--success);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-full,
.full-width {
  grid-column: 1 / -1;
}

.job-detail {
  display: grid;
  gap: 18px;
}

.job-detail__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.job-detail__title {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 2vw, 2.3rem);
  line-height: 1.1;
}

.job-detail__company {
  color: var(--brand-strong);
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.84rem;
  margin-bottom: 10px;
}

.job-detail__meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.detail-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(247, 249, 255, 0.96);
  border: 1px solid var(--line);
}

.detail-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-card strong {
  display: block;
}

.job-detail__section {
  display: grid;
  gap: 10px;
}

.job-detail__section h3 {
  margin: 0;
  font-size: 1.04rem;
}

.job-detail__section p {
  margin: 0;
  line-height: 1.72;
  white-space: pre-wrap;
  color: var(--text);
}

.vote-panel {
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(58, 114, 211, 0.08), rgba(235, 238, 252, 0.88));
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.vote-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.vote-stars {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vote-star {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--brand-strong);
  font-size: 1.12rem;
  display: inline-grid;
  place-items: center;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.vote-star:hover {
  transform: translateY(-1px);
  border-color: rgba(58, 114, 211, 0.35);
  background: rgba(58, 114, 211, 0.08);
}

.vote-message {
  min-height: 1.2em;
  font-weight: 700;
}

.vote-message.is-error {
  color: var(--danger);
}

.vote-message.is-success {
  color: var(--success);
}

.hidden {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

  .sidecar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1320px);
    margin: 12px auto 28px;
  }

  .board-search,
  .board-summary,
  .board-toolbar,
  .job-card__head,
  .job-card__actions,
  .job-detail__head,
  .vote-panel__head,
  .sidecard__header,
  .sidecard-account__head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: start;
  }

  .board-search,
  .form-grid,
  .job-detail__meta,
  .stats-grid,
  .sidecar {
    grid-template-columns: 1fr;
  }

  .board-search__actions,
  .auth-actions,
  .view-toggle,
  .filter-group,
  .action-group {
    width: 100%;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .toggle-btn,
  .filter-chip,
  .action-btn {
    width: 100%;
    justify-content: center;
  }

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

  .jobs-grid[data-view="list"] .job-card--list,
  .job-card--list {
    grid-template-columns: 1fr;
  }
}
