/* CRZ auth — mobile-only layout (max 430px), shared login + register */
:root {
  --crz-bg: #f9f8f3;
  --crz-ink: #0f1419;
  --crz-muted: rgba(15, 20, 25, 0.55);
  --crz-green: #39e36a;
  --crz-font: "Outfit", system-ui, sans-serif;
  --crz-display: "Orbitron", "Outfit", sans-serif;
  --crz-safe-top: env(safe-area-inset-top, 0px);
  --crz-safe-bottom: env(safe-area-inset-bottom, 0px);
  --crz-mobile-w: 430px;
}

* { box-sizing: border-box; }

html {
  margin: 0;
  min-height: 100%;
  background: var(--crz-bg);
}

body.crz-auth {
  margin: 0 auto;
  width: 100%;
  max-width: var(--crz-mobile-w);
  min-height: 100dvh;
  font-family: var(--crz-font);
  color: var(--crz-ink);
  background: var(--crz-bg);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

.crz-shell {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  position: relative;
  overflow-x: hidden;
  background: var(--crz-bg);
}

.crz-shell::after {
  display: none;
}

.crz-top {
  position: relative;
  z-index: 2;
  padding: calc(8px + var(--crz-safe-top)) 18px 0;
}

.crz-brand {
  text-align: center;
}
.crz-brand__mark {
  margin: 0;
  font-family: var(--crz-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--crz-ink);
  text-shadow: none;
}
.crz-brand__mark span { color: var(--crz-green); }
.crz-brand__tag {
  margin: 5px 0 0;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--crz-muted);
}

.crz-hero {
  position: relative;
  z-index: 1;
  height: 24vh;
  min-height: 140px;
  max-height: 200px;
  margin-top: 4px;
}
.crz-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}
.crz-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent 0%, var(--crz-bg) 92%);
}

.crz-auth-block {
  position: relative;
  z-index: 3;
  margin-top: -24px;
  padding: 0 20px calc(14px + var(--crz-safe-bottom));
}

.crz-title {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.crz-title span { color: var(--crz-green); }
.crz-sub {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--crz-muted);
}

.crz-flash {
  margin: 0 0 10px;
  padding: 0;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* Form — tight stack, no extra margins on fields */
.crz-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}

label.crz-field {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin: 0;
  padding: 9px 14px 9px 11px;
  min-height: 0;
  cursor: text;
  background: var(--crz-bg);
  border: 1px solid rgba(57, 227, 106, 0.45);
  box-shadow:
    0 1px 3px rgba(15, 20, 25, 0.06),
    0 4px 12px rgba(15, 20, 25, 0.04);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
label.crz-field:focus-within {
  border-color: rgba(72, 255, 130, 0.72);
  box-shadow:
    0 0 0 2px rgba(57, 227, 106, 0.2),
    0 0 20px rgba(57, 227, 106, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.crz-field__ico-wrap {
  flex-shrink: 0;
  align-self: center;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(57, 227, 106, 0.1);
  border: 1px solid rgba(57, 227, 106, 0.25);
  box-shadow: none;
}
.crz-field__ico {
  width: 20px;
  height: 20px;
  color: #1a8f42;
}
.crz-field__ico-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  /* White freehand PNGs → match previous green icon tone */
  filter: brightness(0) saturate(100%) invert(36%) sepia(72%) saturate(1450%) hue-rotate(108deg) brightness(0.88);
}
.crz-field__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 2px 0;
}
.crz-field__lbl {
  display: block;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--crz-muted);
  line-height: 1;
}
.crz-phone {
  display: flex;
  align-items: center;
  gap: 6px;
}
.crz-dial {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--crz-ink);
}
.crz-field input {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--crz-ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 0;
  line-height: 1.3;
}
.crz-field input::placeholder {
  color: rgba(15, 20, 25, 0.35);
  font-weight: 500;
}
.crz-eye {
  flex-shrink: 0;
  align-self: center;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--crz-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  margin-right: -4px;
}
.crz-eye svg { width: 18px; height: 18px; }

label.crz-field.crz-captcha {
  align-items: center;
}
.crz-captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.crz-captcha-row input {
  flex: 1;
  min-width: 0;
}
.crz-captcha__img {
  flex-shrink: 0;
  width: auto;
  min-width: 92px;
  height: 46px;
  padding: 4px 8px;
  cursor: pointer;
  font: inherit;
  border: 0;
  border-radius: 8px;
  background: rgba(57, 227, 106, 0.08);
  border: 1px solid rgba(57, 227, 106, 0.22);
}
.crz-captcha__img img {
  display: block;
  width: 84px;
  height: 34px;
  object-fit: contain;
  pointer-events: none;
}

.crz-btn {
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  border: 2px solid rgba(4, 18, 10, 0.75);
  border-radius: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  background: linear-gradient(180deg, #9dffb8 0%, #52eb78 32%, #28d85a 68%, #14b843 100%);
  box-shadow:
    0 12px 28px rgba(18, 194, 74, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}
.crz-btn:active { transform: translateY(1px); }
.crz-btn svg { width: 20px; height: 20px; stroke: #fff; }
.crz-btn:disabled { opacity: 0.65; cursor: wait; }

.crz-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 2px 4px;
  color: var(--crz-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.crz-or::before,
.crz-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(15, 20, 25, 0.1);
}

.crz-alt {
  display: block;
  text-align: center;
  margin: 0;
  color: var(--crz-green);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.crz-alt--inline {
  display: inline;
}
.crz-alt--inline:hover,
.crz-alt--inline:focus-visible {
  text-decoration: underline;
}

.crz-switch {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--crz-muted);
  line-height: 1.4;
}

/* Register: scroll if needed, same field styles as login */
.crz-auth--register {
  overflow-y: auto;
}
.crz-auth--register .crz-shell {
  min-height: 100dvh;
  height: auto;
  padding-bottom: calc(10px + var(--crz-safe-bottom));
}
.crz-auth--register .crz-hero {
  height: 22vh;
  min-height: 128px;
  max-height: 180px;
}

/* Desktop: keep phone column centered, no wide layout */
@media (min-width: 431px) {
  html {
    background: #ebeae4;
  }
  body.crz-auth {
    box-shadow: 0 0 0 1px rgba(15, 20, 25, 0.08);
  }
}

@media (max-height: 700px) {
  .crz-hero {
    height: 18vh;
    min-height: 110px;
    max-height: 150px;
  }
  .crz-auth--register .crz-hero {
    min-height: 100px;
    max-height: 140px;
  }
  .crz-title { font-size: 24px; }
  .crz-form { gap: 6px; }
  label.crz-field { padding: 7px 12px 7px 10px; }
  .crz-field__ico-wrap { width: 40px; height: 40px; }
}
