/* ==========================================================================
   Fonts — self-hosted (no Google Fonts call, so no visitor IPs leave for Google).
   SIL Open Font License; see wwwroot/brand/fonts/README.md.
   ========================================================================== */
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("../brand/fonts/raleway-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("../brand/fonts/raleway-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   Design tokens — change the brand here. Everything below reads from these.
   Source: docs/design/Kompetent_visuel_retning.pdf, mapped in docs/design/design-tokens.md.
   ========================================================================== */
:root {
  /* Brand palette (guide p. 20). Use the semantic tokens below in components, not these. */
  --k-cream: #f3efe6;   /* Business card white */
  --k-black: #000000;   /* Classic suit black */
  --k-brown: #895736;   /* Grain leather brown */
  --k-blue: #07395b;    /* Corporate blue */
  --k-red: #c64323;     /* Twisted red — the twist; use sparingly */

  /* Brand font (guide p. 23–24). The wordmark is an image: brand/logo.svg. */
  --cp-font: "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Interactive: links, focus, selected rows. */
  --cp-accent: var(--k-blue);
  --cp-accent-hover: #052a44;
  --cp-accent-soft: #e4ebf0;

  /* Primary buttons and the header: the classic suit. */
  --cp-ink: var(--k-black);
  --cp-ink-hover: var(--k-blue);
  --cp-on-ink: var(--k-cream);
  --cp-on-ink-muted: #b9b4aa;

  /* The red, for small deliberate accents (active nav, stars, ™, status codes).
     --cp-red-text is a shade darker so small red text passes WCAG AA on cream. */
  --cp-red: var(--k-red);
  --cp-red-text: #b53a1c;

  --cp-bg: var(--k-cream);
  --cp-surface: #ffffff;
  --cp-surface-sunken: #eae4d7;
  --cp-border: #ddd5c6;
  --cp-text: var(--k-black);
  --cp-muted: #6b6358;

  --cp-warning-bg: #fbf3e2;
  --cp-warning-border: #e8d3a6;
  --cp-warning-text: #5e4100;

  --cp-success-bg: #eef4ec;
  --cp-success-border: #bcd3b6;
  --cp-success-text: #2a5222;

  --cp-star: var(--k-red);
  --cp-star-hover: #e08a72;
  --cp-star-off: #d6cebf;

  /* Hyper corporate: square corners, flat surfaces. */
  --cp-radius: 0;
  --cp-radius-sm: 0;
  --cp-shadow: none;
  --cp-shadow-raised: 0 6px 18px rgba(0, 0, 0, .08);

  /* Hand the tokens to Bootstrap so its components match. */
  --bs-body-font-family: var(--cp-font);
  --bs-body-bg: var(--cp-bg);
  --bs-body-color: var(--cp-text);
  --bs-secondary-color: var(--cp-muted);
  --bs-border-color: var(--cp-border);
  --bs-border-radius: 0;
  --bs-border-radius-sm: 0;
  --bs-border-radius-lg: 0;
  --bs-primary: var(--cp-accent);
  --bs-primary-rgb: 7, 57, 91;
  --bs-link-color: var(--cp-accent);
  --bs-link-color-rgb: 7, 57, 91;
  --bs-link-hover-color: var(--cp-accent-hover);
  --bs-link-hover-color-rgb: 5, 42, 68;
}

body {
  /* Raleway defaults to old-style figures; counts and dates read better lined up. */
  font-variant-numeric: lining-nums;
}

.btn {
  font-weight: 600;
}

.btn-primary {
  --bs-btn-color: var(--cp-on-ink);
  --bs-btn-bg: var(--cp-ink);
  --bs-btn-border-color: var(--cp-ink);
  --bs-btn-hover-color: var(--cp-on-ink);
  --bs-btn-hover-bg: var(--cp-ink-hover);
  --bs-btn-hover-border-color: var(--cp-ink-hover);
  --bs-btn-active-color: var(--cp-on-ink);
  --bs-btn-active-bg: var(--cp-ink-hover);
  --bs-btn-active-border-color: var(--cp-ink-hover);
  --bs-btn-disabled-color: var(--cp-on-ink);
  --bs-btn-disabled-bg: var(--cp-ink);
  --bs-btn-disabled-border-color: var(--cp-ink);
}

.btn-outline-secondary {
  --bs-btn-color: var(--cp-ink);
  --bs-btn-border-color: var(--cp-ink);
  --bs-btn-hover-color: var(--cp-on-ink);
  --bs-btn-hover-bg: var(--cp-ink);
  --bs-btn-hover-border-color: var(--cp-ink);
  --bs-btn-active-color: var(--cp-on-ink);
  --bs-btn-active-bg: var(--cp-ink);
  --bs-btn-active-border-color: var(--cp-ink);
}

.btn-outline-danger {
  --bs-btn-color: var(--cp-red-text);
  --bs-btn-border-color: var(--cp-red-text);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--cp-red-text);
  --bs-btn-hover-border-color: var(--cp-red-text);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--cp-red-text);
  --bs-btn-active-border-color: var(--cp-red-text);
}

