:root {
  --red: #d40f16;
  --red2: #aa0b10;
  --ink: #171719;
  --muted: #6b6b73;
  --line: #e8e8eb;
  --bg: #f7f7f9;
  --card: #fff;
  --soft: #fff1f2;
  --ok: #16834c;
  --warn: #e69a00;
  --blue: #1769e0;
  --radius: 18px;
  --shadow: 0 12px 36px rgba(20, 20, 24, 0.08);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px/1.45 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
.app {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  width: 280px;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  text-align: center;
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.brand img {
  display: block;
  width: 235px;
  max-width: 100%;
  height: 118px;
  object-fit: contain;
  margin: -18px auto -19px;
}
.brand-mark {
  margin: auto;
  width: 66px;
  height: 66px;
  border-radius: 20px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font: bold 31px Georgia;
  box-shadow: 0 10px 25px #d40f1633;
}
.brand-mark span {
  font-size: 15px;
  margin-left: 2px;
}
.brand h1 {
  margin: 5px 0 0;
  font-size: 17px;
}
.brand p {
  margin: 1px;
  color: var(--muted);
  font-size: 11px;
}
.version {
  display: inline-block;
  margin-top: 7px;
  background: #171719;
  color: #fff;
  border-radius: 99px;
  padding: 3px 9px;
  font-size: 10px;
  letter-spacing: 0.14em;
}
.nav-group {
  margin: 10px 7px 5px;
  color: #999;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.nav-btn {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 11px 12px;
  border-radius: 12px;
  text-align: left;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #34343a;
  cursor: pointer;
}
.nav-btn span {
  width: 20px;
  text-align: center;
}
.nav-btn:hover,
.nav-btn.active {
  background: var(--red);
  color: #fff;
}
.side-foot {
  margin-top: auto;
  padding: 15px 10px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.status-dot {
  color: var(--ok);
  font-weight: 700;
}
.side-foot small {
  color: var(--muted);
}
main {
  min-width: 0;
  flex: 1;
  padding: 22px 28px;
  max-width: 1600px;
  margin: auto;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.eyebrow {
  margin: 0;
  color: var(--red);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.topbar h2 {
  margin: 2px 0 0;
  font-size: 27px;
}
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 9px 12px;
  color: #999;
}
.search input {
  border: 0;
  outline: 0;
  width: 270px;
}
.icon-btn {
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  width: 42px;
  height: 42px;
}
.icon-btn b {
  position: absolute;
  right: -4px;
  top: -5px;
  background: var(--red);
  color: #fff;
  border-radius: 99px;
  font-size: 10px;
  padding: 2px 5px;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #171719;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.menu {
  display: none;
  border: 0;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.span-12 {
  grid-column: span 12;
}
.span-8 {
  grid-column: span 8;
}
.span-7 {
  grid-column: span 7;
}
.span-6 {
  grid-column: span 6;
}
.span-5 {
  grid-column: span 5;
}
.span-4 {
  grid-column: span 4;
}
.span-3 {
  grid-column: span 3;
}
.hero {
  background: linear-gradient(115deg, #171719 0, #2a2021 60%, #8d0c10 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.hero:after {
  content: "SII";
  position: absolute;
  right: 30px;
  top: -40px;
  font: 180px Georgia;
  color: #ffffff0a;
}
.hero h3 {
  font-size: 25px;
  margin: 0 0 6px;
}
.hero p {
  color: #ddd;
  max-width: 700px;
}
.metric {
  border-top: 4px solid var(--red);
}
.metric .num {
  font-size: 33px;
  font-weight: 850;
}
.metric .label {
  color: var(--muted);
}
.metric .trend {
  font-size: 11px;
  color: var(--ok);
  margin-top: 8px;
}
.card-head,
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card h3 {
  margin: 0;
  font-size: 17px;
}
.btn {
  border: 0;
  background: #ececef;
  color: #222;
  border-radius: 11px;
  padding: 10px 13px;
  cursor: pointer;
  font-weight: 650;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn.primary {
  background: var(--red);
  color: #fff;
}
.btn.dark {
  background: #171719;
  color: #fff;
}
.btn.ok {
  background: var(--ok);
  color: #fff;
}
.btn.ghost {
  background: #fff;
  border: 1px solid var(--line);
}
.btn.small {
  padding: 7px 9px;
  font-size: 12px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 830px;
}
th,
td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  background: #fafafa;
  color: #555;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.person {
  display: flex;
  gap: 10px;
  align-items: center;
}
.person .pic {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--soft);
  color: var(--red);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.person b,
.person small {
  display: block;
}
.person small {
  color: var(--muted);
}
.tag {
  display: inline-block;
  border-radius: 99px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 750;
  background: #eee;
}
.tag.red {
  background: #ffe5e7;
  color: #aa0b10;
}
.tag.green {
  background: #e5f7ed;
  color: #117442;
}
.tag.blue {
  background: #e7f0ff;
  color: #1455ad;
}
.tag.yellow {
  background: #fff3d5;
  color: #8b5b00;
}
.score {
  --p: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--red) calc(var(--p) * 1%), #eee 0);
  position: relative;
  font-size: 11px;
  font-weight: 900;
}
.score:before {
  content: "";
  position: absolute;
  inset: 5px;
  background: white;
  border-radius: 50%;
}
.score span {
  z-index: 1;
}
.pipeline {
  display: flex;
  gap: 8px;
  overflow: auto;
}
.stage {
  min-width: 150px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
}
.stage b {
  display: block;
  font-size: 22px;
}
.stage small {
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.field {
  grid-column: span 4;
  display: grid;
  gap: 5px;
}
.field.w6 {
  grid-column: span 6;
}
.field.w8 {
  grid-column: span 8;
}
.field.w12 {
  grid-column: span 12;
}
.field label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
  color: #606068;
  letter-spacing: 0.04em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #d9d9de;
  border-radius: 11px;
  padding: 10px;
  background: #fff;
}
.field textarea {
  min-height: 90px;
  resize: vertical;
}
.empty {
  text-align: center;
  padding: 35px;
  color: var(--muted);
}
.activity {
  display: grid;
  gap: 12px;
}
.activity-item {
  display: flex;
  gap: 10px;
}
.activity-item:before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  margin-top: 6px;
}
.activity-item small {
  display: block;
  color: var(--muted);
}
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: #0008;
  z-index: 100;
  padding: 30px;
  overflow: auto;
}
.modal.open {
  display: grid;
  place-items: start center;
}
.modal-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  width: min(850px, 100%);
  box-shadow: 0 25px 80px #0005;
}
.modal-card.wide {
  width: min(1120px, 100%);
}
.modal-close {
  position: absolute;
  right: 14px;
  top: 12px;
  border: 0;
  background: transparent;
  font-size: 26px;
}
.info-help {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid #9ca3af;
  border-radius: 50%;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}
.info-help:hover,
.info-help:focus-visible {
  border-color: var(--red);
  background: #fff1f2;
  color: var(--red);
}
.info-text {
  white-space: pre-line;
  font-size: 15px;
  line-height: 1.6;
}
.drop-zone {
  display: grid;
  place-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 24px;
  border: 2px dashed #b8bbc4;
  border-radius: 16px;
  background: #fafafa;
  text-align: center;
  cursor: pointer;
  transition: 0.2s ease;
}
.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--red);
  background: #fff1f2;
  transform: translateY(-1px);
}
.drop-zone span,
.drop-zone small {
  color: var(--muted);
}
.drop-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}
.intake-status {
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #4b5563;
}
.intake-status.loading {
  background: #fff7ed;
  color: #9a3412;
}
.intake-status.success {
  background: #ecfdf5;
  color: #065f46;
}
.intake-status.error {
  background: #fef2f2;
  color: #991b1b;
}
.candidate-queue {
  margin: -6px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.queue-head,
.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.queue-head small,
.queue-item small {
  display: block;
  color: var(--muted);
}
.queue-progress {
  height: 7px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}
.queue-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
  transition: width 0.25s ease;
}
.queue-list {
  display: grid;
  gap: 7px;
  max-height: 250px;
  overflow: auto;
}
.queue-item {
  justify-content: flex-start;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f8fafc;
}
.queue-item > span {
  display: grid;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: #e5e7eb;
  font-size: 12px;
  font-weight: 800;
}
.queue-item.processing {
  background: #fff7ed;
}
.queue-item.created {
  background: #ecfdf5;
}
.queue-item.duplicate {
  background: #eff6ff;
}
.queue-item.error {
  background: #fef2f2;
}
.consent-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
}
.consent-field input {
  width: auto;
}
.document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}
.document-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.document-frame {
  width: 100%;
  min-height: 72vh;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.document-text {
  max-height: 72vh;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.5;
}
.dimension-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.exam-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}
.exam-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid #dedee4;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.exam-choice:has(input:checked) {
  border-color: var(--red);
  background: #fff1f2;
}
.exam-choice input {
  width: auto;
  margin-top: 3px;
}
.exam-choice small,
.linked-exam small,
.linked-exam b {
  display: block;
}
.exam-choice small,
.linked-exam small {
  margin-top: 3px;
  color: var(--muted);
}
.linked-exam {
  margin-top: 14px;
  padding: 10px;
  border-radius: 10px;
  background: #f5f5f7;
}
.filter-result {
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.score-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.score-legend > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}
.score-legend b,
.score-legend span {
  display: block;
}
.score-legend span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.empty.compact {
  padding: 14px;
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #171719;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  transform: translateY(100px);
  opacity: 0;
  transition: 0.2s;
  z-index: 200;
}
.toast.show {
  transform: none;
  opacity: 1;
}
.exam-shell {
  max-width: 950px;
  margin: auto;
}
.question {
  margin: 15px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.option {
  display: block;
  padding: 9px;
  border-radius: 9px;
}
.option:hover {
  background: var(--soft);
}
.timer {
  position: sticky;
  top: 10px;
  background: #171719;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  float: right;
}
.meeting-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
.video-stage {
  background: #101012;
  border-radius: 16px;
  min-height: 410px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  width: 100%;
  min-height: 410px;
}
.video-tile {
  position: relative;
  min-width: 0;
  min-height: 205px;
  background: #18181b;
  overflow: hidden;
}
.video-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-name,
.video-connection {
  position: absolute;
  z-index: 2;
  left: 10px;
  color: #fff;
  background: #000a;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}
.video-name {
  bottom: 10px;
}
.video-connection {
  top: 10px;
}
.video-connection.failed {
  background: #a10d12e8;
}
.video-placeholder {
  position: absolute;
  z-index: 3;
  color: #aaa;
  text-align: center;
}
.call-controls {
  position: absolute;
  z-index: 4;
  bottom: 15px;
  display: flex;
  gap: 9px;
}
.call-btn {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  font-size: 19px;
}
.call-btn.device-off {
  background: #fee2e2;
  color: #991b1b;
  box-shadow: 0 0 0 2px #ef4444;
}
.call-btn.device-off::after {
  content: "×";
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}
.call-btn.end {
  background: var(--red);
  color: #fff;
}
.chat-box {
  height: 210px;
  overflow: auto;
  background: #fafafa;
  border-radius: 12px;
  padding: 10px;
}
.participants-box {
  max-height: 120px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}
.participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.participant-row:first-of-type {
  border-top: 0;
}
.chat-msg {
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 9px;
  margin-bottom: 8px;
}
.notice {
  border-left: 4px solid var(--red);
  background: var(--soft);
  padding: 12px;
  border-radius: 10px;
}
.progress {
  height: 8px;
  background: #eee;
  border-radius: 99px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--red);
}
.difficulty {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 150px;
}
.difficulty-bar {
  width: 86px;
  height: 7px;
  background: #e9e9ed;
  border-radius: 99px;
  overflow: hidden;
}
.difficulty-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #28a36a, #e5a000, var(--red));
}
.source-list {
  display: grid;
  gap: 5px;
  font-size: 11px;
}
.source-list a {
  color: var(--blue);
}
.bank-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bank-summary .tag {
  font-size: 12px;
  padding: 6px 10px;
}
.question-detail {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  margin: 8px 0;
}
@media (max-width: 1050px) {
  .sidebar {
    width: 230px;
  }
  .span-3 {
    grid-column: span 6;
  }
  .span-8,
  .span-7,
  .span-5,
  .span-4 {
    grid-column: span 12;
  }
  .search input {
    width: 150px;
  }
  .meeting-grid {
    grid-template-columns: 1fr;
  }
  .score-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    left: -290px;
    transition: 0.2s;
    width: 280px;
  }
  .sidebar.open {
    left: 0;
  }
  .menu {
    display: block;
  }
  .top-actions .search {
    display: none;
  }
  main {
    padding: 16px;
  }
  .span-3,
  .span-6 {
    grid-column: span 12;
  }
  .field,
  .field.w6,
  .field.w8 {
    grid-column: span 12;
  }
  .topbar h2 {
    font-size: 22px;
  }
  .exam-catalog,
  .score-legend {
    grid-template-columns: 1fr;
  }
  .document-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
.candidate-detail-edit {
  margin-left: auto;
}

.candidate-edit-form .card-head {
  margin-bottom: 18px;
}
