:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-2: rgba(255, 255, 255, 0.68);
  --text: #111116;
  --muted: #6f7078;
  --line: rgba(17, 17, 22, 0.09);
  --accent: #6d5dfc;
  --accent-soft: rgba(109, 93, 252, 0.12);
  --ok: #16865d;
  --warn: #a86718;
  --bad: #c74444;
  --field: #ffffff;
  --shadow-soft: 0 16px 44px rgba(13, 13, 18, 0.08);
  --shadow-lift: 0 22px 62px rgba(13, 13, 18, 0.13);
  --button-primary-bg: var(--accent);
  --button-primary-hover: color-mix(in srgb, var(--accent) 88%, #ffffff);
  --button-primary-active: color-mix(in srgb, var(--accent) 80%, #111116);
  --button-primary-text: #ffffff;
  --button-secondary-bg: var(--accent-soft);
  --button-secondary-hover: color-mix(in srgb, var(--accent-soft) 74%, #ffffff);
  --button-secondary-active: color-mix(in srgb, var(--accent-soft) 82%, var(--accent));
  --button-danger-bg: color-mix(in srgb, var(--bad) 9%, var(--surface));
  --button-danger-hover: color-mix(in srgb, var(--bad) 14%, var(--surface));
  --button-danger-active: color-mix(in srgb, var(--bad) 20%, var(--surface));
  --button-quiet-bg: var(--field);
  --button-quiet-hover: color-mix(in srgb, var(--accent-soft) 52%, var(--field));
  --button-quiet-active: color-mix(in srgb, var(--accent-soft) 78%, var(--field));
  --button-disabled-bg: color-mix(in srgb, var(--muted) 10%, var(--surface-2));
  --button-disabled-text: color-mix(in srgb, var(--muted) 72%, var(--surface));
  --button-disabled-border: color-mix(in srgb, var(--muted) 16%, var(--line));
  --button-focus-ring: color-mix(in srgb, var(--accent) 20%, transparent);
  --tag-height: 28px;
  --tag-padding-x: 10px;
  --tag-font-size: 11px;
  --stage-dot-size: 30px;
  --stage-dot-current-size: 34px;
  --stage-line: color-mix(in srgb, var(--accent) 58%, var(--line));
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0e;
    --surface: rgba(23, 23, 28, 0.88);
    --surface-2: rgba(30, 30, 37, 0.72);
    --text: #f5f5f7;
    --muted: #9b9ca5;
    --line: rgba(255, 255, 255, 0.09);
    --accent: #8b7cff;
    --accent-soft: rgba(139, 124, 255, 0.15);
    --ok: #45c995;
    --warn: #e1b15f;
    --bad: #ff7979;
    --field: #17171c;
    --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 24px 64px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

html,
body,
.app {
  touch-action: manipulation;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.42;
}

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

button {
  cursor: pointer;
}

button:disabled,
button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 1;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 58px;
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: 0;
}

h2 {
  font-size: 22px;
  line-height: 1.18;
  font-weight: 850;
  letter-spacing: 0;
}

h3 {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: 0;
}

.app {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px calc(34px + env(safe-area-inset-bottom));
  overflow-x: clip;
}

.loading {
  display: grid;
  min-height: 84px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.top {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.shell-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.shell-left {
  min-width: 0;
}

.back-home-link {
  width: fit-content;
  max-width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 13px 0 10px;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.back-home-link span:first-child {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
  font-size: 19px;
  line-height: 1;
}

.role-toggle {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 999px;
  background: var(--field);
  color: var(--accent);
  padding: 0;
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 11%, transparent);
}

.head,
.date-head,
.candidate-head,
.candidate-top,
.slot-top,
.event-card,
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.head > *,
.date-head > *,
.candidate-head > *,
.top .head > *,
.subtabs > *,
.stats > *,
.grid > *,
.choice-grid > *,
.quick-dates > * {
  min-width: 0;
}

.lead,
.muted,
.meta,
.candidate-meta,
.candidate-note {
  color: var(--muted);
  line-height: 1.42;
}

.lead {
  max-width: 520px;
  margin-top: 12px;
  font-size: 15px;
}

.meta,
.candidate-meta {
  font-size: 14px;
}

.tabs,
.subtabs,
.grid,
.stats,
.actions,
.date-list,
.list,
.form,
.form-grid,
.slot-grid,
.candidate-list,
.event-list,
.reason-grid,
.recruiter-grid {
  display: grid;
  gap: 10px;
}

.tabs {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
}

.subtabs {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin: 10px 0 12px;
}

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

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

.panel,
.card,
.date-card,
.slot-card,
.candidate-card,
.event-card,
.reason-card,
.stat {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  overflow: hidden;
  overflow: clip;
  padding: 18px;
  margin-bottom: 14px;
}

.card,
.date-card,
.slot-card,
.candidate-card,
.reason-card {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.date-card,
.slot-card {
  border-color: color-mix(in srgb, var(--accent) 12%, var(--line));
}

.date-card.selected,
.slot-card.selected {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: linear-gradient(145deg, var(--accent-soft), transparent 70%);
  box-shadow: var(--shadow-lift);
}

.interview-date-card {
  gap: 11px;
  padding: 14px;
}

.interview-date-card.selected {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  box-shadow: none;
}

.interview-date-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.interview-date-main > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.slot-status-stack {
  display: grid;
  justify-items: end;
  gap: 6px;
  flex: 0 0 auto;
  max-width: 112px;
}

.slot-created-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  text-align: right;
  white-space: nowrap;
}

.slot-line {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.28;
}

.candidate-slot-card .candidate-slot-time {
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.12;
  margin-top: 2px;
}

.slot-place {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.slot-place b {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
}

.slot-place span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.slot-seat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.slot-seat-box {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 56%, transparent);
  padding: 9px 10px;
}

.slot-seat-box span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
}

.slot-seat-box b {
  color: var(--text);
  font-weight: 950;
  font-size: 18px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.slot-seat-box.free {
  border-color: color-mix(in srgb, var(--ok) 28%, var(--line));
  background: color-mix(in srgb, var(--ok-soft) 34%, var(--surface));
}

.slot-seat-box.booked {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface));
}

.date-card.locked {
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-2));
}