.btn:focus-visible, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 .1rem #fff, 0 0 0 .25rem rgba(7, 57, 91, .45);
}

.form-control:focus {
  border-color: var(--cp-accent);
}

.form-check-input:checked {
  background-color: var(--cp-ink);
  border-color: var(--cp-ink);
}

a {
  text-underline-offset: 2px;
}

/* ==========================================================================
   App shell
   ========================================================================== */
body.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--cp-bg);
}

.app-header {
  background: var(--cp-ink);
  color: var(--cp-on-ink);
}

.app-header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  min-height: 60px;
  padding-top: .5rem;
  padding-bottom: .5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
}

/* The Kompetent wordmark, red on the black header. Height sets the size; width follows. */
.brand-logo {
  display: block;
  height: 1.75rem;
  width: auto;
}

.brand-name {
  padding-left: .75rem;
  border-left: 1px solid currentColor;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .8;
}

.app-nav {
  display: flex;
  gap: .25rem;
  margin-right: auto;
}

.app-nav-link {
  padding: .4rem .75rem;
  border-bottom: 2px solid transparent;
  color: var(--cp-on-ink-muted);
  text-decoration: none;
  font-weight: 600;
}

.app-nav-link:hover {
  color: var(--cp-on-ink);
}

.app-nav-link.is-active {
  color: var(--cp-on-ink);
  border-bottom-color: var(--cp-red);
}

/* Header controls sit on black. */
.app-header .btn-outline-secondary {
  --bs-btn-color: var(--cp-on-ink);
  --bs-btn-border-color: var(--cp-on-ink-muted);
  --bs-btn-hover-color: var(--cp-ink);
  --bs-btn-hover-bg: var(--cp-on-ink);
  --bs-btn-hover-border-color: var(--cp-on-ink);
  --bs-btn-active-color: var(--cp-ink);
  --bs-btn-active-bg: var(--cp-on-ink);
  --bs-btn-active-border-color: var(--cp-on-ink);
}

.app-header .btn-primary {
  --bs-btn-color: var(--cp-ink);
  --bs-btn-bg: var(--cp-on-ink);
  --bs-btn-border-color: var(--cp-on-ink);
  --bs-btn-hover-color: var(--cp-ink);
  --bs-btn-hover-bg: #ffffff;
  --bs-btn-hover-border-color: #ffffff;
}

.app-header-tools {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
}

.app-nav + .app-header-tools {
  margin-left: 0;
}

.app-main {
  flex: 1 0 auto;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

/* Full-page mode (ViewData["FullPage"]): the page is exactly one window tall and the main area
   hands all remaining height to its last child (the job board), which scrolls internally. */
body.app-full {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}

/* flex: 1 1 0 (not the base 1 0 auto) so main is sized by the window, not by the board's
   content — otherwise the tallest column stretches the page instead of scrolling. */
.app-full .app-main {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem 1.5rem;
}

.app-full .app-main > :last-child {
  flex: 1;
  min-height: 0;
}

.app-footer {
  padding: 1.25rem 0;
  border-top: 1px solid var(--cp-border);
  color: var(--cp-muted);
  font-size: .85rem;
}

/* Language picker (segmented control) */
.lang-picker {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-sm);
  background: var(--cp-surface);
}

.lang-option {
  padding: .15rem .5rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--cp-muted);
  font-size: .8rem;
  font-weight: 600;
}

.lang-option:hover {
  color: var(--cp-text);
}

.lang-option.is-active {
  background: var(--cp-ink);
  color: var(--cp-on-ink);
}

