* {
  box-sizing: border-box;
}

:root {
  --bg-1: #060d1b;
  --bg-2: #081325;
  --panel-strong: rgba(10, 18, 33, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3f7ff;
  --muted: #b9c7e2;
  --muted-2: #9fb0d1;
  --blue: #2563eb;
  --blue-2: #3c7bff;
  --success: #86efac;
  --error: #fda4af;
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.28);
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 25%),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.08), transparent 18%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

body {
  overflow-x: hidden;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 14, 27, 0.68);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.16));
}

.brand-texts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--muted-2);
}

.hero-section {
  display: grid;
  grid-template-columns: 0.98fr 1.02fr;
  gap: 34px;
  padding: 44px 28px 36px;
  align-items: stretch;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.hero-title {
  margin: 0;
  max-width: 700px;
  font-size: 62px;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-text {
  margin: 0;
  max-width: 700px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 6px;
}

.point {
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.point strong {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.point span {
  color: var(--muted-2);
  font-size: 14px;
  line-height: 1.6;
}

.hero-right {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-stage {
  position: relative;
  width: 100%;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-preview {
  position: absolute;
  inset: 16px 0 16px 0;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(17, 26, 46, 0.95), rgba(11, 18, 32, 0.98));
  box-shadow: var(--shadow-lg);
  filter: blur(4px);
  opacity: 0.58;
  transform: scale(0.985);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.preview-title {
  font-size: 20px;
  font-weight: 800;
}

.preview-meta {
  color: var(--muted-2);
  font-size: 13px;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 18px;
}

.preview-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  min-height: 170px;
  padding: 14px;
}

.preview-card h3 {
  margin: 0 0 18px;
  color: #8fd6ff;
  font-size: 16px;
  font-weight: 700;
}

.preview-line {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
}

.preview-line.short {
  width: 62%;
}

.preview-line.mid {
  width: 70%;
}

.preview-line.long {
  width: 78%;
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(500px, 100%);
  margin-right: 70px;
  padding: 28px;
  border-radius: 24px;
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(14px);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(37, 99, 235, 0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(37, 99, 235, 0.16));
}

.auth-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-brand-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.auth-brand-subtitle {
  font-size: 13px;
  color: var(--muted-2);
}

.auth-card h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.auth-sub {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 16px;
}

.form-status {
  min-height: 22px;
  margin-bottom: 12px;
  color: var(--muted-2);
  font-size: 14px;
}

.form-status.error {
  color: var(--error);
}

.form-status.success {
  color: var(--success);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: #d7e3ff;
  font-size: 14px;
  font-weight: 700;
}

.input {
  width: 100%;
  padding: 15px 16px;
  margin-bottom: 14px;
  border-radius: 13px;
  border: 1px solid #22304d;
  background: #0a1221;
  color: #ffffff;
  outline: none;
  font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.input::placeholder {
  color: #7f93b9;
}

.input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.btn {
  width: 100%;
  padding: 15px 18px;
  border-radius: 13px;
  border: 1px solid #2a3b5f;
  color: white;
  cursor: pointer;
  font-weight: 800;
  font-size: 16px;
  transition: 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.97;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border-color: var(--blue);
  box-shadow:
    0 14px 30px rgba(37, 99, 235, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-switch-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
}

.auth-switch-link {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 6px;
  color: #76a0ff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.auth-switch-link:hover {
  color: #9bbcff;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 20, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.logo-loader {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-core {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle at top left, #2563eb, #0f172a 72%);
  border: 1px solid rgba(125, 211, 252, 0.35);
  box-shadow: 0 0 35px rgba(37, 99, 235, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
}

.logo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid rgba(125, 211, 252, 0.12);
  border-top: 4px solid #7dd3fc;
  border-right: 4px solid #2563eb;
  animation: spin 1.2s linear infinite;
  box-shadow: 0 0 30px rgba(125, 211, 252, 0.1);
}

.loading-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.loading-text {
  color: var(--muted-2);
  font-size: 15px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1200px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 52px;
  }

  .hero-right {
    min-height: 560px;
  }

  .preview-stage {
    min-height: 560px;
  }

  .auth-card {
    margin-right: 0;
    width: min(520px, 100%);
  }
}

@media (max-width: 800px) {
  .topbar {
    padding: 18px 16px;
  }

  .hero-section {
    padding: 28px 16px 26px;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-text {
    font-size: 17px;
  }

  .hero-points {
    grid-template-columns: 1fr;
  }

  .preview-stage,
  .hero-right {
    min-height: 500px;
  }

  .auth-card {
    padding: 22px 18px;
    margin-right: 0;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 560px) {
  .brand-title {
    font-size: 20px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .hero-title {
    font-size: 34px;
  }

  .dashboard-preview {
    inset: 12px 0 12px 0;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .auth-card h2 {
    font-size: 24px;
  }
}