.date-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 16px;
  background: var(--accent-soft);
  padding: 10px;
}

.date-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 950;
}

.date-summary b {
  display: block;
  line-height: 1.18;
}

.date-summary span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.stat {
  padding: 10px 8px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 23px;
  line-height: 1.05;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--field);
  color: var(--text);
  outline: none;
  font-weight: 650;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 50%,
    calc(100% - 13px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.42;
}

input[type="date"] {
  display: block;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  -webkit-appearance: none;
  appearance: none;
  -webkit-min-logical-width: 0;
}

input[type="date"]::-webkit-date-and-time-value {
  display: block;
  min-width: 0;
  min-height: 1.2em;
  text-align: left;
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.choice-grid,
.form-grid.two,
.slot-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
  overflow: clip;
}

.slot-form label {
  min-width: 0;
  overflow: hidden;
  overflow: clip;
}

.candidate-short-form {
  grid-template-columns: minmax(0, 1fr);
}

.time-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.time-select-row select {
  min-width: 0;
  text-align: center;
  font-weight: 900;
}

.form-autosave {
  min-height: 26px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.form-feedback {
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.success-feedback {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--ok) 27%, var(--line));
}

.span-2 {
  grid-column: 1 / -1;
}

.tab,
.subtab,
.secondary,
.danger,
.quiet,
.primary,
.success {
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 13px;
  color: var(--muted);
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: anywhere;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

.primary {
  min-height: 52px;
  border-color: transparent;
  background: var(--button-primary-bg);
  color: var(--button-primary-text);
  font-weight: 950;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 24%, transparent);
}

.secondary,
.success {
  color: var(--accent);
  background: var(--button-secondary-bg);
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
}

.success {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--ok) 24%, var(--line));
}

.danger {
  color: var(--bad);
  background: var(--button-danger-bg);
  border-color: color-mix(in srgb, var(--bad) 25%, var(--line));
}

.quiet,
.subtab,
.tab {
  background: var(--button-quiet-bg);
  border-color: var(--line);
}

.tab.active,
.subtab.active {
  color: var(--accent);
  background: var(--button-secondary-bg);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);
}

.quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .primary:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--button-primary-hover);
    box-shadow: var(--shadow-lift);
    transform: translateY(-1px);
  }

  .secondary:not(:disabled):not([aria-disabled="true"]):hover,
  .success:not(:disabled):not([aria-disabled="true"]):hover,
  .subtab:not(:disabled):not([aria-disabled="true"]):hover,
  .tab:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--button-secondary-hover);
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
    transform: translateY(-1px);
  }

  .danger:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--button-danger-hover);
    border-color: color-mix(in srgb, var(--bad) 36%, var(--line));
    transform: translateY(-1px);
  }

  .quiet:not(:disabled):not([aria-disabled="true"]):hover {
    background: var(--button-quiet-hover);
    color: var(--accent);
    transform: translateY(-1px);
  }
}

.primary:active,
.secondary:active,
.success:active,
.danger:active,
.quiet:active,
.subtab:active,
.tab:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: none;
}

.primary:not(:disabled):not([aria-disabled="true"]):active {
  background: var(--button-primary-active);
}

.primary.is-loading,
.secondary.is-loading,
.success.is-loading,
.danger.is-loading {
  color: var(--button-primary-text);
  background: color-mix(in srgb, var(--accent) 76%, var(--muted));
  border-color: transparent;
  box-shadow: 0 0 0 5px var(--accent-soft);
  animation: action-pulse 0.82s ease-in-out infinite alternate;
}

.secondary:not(:disabled):not([aria-disabled="true"]):active,
.success:not(:disabled):not([aria-disabled="true"]):active,
.subtab:not(:disabled):not([aria-disabled="true"]):active,
.tab:not(:disabled):not([aria-disabled="true"]):active {
  background: var(--button-secondary-active);
}

.danger:not(:disabled):not([aria-disabled="true"]):active {
  background: var(--button-danger-active);
}

.quiet:not(:disabled):not([aria-disabled="true"]):active {
  background: var(--button-quiet-active);
}

.action-done {
  border-color: color-mix(in srgb, var(--ok) 44%, var(--line));
  background: color-mix(in srgb, var(--ok) 12%, var(--surface));
  color: var(--ok);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 12%, transparent);
}

.action-just-done {
  animation: action-confirm 0.72s ease both;
}

@keyframes action-confirm {
  0% {
    transform: scale(0.985);
  }

  42% {
    border-color: color-mix(in srgb, var(--ok) 62%, var(--line));
    background: color-mix(in srgb, var(--ok) 18%, var(--surface));
    color: var(--ok);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 12%, transparent);
    transform: scale(1.015);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes action-pulse {
  from {
    transform: scale(0.992);
  }

  to {
    transform: scale(1.01);
  }
}

.primary:focus-visible,
.secondary:focus-visible,
.success:focus-visible,
.danger:focus-visible,
.quiet:focus-visible,
.subtab:focus-visible,
.tab:focus-visible,
.role-toggle:focus-visible,
.back-home-link:focus-visible,
.stage-node:focus-visible {
  outline: 3px solid var(--button-focus-ring);
  outline-offset: 2px;
}

button:disabled,
button[aria-disabled="true"] {
  background: var(--button-disabled-bg);
  border-color: var(--button-disabled-border);
  color: var(--button-disabled-text);
  box-shadow: none;
  filter: saturate(0.72);
  transform: none;
}

button.is-loading:disabled {
  color: var(--button-primary-text);
  background: color-mix(in srgb, var(--accent) 78%, var(--muted));
  border-color: transparent;
  box-shadow: 0 0 0 5px var(--accent-soft);
  filter: none;
  animation: action-pulse 0.82s ease-in-out infinite alternate;
}

.pill,
.badge,
.count {
  min-height: var(--tag-height);
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 var(--tag-padding-x);
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--tag-font-size);
  line-height: 1.1;
  font-weight: 860;
  white-space: nowrap;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pill.ok,
.badge.good {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--ok) 25%, var(--line));
}

.pill.wait,
.pill.warn {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--warn) 25%, var(--line));
}

.pill.bad {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--bad) 25%, var(--line));
}

.pill.accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.candidate-card {
  gap: 14px;
  padding: 16px;
}

.compact-candidate-list {
  gap: 8px;
}

.recruiter-candidate-card {
  gap: 10px;
  padding: 12px;
  box-shadow: none;
  background: var(--surface);
}