/* On black (app header, login page) the picker inverts. */
.app-header .lang-picker,
.auth-lang .lang-picker {
  border-color: #3a3a3a;
  background: transparent;
}

.app-header .lang-option,
.auth-lang .lang-option {
  color: var(--cp-on-ink-muted);
}

.app-header .lang-option:hover,
.auth-lang .lang-option:hover {
  color: var(--cp-on-ink);
}

.app-header .lang-option.is-active,
.auth-lang .lang-option.is-active {
  background: var(--cp-on-ink);
  color: var(--cp-ink);
}

/* ==========================================================================
   Page structure
   ========================================================================== */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Display: Raleway Bold, set tight like the guide's big headlines (p. 23). */
.page-header h1 {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.015em;
}

.page-subtitle {
  margin: .25rem 0 0;
  color: var(--cp-muted);
}

.page-header-compact {
  margin-bottom: 1rem;
}

.page-header-compact h1 {
  font-size: 1.25rem;
}

.page-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem 1rem;
}

.page-title-row .back-link,
.page-title-row .page-subtitle {
  margin: 0;
}

.back-link {
  display: inline-block;
  margin-bottom: .35rem;
  color: var(--cp-muted);
  font-size: .9rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--cp-accent);
}

.panel {
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  box-shadow: var(--cp-shadow);
}

.panel-narrow {
  max-width: 640px;
}

.panel-form {
  max-width: 760px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
}

/* Small neutral label, e.g. a contact person's department */
.tag {
  display: inline-block;
  margin-top: .25rem;
  padding: .05rem .5rem;
  border-radius: var(--cp-radius-sm);
  background: var(--cp-surface-sunken);
  color: var(--cp-muted);
  font-size: .75rem;
  font-weight: 500;
}

.contact-card {
  height: 100%;
}

.contact-card .panel-header {
  align-items: flex-start;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--cp-border);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.panel-search {
  width: 100%;
  max-width: 240px;
}

.panel-body {
  padding: 1.25rem;
}

.count-pill {
  display: inline-block;
  min-width: 1.6em;
  padding: .1rem .45rem;
  border-radius: var(--cp-radius-sm);
  background: var(--cp-surface-sunken);
  color: var(--cp-muted);
  font-size: .75rem;
  font-weight: 600;
  text-align: center;
}

.section-label {
  margin: 0 0 .5rem;
  color: var(--cp-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Label/value pairs (profile, contact info) */
.field-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .5rem 1rem;
  margin: 0 0 1rem;
}

.field-list dt {
  color: var(--cp-muted);
  font-weight: 500;
}

.field-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Lists of clickable rows (jobs, customers, login options)
   ========================================================================== */
.item-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.item {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-sm);
  background: var(--cp-surface);
  color: var(--cp-text);
  text-align: left;
  text-decoration: none;
}

a.item:hover, .item-button:hover {
  border-color: var(--cp-accent);
  box-shadow: var(--cp-shadow-raised);
  color: var(--cp-text);
}

.item-compact {
  padding: .5rem .75rem;
}

a.item-main {
  color: var(--cp-text);
  text-decoration: none;
}

a.item-main:hover {
  color: var(--cp-accent);
  text-decoration: underline;
}

/* A whole row that toggles a checkbox */
.item-check {
  cursor: pointer;
}

.item-check .form-check-input {
  flex: 0 0 auto;
  margin: 0;
}

.item-check:hover {
  border-color: var(--cp-accent);
}

.item-check:has(:checked) {
  border-color: var(--cp-accent);
  background: var(--cp-accent-soft);
}

.item-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.item-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.item-meta {
  color: var(--cp-muted);
  font-size: .85rem;
  overflow-wrap: anywhere;
}

.item-stat {
  color: var(--cp-muted);
  font-size: .85rem;
  white-space: nowrap;
}

.item-chevron {
  color: var(--cp-muted);
  font-size: 1.4rem;
  line-height: 1;
}

.filter-empty {
  margin: .75rem 0 0;
  color: var(--cp-muted);
  font-size: .9rem;
}

.empty-state {
  padding: 1.5rem 0;
  color: var(--cp-muted);
  text-align: center;
}

.empty-state-title {
  margin-bottom: .25rem;
  color: var(--cp-text);
  font-weight: 600;
}

/* ==========================================================================
   Placeholders and notices
   ========================================================================== */
