:root {
  --ink: #1c1c1c;
  --muted: #6d6d6d;
  --line: #d4d4d4;
  --addon: #ececec;
  --black: #111111;
  --black-hover: #2a2a2a;
  --green: #22c55e;
  --green-hover: #16a34a;
  --green-ico: #128a3e;
  --blue: #1a8cff;
  --danger: #9f1d1d;
  --card: #ffffff;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #0c0907;
}

button,
input {
  font-family: inherit;
}

.page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 42% at 50% 0%, rgba(232, 196, 122, 0.14), transparent 46%),
    radial-gradient(ellipse 72% 50% at 50% 72%, rgba(201, 146, 58, 0.72), transparent 64%),
    linear-gradient(180deg, #0c0907 0%, #1a110c 18%, #3d2614 46%, #9a6428 72%, #c4923e 86%, #7a4c1c 100%);
}

.page::before {
  content: "";
  position: fixed;
  inset: -15%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, rgba(255, 214, 140, 0.22), transparent 36%);
  animation: drift 10s ease-in-out infinite;
}

.stage {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 12px 22px;
}

.logo {
  width: min(196px, 52vw);
  height: auto;
  aspect-ratio: 250 / 63;
  object-fit: contain;
  object-position: center;
  margin: 2px 0 12px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.32));
  animation: floaty 4.8s ease-in-out infinite;
}

.card {
  width: min(340px, calc(100% - 20px));
  background: #fff;
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  padding: 14px 14px 8px;
  animation: rise 0.45s ease;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.title-icon {
  width: 18px;
  height: 18px;
  fill: var(--blue);
}

.field {
  display: flex;
  align-items: stretch;
  border: 1px solid #d0d0d0;
  background: #fff;
  margin-bottom: 8px;
  min-height: 36px;
  border-radius: 0;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.field input {
  flex: 1;
  width: 100%;
  border: 0;
  outline: none;
  background: #fff;
  color: #1d1a16;
  padding: 7px 8px 7px 10px;
  font-size: 15px;
  min-width: 0;
}

.field input::placeholder {
  color: #9a9a9a;
}

.field:focus-within {
  border-color: #9a9a9a;
}

.addon {
  width: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  background: #ececec;
  color: #666;
  border: 0;
  border-left: 1px solid #ddd;
  padding: 0;
  cursor: default;
}

button.addon {
  cursor: pointer;
}

button.addon:hover,
button.addon:focus-visible {
  background: #e2e2e2;
  color: #333;
}

.addon svg,
.btn-ico svg,
.bubble svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.btn-ico svg,
.bubble svg,
.title-icon,
.addon svg {
  display: block;
}

#loginForm {
  margin: 0 0 8px;
}

.stack {
  display: grid;
  gap: 8px;
}

.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 8px 40px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: var(--black);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: none;
  box-shadow: none;
}

.btn-dark:hover,
.btn-dark:focus-visible {
  background: var(--black-hover);
}

.btn-green {
  background: var(--green);
}

.btn-green:hover,
.btn-green:focus-visible {
  background: var(--green-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.btn-ico {
  position: absolute;
  right: 5px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border-radius: 0;
  background: #2c2c2c;
  color: #fff;
}

.btn-green .btn-ico {
  background: var(--green-ico);
}

.btn-ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
}

.btn-green .btn-ico svg,
.bubble svg {
  fill: currentColor;
  stroke: none;
}

.captcha-note {
  margin: 8px 0 2px;
  color: #8a8a8a;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.captcha-note a {
  color: #1a73e8;
  text-decoration: none;
}

.captcha-note a:hover,
.captcha-note a:focus-visible {
  text-decoration: underline;
}

.form-alert {
  display: none;
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 4px;
  background: #fdecea;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

.form-alert.show {
  display: block;
}

.form-alert.ok {
  background: #e8f8ee;
  color: #146c36;
}

.welcome-name {
  margin: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
}

.welcome-id,
.welcome-copy {
  margin: 6px 0 0;
  text-align: center;
  color: #444;
  font-size: 14px;
}

.welcome-copy {
  margin-bottom: 16px;
}

.socials {
  margin: 12px -14px -8px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  padding: 12px 10px 10px;
  background: transparent;
  border: 0;
  border-top: 1px solid #ececec;
  border-radius: 0;
  box-shadow: none;
}

.social {
  width: auto;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #1a1a1a;
  text-decoration: none;
  text-align: center;
}

.brand-logo {
  width: 44px;
  height: 44px;
  display: block;
  filter: none;
  transition: transform 0.16s ease;
}

.social:hover .brand-logo,
.social:focus-visible .brand-logo {
  transform: translateY(-2px);
}

.social:focus-visible {
  outline: 2px solid #111;
  outline-offset: 4px;
}

.social-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.2px;
  text-shadow: none;
}

.social-label small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  opacity: 0.92;
}

.footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 52px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: #000;
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  grid-column: 1;
}

.footer a {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.footer a:hover,
.footer a:focus-visible {
  text-decoration: underline;
}

.footer-support {
  grid-column: 2;
  justify-self: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px 14px;
  background: rgba(0, 0, 0, 0.62);
  overflow: auto;
}

.modal[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(360px, 100%);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  background: #fff;
  color: var(--ink);
  border-radius: 0;
  padding: 16px 14px 14px;
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin: 0 36px 8px 0;
  font-size: 22px;
}

.modal-lead,
.modal-copy p {
  margin: 0 0 12px;
  color: #444;
  font-size: 14px;
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 0;
  background: #f2f2f2;
  color: #222;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: #e4e4e4;
}

.stack-field {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.stack-field input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d0d0d0;
  border-radius: 0;
  padding: 7px 10px;
  font-size: 15px;
  font-weight: 400;
  color: #1d1a16;
  background: #fff;
}

.stack-field input:focus {
  outline: none;
  background: #fff;
  border-color: #9a9a9a;
  box-shadow: none;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 14px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.check input {
  margin-top: 2px;
  accent-color: #16a34a;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.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;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, 28px, 0) scale(1.08);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@media (max-width: 640px) {
  .stage {
    padding-top: 20px;
  }

  .footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 8px;
  }

  .footer-links,
  .footer-support {
    grid-column: auto;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .card {
    padding: 14px 12px 8px;
  }

  .socials {
    margin-left: -12px;
    margin-right: -12px;
  }

  .btn {
    font-size: 14px;
    padding-inline: 40px;
  }

  .social {
    min-width: 64px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .socials {
    gap: 16px;
  }
}

@media (max-height: 760px) and (orientation: landscape) {
  .stage {
    padding-top: 14px;
    padding-bottom: 20px;
  }

  .logo {
    width: min(168px, 34vw);
    margin-bottom: 10px;
  }
}

@media (min-width: 1200px) {
  .logo {
    width: 210px;
    margin-top: 12px;
  }

  .card {
    width: min(360px, calc(100% - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.admin-wrap {
  width: min(980px, calc(100% - 28px));
  margin: 28px auto 40px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: #fff;
}

.admin-head h1 {
  margin: 0;
  font-size: 28px;
}

.admin-count {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.admin-head .btn {
  width: auto;
  min-width: 120px;
}

.number-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.number-bar .stack-field {
  flex: 1;
  margin: 0;
}

.number-bar .btn {
  width: auto;
  min-width: 140px;
  margin-bottom: 0;
}

.number-note {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.admin-wrap .form-alert {
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .number-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .number-bar .btn {
    width: 100%;
  }
}

.leads-wrap {
  overflow: auto;
  background: #fff;
  border-radius: 0;
  box-shadow: 0 18px 40px rgba(20, 8, 2, 0.28);
}

.leads {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.leads th,
.leads td {
  padding: 12px 14px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #f0e8dc;
  white-space: nowrap;
}

.leads th {
  background: #1a120c;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.leads tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 720px) {
  .leads {
    min-width: 0;
  }

  .leads thead {
    display: none;
  }

  .leads,
  .leads tbody,
  .leads tr,
  .leads td {
    display: block;
    width: 100%;
  }

  .leads tr {
    padding: 12px 14px;
    border-bottom: 1px solid #f0e8dc;
  }

  .leads td {
    border: 0;
    padding: 3px 0;
    white-space: normal;
  }

  .leads td::before {
    content: attr(data-label);
    display: inline-block;
    width: 96px;
    font-weight: 700;
    color: #6d5b46;
  }
}

.leads tbody tr:hover td {
  background: #fff8ee;
}

.empty-leads {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  color: #666;
}

.pass-card {
  width: min(380px, calc(100% - 28px));
  margin: 12vh auto;
}