.recruiter-candidate-card .candidate-card-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.recruiter-candidate-card .candidate-number {
  flex-basis: 28px;
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.recruiter-candidate-card .name {
  font-size: 17px;
  line-height: 1.15;
}

.candidate-title-stack {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.recruiter-candidate-card .candidate-status.pill {
  width: auto;
  max-width: 176px;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.15;
}

.recruiter-candidate-card .candidate-actions {
  border-top: 0;
  padding-top: 0;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.recruiter-candidate-card .candidate-actions button {
  min-height: 38px;
  font-size: 12px;
}

.recruiter-candidate-card.marked {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
}

.recruiter-candidate-card.arrived {
  border-color: color-mix(in srgb, var(--ok) 22%, var(--line));
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ok) 62%, transparent);
}

.recruiter-candidate-card.missed,
.recruiter-candidate-card.left {
  border-color: color-mix(in srgb, var(--bad) 22%, var(--line));
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--bad) 58%, transparent);
}

.recruiter-candidate-card.unmarked {
  border-color: var(--line);
}

.candidate-card-head {
  display: grid;
  gap: 11px;
  min-width: 0;
}

.candidate-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.candidate-mark-row {
  display: block;
  min-width: 0;
}

.recruiter-candidate-card .candidate-name-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(142px, 29%, 190px);
  gap: 10px;
  align-items: center;
  width: 100%;
}

.recruiter-person-details {
  display: grid;
  gap: 9px;
  min-width: 0;
  width: 100%;
}

.attendance-quick-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.attendance-quick-actions button {
  min-height: 38px;
  border-radius: 13px;
  padding: 0 7px;
  font-size: 12px;
  line-height: 1.08;
}

.attendance-state {
  width: 100%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.attendance-state.ok {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--ok) 28%, var(--line));
}

.attendance-state.bad {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--bad) 26%, var(--line));
}

.attendance-correction {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 72%, var(--surface));
  padding: 10px;
}

.attendance-correction > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.attendance-correction-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.attendance-correction-actions button {
  width: 100%;
  min-height: 36px;
  border-radius: 12px;
  font-size: 12px;
  padding: 0 8px;
}

.candidate-name-summary {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 38px;
  border-radius: 14px;
  cursor: pointer;
  list-style: none;
}

.candidate-name-summary::-webkit-details-marker {
  display: none;
}

.candidate-name-summary::marker {
  content: "";
}

.candidate-details-body {
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
  padding-top: 8px;
}

.recruiter-candidate-card .candidate-info-grid {
  grid-template-columns: minmax(0, 1fr);
}

.confirmation-status-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.confirmation-mini {
  width: fit-content;
  max-width: 100%;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 9px;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.confirmation-mini.ok {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--ok) 25%, var(--line));
}

.confirmation-mini.wait {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 11%, var(--surface));
  border-color: color-mix(in srgb, var(--warn) 24%, var(--line));
}

.confirmation-mini.bad {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--bad) 25%, var(--line));
}

.confirmation-mini.accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
}

@media (hover: hover) and (pointer: fine) {
  .candidate-name-summary:hover .name {
    color: var(--accent);
  }
}

.compact-person-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.queue-telegram {
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-telegram.muted {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
}

.candidate-details {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.candidate-details summary {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button-quiet-bg);
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.candidate-details[open] {
  padding-top: 2px;
}

.candidate-number {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
}

.candidate-name,
.name,
.slot-title {
  min-width: 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.candidate-status.pill {
  width: 100%;
  max-width: none;
  min-height: 38px;
  border-radius: 14px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.candidate-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 72%, var(--surface));
  padding: 12px;
}

.candidate-info-item {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.candidate-info-item span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
}

.candidate-info-item b {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.candidate-card .candidate-stage,
.candidate-card-actions,
.candidate-actions,
.button-row.result-row,
.result-row {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.candidate-card-actions,
.candidate-actions,
.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.candidate-action-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.button-row > :only-child,
.candidate-actions > :only-child,
.candidate-card-actions > :only-child {
  grid-column: 1 / -1;
}

.candidate-card-actions button,
.candidate-actions button,
.button-row button {
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 900;
}

.status-hero {
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 16px;
  background: linear-gradient(145deg, var(--accent-soft), transparent 70%);
  padding: 12px;
}

.notice {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  padding: 12px;
  line-height: 1.42;
}

.notice p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.locked-booking-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-color: color-mix(in srgb, var(--ok) 22%, var(--line));
  background: color-mix(in srgb, var(--ok) 8%, var(--surface));
}

.locked-booking-notice > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.locked-booking-notice b {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
}

.locked-booking-notice span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.locked-booking-notice .danger {
  min-width: 132px;
  min-height: 40px;
  border-radius: 13px;
  font-size: 12px;
}

.notification-card {
  display: grid;
  gap: 10px;
}

.queue-notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.queue-notice-head b {
  font-size: 16px;
  line-height: 1.2;
}

.queue-notice-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.queue-candidate-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--line));
  border-radius: 16px;
  background: var(--surface);
  padding: 10px;
}

