@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --ink: #242424;
  --muted: #6b6b6b;
  --line: #e5e0d7;
  --soft: #eee9e0;
  --paper: #f8f6f1;
  --forest: #111111;
  --forest-dark: #000000;
  --sage: #e9e5dc;
  --gold: #9b7047;
  --danger: #853f35;
  --shadow: 0 22px 70px rgba(44, 44, 44, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: 'DM Sans', Arial, sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 21px clamp(22px, 6vw, 92px);
}
.site-header img { width: 208px; height: auto; }
.language-switch { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.language-switch select { min-width: 94px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 30px 9px 11px; color: var(--ink); background-color: #fff; cursor: pointer; }
.language-switch select:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(155, 112, 71, .4); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #d22b1c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: #d22b1c;
}
.hero {
    position: relative;
    min-height: 700px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    align-items: center;
    gap: 60px;
    padding: 42px clamp(22px, 8vw, 130px) 100px;
    background: radial-gradient(circle at 90% 11%, rgba(155, 112, 71, .12), transparent 27%), linear-gradient(125deg, #fbfaf7 0%, #d22b1c1f 60%, #d22b1c1c 100%);
    overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  right: -180px;
  bottom: -220px;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 50%;
}
.hero-copy { position: relative; z-index: 1; max-width: 580px; }
h1, h2, h3 { font-family: 'Manrope', Arial, sans-serif; letter-spacing: -.05em; }
h1 { max-width: 620px; margin: 22px 0 20px; font-size: clamp(42px, 6vw, 82px); line-height: 1.2; }
h1 em { color: var(--forest); font-style: normal; }
.hero-copy p { max-width: 500px; margin: 0; color: var(--muted); font-size: 17px; }
.hero-note { display: flex; gap: 16px; align-items: center; margin-top: 34px; color: #d22b1c; font-size: 13px; font-weight: 700; }
.hero-note span { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; color: white; background: #d22b1c; font-size: 15px; }
.form-shell {
  position: relative;
  z-index: 2;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 24px;
  background: rgba(255,255,255,.83);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.form-shell h2 { margin: 0 0 7px; font-size: 25px; }
.form-shell > p { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #333333; font-size: 12px; font-weight: 700; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border .2s, box-shadow .2s;
}
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(0,0,0,.08); }
.city-field { position: relative; z-index: 3; }
.city-field-control { position: relative; }
.city-field-control > input { padding-right: 46px; }
.city-field-control::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 18px;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid #555555;
  border-bottom: 2px solid #555555;
  transform: rotate(45deg);
  pointer-events: none;
}
.city-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 224px;
  margin: 0;
  padding: 5px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(36, 36, 36, .14);
}
.city-suggestions[hidden] { display: none; }
.city-suggestions li { margin: 0; padding: 0; }
.city-suggestions [role="option"] {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.city-suggestions [role="option"]:hover,
.city-suggestions [role="option"][aria-selected="true"] { background: #f1eee7; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 21px; color: var(--muted); font-size: 11px; }
.consent input { margin-top: 3px; accent-color: var(--forest); }
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 10px;
    border: 0;
    border-radius: 11px;
    padding: 14px 18px;
    color: #fff;
    background: #d22b1c;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s, background .2s;
}
.button:hover { transform: translateY(-2px); background: var(--forest-dark); }
.button:disabled { opacity: .6; cursor: wait; }
.section { padding: 90px clamp(22px, 8vw, 130px); }
.section-intro { max-width: 540px; }
.section h2 { margin: 14px 0; font-size: clamp(32px, 4vw, 52px); line-height: 1.05; }
.section-intro p { color: var(--muted); }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 42px; }
.category { min-height: 180px; display: flex; flex-direction: column; justify-content: end; padding: 22px; border-radius: 16px; background: var(--sage); }
.category:nth-child(2) { background: #e7e7e7; }
.category:nth-child(3) { background: #e2e2e2; }
.category:nth-child(4) { background: #dcdcdc; }
.category strong { font-family: 'Manrope'; font-size: 18px; letter-spacing: -.04em; }
.category small { margin-top: 6px; color: var(--muted); font-size: 12px; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 32px clamp(22px, 8vw, 130px); color: #f6f4ef; background: var(--forest-dark); font-size: 13px; }
.footer img { width: 158px; filter: brightness(0) invert(1); opacity: .96; }
.footer-contacts { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 14px 30px; }
.footer-contact-group { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.footer-contact-group strong { color: #fff; font-size: 13px; }
.footer-contacts a { color: #f6f4ef; }
.footer-contacts a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-contacts span { color: #c9c9c9; }
.notice { margin: 0 auto 28px; max-width: 760px; padding: 14px 18px; border-radius: 12px; background: #eeeeee; color: var(--forest); font-size: 14px; }
.notice.error { background: #e4e4e4; color: var(--danger); }
.success-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: linear-gradient(135deg, #eee9df, #fbfaf7); }
.success-card { max-width: 540px; padding: 52px; border-radius: 24px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.success-icon { display: grid; place-items: center; width: 65px; height: 65px; margin: 0 auto 22px; border-radius: 50%; color: #fff; background: var(--forest); font-size: 28px; }
.success-card h1 { margin: 0 0 15px; font-size: 39px; }
.success-card p { color: var(--muted); }
.button.secondary { margin-top: 20px; background: transparent; border: 1px solid var(--forest); color: var(--forest); }
.admin-body { min-height: 100vh; background: #f5f3ee; }
.admin-header { display: flex; justify-content: space-between; align-items: center; padding: 22px clamp(22px, 5vw, 70px); background: #fff; border-bottom: 1px solid var(--line); }
.admin-header img { width: 184px; height: auto; }
.admin-header nav { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 13px; }
.admin-header nav a { color: var(--forest); font-weight: 700; }
.admin-header nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.admin-language { margin-left: 4px; }
.admin-language label { display: none; }
.admin-language select { min-width: 70px; padding: 8px 26px 8px 10px; }
.admin-main { padding: 45px clamp(22px, 5vw, 70px); }
.admin-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.admin-heading h1 { margin: 10px 0 0; font-size: 40px; }
.admin-date { color: var(--muted); font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat { position: relative; overflow: hidden; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(135deg, #fff 0%, #fbfaf7 100%); box-shadow: 0 8px 22px rgba(48, 48, 48, .035); }
.stat::after { content: ''; position: absolute; width: 50px; height: 50px; right: -21px; bottom: -22px; border: 1px solid rgba(155, 112, 71, .16); border-radius: 50%; }
.stat small { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.stat strong { display: block; margin-top: 9px; font-family: Manrope; font-size: 30px; }
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 12px 32px rgba(48, 48, 48, .045); }
.table-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.table-top h2 { margin: 0; font-size: 20px; }
.record-count { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.table-filters { display: flex; align-items: center; gap: 10px; }
.search-control input, .filter-select { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--ink); background: #fff; font-size: 12px; }
.search-control input { width: min(34vw, 340px); }
.search-control input:focus, .filter-select:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(0, 0, 0, .1); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1020px; }
th, td { padding: 15px 17px; border-bottom: 1px solid #eeece6; text-align: left; font-size: 13px; vertical-align: top; }
th { color: var(--muted); background: #faf9f6; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
tbody tr:hover { background: #fcfbf8; }
td strong { display: block; }
td small { color: var(--muted); }
.status { display: inline-flex; padding: 5px 9px; border-radius: 99px; background: #eeeeee; color: #111111; font-size: 11px; font-weight: 700; }
.status.qualified { background: #e9e2d5; color: #805b2c; }
.status.archived { background: #eef0ef; color: var(--muted); }
.status-form select { border: 1px solid var(--line); border-radius: 7px; padding: 6px; color: var(--ink); background: #fff; font-size: 12px; }
.note-disclosure { max-width: 330px; }
.note-disclosure summary { list-style: none; cursor: pointer; }
.note-disclosure summary::-webkit-details-marker { display: none; }
.note-preview { display: block; max-width: 300px; color: #424242; overflow-wrap: anywhere; }
.note-toggle { display: inline-block; margin-top: 5px; color: var(--forest); font-size: 11px; font-weight: 700; }
.note-hide, .note-disclosure[open] .note-show { display: none; }
.note-disclosure[open] .note-hide { display: inline; }
.note-full { max-width: 340px; margin-top: 9px; padding: 11px 12px; border-left: 2px solid var(--gold); border-radius: 0 8px 8px 0; color: #343434; background: #f7f5f0; line-height: 1.55; overflow-wrap: anywhere; }
.note-empty { color: #888888; font-size: 12px; font-style: italic; }
.empty-row { padding: 35px 20px; color: var(--muted); text-align: center; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: linear-gradient(135deg, #eee9df, #fbfaf7); }
.login-language, .success-language { position: absolute; z-index: 2; top: 22px; right: clamp(22px, 5vw, 70px); }
.login-language .language-switch label, .success-language .language-switch label { display: none; }
.login-card { width: min(100%, 410px); padding: 42px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.login-card img { display: block; width: 180px; margin: 0 auto 35px; }
.login-card h1 { margin: 0 0 7px; font-size: 28px; }
.login-card p { color: var(--muted); font-size: 13px; }
.login-card .field { margin-top: 22px; }
.login-card .button { margin-top: 22px; }
.remember-option { display: flex; align-items: center; gap: 9px; margin-top: 17px; color: var(--muted); font-size: 12px; cursor: pointer; }
.remember-option input { accent-color: var(--forest); }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 25px; }
  .hero-copy { max-width: 700px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .table-top { align-items: flex-start; flex-direction: column; }
  .table-filters { width: 100%; }
  .search-control { flex: 1; }
  .search-control input { width: 100%; }
}
@media (max-width: 560px) {
  .site-header { width: 100%; padding: 18px 16px; }
  .site-header img { width: 156px; }
  .site-header .language-switch { gap: 5px; }
  .site-header .language-switch label { display: none; }
  .site-header .language-switch select { min-width: 80px; padding: 8px 26px 8px 8px; font-size: 12px; }
  .hero { width: 100%; min-height: auto; gap: 34px; padding: 30px 16px 55px; }
  h1 { font-size: clamp(38px, 13vw, 58px); }
  .hero-copy p { font-size: 15px; }
  .form-shell { width: 100%; min-width: 0; padding: 22px 18px; border-radius: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .section { width: 100%; padding: 65px 16px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .category { min-height: 140px; padding: 16px; }
  .footer { width: 100%; align-items: flex-start; flex-direction: column; padding: 28px 16px; }
  .footer-contacts { grid-template-columns: 1fr; gap: 12px; }
  .admin-heading { display: block; }
  .admin-main { padding: 30px 20px; }
  .login-card { padding: 30px 24px; }
  .admin-header { align-items: flex-start; flex-direction: column; gap: 17px; padding: 17px 20px; }
  .admin-header img { width: 164px; }
  .admin-header nav { width: 100%; flex-wrap: wrap; gap: 13px; font-size: 12px; }
  .admin-header nav > span { display: none; }
  .admin-language { margin-left: auto; }
  .table-filters { align-items: stretch; flex-direction: column; }
  .filter-select { width: 100%; }
  .admin-heading h1 { font-size: 32px; }
  .login-language, .success-language { top: 14px; right: 15px; }
  .login-page { padding: 58px 16px 20px; }
}