/* Singular ECHO — dashboard login. Sonar field + frosted glass. Echo module = blue. */

:root {
  --bg: #06080b;
  --ink: #f1ede4;
  --ink2: #b9b8b1;
  --mut: #7d827f;
  --line-2: #2b3538;
  --em: #5ac8fa;
  --em2: #8ad9ff;
  --em-deep: #2f9fe0;
  --core: #20c997;
  --cortex: #f0966e;
  --radius: 20px;
  --radius-sm: 12px;
  --ring: 0 0 0 3px rgba(90, 200, 250, 0.30);
  color-scheme: dark;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* The hidden attribute must always win, even over class display rules */
[hidden] { display: none !important; }

html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

#echo-field { position: fixed; inset: 0; z-index: 0; display: block; }

.scrim {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(46% 46% at 50% 50%, rgba(6, 8, 11, 0.38), transparent 72%),
    radial-gradient(130% 100% at 50% 50%, transparent 46%, rgba(6, 8, 11, 0.62) 100%);
}

/* centered brand block */
.stage-col { display: flex; flex-direction: column; align-items: center; gap: 26px; width: 100%; }

.brand-block { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 16px;
  color: #04121b;
  background: linear-gradient(135deg, var(--em2), var(--em-deep));
  box-shadow: 0 12px 34px rgba(90, 200, 250, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.wordmark {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--ink);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}
.wordmark em {
  font-style: italic; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(100deg, var(--em2), var(--em-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(90, 200, 250, 0.35));
}
.lede {
  margin: 0;
  color: var(--em); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 3.4px;
}

.ownership {
  position: fixed; z-index: 3; bottom: 22px; left: 0; right: 0; margin: 0;
  text-align: center;
  color: var(--mut); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.9px;
}

/* login layout */
.login-shell {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px 60px;
}

.login-panel {
  position: relative;
  width: min(400px, 100%);
  padding: 34px 34px 30px;
  border-radius: var(--radius);
  background: rgba(9, 13, 16, 0.62);
  border: 1px solid rgba(90, 200, 250, 0.20);
  box-shadow:
    0 40px 120px -30px rgba(0, 0, 0, 0.85),
    0 0 70px -24px rgba(90, 200, 250, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: rise 0.6s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .login-panel { background: rgba(9, 13, 16, 0.5); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(0.99); } to { opacity: 1; transform: none; } }

.language-field { position: absolute; top: 20px; right: 22px; display: flex; align-items: center; gap: 8px; }
.language-field span { color: var(--mut); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.7px; }

.eyebrow { margin: 0 0 10px; color: var(--em); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.6px; }
h1 { margin: 0; font-size: clamp(25px, 3vw, 30px); line-height: 1.07; font-weight: 800; letter-spacing: -0.5px; color: var(--ink); text-wrap: balance; }
.copy { margin: 11px 0 0; color: var(--ink2); font-size: 13.5px; line-height: 1.55; max-width: 32ch; }

form { display: grid; gap: 14px; margin-top: 24px; }
label { display: grid; gap: 7px; }
label span { color: var(--ink2); font-size: 12px; font-weight: 700; }

input {
  min-height: 47px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: rgba(6, 10, 13, 0.6);
  color: var(--ink);
  padding: 0 15px;
  font: 15px/1.2 inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
input::placeholder { color: var(--mut); }
input:focus { outline: none; border-color: var(--em); background: rgba(12, 20, 24, 0.75); box-shadow: var(--ring); }

select {
  min-height: 32px; border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(6, 10, 13, 0.6); color: var(--ink);
  padding: 0 28px 0 12px; font: 700 11.5px/1 inherit; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--mut) 50%), linear-gradient(135deg, var(--mut) 50%, transparent 50%);
  background-position: right 12px center, right 7px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
select:focus { outline: none; border-color: var(--em); box-shadow: var(--ring); }
select option { background: #0c1216; color: var(--ink); }

button[type="submit"] {
  min-height: 50px; margin-top: 4px; border: 0; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--em2), var(--em-deep)); color: #04121b;
  cursor: pointer; font: 800 14.5px/1 inherit; letter-spacing: 0.2px;
  box-shadow: 0 14px 34px -10px rgba(47, 159, 224, 0.6);
  transition: transform 0.12s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
button[type="submit"]:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 20px 46px -12px rgba(47, 159, 224, 0.75); }
button[type="submit"]:active { transform: translateY(0); }
button[type="submit"]:focus-visible { outline: none; box-shadow: var(--ring); }

.status { margin: 2px 0 0; min-height: 1.2em; font-size: 13px; color: var(--ink2); line-height: 1.5; }

#google-block { margin-top: 20px; }
.divider {
  display: flex; align-items: center; gap: 12px; margin: 0 0 15px;
  color: var(--mut); font-size: 11px; font-weight: 600; text-transform: lowercase; letter-spacing: 0.2px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
/* Google pill: our styling, Google's real (invisible) button on top catches the click */
#google-pill { position: relative; overflow: hidden; cursor: pointer; }
.gsi-overlay {
  position: absolute; inset: -2px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.001;
}

.alt-providers { display: flex; justify-content: center; gap: 10px; margin-top: 0; flex-wrap: wrap; }
.oauth-btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 42px; padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(6, 10, 13, 0.6);
  color: var(--ink); text-decoration: none;
  font: 600 13.5px/1 inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}
.oauth-btn:hover { border-color: var(--em); box-shadow: 0 0 0 3px rgba(90, 200, 250, 0.16); transform: translateY(-1px); }
.oauth-btn:focus-visible { outline: none; border-color: var(--em); box-shadow: var(--ring); }
.oauth-btn svg { flex: none; }

/* Responsive */
@media (max-width: 820px) {
  .login-shell { padding: 44px 16px 58px; }
  .login-panel { width: 100%; max-width: 440px; }
}
@media (max-width: 430px) {
  .wordmark { font-size: 25px; letter-spacing: 4px; }
  .brand-mark { width: 46px; height: 46px; border-radius: 13px; }
  .stage-col { gap: 20px; }
}

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