.queue-candidate-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.queue-candidate-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.queue-candidate-limits {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.form-subhead {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.slot-form-actions {
  grid-template-columns: minmax(0, 1fr);
}

.panel-title-stack {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.panel-title-stack span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
}

.waitlist-panel .panel-head {
  align-items: center;
}

.waitlist-panel h2 {
  font-size: 20px;
}

.waitlist-panel .panel-title-stack span {
  max-width: 420px;
}

.waitlist-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  min-width: 0;
}

.waitlist-details > summary::-webkit-details-marker {
  display: none;
}

.waitlist-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.summary-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.waitlist-details[open] .summary-chevron {
  transform: rotate(225deg) translateY(-1px);
  border-color: var(--accent);
}

.waitlist-details .candidate-list {
  margin-top: 14px;
}

.waitlist-action {
  width: fit-content;
  min-width: 118px;
  min-height: 38px;
  border-radius: 999px;
  padding-inline: 13px;
  font-size: 12px;
  white-space: nowrap;
  overflow-wrap: normal;
}

.resource-progress-panel {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.resource-progress-panel.locked {
  opacity: 0.78;
}

.resource-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.resource-progress-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.resource-progress-head span:not(.pill) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.resource-exceptions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.resource-progress-panel > button {
  width: 100%;
  min-height: 44px;
}

.status-hero-title {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.candidate-stage {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.candidate-stage-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
}

.candidate-stage-label b {
  color: var(--text);
  font-weight: 900;
}

.stage-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--field) 86%, var(--surface-2));
  padding: 8px 7px 7px;
}

.stage-track.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stage-node {
  position: relative;
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-rows: 32px auto;
  gap: 5px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  border-radius: 999px;
}

.stage-node::before {
  content: "";
  position: absolute;
  right: 50%;
  left: -50%;
  top: 16px;
  height: 2px;
  background: var(--line);
}

.stage-node:first-child::before {
  display: none;
}

.stage-node.done::before,
.stage-node.current::before {
  background: var(--stage-line);
}

.stage-dot {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: 0 0 0 3px var(--field);
}

.stage-dot svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stage-node.done .stage-dot {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}

.stage-node.current .stage-dot {
  width: 32px;
  height: 32px;
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.stage-caption {
  max-width: 100%;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
}

.stage-node.done .stage-caption,
.stage-node.current .stage-caption {
  color: var(--accent);
}

.stage-help {
  display: grid;
  gap: 3px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent-soft) 66%, transparent);
  padding: 9px 10px;
}

.stage-help b {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
}

.stage-help span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.32;
}

.archive-panel {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.archive-panel summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--button-quiet-bg);
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
}

.archive-panel summary::-webkit-details-marker,
.archive-slot-card summary::-webkit-details-marker {
  display: none;
}

.archive-panel summary::marker,
.archive-slot-card summary::marker {
  content: "";
}

.archive-panel summary span {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.archive-panel summary b {
  min-width: 28px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
}

.archive-panel[open] {
  gap: 10px;
}

.archive-search {
  margin-top: 10px;
}

.archive-date-list {
  margin-top: 10px;
}

.data-tools-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.data-tools-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.data-tools-copy b {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.2;
}

.data-tools-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.32;
}

.data-tools-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(118px, 1fr));
  gap: 8px;
}

.data-tools-actions .danger {
  min-height: 40px;
  border-radius: 13px;
  font-size: 12px;
}

.danger-lock {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--bad) 22%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--bad) 6%, var(--surface));
  color: color-mix(in srgb, var(--bad) 82%, var(--text));
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.16;
  text-align: center;
}

.archive-slot-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 10px;
}

