/* Цвета, фон и формы: testsdod v2.4.17, public/assets/app.css. */
:root {
  color-scheme: dark;
  --ink: #edf6ff;
  --muted: #9eafc8;
  --surface: rgba(15, 28, 48, .84);
  --surface-strong: #12243a;
  --line: rgba(165, 203, 244, .18);
  --accent: #60b9f9;
  --blue: #8bd2ff;
  --red: #ffb1b8;
  --green: #94dec5;
  --shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #07111f; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: linear-gradient(145deg, #06101d, #0a192b 62%, #081524);
  color: var(--ink);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
body::before, body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}
body::before {
  width: min(50rem, 75vw); height: min(50rem, 75vw);
  top: -20rem; left: -16rem;
  background: radial-gradient(circle, rgba(50, 143, 221, .26), rgba(47, 94, 177, .11) 48%, transparent 72%);
}
body::after {
  width: min(40rem, 70vw); height: min(40rem, 70vw);
  top: 18%; right: -16rem;
  background: radial-gradient(circle, rgba(28, 191, 210, .15), rgba(54, 110, 194, .08) 48%, transparent 72%);
}
body > header, body > main, body > footer { position: relative; z-index: 1; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: #b5e6ff; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button, a.button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #84ccfa; outline-offset: 3px; }
[hidden] { display: none !important; }
.topbar {
  width: calc(100% - 40px);
  max-width: 1160px;
  margin: 12px auto 0;
  padding: 18px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: rgba(15, 28, 48, .5);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 38px rgba(0, 0, 0, .12);
  backdrop-filter: blur(18px);
}
.brand { color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 850; letter-spacing: .075em; line-height: 1.1; }
.brand small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .025em; }
.top-label { color: var(--muted); font-size: 13px; }
h1, h2 { color: var(--ink); letter-spacing: -.025em; }
h1 { font-size: 30px; line-height: 1.2; margin: 10px 0 14px; font-weight: 760; }
h2 { font-size: 22px; line-height: 1.25; margin: 0 0 12px; font-weight: 700; }
p { overflow-wrap: anywhere; }
.landing { width: 100%; max-width: 600px; margin: 0 auto; padding: 62px 20px 72px; }
.lookup-card, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  min-width: 0;
}
.lookup-card { padding: 32px; }
.section-label, .eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .06em; margin: 0 0 10px; }
.muted { color: var(--muted); }
.card-description { color: var(--muted); font-size: 14px; margin: 0 0 26px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
input, select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 13px;
  background: rgba(3, 15, 28, .5);
  color: var(--ink);
  font-size: 16px;
}
input::placeholder { color: var(--muted); opacity: .8; }
input:focus, select:focus { background: var(--surface-strong); border-color: #70bdf1; box-shadow: 0 0 0 3px rgba(83, 181, 249, .14); }
input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 1000px var(--surface-strong) inset; }
select option { background: var(--surface-strong); color: var(--ink); }
.field-hint { color: var(--muted); font-size: 12px; margin: 9px 0 20px; line-height: 1.6; }
.primary, .secondary, .button {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 44px; margin-top: 20px; padding: 11px 16px;
  border: 1px solid transparent; border-radius: 11px; font-size: 14px; font-weight: 600;
  line-height: 1.5; text-decoration: none;
}
.primary { color: #061a2e; background: #73c9fa; border-color: #73c9fa; }
.primary:hover { color: #061a2e; background: #a0dcff; border-color: #a0dcff; }
.secondary { color: var(--muted); background: transparent; border-color: var(--line); }
.secondary:hover { color: var(--ink); background: #29425d; border-color: #6a92b4; }
.help { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 17px; }
.help p { color: var(--muted); font-size: 12px; margin: 0; }
.event-chip { color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: var(--surface-strong); padding: 12px 14px; font-size: 13px; margin: 20px 0 22px; overflow-wrap: anywhere; }
.notice { color: #d3e8fa; background: rgba(96, 185, 249, .08); border: 1px solid rgba(96, 185, 249, .28); border-radius: 12px; padding: 14px 16px; font-size: 14px; margin: 18px 0; overflow-wrap: anywhere; }
.notice.error { color: var(--red); background: rgba(161, 52, 69, .14); border-color: rgba(242, 127, 145, .3); }
.notice.success { color: var(--green); background: rgba(38, 125, 92, .13); border-color: rgba(96, 206, 164, .26); }
.result { display: flex; gap: 14px; background: rgba(38, 125, 92, .12); border: 1px solid rgba(96, 206, 164, .3); border-radius: 12px; padding: 20px; color: var(--green); font-size: 14px; }
.result p { color: var(--ink); margin: 9px 0 7px; font-weight: 650; font-size: 17px; }
.result small { color: var(--muted); font-size: 12px; }
.result-check { font-size: 22px; }
.centered { text-align: center; }
.back-link { display: block; text-align: center; margin: 20px 0 0; font-size: 14px; }
footer { display: flex; justify-content: space-between; gap: 16px; width: calc(100% - 40px); max-width: 1160px; margin: auto auto 0; padding: 22px 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer a { color: var(--muted); }
.login-wrap { width: 100%; max-width: 540px; padding: 62px 20px 72px; margin: 0 auto; }
.small-title { font-size: 30px; line-height: 1.2; margin: 0 0 14px; }
.admin-main { width: 100%; max-width: 1200px; padding: 36px 20px 64px; margin: 0 auto; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.admin-heading h1 { margin: 5px 0 0; }
.compact { min-height: 38px; width: auto; margin: 0; padding: 8px 13px; font-size: 13px; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 22px 26px; margin: 24px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.stats strong { display: block; color: var(--ink); font-size: 28px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 13px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; }
.panel { padding: 28px; margin-bottom: 24px; }
.panel h2 { font-size: 20px; }
.panel p { font-size: 14px; color: var(--muted); }
.section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.section-heading p { margin: 6px 0 0; }
.step { min-width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface-strong); border-radius: 10px; color: var(--accent); font-size: 14px; font-weight: 650; }
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px; border: 1px dashed rgba(165, 203, 244, .4); border-radius: 12px; background: rgba(3, 15, 28, .3); text-align: center; }
.drop-zone strong { font-size: 14px; }
.drop-zone > span { color: var(--muted); font-size: 13px; font-weight: 400; }
.drop-zone .upload-arrow { font-size: 24px; color: var(--accent); }
.drop-zone input { font-size: 12px; min-height: 38px; padding: 7px; max-width: 100%; }
.event-list { margin-top: 18px; }
.event-row { display: flex; gap: 18px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.event-row > div { flex: 1; min-width: 0; }
.event-row strong { font-size: 15px; }
.event-row a { color: var(--ink); text-decoration: none; }
.event-row small, td small { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.badge { display: inline-block; border: 1px solid var(--line); background: var(--surface-strong); color: var(--muted); font-size: 12px; padding: 5px 10px; border-radius: 9px; white-space: nowrap; }
.badge.live { color: #94dec5; background: rgba(38, 125, 92, .14); border-color: rgba(96, 206, 164, .25); }
.badge.pending { color: #f4ca7b; background: rgba(165, 125, 39, .13); border-color: rgba(244, 202, 123, .24); white-space: normal; margin-top: 9px; }
.filters { display: flex; gap: 12px; margin: 22px 0; }
.filters input, .filters select { flex: 1; min-width: 0; }
.count { font-size: 13px; color: var(--muted); background: var(--surface-strong); border-radius: 8px; padding: 3px 8px; margin-left: 7px; font-weight: 400; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th { background: var(--surface-strong); color: var(--muted); font-size: 12px; letter-spacing: .04em; font-weight: 600; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td input { min-width: 260px; }
td strong { font-weight: 600; }
.filename { overflow-wrap: anywhere; max-width: 350px; }
.row-actions { display: flex; align-items: center; gap: 15px; white-space: nowrap; }
.text-button { display: inline-block; padding: 5px 0; background: none; border: 0; color: var(--blue); text-decoration: none; font-size: 13px; cursor: pointer; }
.danger { color: var(--red); }
.fit { width: auto; min-width: 225px; max-width: 100%; }
.stage { border-color: rgba(96, 185, 249, .5); }
.empty { text-align: center; padding: 36px 10px; color: var(--muted); font-size: 14px; }
.pagination { display: flex; gap: 20px; align-items: center; font-size: 14px; margin-top: 24px; }
.pagination span { margin-right: auto; color: var(--muted); }
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.email-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.checkbox-row { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; font-weight: 600; }
.checkbox-row input { width: 18px; min-height: 18px; height: 18px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.factor-setting { background: rgba(3, 15, 28, .3); border: 1px solid var(--line); padding: 16px 20px; border-radius: 12px; }
.factor-setting .fit { min-width: 0; width: 100%; }
.email-summary { padding-top: 14px; }
summary { font-size: 14px; font-weight: 600; cursor: pointer; padding: 12px 0; }
.certificate-table { min-width: 1040px; }
.email-binding { min-width: 250px; }
.email-binding select { min-height: 38px; font-size: 14px; }
.email-binding button { margin-top: 8px; }
.email-binding small { max-width: 245px; }
@media (max-width: 780px) {
  .topbar { width: calc(100% - 28px); padding: 17px 18px; gap: 14px; }
  .brand { font-size: 19px; }
  .top-label { font-size: 12px; max-width: 110px; text-align: right; }
  .landing, .login-wrap { padding: 32px 14px 44px; }
  .lookup-card { padding: 25px 22px; }
  h1, .small-title { font-size: 27px; }
  .admin-main { padding: 28px 14px 48px; }
  .panel { padding: 22px 18px; }
  .admin-grid, .email-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .email-grid { gap: 22px; }
  .stats { padding: 18px; gap: 10px; }
  .stats strong { font-size: 25px; }
  .stats span { font-size: 12px; }
  .event-row { flex-wrap: wrap; gap: 12px; }
  .event-row > div { flex-basis: 60%; }
  .filters { flex-wrap: wrap; }
  .filters select { flex-basis: 100%; }
  .filters input { flex-basis: 60%; }
  .filters button { flex: 1; }
  .pagination { flex-wrap: wrap; }
  .email-binding select { font-size: 16px; }
  table { min-width: 540px; }
  footer { width: calc(100% - 28px); font-size: 11px; gap: 12px; }
}
@media (max-width: 360px) {
  .lookup-card { padding: 22px 18px; }
  .top-label { max-width: 100px; }
  h1, .small-title { font-size: 25px; }
  .stats span { font-size: 11px; }
}
