﻿:root {
  --cs-bg: #0b1523;
  --cs-panel: rgba(15, 27, 43, 0.94);
  --cs-field: #10182b;
  --cs-line: rgba(148, 163, 184, 0.22);
  --cs-text: #f8fafc;
  --cs-muted: #b6c3d4;
  --cs-orange: #ff5a2f;
  --cs-red: #ef4444;
  --cs-blue: #7cc2ff;
  --cs-yellow: #ffcc2f;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 90, 47, 0.14), transparent 32%),
    linear-gradient(135deg, #08111f 0%, #0d1c2a 52%, #071426 100%);
  color: var(--cs-text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

.cs-auth-nav {
  min-height: 78px;
  padding: 14px clamp(18px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(7, 20, 38, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cs-text);
  text-decoration: none;
}

.cs-auth-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cs-orange), var(--cs-red));
  color: white;
  font-weight: 1000;
}

.cs-auth-brand strong {
  display: block;
  font-size: 21px;
  line-height: 1;
}

.cs-auth-brand small {
  display: block;
  color: var(--cs-muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
}

.cs-auth-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs-auth-nav-actions a {
  color: #dbeafe;
  text-decoration: none;
  font-weight: 900;
  padding: 10px 12px;
  border-radius: 999px;
}

.cs-auth-nav-actions a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cs-auth-page {
  min-height: calc(100vh - 78px);
  display: grid;
  place-items: center;
  padding: 22px 18px;
}

.cs-auth-card {
  width: min(440px, 100%);
  background: var(--cs-panel);
  border: 1px solid var(--cs-line);
  border-radius: 26px;
  padding: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.cs-auth-heading {
  margin-bottom: 18px;
}

.cs-auth-kicker {
  margin: 0 0 8px;
  color: var(--cs-yellow);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cs-auth-heading h1 {
  margin: 0;
  font-size: clamp(31px, 5vw, 43px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.cs-auth-heading p {
  margin: 12px 0 0;
  color: var(--cs-muted);
  font-size: 14.5px;
  line-height: 1.45;
}

.cs-auth-warning {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fde68a;
  font-size: 13px;
  line-height: 1.4;
}

.cs-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--cs-line);
  border-radius: 16px;
  padding: 5px;
  gap: 5px;
  margin-bottom: 16px;
}

.cs-auth-tabs button {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--cs-muted);
  padding: 11px;
  font-weight: 1000;
  cursor: pointer;
}

.cs-auth-tabs button.active {
  background: linear-gradient(135deg, var(--cs-orange), var(--cs-red));
  color: white;
}

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

.cs-auth-field {
  display: grid;
  gap: 6px;
}

.cs-auth-field label {
  font-size: 12px;
  font-weight: 1000;
  color: #dbeafe;
}

.cs-auth-field input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: var(--cs-field);
  color: white;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 14.5px;
  outline: none;
}

.cs-auth-field input:focus {
  border-color: rgba(255, 90, 47, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 90, 47, 0.14);
}

.cs-auth-primary,
.cs-auth-oauth {
  width: 100%;
  border: 0;
  border-radius: 15px;
  padding: 14px 16px;
  color: white;
  font-weight: 1000;
  font-size: 15px;
  cursor: pointer;
}

.cs-auth-primary {
  margin-top: 2px;
  background: linear-gradient(135deg, var(--cs-orange), var(--cs-red));
}

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

.cs-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cs-muted);
  font-size: 12px;
  font-weight: 900;
  margin: 14px 0;
}

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

.cs-auth-oauth {
  margin-top: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--cs-line);
}

.cs-auth-oauth:hover {
  background: rgba(255, 255, 255, 0.12);
}

.cs-auth-message {
  margin-top: 14px;
  border-radius: 14px;
  padding: 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.cs-auth-message.success {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #bbf7d0;
}

.cs-auth-message.error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fecaca;
}

.cs-auth-message.info {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #bae6fd;
}

.cs-auth-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cs-auth-footer a {
  color: var(--cs-blue);
  font-weight: 1000;
  text-decoration: none;
  font-size: 14px;
}

.cs-auth-callback-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.cs-auth-callback-card {
  width: min(430px, 100%);
  text-align: center;
  background: var(--cs-panel);
  border: 1px solid var(--cs-line);
  border-radius: 26px;
  padding: 30px;
}

.cs-auth-spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 4px solid rgba(148, 163, 184, 0.25);
  border-top-color: var(--cs-orange);
  animation: csSpin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes csSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-height: 760px) {
  .cs-auth-page {
    align-items: start;
    padding-top: 12px;
  }

  .cs-auth-card {
    padding: 20px;
  }

  .cs-auth-heading h1 {
    font-size: 31px;
  }

  .cs-auth-heading p {
    font-size: 13px;
  }
}