.archive-slot-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.archive-slot-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.archive-slot-main b {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.archive-slot-main span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.archive-candidate-card {
  gap: 8px;
  border-radius: 16px;
  padding: 10px;
  box-shadow: none;
}

.archive-candidate-card.left,
.archive-candidate-card.missed {
  border-color: color-mix(in srgb, var(--bad) 22%, var(--line));
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--bad) 56%, transparent);
}

.archive-candidate-card.arrived {
  border-color: color-mix(in srgb, var(--ok) 22%, var(--line));
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ok) 58%, transparent);
}

.archive-person-details {
  display: grid;
  min-width: 0;
}

.archive-person-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  cursor: pointer;
  list-style: none;
}

.archive-person-summary::-webkit-details-marker {
  display: none;
}

.archive-person-summary::marker {
  content: "";
}

.archive-person-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.archive-person-main b {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-status-chip {
  max-width: 92px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 8px;
  font-size: 10.5px;
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-status-chip.ok {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--ok) 25%, var(--line));
}

.archive-status-chip.bad {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--bad) 25%, var(--line));
}

.archive-status-chip.wait,
.archive-status-chip.warn {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--warn) 25%, var(--line));
}

.archive-status-chip.accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.archive-person-footer {
  display: flex;
  min-width: 0;
  padding-left: 36px;
}

.candidate-history {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.candidate-history > b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.candidate-history-list {
  display: grid;
  gap: 6px;
}

.candidate-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  padding: 8px 9px;
}

.candidate-history-item span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-history-item b {
  color: var(--text);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.archive-telegram-button {
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 9px;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-telegram-button.muted {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--line);
}

.archive-person-details-body {
  padding-top: 7px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--field);
}

.step {
  display: grid;
  gap: 5px;
  align-content: center;
  min-height: 72px;
  border-right: 1px solid var(--line);
  background: var(--field);
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.step:last-child {
  border-right: 0;
}

.step.done {
  background: var(--accent-soft);
  color: var(--accent);
}

.recruiter-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(108px, 1fr));
  gap: 10px;
  align-items: stretch;
  margin: 10px 0 12px;
}

.journal-group {
  display: grid;
  gap: 9px;
  padding-top: 4px;
}

.journal-group + .journal-group {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.journal-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.recruiter-nav .subtab,
.recruiter-nav .quiet {
  min-height: 48px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 950;
}

.analytics-panel {
  gap: 14px;
}

.analytics-period-panel,
.analytics-results,
.analytics-detail-section,
.analytics-breakdown,
.analytics-group-list,
.analytics-slot-list,
.analytics-person-list,
.analytics-person-body,
.analytics-search,
.analytics-history,
.analytics-history-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.analytics-preset-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.analytics-preset {
  min-height: 40px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--muted);
  border-color: var(--line);
  box-shadow: none;
  font-size: 12px;
  font-weight: 950;
}

.analytics-preset.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

.analytics-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(130px, auto);
  gap: 10px;
  align-items: end;
}

.analytics-reset {
  min-height: 54px;
  border-radius: 16px;
  padding: 0 14px;
}

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

.analytics-entry {
  min-height: 116px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 14px;
  text-align: left;
  border-radius: 18px;
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}

.analytics-entry.active {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.analytics-entry span,
.analytics-entry small {
  color: var(--muted);
  font-weight: 900;
  line-height: 1.2;
}

.analytics-entry b {
  color: var(--text);
  font-size: 31px;
  line-height: 0.95;
  font-weight: 950;
}

.analytics-entry.active span,
.analytics-entry.active b {
  color: var(--accent);
}

.analytics-breakdown {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.analytics-breakdown-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--field);
}

.analytics-breakdown-row,
.analytics-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.analytics-breakdown-row:last-child,
.analytics-history-row:last-child {
  border-bottom: 0;
}

.analytics-breakdown-row span,
.analytics-history-row span,
.analytics-slot-main span,
.analytics-person-title small,
.analytics-mini-count small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.analytics-breakdown-row b,
.analytics-history-row b {
  color: var(--text);
  font-weight: 950;
}

.analytics-slot-card,
.analytics-group {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 12px;
  min-width: 0;
}

.analytics-slot-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  list-style: none;
  cursor: pointer;
}

.analytics-slot-card summary::-webkit-details-marker,
.analytics-group-details summary::-webkit-details-marker,
.analytics-person-card summary::-webkit-details-marker {
  display: none;
}

