:root {
  --auth-deep: #0a2e8a;
  --auth-main: #1847b8;
  --auth-bright: #2f80ed;
  --auth-green: #2fa84f;
  --auth-red: #e84a4a;
}

.auth-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, .9) 0%,
      rgba(255, 255, 255, .78) 38%,
      rgba(255, 255, 255, .68) 68%,
      rgba(255, 255, 255, .86) 100%
    ),
    url("/static/images/mobile-cotton-bg.webp?v=20260705");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.auth-page::before,
.auth-page::after {
  content: "";
  position: fixed;
  pointer-events: none;
  inset: auto;
  z-index: 0;
}

.auth-page::before {
  left: 0;
  right: 0;
  top: 0;
  height: 260px;
  background:
    linear-gradient(135deg, rgba(10, 46, 138, .07) 25%, transparent 25%) 0 0 / 22px 22px,
    linear-gradient(225deg, rgba(24, 71, 184, .05) 25%, transparent 25%) 0 0 / 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent);
}

.auth-page::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, .82) 72%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 16px 24px;
}

.auth-hero {
  position: relative;
  min-height: 250px;
  padding: 4px 2px 18px;
}

.auth-hero::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 116px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 46%, rgba(255,255,255,.88) 0 9px, transparent 10px),
    radial-gradient(circle at 29% 38%, rgba(255,255,255,.8) 0 7px, transparent 8px),
    radial-gradient(circle at 40% 51%, rgba(255,255,255,.84) 0 8px, transparent 9px),
    linear-gradient(145deg, rgba(255,255,255,.72), rgba(232, 244, 255, .38));
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.auth-hero::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 42px;
  width: 150px;
  height: 72px;
  background:
    linear-gradient(138deg, transparent 52%, rgba(10, 46, 138, .24) 53%, transparent 55%),
    linear-gradient(26deg, transparent 48%, rgba(24, 71, 184, .2) 49%, transparent 51%),
    linear-gradient(180deg, rgba(10, 46, 138, .16), rgba(255,255,255,0));
  clip-path: polygon(0 82%, 20% 52%, 34% 68%, 54% 25%, 72% 57%, 88% 18%, 100% 82%);
  opacity: .7;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(145deg, var(--auth-deep), var(--auth-bright));
  box-shadow: 0 12px 24px rgba(24, 71, 184, .24);
}

.brand-name {
  font-weight: 900;
  color: var(--auth-deep);
  font-size: 18px;
  letter-spacing: 0;
}

.brand-sub {
  color: #5d7192;
  font-size: 12px;
  margin-top: 2px;
}

.hero-copy {
  position: relative;
  margin-top: 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(47, 128, 237, .18);
  color: var(--auth-main);
  font-size: 12px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 13px 0 8px;
  color: var(--auth-deep);
  font-size: 30px;
  line-height: 1.16;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 0;
  color: #53647f;
  font-size: 15px;
  line-height: 1.55;
}

.auth-card,
.farmer-preview {
  position: relative;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 16px 40px rgba(10, 46, 138, .13);
  backdrop-filter: blur(12px);
}

.auth-card {
  padding: 18px;
  margin-top: 14px;
}

.card-head h2 {
  margin: 0 0 7px;
  font-size: 19px;
  color: var(--auth-deep);
  letter-spacing: 0;
}

.card-head p,
.privacy-note {
  margin: 0;
  color: #66758e;
  line-height: 1.55;
  font-size: 13px;
}

.auth-field {
  display: grid;
  gap: 8px;
  margin-top: 15px;
  color: #42516b;
  font-size: 14px;
  font-weight: 800;
}

.auth-field input {
  height: 52px;
  border-radius: 14px;
  border: 1px solid #d8e5f5;
  padding: 0 15px;
  font-size: 17px;
  color: #15213a;
  background: #f8fbff;
}

.auth-field input:focus {
  border-color: var(--auth-bright);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, .14);
}

.auth-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 14px;
  margin-top: 14px;
  color: white;
  font-weight: 900;
  font-size: 16px;
  background: linear-gradient(135deg, var(--auth-main), var(--auth-bright));
  box-shadow: 0 14px 26px rgba(24, 71, 184, .24);
  cursor: pointer;
  opacity: .72;
}

.auth-btn.ready,
.auth-btn.loading {
  opacity: 1;
}

.auth-btn:disabled {
  cursor: not-allowed;
  color: #7b8ba5;
  background: #dce7f5;
  box-shadow: none;
}

.auth-btn.loading {
  background: linear-gradient(135deg, #476da8, #669be2);
}

.inline-message {
  display: none;
  margin-top: 12px;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.inline-message.show {
  display: block;
}

.inline-message.error {
  color: #a51616;
  background: #fff0f0;
  border: 1px solid rgba(232, 74, 74, .24);
}

.inline-message.success {
  color: #12622f;
  background: #ecfff2;
  border: 1px solid rgba(47, 168, 79, .24);
}

.privacy-note {
  margin-top: 12px;
}

.farmer-preview {
  padding: 15px;
  margin-top: -4px;
}

.preview-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.preview-title strong {
  color: var(--auth-deep);
  font-size: 16px;
}

.secure-badge {
  border-radius: 999px;
  padding: 4px 8px;
  color: #176334;
  background: #e9fbef;
  font-size: 12px;
  font-weight: 900;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.preview-item {
  min-height: 58px;
  border-radius: 14px;
  padding: 9px 10px;
  background: #f5f9ff;
  border: 1px solid #e3edf9;
}

.preview-item span {
  display: block;
  color: #7b8ba5;
  font-size: 12px;
  margin-bottom: 4px;
}

.preview-item strong {
  display: block;
  color: #1d2a44;
  font-size: 15px;
  word-break: break-word;
}

.invalid-card {
  padding: 16px;
  border-radius: 16px;
  color: #8b1d1d;
  background: #fff1f1;
  border: 1px solid rgba(232, 74, 74, .25);
  line-height: 1.55;
}

.skeleton-line {
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef4fc, #dfeafa, #eef4fc);
  background-size: 200% 100%;
  animation: authShimmer 1.4s infinite linear;
}

.skeleton-line.short {
  width: 58%;
  margin-top: 12px;
}

.auth-footer {
  margin-top: 18px;
  padding: 0 8px;
  text-align: center;
  color: #5c6c84;
}

.auth-footer strong,
.auth-footer span {
  display: block;
}

.auth-footer strong {
  color: var(--auth-deep);
  font-size: 13px;
  margin-bottom: 5px;
}

.auth-footer span {
  font-size: 12px;
  line-height: 1.45;
}

.report-app {
  min-height: 100vh;
  background: #f5f8fc;
}

@keyframes authShimmer {
  to { background-position: -200% 0; }
}

@media (max-width: 390px) {
  .auth-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-copy h1 {
    font-size: 27px;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }
}
