:root {
  color-scheme: dark;
  --bg: #081018;
  --panel: rgba(8, 20, 30, 0.88);
  --panel-strong: rgba(11, 28, 42, 0.96);
  --field: rgba(2, 12, 20, 0.88);
  --line: rgba(88, 218, 255, 0.34);
  --line-strong: rgba(113, 236, 255, 0.72);
  --text: #eefaff;
  --muted: #8fb6c7;
  --accent: #43e6ff;
  --accent-2: #4ade80;
  --danger: #ff6b7a;
  --button: #16d67f;
  --button-text: #03120c;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, #050b12 0%, #071827 48%, #050c12 100%);
}

body::before {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(88, 218, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 218, 255, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent);
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--button);
  color: var(--button-text);
  font-weight: 800;
  cursor: pointer;
}

button:hover:not(:disabled) {
  filter: brightness(1.08);
}

button:disabled {
  cursor: progress;
  opacity: 0.68;
}

a {
  color: var(--accent);
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 440px);
  align-items: center;
  gap: 28px;
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 0;
}

.brand-panel {
  display: grid;
  gap: 16px;
}

.brand-panel img,
.brand-logo {
  width: min(430px, 100%);
}

.brand-mark {
  width: min(460px, 100%);
  aspect-ratio: 2.5;
  background-image: url("./geocore-logo.png");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
}

.brand-panel h1 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.05;
}

.brand-panel p {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.auth-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  padding: 24px;
  backdrop-filter: blur(18px);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.tab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.tab.is-active {
  border-color: var(--line-strong);
  background: rgba(67, 230, 255, 0.12);
  color: var(--text);
}

.auth-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--text);
  padding: 0 12px;
}

input:focus {
  outline: 2px solid rgba(67, 230, 255, 0.34);
  outline-offset: 1px;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.divider::before,
.divider::after {
  height: 1px;
  content: "";
  background: var(--line);
}

.oauth-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
}

.google-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    conic-gradient(#4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
}

.secondary-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.secondary-actions button,
#returnButton {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 0 12px;
}

.status {
  min-height: 22px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.status[data-tone="success"] {
  color: var(--accent-2);
}

.status[data-tone="error"] {
  color: var(--danger);
}

.account-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(67, 230, 255, 0.08);
  padding: 14px;
}

.label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.account-email {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

.legal {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .auth-shell {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 22px;
  }

  .brand-panel {
    justify-items: center;
    text-align: center;
  }

  .brand-mark {
    background-position: center;
  }

  .auth-panel {
    padding: 20px;
  }
}

@media (max-width: 430px) {
  .auth-shell {
    width: min(100% - 20px, 1040px);
    padding: 18px 0;
  }

  .tabs,
  .secondary-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}