.analytics-slot-card summary::marker,
.analytics-group-details summary::marker,
.analytics-person-card summary::marker {
  content: "";
}

.analytics-slot-main,
.analytics-person-title > span:last-child,
.analytics-group-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.analytics-slot-main b,
.analytics-group-title b {
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.18;
}

.analytics-slot-counts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.analytics-mini-count {
  min-width: 58px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
  padding: 5px 8px;
}

.analytics-mini-count b {
  color: var(--text);
  font-size: 15px;
  line-height: 1;
}

.analytics-group-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
}

.analytics-group-details > summary {
  list-style: none;
  cursor: pointer;
}

.analytics-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.analytics-group-title b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.analytics-group-title .pill {
  flex: 0 0 auto;
}

.analytics-person-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--field);
  padding: 10px;
  min-width: 0;
}

.analytics-person-card.ok {
  border-color: color-mix(in srgb, var(--ok) 24%, var(--line));
}

.analytics-person-card.wait {
  border-color: color-mix(in srgb, var(--warn) 24%, var(--line));
}

.analytics-person-card.bad {
  border-color: color-mix(in srgb, var(--bad) 24%, var(--line));
}

.analytics-person-card.accent {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.analytics-person-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(86px, auto);
  gap: 10px;
  align-items: center;
  list-style: none;
  cursor: pointer;
}

.analytics-person-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.analytics-person-title b {
  color: var(--text);
  font-size: 15px;
  line-height: 1.15;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.analytics-status-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}

.analytics-status-chip.ok {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--ok) 28%, var(--line));
}

.analytics-status-chip.wait {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 11%, var(--surface));
  border-color: color-mix(in srgb, var(--warn) 28%, var(--line));
}

.analytics-status-chip.bad {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--bad) 27%, var(--line));
}

.analytics-status-chip.accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}

.analytics-person-body {
  padding-top: 10px;
}

.analytics-search {
  margin: 0;
}

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

.analytics-info-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 80%, var(--field));
  padding: 10px;
}

.analytics-info-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.analytics-info-item b {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.analytics-history {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.analytics-history > b {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.analytics-history-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.panel-head.compact {
  align-items: center;
}

.analytics-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--field);
}

.analytics-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 11px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  vertical-align: top;
}

.analytics-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.analytics-table tr:last-child td {
  border-bottom: 0;
}

.analytics-empty {
  color: var(--muted) !important;
  text-align: center !important;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.75fr) minmax(138px, auto) minmax(126px, auto);
  gap: 10px;
  align-items: end;
}

.event-card {
  align-items: center;
  padding: 12px;
}

.reason-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 26px 10px;
}

.venue-photo {
  display: none;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 96%, var(--field));
  color: var(--text);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

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