.coming-soon {
  padding: .9rem 1rem;
  border: 1px dashed var(--cp-border);
  border-radius: var(--cp-radius-sm);
  background: var(--cp-bg);
  color: var(--cp-muted);
  font-size: .875rem;
}

.coming-soon p {
  margin: .4rem 0 0;
}

.badge-soft {
  display: inline-block;
  padding: .1rem .5rem;
  border-radius: var(--cp-radius-sm);
  background: var(--cp-accent-soft);
  color: var(--cp-accent);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.coming-soon-fields {
  opacity: .6;
}

.field-tag {
  color: var(--cp-muted);
  font-size: .75rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1.5rem;
}

.notice {
  padding: .6rem .8rem;
  border-radius: var(--cp-radius-sm);
  font-size: .85rem;
}

.notice-warning {
  border: 1px solid var(--cp-warning-border);
  background: var(--cp-warning-bg);
  color: var(--cp-warning-text);
}

.notice-success {
  border: 1px solid var(--cp-success-border);
  background: var(--cp-success-bg);
  color: var(--cp-success-text);
}

/* ==========================================================================
   Job board
   ========================================================================== */
.board {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.stage {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 230px);
  min-height: 160px;
  border-radius: var(--cp-radius);
  background: var(--cp-surface-sunken);
  scroll-snap-align: start;
}

/* In full-page mode the columns share the full width (each at least 260px, scrolling
   sideways when they don't fit) and run the full height, scrolling their own cards. */
.app-full .board {
  align-items: stretch;
  padding-bottom: .5rem;
}

.app-full .stage {
  flex: 1 0 260px;
  max-height: none;
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .85rem 1rem .6rem;
}

.stage-title {
  margin: 0;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.stage-header .count-pill {
  background: var(--cp-surface);
}

.stage-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  gap: .5rem;
  padding: 0 .6rem .6rem;
  overflow-y: auto;
}

.stage-empty {
  margin: .5rem .4rem;
  color: var(--cp-muted);
  font-size: .85rem;
}

.candidate {
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-sm);
  background: var(--cp-surface);
  box-shadow: var(--cp-shadow);
}

.candidate:hover {
  border-color: var(--cp-accent);
  box-shadow: var(--cp-shadow-raised);
}

.candidate-open {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  width: 100%;
  padding: .7rem .8rem .4rem;
  border: 0;
  background: transparent;
  color: var(--cp-text);
  text-align: left;
}

.candidate-text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}

/* Candidate avatar: initials, with the Teamtailor picture (if any) layered on top. */
.avatar {
  position: relative;
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--cp-accent);
  color: var(--cp-on-ink);
  font-weight: 700;
  line-height: 1;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  font-size: .8rem;
}

.avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 1.05rem;
}

.candidate-name {
  font-weight: 600;
}

.candidate-meta {
  color: var(--cp-muted);
  font-size: .8rem;
}

.candidate-link {
  display: inline-block;
  /* Lines up with the name, past the 36px avatar and its .6rem gap. */
  margin: 0 .8rem .6rem calc(.8rem + 36px + .6rem);
  font-size: .8rem;
}

/* Candidate detail dialog */
.candidate-dialog {
  width: min(1100px, 94vw);
  height: 90vh;
  padding: 0;
  border: 0;
  border-radius: var(--cp-radius);
  box-shadow: 0 20px 50px rgba(16, 24, 40, .25);
}

.candidate-dialog[open] {
  display: flex;
  flex-direction: column;
}

.candidate-dialog::backdrop {
  background: rgba(16, 24, 40, .45);
}

.candidate-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--cp-border);
}

.candidate-dialog-heading {
  flex: 1;
  min-width: 0;
}

.candidate-dialog-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.candidate-dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  margin-top: .25rem;
  color: var(--cp-muted);
  font-size: .85rem;
}

.candidate-dialog-body {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  flex: 1;
  min-height: 0;
}

.candidate-dialog-info {
  max-height: 35vh;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--cp-border);
  overflow-y: auto;
}

.candidate-dialog-cv {
  display: flex;
  min-height: 0;
  background: var(--cp-surface-sunken);
}

.candidate-dialog-cv iframe {
  flex: 1;
  width: 100%;
  border: 0;
}

