/* PREPMODE EDUTECH — leads.css v1: Leads, Free test settings and Diagnostic tests (leads.js, file 110) */
.ld-head { align-items: flex-end; }
.ld-sub { font-size: 12.5px; color: var(--slate); font-weight: 400; }
.ld-amber { color: var(--warn-ink); }
.ld-ok { color: var(--ok); font-weight: 600; }
.ld-num { text-align: right; font-variant-numeric: tabular-nums; }

/* tools: status tabs + search */
.ld-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.ld-tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--rule-2); flex-wrap: wrap; }
.ld-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent;
  font: 600 14px var(--body); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.ld-tab:hover { background: rgba(255, 255, 255, .6); }
.ld-tab[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(22, 15, 34, .12); }
.ld-n { font-weight: 500; color: var(--slate); }
.ld-tab[aria-selected=true] .ld-n { color: var(--brand); font-weight: 700; }
.ld-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ld-filters .ld-search { width: 260px; max-width: 100%; }
.ld-filters .ld-course { width: auto; min-width: 140px; }

/* list + panel */
.ld-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.ld-split.open { grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); }
.ld-list { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.ld-list > .ld-empty { border: 0; margin: 0; padding: 36px 24px; line-height: 1.7; }
.ld-table td, .ld-table th { vertical-align: middle; }
.ld-table td:first-child b { display: block; }
.ld-table .ld-sub { display: block; }
.ld-row { cursor: pointer; }
.ld-row:hover td { background: #F9FAFB; }
.ld-row.sel td { background: var(--brand-soft); }
.ld-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ld-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); position: sticky; top: 16px;
  max-height: calc(100vh - 32px); display: flex; flex-direction: column; min-width: 0; }