@media (max-width: 720px) {
  .app {
    padding: 16px 12px 28px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  h1 {
    font-size: 34px;
  }

  .tabs,
  .grid,
  .main-grid,
  .choice-grid,
  .form-grid.two,
  .slot-form,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .subtabs,
  .stats,
  .stats-grid,
  .analytics-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .analytics-filter {
    grid-template-columns: 1fr;
  }

  .analytics-preset-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-preset:last-child {
    grid-column: 1 / -1;
  }

  .analytics-entry-grid,
  .analytics-person-grid {
    grid-template-columns: 1fr;
  }

  .analytics-entry {
    min-height: 92px;
  }

  .analytics-slot-card summary,
  .analytics-group-head,
  .analytics-person-card summary {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .analytics-slot-counts {
    justify-content: stretch;
  }

  .analytics-mini-count {
    flex: 1 1 72px;
  }

  .analytics-status-chip {
    justify-self: start;
    max-width: 100%;
    white-space: normal;
    line-height: 1.15;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .analytics-breakdown-row,
  .analytics-history-row {
    grid-template-columns: 1fr auto;
  }

  .analytics-table-wrap {
    overflow-x: hidden;
  }

  .analytics-table {
    min-width: 0;
  }

  .analytics-table,
  .analytics-table tbody,
  .analytics-table tr,
  .analytics-table td {
    display: block;
    width: 100%;
  }

  .analytics-table thead {
    display: none;
  }

  .analytics-table tr {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }

  .analytics-table tr:last-child {
    border-bottom: 0;
  }

  .analytics-table td {
    display: grid;
    grid-template-columns: minmax(78px, 0.36fr) minmax(0, 1fr);
    gap: 10px;
    border-bottom: 0;
    padding: 6px 0;
    overflow-wrap: anywhere;
  }

  .analytics-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 950;
  }

  .analytics-table td.analytics-empty {
    display: block;
    padding: 12px;
  }

  .analytics-table td.analytics-empty::before {
    content: "";
  }

  .subtab {
    min-height: 48px;
  }

  .stat {
    padding: 9px 6px;
  }

  .stat b {
    font-size: 21px;
  }

  .stat span {
    font-size: 11px;
  }

  .candidate-actions,
  .candidate-card-actions,
  .button-row,
  .slot-form-actions,
  .link-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .step:last-child {
    border-bottom: 0;
  }

  .candidate-card {
    gap: 12px;
    padding: 14px;
  }

  .recruiter-candidate-card .candidate-card-head {
    grid-template-columns: 1fr;
  }

  .recruiter-candidate-card .candidate-status.pill {
    width: 100%;
    max-width: none;
  }

  .candidate-info-grid {
    gap: 11px 12px;
    padding: 11px;
  }

  .status-hero-title {
    grid-template-columns: 1fr;
  }

  .recruiter-nav {
    grid-template-columns: 1fr 1fr;
  }

  .data-tools-panel,
  .data-tools-actions {
    grid-template-columns: 1fr;
  }

  .locked-booking-notice {
    grid-template-columns: 1fr;
  }

  .locked-booking-notice .danger {
    width: 100%;
  }

  .recruiter-nav .quiet:last-child {
    grid-column: 1 / -1;
  }

  .head,
  .date-head,
  .candidate-head,
  .candidate-top,
  .slot-top,
  .panel-head {
    align-items: stretch;
  }

  .pill {
    align-self: flex-start;
  }

  .top .head {
    grid-template-columns: 1fr;
  }

  .back-home-link {
    min-height: 38px;
    padding-right: 11px;
    font-size: 12px;
  }

  .role-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
}

@media (max-width: 430px) {
  .recruiter-candidate-card {
    gap: 8px;
    padding: 10px;
  }

  .recruiter-candidate-card .candidate-name-summary {
    grid-template-columns: minmax(0, 1fr) clamp(124px, 37vw, 160px);
    gap: 7px;
  }

  .recruiter-candidate-card .candidate-number {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .recruiter-candidate-card .name {
    font-size: 16px;
    line-height: 1.18;
  }

  .candidate-name-summary {
    min-height: 34px;
  }

  .attendance-quick-actions {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .attendance-quick-actions button {
    min-height: 34px;
    border-radius: 12px;
    padding: 0 6px;
    font-size: 11px;
  }

  .attendance-state {
    min-height: 32px;
    padding: 0 9px;
    font-size: 11px;
  }

  .queue-telegram {
    min-height: 26px;
    padding: 0 8px;
    font-size: 11px;
  }

  .confirmation-status-panel {
    gap: 6px;
    padding: 9px 0;
  }

  .confirmation-mini {
    min-height: 24px;
    padding: 0 8px;
    font-size: 10.5px;
  }

  .resource-progress-panel {
    gap: 9px;
    padding: 10px 0;
  }

  .resource-progress-panel > button {
    min-height: 40px;
    font-size: 13px;
  }

  .stage-track {
    padding-inline: 5px;
  }

  .stage-caption {
    font-size: 8.8px;
  }

  .archive-slot-card {
    padding: 9px;
  }

  .archive-candidate-card {
    padding: 9px;
  }

  .archive-person-summary {
    grid-template-columns: minmax(0, 1fr) minmax(74px, auto);
    gap: 7px;
  }

  .archive-person-main {
    gap: 7px;
  }

  .archive-person-main b {
    font-size: 14px;
  }

  .archive-status-chip {
    max-width: 78px;
    min-height: 26px;
    padding: 0 7px;
    font-size: 10px;
  }

  .archive-person-footer {
    padding-left: 34px;
  }
}

@media (max-width: 390px) {
  .app {
    padding-left: 10px;
    padding-right: 10px;
  }

  .panel {
    padding: 15px;
  }

  h1 {
    font-size: 32px;
  }
}
