:root {
  --forest: #14352b;
  --forest-deep: #0d241d;
  --leaf: #1f7a52;
  --sand: #f3efe6;
  --paper: #fffaf3;
  --ink: #1b2420;
  --muted: #5d675f;
  --line: #e4dacb;
  --danger: #8e2e2e;
  --shadow: 0 24px 60px rgba(20, 40, 32, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: Manrope, sans-serif;
  color: var(--ink);
  background: var(--sand);
}

h1, .eyebrow {
  font-family: Fraunces, Georgia, serif;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  font-weight: 560;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

a { color: inherit; }

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  min-height: 100vh;
}

.intro {
  background:
    radial-gradient(900px 420px at 10% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(165deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: #f6f3ec;
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.intro .eyebrow-line { white-space: nowrap; }

.eyebrow {
  margin: 0 0 16px;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d7c7a4;
}

.lead {
  font-size: 1.08rem;
  line-height: 1.55;
  color: #e7efe9;
  max-width: 38rem;
}

.points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  padding: 0 0 14px 22px;
  line-height: 1.45;
  color: #d5e2da;
}

.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0b15a;
}

.channel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.channel-links a, .button-link, button, .admin-actions a {
  font: 600 0.98rem/1 Manrope, sans-serif;
  text-decoration: none;
}

.channel-links a {
  color: #14352b;
  background: #f3efe6;
  border-radius: 999px;
  padding: 12px 16px;
}

.channel-links.on-light a {
  color: #fffaf3;
  background: var(--forest);
}

.hint, .doc-links {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.doc-links { margin: 8px 0 0 30px; }
.doc-links a { color: var(--leaf); }

.req { color: var(--leaf); }

.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(165deg, var(--forest) 0%, var(--forest-deep) 100%);
}

.landing-card {
  width: min(760px, 100%);
  background: var(--paper);
  color: var(--ink);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px 32px 24px;
  container-type: inline-size;
}

.landing-card .eyebrow {
  margin-bottom: 10px;
  color: #8d7344;
}

.landing-card h1 {
  color: var(--forest-deep);
  max-width: none;
  font-size: clamp(0.82rem, 3.85cqi, 2.15rem);
  line-height: 1.25;
  white-space: nowrap;
}

.landing-card .lead {
  color: var(--muted);
  margin: 10px 0 0;
}

.landing-card .choose {
  margin: 18px 0 0;
  font-weight: 700;
}

.landing-card .channel-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.landing-card .channel-links a {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  width: 100%;
  justify-content: center;
  padding: 14px 18px;
  color: #fffaf3;
  background: var(--forest);
}

.landing-card .channel-links a:hover { background: #0f2b23; }

.panel, .center-page, .text-page, .admin {
  padding: 48px 28px;
}

.panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

form {
  width: min(460px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 32px 28px 28px;
}

label {
  display: block;
  margin: 16px 0 8px;
  font-weight: 700;
  font-size: 0.92rem;
}

input[type="text"], input[type="tel"], input[type="email"], input[type="password"], input:not([type]), select {
  width: 100%;
  border: 1px solid #d9cdb8;
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  font: 500 1rem/1.3 Manrope, sans-serif;
}

input:focus {
  outline: 3px solid rgba(31, 122, 82, 0.25);
  border-color: var(--leaf);
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 22px;
  font-weight: 500;
  line-height: 1.45;
}

.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--leaf); }

.check a { color: var(--leaf); }

.field-group {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.field-group legend {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 0.92rem;
}

.check.compact { margin-top: 10px; }

button, .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: var(--forest);
  color: #fffaf3;
  padding: 15px 18px;
  cursor: pointer;
}

button:hover, .button-link:hover, .admin-actions a:hover { background: #0f2b23; }

.field-error, .form-error { color: var(--danger); margin: 8px 0 0; font-size: 0.92rem; }

.form-error {
  background: #fdecec;
  border-radius: 12px;
  padding: 10px 12px;
}

.center-page, .text-page {
  max-width: 760px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.center-page .lead, .text-page p { color: var(--muted); }

.button-link { width: auto; align-self: flex-start; padding-inline: 22px; }

.summary-list {
  width: min(560px, 100%);
  margin: 28px 0 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 8px 22px;
}

.summary-list div {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.summary-list div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted); font-weight: 700; }
.summary-list dd { margin: 0; overflow-wrap: anywhere; }

.plain-form {
  width: min(560px, 100%);
  margin-top: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.secondary-form { margin-top: 10px; }

.quiet-button {
  background: transparent;
  color: var(--forest);
  border: 1px solid var(--line);
}

.quiet-button:hover { background: rgba(20, 53, 43, 0.08); }

.text-page { justify-content: flex-start; padding-top: 72px; }
.text-page p { font-size: 1.05rem; line-height: 1.6; }

.narrow form { margin-top: 8px; }

.admin {
  width: min(1240px, 100%);
  max-width: none;
  margin: 0 auto;
}

.admin-bar, .admin-actions, .filters {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.admin-actions { justify-content: flex-end; flex: none; }
.admin-actions form {
  width: auto;
  margin: 0;
  display: flex;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.admin-actions a, .admin-actions button {
  width: auto;
  margin: 0;
  padding: 12px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

button.quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.admin-actions a { background: var(--forest); color: white; }

.broadcast {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px 8px;
  margin: 8px 0 22px;
}
.broadcast p { color: var(--muted); line-height: 1.45; }
.broadcast h2 {
  margin: 0 0 8px;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.7rem;
  font-weight: 560;
}
form.broadcast-form {
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}
textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1px solid #d9cdb8;
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  font: 500 1rem/1.45 Manrope, sans-serif;
}
textarea:focus, input[type="file"]:focus { outline: 3px solid rgba(31, 122, 82, 0.25); border-color: var(--leaf); }
input[type="file"] {
  width: 100%;
  padding: 12px 0;
  font: 500 0.98rem/1.4 Manrope, sans-serif;
}
form.broadcast-form button { width: auto; min-width: 220px; }
.notice {
  background: #e7f4ec;
  color: var(--forest);
  border-radius: 12px;
  padding: 10px 12px;
}
.history { list-style: none; margin: 0 0 12px; padding: 0; }
.history li { border-top: 1px solid var(--line); padding: 12px 0; }
.history span { display: inline-block; margin-right: 12px; color: var(--muted); font-size: 0.92rem; }
.history p { margin: 6px 0 0; white-space: pre-wrap; color: var(--ink); }

.filters { justify-content: flex-start; margin: 8px 0 20px; flex-wrap: wrap; }
.filters a {
  text-decoration: none;
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}
.filters a[aria-current="page"] { background: var(--forest); color: white; border-color: var(--forest); }

.records {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1.1fr) max-content minmax(0, 1.3fr) max-content minmax(0, 1fr) max-content;
  column-gap: 18px;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  padding: 0 18px;
}
.records > * {
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.records > :nth-last-child(-n + 8) { border-bottom: 0; }
.records > .head {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.records time,
.records .phone,
.records .channel,
.records .verified,
.records .head { white-space: nowrap; }
.records .name,
.records .email,
.records .city,
.records .interests { overflow-wrap: anywhere; }
.records .interests {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty { color: var(--muted); }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .intro, .panel { padding: 32px 18px; }
  .intro { min-height: auto; }
  .landing-card { padding: 22px 18px 18px; }
  h1 { font-size: 2.3rem; }
  .admin-bar { align-items: flex-start; flex-direction: column; }
  .records {
    grid-template-columns: 1fr;
    row-gap: 2px;
    padding: 8px 18px 16px;
  }
  .records > .head { display: none; }
  .records > * { border-bottom: 0; padding: 2px 0; }
  .records .interests {
    overflow: visible;
    white-space: normal;
  }
  .records time {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-weight: 700;
  }
  .records time:nth-of-type(1) { margin-top: 0; border-top: 0; }
  .records .channel::before,
  .records .phone::before,
  .records .email::before,
  .records .verified::before,
  .records .city::before,
  .records .interests::before,
  .records .name::before {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .records .name::before { content: "ФИО"; }
  .records .channel::before { content: "Канал"; }
  .records .phone::before { content: "Телефон"; }
  .records .email::before { content: "Почта"; }
  .records .city::before { content: "Город"; }
  .records .interests::before { content: "Интересы"; }
  .records .verified::before { content: "Из мессенджера"; }
}
