:root {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --color-brand: #4f5bd5;
  --color-brand-hover: #424cb8;
  --color-brand-soft: #eef0fd;
  --color-bg-body: #f6f7fb;
  --color-bg-content: #ffffff;
  --color-text-primary: #24283b;
  --color-text-heading: #161a2e;
  --color-text-muted: #6b7088;
  --color-border: #e3e5ee;

  --navbar-height: 4rem;
  --radius: 0.75rem;
  --shadow: 0 1px 2px rgba(22, 26, 46, 0.04), 0 2px 8px rgba(22, 26, 46, 0.04);
  --shadow-hover: 0 4px 16px rgba(22, 26, 46, 0.08);

  --bs-primary: var(--color-brand);
  --bs-primary-rgb: 79, 91, 213;
  --bs-link-color: var(--color-brand);
  --bs-link-color-rgb: 79, 91, 213;
  --bs-link-hover-color: var(--color-brand-hover);
  --bs-link-hover-color-rgb: 66, 76, 184;
}

[data-bs-theme="dark"] {
  --color-brand: #8b93f0;
  --color-brand-hover: #a3aaf4;
  --color-brand-soft: #262a4a;
  --color-bg-body: #12131c;
  --color-bg-content: #1b1d29;
  --color-text-primary: #d9dbe7;
  --color-text-heading: #f1f2f8;
  --color-text-muted: #9a9db3;
  --color-border: #2c2f42;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.5);

  --bs-primary-rgb: 139, 147, 240;
  --bs-link-color-rgb: 139, 147, 240;
  --bs-link-hover-color-rgb: 163, 170, 244;
  --bs-body-bg: var(--color-bg-body);
}

body {
  font-family: var(--font-body);
  background: var(--color-bg-body);
  color: var(--color-text-primary);
}

main {
  padding-top: calc(var(--navbar-height) + 1.5rem);
  padding-bottom: 2rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-text-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

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

.site-navbar {
  min-height: var(--navbar-height);
  background: var(--color-bg-content);
  border-bottom: 1px solid var(--color-border);
}

.navbar-brand {
  font-weight: 800;
  color: var(--color-text-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--color-brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-navbar .nav-link {
  color: var(--color-text-muted);
  font-weight: 500;
  border-radius: 0.5rem;
  padding-inline: 0.75rem !important;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus {
  color: var(--color-text-heading);
}

.site-navbar .nav-link.active {
  color: var(--color-brand);
  background: var(--color-brand-soft);
}

.content-section {
  background: var(--color-bg-content);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-link-hover {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card-link-hover:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.15rem;
}

.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.job-title {
  color: var(--color-text-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

a.job-title:hover {
  color: var(--color-brand);
}

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

.job-meta i {
  margin-right: 0.25rem;
}

.job-description {
  white-space: pre-line;
  line-height: 1.7;
}

.company-logo {
  width: 3rem;
  height: 3rem;
  border-radius: 0.65rem;
  background: var(--color-brand-soft);
  color: var(--color-brand);
  font-weight: 800;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.company-logo.lg {
  width: 4rem;
  height: 4rem;
  font-size: 1.75rem;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.6rem 1.25rem;
  margin: 0;
}

.detail-list dt {
  font-weight: 500;
  color: var(--color-text-muted);
}

.detail-list dd {
  margin: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}

.status-wishlist { color: #9a3c6b; background: #fbe9f2; }
.status-applied { color: #3b4cc0; background: #e8ebfc; }
.status-screening { color: #7a3fb8; background: #f3eafc; }
.status-interview { color: #a35a00; background: #fff2dc; }
.status-offer { color: #18794e; background: #e1f6ea; }
.status-accepted { color: #fff; background: #18794e; }
.status-rejected { color: #b42318; background: #fde8e6; }
.status-withdrawn { color: #5d6275; background: #eceef3; }

[data-bs-theme="dark"] .status-wishlist { color: #f5a6cb; background: #3d1f2e; }
[data-bs-theme="dark"] .status-applied { color: #a9b2ff; background: #23284d; }
[data-bs-theme="dark"] .status-screening { color: #d2b0f7; background: #33244a; }
[data-bs-theme="dark"] .status-interview { color: #ffc56b; background: #3d2e14; }
[data-bs-theme="dark"] .status-offer { color: #73d9a5; background: #163527; }
[data-bs-theme="dark"] .status-accepted { color: #0d1f16; background: #73d9a5; }
[data-bs-theme="dark"] .status-rejected { color: #ff9b91; background: #43201d; }
[data-bs-theme="dark"] .status-withdrawn { color: #b5b9ca; background: #2a2d3b; }

.stat-card {
  padding: 1rem 1.25rem;
  height: 100%;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--color-text-heading);
  line-height: 1.1;
}

.stat-label {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  border: 1px solid var(--color-border);
  background: var(--color-bg-content);
  color: var(--color-text-primary);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
}

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

.filter-pill.active {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
}

.filter-pill .count {
  opacity: 0.7;
  margin-left: 0.25rem;
}

.applications-table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.applications-table th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-bottom-width: 1px;
  white-space: nowrap;
}

.applications-table td {
  vertical-align: middle;
  padding-block: 0.85rem;
}

.status-select {
  min-width: 9.5rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.hero {
  padding: 3.5rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
}

.hero-icon {
  font-size: 2.5rem;
  color: var(--color-brand);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
}

.empty-state i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-brand);
  color: #fff;
  font-weight: 700;
}

.auth-card {
  max-width: 28rem;
  margin: 1rem auto;
  padding: 2rem;
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--color-brand);
  --bs-btn-border-color: var(--color-brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--color-brand-hover);
  --bs-btn-hover-border-color: var(--color-brand-hover);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--color-brand-hover);
  --bs-btn-active-border-color: var(--color-brand-hover);
  --bs-btn-disabled-bg: var(--color-brand);
  --bs-btn-disabled-border-color: var(--color-brand);
}

[data-bs-theme="dark"] .btn-primary {
  --bs-btn-color: #12131c;
  --bs-btn-hover-color: #12131c;
  --bs-btn-active-color: #12131c;
  --bs-btn-disabled-color: #12131c;
}

.btn-outline-primary {
  --bs-btn-color: var(--color-brand);
  --bs-btn-border-color: var(--color-brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--color-brand);
  --bs-btn-hover-border-color: var(--color-brand);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--color-brand-hover);
  --bs-btn-active-border-color: var(--color-brand-hover);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.2);
}

.modal-content {
  border-radius: var(--radius);
}

.toast-container {
  z-index: 1090;
}

.form-section {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
}

.form-section summary {
  font-weight: 600;
  cursor: pointer;
}

.picker-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.picker-name {
  flex-grow: 1;
  font-weight: 500;
}

.picker-item .picker-extra {
  width: auto;
  max-width: 50%;
}

.board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  align-items: flex-start;
}

.board-column {
  flex: 0 0 15rem;
  background: var(--color-bg-body);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.board-column.folded {
  flex-basis: 9rem;
}

.board-column-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.board-column-title .count {
  font-weight: 500;
  color: var(--color-text-muted);
}

.board-card {
  background: var(--color-bg-content);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-bottom: 0.6rem;
}

.board-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.attention-item {
  display: flex;
  gap: 0.5rem;
  padding: 0.3rem 0;
}
