/* ============================================================
   Terraliti — Login & Signup pages
============================================================ */

:root {
  --bg: #050505;
  --surface: #090909;
  --surface-2: #0d0d0d;

  --text: #ededeb;
  --body: #a7a7a7;
  --muted: #707070;
  --dim: #4b4b4b;

  --line: #202020;
  --line-soft: #151515;
  --line-strong: #303030;

  --ease: cubic-bezier(.2, .8, .2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body.auth-body {
  background: var(--bg);
  color: var(--text);

  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;

  line-height: 1.5;

  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 3px;
  border-radius: 1px;
}

::selection {
  background: #fff;
  color: #000;
}

/* ============================================================
   Layout
============================================================ */

.auth-shell {
  min-height: 100vh;

  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* ============================================================
   Visual side (left)
============================================================ */

.auth-side {
  position: relative;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 44px 52px;

  border-right: 1px solid var(--line-soft);

  overflow: hidden;
}

.auth-side-grid {
  position: absolute;
  inset: 0;

  opacity: .3;

  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);

  background-size: 84px 84px;

  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 22%,
    black 68%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 22%,
    black 68%,
    transparent 100%
  );

  pointer-events: none;
}

.auth-side-brand {
  position: relative;
  z-index: 1;

  display: inline-flex;
  width: 156px;
}

.auth-side-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.auth-side-inner {
  position: relative;
  z-index: 1;

  max-width: 480px;
}

.auth-side-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  margin-bottom: 26px;

  color: #888;

  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.auth-side-kicker .dot,
.auth-side-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6fae6f;
  box-shadow: 0 0 8px rgba(111, 174, 111, .5);

  animation: auth-pulse 2.4s ease-in-out infinite;
}

@keyframes auth-pulse {
  0%, 100% { opacity: .55; }
  50%      { opacity: 1; }
}

.auth-side-quote {
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: .96;
  letter-spacing: -.065em;
  font-weight: 700;
}

.auth-side-quote em {
  color: #5e5e5e;
  font-style: normal;
}

.auth-side-facts {
  display: flex;
  flex-direction: column;
  gap: 14px;

  margin-top: 42px;

  color: #7a7a7a;
  font-size: 13.5px;
  line-height: 1.6;
}

.auth-side-facts strong {
  display: inline-block;

  margin-right: 14px;

  color: #555;

  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
}

.auth-side-foot {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: space-between;

  color: #555;

  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-side-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.auth-side-version {
  color: #3a3a3a;
}

/* ============================================================
   Form side (right)
============================================================ */

.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 60px 40px;

  background: #070707;

  position: relative;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-eyebrow {
  color: #666;

  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;

  margin-bottom: 16px;
}

.auth-title {
  font-size: clamp(32px, 3.6vw, 42px);
  line-height: 1.02;
  letter-spacing: -.055em;
  font-weight: 700;
}

.auth-sub {
  margin-top: 14px;

  color: #8b8b8b;

  font-size: 14px;
  line-height: 1.65;
}

/* ============================================================
   Google button slot
============================================================ */

.auth-google-slot {
  margin-top: 34px;

  min-height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* GIS renders an iframe; center it & keep it clean */
.auth-google-slot > div {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-google-slot iframe {
  max-width: 100%;
  color-scheme: normal;
}

.auth-fallback {
  margin-top: 34px;

  padding: 14px 16px;

  border: 1px solid #302020;
  background: #120808;
  color: #c8a5a5;

  font-size: 12.5px;
  line-height: 1.6;
}

.auth-inline-error {
  margin-top: 22px;

  padding: 12px 14px;

  border: 1px solid #3a2020;
  background: #150a0a;
  color: #d8a0a0;

  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

/* ============================================================
   Divider + switch + legal
============================================================ */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;

  margin: 28px 0 22px;

  color: #444;

  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #1c1c1c;
}

.auth-switch {
  color: #8b8b8b;
  font-size: 13px;
}

.auth-switch a {
  color: #fff;
  font-weight: 600;

  border-bottom: 1px solid #444;

  transition: border-color .2s ease;
}

.auth-switch a:hover {
  border-color: #fff;
}

.auth-legal {
  margin-top: 34px;

  color: #5e5e5e;

  font-size: 11px;
  line-height: 1.7;
}

.auth-main-foot {
  position: absolute;
  bottom: 28px;
  left: 40px;

  color: #555;

  font-size: 11.5px;
}

.auth-main-foot a {
  transition: color .2s ease;
}

.auth-main-foot a:hover {
  color: #fff;
}

/* ============================================================
   Responsive
============================================================ */

@media (max-width: 900px) {

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-side {
    padding: 32px 26px 28px;
    min-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .auth-side-inner {
    margin-top: 28px;
  }

  .auth-side-quote {
    font-size: 42px;
  }

  .auth-side-facts {
    display: none;
  }

  .auth-side-foot {
    margin-top: 32px;
  }

  .auth-main {
    padding: 56px 24px 96px;
  }

  .auth-main-foot {
    left: 24px;
    bottom: 22px;
  }
}

@media (max-width: 480px) {

  .auth-side-quote {
    font-size: 34px;
  }

  .auth-title {
    font-size: 30px;
  }

  .auth-google-slot iframe {
    max-width: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}