:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #050505;
  --muted: #5f6670;
  --line: #d8dde5;
  --navy: #0b2f63;
  --navy-dark: #071f42;
  --navy-soft: #eef4ff;
  --black: #050505;
  --green: #1f7a4d;
  --shadow: 0 12px 30px rgba(5, 5, 5, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

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

button {
  cursor: pointer;
}

.recruit-shell {
  min-height: 100vh;
}

.recruit-sidebar {
  align-content: start;
  background: var(--black);
  color: #ffffff;
  display: grid;
  gap: 24px;
  padding: 22px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand-mark {
  align-items: center;
  background: #ffffff;
  border-radius: 8px;
  color: var(--black);
  display: inline-flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span:last-child,
.workspace-card span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
}

.nav-links {
  display: grid;
  gap: 8px;
}

.nav-links a {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
  padding: 12px;
  text-decoration: none;
}

.nav-links a.active,
.nav-links a:hover {
  background: #ffffff;
  color: var(--black);
}

.workspace-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.workspace-card img {
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
  width: 100%;
}

.recruit-main {
  align-content: start;
  display: grid;
  gap: 18px;
  padding: 22px;
}

.topbar,
.panel,
.metrics article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.topbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
}

.topbar h1,
.panel h2,
.panel p {
  margin: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-actions,
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.subpage-nav {
  align-items: center;
  background: #f4f6f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
}

.subpage-nav button {
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 850;
  min-height: 34px;
  padding: 0 12px;
}

.subpage-nav button.active {
  background: var(--navy);
  box-shadow: 0 4px 12px rgba(11, 47, 99, 0.16);
  color: #ffffff;
}

.mode-pill,
.schedule-pill {
  align-items: center;
  background: var(--navy-soft);
  border: 1px solid #c9d8f0;
  border-radius: 999px;
  color: var(--navy);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  min-height: 34px;
  padding: 0 12px;
}

.primary-button,
.secondary-button {
  border-radius: 8px;
  font-weight: 900;
  min-height: 38px;
  padding: 0 14px;
}

.primary-button {
  background: var(--navy);
  border: 1px solid var(--navy);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--navy-dark);
}

.secondary-button {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--black);
}

.large-button {
  min-height: 46px;
  padding: 0 20px;
}

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

.metrics article {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.metrics span,
.board-row span,
.candidate-card span,
.interview-row span,
.feed-preview span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.metrics strong {
  font-size: 1.7rem;
}

.workspace-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.panel {
  padding: 18px;
}

.panel-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.job-panel,
.applicant-panel {
  grid-column: 1 / 2;
}

.board-panel,
.interview-panel,
.crm-panel {
  grid-column: 2 / 3;
}

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

label {
  color: var(--muted);
  display: grid;
  font-size: 0.86rem;
  font-weight: 850;
  gap: 6px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  padding: 0 12px;
  width: 100%;
}

textarea {
  line-height: 1.45;
  padding: 10px 12px;
  resize: vertical;
}

.wide-field {
  grid-column: 1 / -1;
}

.status-message {
  color: var(--muted);
  font-weight: 800;
  min-height: 22px;
}

.board-list,
.candidate-list,
.interview-list,
.feed-preview {
  display: grid;
  gap: 10px;
}

.board-row,
.interview-row,
.feed-preview article {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.board-row strong,
.board-row span,
.interview-row strong,
.interview-row span {
  display: block;
}

.board-stats {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.board-stats .live {
  color: var(--green);
}

.candidate-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.candidate-head,
.candidate-foot {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.candidate-head strong,
.candidate-head span {
  display: block;
}

.candidate-head b {
  align-items: center;
  background: var(--navy);
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  min-width: 48px;
}

.candidate-card p {
  color: var(--ink);
  line-height: 1.45;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  background: #f5f7fa;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  padding: 5px 9px;
}

.candidate-foot strong {
  color: var(--navy);
}

.interview-row time {
  color: var(--navy);
  font-weight: 900;
  white-space: nowrap;
}

.feed-preview article {
  display: grid;
  justify-items: start;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  margin: 0;
  padding: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080a0f;
    --surface: #0e1118;
    --ink: #f6f8fb;
    --muted: #a7b0bf;
    --line: #273142;
    --navy: #5f8edb;
    --navy-dark: #8ab4ff;
    --navy-soft: #16253d;
    --black: #05070b;
    --green: #7ee2ad;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  }

  body {
    color-scheme: dark;
  }

  .recruit-main {
    background: var(--bg);
  }

  input,
  select,
  textarea {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
  }

  .brand-mark,
  .topbar,
  .panel,
  .metrics article,
  .candidate-card,
  .board-row,
  .interview-row,
  .feed-preview article {
    background: var(--surface);
  }

  .subpage-nav,
  .mode-pill,
  .schedule-pill,
  .tag-row span {
    background: #171d28;
    border-color: var(--line);
    color: var(--ink);
  }

  .subpage-nav button,
  .secondary-button {
    background: #121722;
    border-color: var(--line);
    color: var(--ink);
  }

  .subpage-nav button.active,
  .primary-button {
    background: var(--navy);
    color: #ffffff;
  }

  .nav-links a.active,
  .nav-links a:hover {
    background: var(--navy);
    color: #ffffff;
  }

  .brand-mark {
    border: 1px solid var(--line);
  }
}

@media (max-width: 980px) {
  .recruit-shell,
  .workspace-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .job-panel,
  .applicant-panel,
  .board-panel,
  .interview-panel,
  .crm-panel {
    grid-column: auto;
  }

  .subpage-nav {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 3px;
    justify-content: flex-start;
    max-width: 100%;
    overflow-x: auto;
    padding: 3px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .subpage-nav::-webkit-scrollbar {
    display: none;
  }

  .subpage-nav button {
    flex: 0 0 auto;
    font-size: 0.78rem;
    min-height: 30px;
    padding: 0 9px;
    white-space: nowrap;
  }
}

@media (max-width: 680px) {
  .recruit-main {
    gap: 14px;
    padding: 14px;
  }

  .topbar,
  .panel {
    padding: 14px;
  }

  .topbar h1 {
    font-size: 1.45rem;
  }

  .metrics {
    gap: 6px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metrics article {
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 8px;
  }

  .metrics span {
    font-size: 0.62rem;
    line-height: 1.2;
  }

  .metrics strong {
    font-size: 0.98rem;
    line-height: 1.15;
  }

  .topbar,
  .panel-heading,
  .candidate-head,
  .candidate-foot,
  .board-row,
  .interview-row {
    align-items: stretch;
    flex-direction: column;
  }

  .job-form,
  .applicant-tools {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .panel-actions {
    justify-content: stretch;
  }

  .topbar-actions > *,
  .panel-actions > *,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .primary-button,
  .secondary-button {
    min-height: 42px;
    white-space: normal;
  }

  .subpage-nav button {
    min-height: 30px;
    padding: 0 9px;
    white-space: nowrap;
    width: auto;
  }

  .board-stats {
    justify-items: start;
  }

  .schedule-pill,
  .mode-pill {
    justify-content: center;
    width: 100%;
  }
}
