:root {
  color-scheme: light;

  --mare-50: #e8f2f6;
  --mare-100: #c4dde8;
  --mare-200: #9dc6d6;
  --mare-300: #5a9db8;
  --mare-400: #2e6e8a;
  --mare-500: #1a3a4a;
  --mare-600: #122a37;
  --mare-700: #0b1d26;

  --turchese-50: #e4f6f4;
  --turchese-100: #baeae4;
  --turchese-300: #55c0b4;
  --turchese-400: #38afa2;
  --turchese-500: #2a9d8f;
  --turchese-600: #1e7268;
  --turchese-700: #134a43;

  --verde-50: #eaf7f1;
  --verde-500: #4caf82;
  --verde-700: #22503c;
  --limone-100: #fdf2c4;
  --limone-600: #c8a828;
  --limone-700: #8a7218;
  --fiore-50: #fef0ee;
  --fiore-200: #f8a99f;
  --fiore-400: #f37c6c;
  --fiore-600: #c0392b;

  --ink: var(--mare-500);
  --ink-light: var(--mare-400);
  --muted: var(--mare-300);
  --line: var(--mare-100);
  --surface: #ffffff;
  --surface-soft: var(--mare-50);
  --paper: var(--surface-soft);
  --panel: var(--surface);
  --nav: var(--mare-100);
  --nav-soft: rgba(0, 0, 0, 0.08);
  --mint: var(--turchese-500);
  --amber: var(--limone-600);
  --coral: var(--fiore-600);
  --blue: var(--mare-400);
  --violet: #6d5aa7;
  --shadow: 0 16px 40px rgba(26, 58, 74, 0.1);
  font-family:
    "InterFace Light", "InterFace", Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@font-face {
  font-family: "InterFace";
  src: url("assets/fonts/interface-light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "InterFace Light";
  src: url("assets/fonts/interface-light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(42, 157, 143, 0.06), transparent 34%),
    linear-gradient(315deg, rgba(192, 57, 43, 0.05), transparent 28%),
    var(--paper);
  color: var(--ink);
  font-weight: 300;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

strong {
  font-weight: 500;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  padding: 0 20px 48px;
}

.login-nav {
  width: min(1180px, 100%);
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.login-main {
  width: min(1180px, 100%);
  min-height: calc(100vh - 130px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  gap: 46px;
  align-items: center;
}

.login-copy h1 {
  max-width: 720px;
  margin: 10px 0 16px;
  color: var(--ink);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 300;
  line-height: 1.03;
}

.login-copy > p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.login-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.login-points article,
.login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.login-points article {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.login-points article > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--turchese-50);
  color: var(--turchese-600);
  font-weight: 600;
}

.login-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
}

.login-card input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

.login-card input:focus {
  border-color: var(--turchese-500);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.13);
}

.login-hint {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.login-hint.error {
  color: var(--fiore-600);
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--nav);
  color: var(--ink);
  border-right: 1px solid var(--mare-200);
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--mare-200);
  flex-shrink: 0;
}

.brand-emblem {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(26, 58, 74, 0.08);
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  width: fit-content;
  gap: 2px;
}

.brand-name {
  color: var(--mare-700);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 5px;
  line-height: 1;
  text-transform: uppercase;
}

.brand-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  border-radius: 1px;
  background: var(--fiore-400);
  position: relative;
  top: -3px;
  vertical-align: middle;
}

.brand-sub {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  line-height: 1;
  margin-top: 7px;
  position: relative;
  left: 3px;
  text-align: right;
  text-transform: uppercase;
}

.nav-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  padding: 12px 10px;
}

.nav-group {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  padding: 4px 10px 5px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-light);
  font-size: 14px;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}

.nav-item:hover {
  background: var(--nav-soft);
  color: var(--ink);
}

.nav-item.active {
  background: rgba(0, 0, 0, 0.1);
  color: var(--mare-600);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--turchese-400);
}

.nav-icon {
  flex-shrink: 0;
  width: 16px;
  font-size: 13px;
  opacity: 0.65;
  text-align: center;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  opacity: 1;
}

.sidebar-panel {
  margin-top: auto;
  margin-inline: 10px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--mare-200);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.panel-label,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-panel .panel-label {
  color: var(--muted);
}

.sidebar-panel strong {
  display: block;
  margin-top: 8px;
  color: var(--mare-500);
  font-size: 1.85rem;
  font-weight: 400;
  letter-spacing: 0;
}

.sidebar-panel p {
  margin: 12px 0 0;
  color: var(--ink-light);
  line-height: 1.45;
}

.mini-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.mini-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
}

.main {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 300;
  line-height: 1.1;
}

h2 {
  font-size: 1.1rem;
}

h3 {
  font-size: 0.95rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(620px, 54vw);
}

.search {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  width: min(36vw, 500px);
  min-width: 270px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.primary-action,
.ghost-action,
.status-tabs button,
.segmented button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.primary-action {
  background: var(--turchese-500);
  border-color: var(--turchese-600);
  color: #ffffff;
  font-weight: 600;
}

.primary-action:hover {
  background: var(--turchese-600);
  border-color: var(--turchese-700);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.topbar-actions > .primary-action {
  min-width: 156px;
}

.ghost-action,
.status-tabs button,
.segmented button {
  background: var(--mare-50);
  border-color: var(--mare-100);
  color: var(--mare-500);
  font-weight: 500;
}

.ghost-action:hover,
.status-tabs button.selected,
.segmented button.selected {
  border-color: #b9c6c1;
  background: var(--surface);
  color: var(--mare-700);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(26, 58, 74, 0.04);
}

.metric {
  min-height: 106px;
  padding: 13px 14px;
}

.metric span,
.metric small {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.95rem;
  font-weight: 400;
  line-height: 1;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
}

.candidate-marketplace,
.bridge-layout,
.interview-board {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.candidate-card,
.market-offer,
.flow-steps article,
.mini-application,
.shortlist-row,
.interview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.candidate-card,
.flow-steps article,
.mini-application,
.interview-card {
  padding: 14px;
}

.offer-list,
.application-stack {
  display: grid;
  gap: 10px;
}

.market-offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.offer-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.flow-steps {
  display: grid;
  gap: 10px;
}

.flow-steps article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  align-items: start;
}

.flow-steps article span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--turchese-50);
  color: var(--turchese-600);
  font-weight: 600;
  grid-row: span 2;
}