/* Views/Jobs/NoCv.cshtml, shown inside the CV iframe when there's no CV. */
body.frame-message {
  display: grid;
  place-items: center;
  height: 100vh;
  margin: 0;
  padding: 1.5rem;
  background: var(--cp-surface-sunken);
  color: var(--cp-muted);
  text-align: center;
}

.cv-summary {
  font-size: .9rem;
}

.cover-letter {
  font-size: .9rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.section-label-spaced {
  margin-top: 1.25rem;
}

/* Comment/review form in the candidate dialog. */
.note-form {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  align-items: flex-start;
}

.note-form textarea {
  font-size: .9rem;
  resize: vertical;
}

.note-rating {
  margin: 0;
}

.note-rating-legend {
  margin-bottom: .1rem;
  color: var(--cp-muted);
  font-size: .8rem;
}

/* Stars sit 5..1 in the DOM and row-reverse puts them 1..5 on screen, so "~" (later siblings)
   reaches the stars to the left: checking or hovering star 3 lights stars 1-3. */
.star-rating {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: .1rem;
}

.star-rating .star {
  padding: 0 .05rem;
  color: var(--cp-star-off);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: color .1s;
}

.star-rating .star:hover,
.star-rating .star:hover ~ .star {
  color: var(--cp-star-hover);
}

.star-rating input:not([value=""]):checked ~ .star {
  color: var(--cp-star);
}

.star-rating .star-clear {
  margin-left: .6rem;
  color: var(--cp-muted);
  font-size: .8rem;
  text-decoration: underline;
  cursor: pointer;
}

/* "Ingen" is the current choice -> no need to offer it as an action. */
.star-rating input:checked + .star-clear {
  text-decoration: none;
  opacity: .6;
}

.star-rating input:focus-visible + label {
  outline: 2px solid var(--cp-accent);
  outline-offset: 2px;
  border-radius: var(--cp-radius-sm);
}

/* Saved portal notes from the customer, shown above the form. */
.note-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-item {
  padding: .6rem .7rem;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius-sm);
  background: var(--cp-surface);
}

.note-meta {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  color: var(--cp-muted);
  font-size: .75rem;
}

.note-author {
  font-weight: 600;
}

.note-stars {
  color: var(--cp-star);
  font-size: 1rem;
  line-height: 1.2;
}

.note-stars-off {
  color: var(--cp-star-off);
}

.note-text {
  margin-top: .2rem;
  font-size: .9rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.note-hint {
  margin-top: .3rem;
  color: var(--cp-muted);
  font-size: .75rem;
  font-style: italic;
}

@media (min-width: 900px) {
  .candidate-dialog-body {
    grid-template-columns: 340px 1fr;
    grid-template-rows: 1fr;
  }

  .candidate-dialog-info {
    max-height: none;
    border-bottom: 0;
    border-right: 1px solid var(--cp-border);
  }
}

/* ==========================================================================
   Login (auth layout)
   ========================================================================== */
/* Cream card on black, like the guide's split slides. */
body.auth {
  min-height: 100vh;
  background: var(--cp-ink);
}

.auth-lang {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.auth-main {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 4rem 16px 2rem;
}

/* Logo on the black page, card below it. */
.auth-stack {
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  display: block;
  width: min(300px, 75%);
  height: auto;
  margin: 0 auto 2rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2rem 2rem;
  border-radius: var(--cp-radius);
  background: var(--cp-bg);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

/* Standard: Raleway in a light weight for the page heading in the card (guide p. 24). */
.auth-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 400;
}

.auth-section {
  margin-top: 1.5rem;
}

.auth-section-title {
  margin-bottom: .6rem;
  color: var(--cp-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ==========================================================================
   Status pages (404 / 403 / 500)
   ========================================================================== */
.status-page {
  max-width: 480px;
  margin: 3rem auto;
  text-align: center;
}

.status-code {
  margin: 0;
  color: var(--cp-red);
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
}

.status-page h1 {
  margin: 1rem 0 .5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.status-page .btn {
  margin-top: 1rem;
}

/* ==========================================================================
   Small screens
   ========================================================================== */
@media (max-width: 575.98px) {
  .app-main {
    padding-top: 1.25rem;
  }

  .panel-search {
    max-width: none;
  }

  .item-stat {
    display: none;
  }

  .stage,
  .app-full .stage {
    flex-basis: 85vw;
    max-height: none;
  }

  .app-full .app-main {
    padding: .75rem;
  }
}
