/* Auth screens (matches Flutter LoginScreen) */
.auth-body {
  margin: 0;
  min-height: 100vh;
  background: #000;
  color: #fff;
  font-family: "Exo 2", system-ui, sans-serif;
}

.auth-main {
  background: #000;
}

.top-auth-links {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.top-auth-logout-form {
  margin: 0;
}

.top-auth-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.top-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-h, 52px);
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.top-auth-btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.top-auth-btn-outline:hover,
.top-auth-btn-outline.is-active {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
}

.top-auth-btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.top-auth-btn-primary:hover {
  filter: brightness(1.08);
}

.top-auth-btn-primary.is-active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.auth-page {
  min-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  position: relative;
}

.auth-top {
  display: flex;
  justify-content: flex-end;
  padding: 12px 12px 0;
}

.auth-skip {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.auth-skip:hover {
  color: #fff;
}

.auth-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  min-width: 300px;
}

.auth-tabs {
  display: flex;
  padding: 4px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.auth-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.auth-tab.is-active {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 3px 10px rgba(227, 24, 55, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.28);
}

.auth-panel {
  display: none;
}

.auth-panel.is-active {
  display: block;
}

.auth-heading {
  margin: 20px 0 0;
  text-align: center;
  font-size: clamp(1.75rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.15;
}

.auth-sub {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.4;
}

.auth-form {
  margin-top: 4px;
}

.auth-field {
  display: block;
  margin-top: 20px;
  position: relative;
}

.auth-field:first-child {
  margin-top: 20px;
}

.auth-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 22px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s ease;
}

.auth-field input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.auth-field input:focus {
  border-color: #fff;
  border-width: 1.5px;
  padding: 15.5px 21.5px;
}

.auth-field-password input {
  padding-right: 48px;
}

.auth-toggle-pass {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  padding: 6px;
  display: flex;
}

.auth-forgot-row {
  margin-top: 5px;
  text-align: right;
}

.auth-forgot-row a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.auth-forgot-row a:hover {
  text-decoration: underline;
}

.auth-submit {
  position: relative;
  width: 100%;
  margin-top: 20px;
  height: 50px;
  border: none;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow:
    0 6px 14px rgba(227, 24, 55, 0.42),
    0 3px 8px rgba(0, 0, 0, 0.22);
  transition: filter 0.15s ease;
}

.auth-submit:hover {
  filter: brightness(1.06);
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.38);
}

.auth-social-btn {
  position: relative;
  width: 100%;
  margin-top: 10px;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.auth-social-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.auth-social-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.auth-switch {
  margin: 20px 0 0;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}

.auth-switch a {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  color: #fff;
  text-decoration: underline;
}

.auth-legal {
  margin: 20px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

.auth-legal a {
  color: var(--red);
  text-decoration: underline;
}

.auth-alert {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.auth-alert.is-error {
  background: rgba(227, 24, 55, 0.15);
  border: 1px solid rgba(227, 24, 55, 0.45);
  color: #ffb4be;
}

.auth-alert.is-success {
  background: rgba(40, 167, 69, 0.12);
  border: 1px solid rgba(40, 167, 69, 0.4);
  color: #b8e6c4;
}

.auth-page.is-loading {
  pointer-events: none;
}

.auth-page.is-loading .auth-card {
  opacity: 0.65;
}

.auth-loading {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
}

.auth-loading.is-visible {
  display: flex;
  pointer-events: auto;
}

.auth-loading[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.auth-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 32px;
  border-radius: 16px;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.auth-loading-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
}

.auth-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}

.auth-submit.is-loading,
.auth-social-btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.auth-submit.is-loading .auth-btn-label,
.auth-social-btn.is-loading .auth-btn-label {
  opacity: 0;
}

.auth-submit.is-loading .auth-btn-spinner,
.auth-social-btn.is-loading .auth-btn-spinner {
  display: block;
}

.auth-btn-spinner {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}

.auth-social-btn.is-loading img {
  opacity: 0;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-policy-wrap {
  align-items: flex-start;
  padding-top: 8px;
  padding-bottom: 32px;
}

.auth-policy-doc h1 {
  font-size: 1.5rem;
  margin: 0 0 16px;
}

.auth-policy-body {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.auth-policy-body p {
  margin: 0 0 1em;
}