.ld-ph { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 18px 20px 12px; }
.ld-ph h2 { margin: 0; font-size: 20px; }
.ld-ph p { margin: 2px 0 0; }
.ld-x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--slate); cursor: pointer; }
.ld-x:hover { background: var(--rule-2); color: var(--ink); }
.ld-pb { overflow-y: auto; padding: 0 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.ld-pb section { border-top: 1px solid var(--rule-2); padding-top: 12px; }
.ld-pb h3 { margin: 0 0 8px; font-size: 14px; }
.ld-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ld-fact { background: var(--paper); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ld-fact > span { font-size: 12px; color: var(--slate); font-weight: 600; }
.ld-fact b { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.ld-fact small { font-size: 12px; color: var(--slate); }
.ld-wait { background: #FFF8EC; border: 1px solid #F6D9A8; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #93370D; }
.ld-wait b { color: var(--warn-ink); }
.ld-topics summary { cursor: pointer; font-weight: 600; color: var(--brand); font-size: 13.5px; min-height: 28px; }
.ld-bars { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ld-bar { display: grid; grid-template-columns: minmax(0, 1fr) 90px 40px; gap: 8px; align-items: center; font-size: 13px; }
.ld-bar-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.ld-bar-track { height: 7px; border-radius: 4px; background: var(--rule-2); overflow: hidden; }
.ld-bar-track i { display: block; height: 100%; background: var(--ok); }
.ld-bar-track i.mid { background: #D97706; } .ld-bar-track i.low { background: #DC6803; }
.ld-contact { font-size: 14px; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.ld-contact a { color: var(--ink); }
.ld-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ld-btns .btn { min-height: 40px; padding: 8px 16px; }
.ld-btns .ico { width: 17px; height: 17px; }
.ld-status { display: flex; flex-wrap: wrap; gap: 6px; }
.ld-status button { min-height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--field); background: var(--surface); font: 500 13px var(--body); color: var(--ink-2); cursor: pointer; }
.ld-status button:hover { background: var(--rule-2); }
.ld-status button[aria-checked=true] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; font-weight: 600; }
.ld-enrolled { background: #ECFDF3; color: #027A48; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.ld-lab { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; margin: 0; }
.ld-pb textarea { width: 100%; min-height: 76px; }
.ld-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ld-hist li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
.ld-when { color: var(--slate); font-variant-numeric: tabular-nums; }
.ld-enrol { border-top: 1px solid var(--rule-2); padding-top: 14px; }
.ld-enrol .btn.block { margin-top: 0; }
.ld-enrol p { margin: 8px 0 0; }

/* enrol dialog */
.ld-dlg { position: fixed; inset: 0; z-index: 60; background: rgba(22, 15, 34, .55); display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow: auto; }
.ld-dlg-box { width: min(560px, 100%); background: var(--surface); border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); display: flex; flex-direction: column; }
.ld-dlg-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--rule-2); }
.ld-dlg-h h2 { margin: 0; font-size: 19px; }
.ld-dlg-b { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.ld-dlg-b label { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ld-dlg-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--rule-2); background: #F9FAFB; border-radius: 0 0 20px 20px; }
.ld-field { display: flex; flex-direction: column; gap: 4px; }
.ld-two { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; }
.ld-note { margin: 0; background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.ld-seat { margin: -4px 0 0; font-size: 13px; color: var(--ink-2); }
.ld-ways { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ld-way { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 14px; border: 1px solid var(--field); border-radius: var(--radius-sm); background: var(--surface); font: inherit; cursor: pointer; }
.ld-way[aria-checked=true] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.ld-way[disabled] { opacity: .55; cursor: not-allowed; }
.ld-dlg .notice ul { margin: 6px 0 0; padding-left: 18px; }

/* settings */
.ld-sgrid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.ld-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ld-col > .panel { margin: 0; }
.ld-card h2 { font-size: 18px; margin-bottom: 10px; }
.ld-pad { padding: 22px 22px 8px; }
.ld-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ld-line p { margin: 4px 0 0; }
.ld-rule { height: 1px; background: var(--rule-2); margin: 16px 0; }
.ld-card > p.ld-sub { margin: 4px 0 12px; }
.ld-tip { margin: 12px 0 0 !important; }
.ld-modes { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ld-mode { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 12px; cursor: pointer; margin: 0; font-weight: 400; }
.ld-mode input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.ld-mode > span { display: flex; flex-direction: column; gap: 2px; }
.ld-mode.on { border: 2px solid var(--brand); padding: 11px 13px; background: var(--brand-soft); }
.ld-switch { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; margin: 0; border-radius: 999px; background: #CFCBE0; position: relative; cursor: pointer; transition: background .15s; }
.ld-switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; transition: left .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.ld-switch:checked { background: var(--brand); }
.ld-switch:checked::after { left: 24px; }
.ld-switch:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, white); outline-offset: 2px; }
.ld-switch:disabled { opacity: .5; cursor: progress; }
.ld-ctable td { vertical-align: top; }
.ld-ctable td:first-child { width: 90px; }
.ld-ctable td:last-child { width: 170px; }
.ld-tests, .ld-owntests { display: flex; flex-direction: column; gap: 6px; }
.ld-test { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 400; font-size: 14px; cursor: pointer; }
.ld-test input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.ld-q { display: block; font-size: 14px; margin: 14px 0 8px; }
.ld-card .ld-q:first-of-type { margin-top: 4px; }
.ld-radio { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; font-weight: 400; font-size: 14px; cursor: pointer; }
.ld-radio input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.ld-radio.off { color: var(--slate); cursor: not-allowed; }
.ld-indent { margin: 0 0 4px 28px; }
.ld-card select { width: 100%; }
.ld-savebar { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ld-savebar .form-error { margin: 0; }
.ld-swl { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; cursor: pointer; }
.ld-dtable td:first-child { min-width: 220px; }

@media (max-width: 1100px) {
  .ld-split.open { grid-template-columns: minmax(0, 1fr); }
  .ld-panel { position: static; max-height: none; }
  .ld-sgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .ld-tools { flex-direction: column; align-items: stretch; }
  .ld-tabs { border-radius: 16px; }
  .ld-filters .ld-search { width: 100%; flex: 1 1 100%; }
  .ld-table th:nth-child(4), .ld-table td:nth-child(4), .ld-table th:nth-child(6), .ld-table td:nth-child(6) { display: none; }
  .ld-two { grid-template-columns: minmax(0, 1fr); }
  .ld-ctable td:last-child { width: auto; }
  .ld-dtable th:nth-child(3), .ld-dtable td:nth-child(3), .ld-dtable th:nth-child(5), .ld-dtable td:nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ld-switch, .ld-switch::after { transition: none; } }
