:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080d13;
  color: #f3f0e8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 360px;
  min-height: 100svh;
  background:
    linear-gradient(122deg, rgba(17, 28, 40, 0.94), rgba(8, 13, 19, 0.98) 58%, rgba(12, 20, 28, 0.96)),
    #080d13;
}

.auth-shell {
  min-height: calc(100svh - 301px);
  display: grid;
  place-items: center;
  padding: 24px 24px 32px;
}

.auth-card {
  width: min(100%, 600px);
  padding: 28px 36px 24px;
  border: 1px solid #46515c;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 28, 38, 0.98), rgba(10, 17, 24, 0.98));
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.5), inset 0 1px rgba(255, 255, 255, 0.035);
}

.auth-logo {
  display: block;
  width: max-content;
  margin: 0 auto 10px;
}

.auth-logo img { display: block; }

.auth-state { text-align: center; }
.auth-state[hidden] { display: none; }

.auth-state h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  line-height: 1.12;
}

.auth-state .auth-sign-in-title {
  display: grid;
  gap: 2px;
  margin: 0 0 32px;
  font-size: 24px;
}

.auth-state p {
  margin: 0 auto 18px;
  max-width: 48ch;
  color: #c4cbd1;
  line-height: 1.55;
}

.auth-providers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 28px;
}

.provider-button,
#auth-error-reset {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid #8d7750;
  border-radius: 10px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #1c2835, #121b25);
  color: #f3f0e8;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.provider-button:hover,
.provider-button:focus-visible,
#auth-error-reset:hover,
#auth-error-reset:focus-visible {
  border-color: #c6aa72;
  background: linear-gradient(180deg, #243342, #17222d);
  outline: 2px solid rgba(198, 170, 114, 0.42);
  outline-offset: 2px;
}

.auth-state .auth-note {
  margin: 0 auto;
  border-top: 1px solid #37434e;
  padding-top: 28px;
  color: #aab3ba;
  font-size: 0.88rem;
}

.auth-loading-line {
  display: block;
  position: relative;
  width: min(100%, 420px);
  height: 38px;
  margin: 0 auto 20px;
  overflow: hidden;
}

.auth-loading-line::before,
.auth-loading-line::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 0;
  width: 100%;
  height: 2px;
}

.auth-loading-line::after {
  background: rgba(0, 213, 152, 0.14);
}

.auth-loading-line::before {
  background: linear-gradient(to right, transparent, #00d598, transparent);
  transform: translateX(-100%);
  animation: auth-loading-slide 0.9s linear infinite;
}

.auth-error {
  border: 1px solid #cc5f42;
  border-radius: 12px;
  padding: 20px;
  background: rgba(86, 29, 20, 0.3);
}

.auth-error h1 { color: #ffb29d; }

body.vroomitest-app-loading > .auth-shell {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  overflow: auto;
  background: inherit;
}

body.vroomitest-app-running > .auth-shell {
  display: none !important;
}

@keyframes auth-loading-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@media (max-width: 620px) {
  .auth-shell { min-height: auto; padding: 24px 14px; }
  .auth-card { padding: 26px 20px 22px; }
  .auth-providers { grid-template-columns: 1fr; }
}

@media (min-width: 621px) and (max-height: 944px) {
  .auth-shell { padding: 0 24px; }
  .auth-card { padding: 6px 36px; }
  .auth-logo { margin-bottom: 8px; }
  .auth-logo img { width: 290px; height: auto; }
  .auth-state .auth-sign-in-title { font-size: 20px; }
  .auth-providers { gap: 8px; }
  .provider-button,
  #auth-error-reset { min-height: 38px; padding-block: 7px; }
  .auth-state .auth-note { max-width: none; font-size: 0.82rem; line-height: 1.45; }
}