.flow-steps article p {
  margin: 0;
}

.mini-application {
  display: grid;
  gap: 8px;
}

.shortlist-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.interview-card {
  display: grid;
  gap: 12px;
}

.interview-head,
.interview-result {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.question-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.question-list p {
  margin: 0;
  color: var(--ink-light);
  line-height: 1.45;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.panel-large {
  min-height: 310px;
}

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

.segmented,
.status-tabs,
.filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filters select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
}

.bar-chart {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}

.bar-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--mare-50);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
}

.pulse-list,
.attention-list,
.request-stack,
.request-table,
.people-table {
  display: grid;
  gap: 10px;
}

.pulse-item,
.attention-item,
.request-card,
.person-row,
.request-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.pulse-item,
.attention-item,
.request-card {
  padding: 14px;
}

.pulse-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.attention-item,
.request-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--mare-50);
  color: var(--mare-500);
  font-size: 0.78rem;
  font-weight: 600;
}

.badge.warning {
  background: var(--limone-100);
  color: var(--limone-700);
}

.badge.risk {
  background: var(--fiore-50);
  color: var(--fiore-600);
}

.badge.good {
  background: var(--verde-50);
  color: var(--verde-700);
}

.directory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.directory-panel,
.person-detail {
  min-height: 680px;
}

.person-row {
  display: grid;
  grid-template-columns: auto minmax(170px, 1fr) minmax(120px, 0.7fr) minmax(110px, 0.6fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  text-align: left;
}

.person-row button {
  border: 0;
  background: transparent;
  text-align: left;
}

.person-row.selected {
  border-color: var(--turchese-300);
  box-shadow: inset 4px 0 0 var(--turchese-400);
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: white;
  font-weight: 500;
}

.avatar.large {
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  font-size: 1.35rem;
}

.person-detail .detail-header {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.detail-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-summary {
  margin: 16px 0 0;
  color: var(--ink-light);
  line-height: 1.5;
}

.section-title {
  margin-top: 18px;
}

.match-card {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-cta {
  width: 100%;
  margin-top: 18px;
}

.org-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
}

.org-column {
  min-height: 420px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.org-column h3 {
  margin-bottom: 12px;
}

.org-person {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.request-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.7fr) minmax(160px, 0.9fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.request-actions {
  display: flex;
  gap: 8px;
}

.request-fit {
  grid-column: 1 / -1;
  margin: -4px 0 0;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mare-50);
  color: var(--mare-500);
}

dialog {
  width: min(520px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(11, 29, 38, 0.42);
}

.person-form {
  display: grid;
  gap: 14px;
}

.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.person-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 600;
}

.person-form input,
.person-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
}

.form-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
}

@media (max-width: 1100px) {
  .login-main,
  .login-points {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .nav-group,
  .nav-item span:last-child {
    font-size: 0;
    overflow: hidden;
    width: 0;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .brand {
    justify-content: center;
    padding-inline: 10px;
  }

  .brand-name {
    font-size: 18px;
    letter-spacing: 3px;
  }

  .brand-dot {
    width: 8px;
    height: 8px;
    top: -2px;
  }

  .brand-sub {
    font-size: 9px;
    letter-spacing: 2px;
    left: 2px;
  }

  .sidebar-panel {
    display: none;
  }

  .metrics-grid,
  .content-grid,
  .directory-layout,
  .candidate-marketplace,
  .bridge-layout,
  .interview-board {
    grid-template-columns: 1fr 1fr;
  }

  .directory-layout {
    align-items: stretch;
  }
}

@media (max-width: 780px) {
  .login-screen {
    padding-inline: 18px;
  }

  .login-main {
    gap: 22px;
    align-items: start;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 3;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px;
    overflow-x: auto;
    height: auto;
  }

  .brand {
    padding: 0;
    border-bottom: 0;
  }

  .brand-wordmark {
    display: flex;
    min-width: 142px;
  }

  .brand-name {
    font-size: 24px;
    letter-spacing: 4px;
  }

  .brand-sub {
    font-size: 10px;
    letter-spacing: 2.8px;
    left: 2.8px;
  }

  .brand-dot {
    width: 10px;
    height: 10px;
    top: -2px;
  }

  .nav-list {
    display: flex;
    flex-direction: row;
    padding: 0;
  }

  .nav-item {
    width: auto;
    min-width: 46px;
  }

  .main {
    padding: 18px;
  }

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

  .search {
    width: 100%;
    min-width: 0;
  }

  .metrics-grid,
  .content-grid,
  .directory-layout,
  .org-board,
  .candidate-marketplace,
  .bridge-layout,
  .interview-board,
  .market-offer {
    grid-template-columns: 1fr;
  }

  .person-row,
  .request-row {
    grid-template-columns: auto 1fr;
  }

  .person-row .row-team,
  .person-row .row-location,
  .request-row .request-period,
  .request-row .request-status {
    grid-column: 2;
  }

  .request-actions {
    grid-column: 1 / -1;
  }
}
