@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --auth-bg: #070b1a;
  --auth-bg-soft: #0d1430;
  --auth-panel: rgba(10, 18, 42, 0.82);
  --auth-panel-strong: rgba(11, 21, 48, 0.92);
  --auth-border: rgba(160, 174, 255, 0.16);
  --auth-border-soft: rgba(255, 255, 255, 0.08);
  --auth-text: #f8fafc;
  --auth-muted: #9aa8ca;
  --auth-subtle: #7b89ad;
  --auth-brand: #7c5cff;
  --auth-brand-2: #27b3ff;
  --auth-success: #34d399;
  --auth-danger: #fda4af;
  --auth-warning: #fcd34d;
  --auth-info: #7dd3fc;
  --auth-shadow: 0 30px 80px rgba(2, 8, 23, 0.45);
}

* {
  box-sizing: border-box;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--auth-text);
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(39, 179, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #050814 0%, #091128 48%, #050814 100%);
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(124, 92, 255, 0.06), transparent 25%),
    radial-gradient(circle at 20% 80%, rgba(124, 92, 255, 0.08), transparent 18%);
  opacity: 0.95;
}

.auth-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.auth-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 26px 42px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.auth-brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(39, 179, 255, 0.2));
  border: 1px solid rgba(160, 174, 255, 0.22);
  color: #dbe6ff;
  font-size: 22px;
  box-shadow: 0 18px 34px rgba(25, 34, 82, 0.32);
}

.auth-brand-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.auth-brand-title strong {
  color: #8b73ff;
}

.auth-brand-subtitle {
  margin: 4px 0 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--auth-subtle);
  text-transform: uppercase;
}

.auth-topbar-note {
  color: var(--auth-muted);
  font-size: 13px;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, 480px);
  gap: 34px;
  padding: 30px 42px 42px;
  align-items: center;
}

.auth-shell > .auth-card {
  align-self: start;
  margin-top: -6px;
}

.auth-showcase {
  padding-right: 10px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.2);
  background: rgba(124, 92, 255, 0.08);
  color: #c8d3ff;
  font-size: 13px;
  font-weight: 600;
}

.auth-showcase h1 {
  max-width: 700px;
  margin: 22px 0 18px;
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.auth-highlight {
  background: linear-gradient(90deg, #8f75ff, #34b9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-showcase p {
  max-width: 650px;
  margin: 0;
  color: var(--auth-muted);
  font-size: 19px;
  line-height: 1.7;
}

.auth-dashboard-preview {
  margin-top: 30px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--auth-border);
  background:
    linear-gradient(180deg, rgba(13, 23, 52, 0.92), rgba(10, 19, 44, 0.86)),
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.12), transparent 28%);
  box-shadow: var(--auth-shadow);
  transform: rotate(-3deg);
}

.auth-dashboard-preview-inner {
  display: grid;
  gap: 14px;
  transform: rotate(3deg);
}

.auth-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.auth-preview-head strong {
  font-size: 14px;
}

.auth-preview-chip {
  min-height: 30px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #b8c5ea;
  font-size: 12px;
}

.auth-preview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.auth-preview-stat,
.auth-preview-panel,
.auth-feature-card {
  border: 1px solid var(--auth-border-soft);
  background: rgba(255, 255, 255, 0.035);
}

.auth-preview-stat {
  padding: 14px;
  border-radius: 16px;
}

.auth-preview-stat span {
  display: block;
  color: var(--auth-muted);
  font-size: 11px;
}

.auth-preview-stat strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
}

.auth-preview-stat em {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 11px;
  color: var(--auth-success);
}

.auth-preview-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.8fr);
  gap: 14px;
}

.auth-preview-panel {
  min-height: 220px;
  padding: 18px;
  border-radius: 18px;
}

.auth-chart {
  position: relative;
  min-height: 160px;
  overflow: hidden;
}

.auth-chart-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 100% 25%, 14.2% 100%;
  opacity: 0.5;
}

.auth-chart-line {
  position: absolute;
  inset: 26px 0 10px;
  width: 100%;
  height: calc(100% - 36px);
}

.auth-chart-line path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-chart-line-primary path {
  stroke: #8b73ff;
}

.auth-chart-line-secondary path {
  stroke: #34b9ff;
}

.auth-mini-list {
  display: grid;
  gap: 10px;
}

.auth-mini-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.auth-mini-item span {
  color: var(--auth-muted);
  font-size: 12px;
}

.auth-feature-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.auth-feature-card {
  min-height: 158px;
  padding: 20px 18px;
  border-radius: 20px;
}

.auth-feature-card i {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(124, 92, 255, 0.12);
  color: #8b73ff;
  font-size: 22px;
}

.auth-feature-card h3 {
  margin: 18px 0 10px;
  font-size: 22px;
  line-height: 1.15;
}

.auth-feature-card p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.65;
}

.auth-trust {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: #b8c5ea;
  font-size: 14px;
}

.auth-card {
  position: relative;
  padding: 34px 34px 30px;
  border-radius: 28px;
  border: 1px solid rgba(185, 197, 234, 0.16);
  background:
    linear-gradient(180deg, rgba(17, 26, 54, 0.95), rgba(11, 20, 42, 0.94)),
    radial-gradient(circle at top center, rgba(124, 92, 255, 0.12), transparent 24%);
  box-shadow: var(--auth-shadow);
}

.auth-card-header {
  text-align: center;
}

.auth-card-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(160, 174, 255, 0.24);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(39, 179, 255, 0.16));
  box-shadow: 0 18px 30px rgba(26, 35, 82, 0.28);
}

.auth-card-logo i {
  font-size: 34px;
  color: #9d8bff;
}

.auth-card h2 {
  margin: 0;
  font-size: clamp(32px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.auth-card p {
  margin: 14px auto 0;
  max-width: 380px;
  color: var(--auth-muted);
  font-size: 17px;
  line-height: 1.65;
}

.auth-flashes {
  display: grid;
  gap: 10px;
  margin: 22px 0 18px;
}

.auth-flash {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
}

.auth-flash-success { background: rgba(52, 211, 153, 0.16); color: #a7f3d0; }
.auth-flash-danger, .auth-flash-error { background: rgba(251, 113, 133, 0.16); color: #fecdd3; }
.auth-flash-warning { background: rgba(252, 211, 77, 0.18); color: #fde68a; }
.auth-flash-info { background: rgba(125, 211, 252, 0.16); color: #bae6fd; }

.auth-form,
.auth-secondary-form {
  display: grid;
  gap: 16px;
}

.auth-secondary-form {
  margin-top: 14px;
}

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

.auth-field label,
.auth-inline-label {
  color: #e6ebfb;
  font-size: 14px;
  font-weight: 700;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap i.auth-input-icon,
.auth-input-wrap span.auth-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--auth-subtle);
  font-size: 20px;
  pointer-events: none;
}

.auth-input-wrap .auth-toggle-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--auth-subtle);
  cursor: pointer;
  font-size: 22px;
}

.auth-input,
.auth-input-wrap input,
.auth-input-wrap textarea,
.auth-input-wrap select {
  width: 100%;
  min-height: 56px;
  padding: 0 18px 0 54px;
  border-radius: 16px;
  border: 1px solid rgba(185, 197, 234, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: var(--auth-text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  box-shadow: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.auth-input-wrap input::placeholder,
.auth-input::placeholder {
  color: #7382a8;
}

.auth-input-wrap input:focus,
.auth-input:focus {
  border-color: rgba(141, 160, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.auth-otp-input {
  padding-left: 18px !important;
  text-align: center;
  letter-spacing: 0.55em;
  font-weight: 800;
  font-size: 26px !important;
}

.auth-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--auth-muted);
  font-size: 14px;
}

.auth-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: #4c8fff;
}

.auth-link {
  color: #66b8ff;
  text-decoration: none;
  font-weight: 700;
}

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

.auth-btn {
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.22s ease, opacity 0.22s ease, background 0.22s ease;
}

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

.auth-btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, #8b5cf6 0%, #5b87ff 48%, #29b7ff 100%);
  box-shadow: 0 20px 34px rgba(59, 130, 246, 0.24);
}

.auth-btn-secondary {
  color: var(--auth-text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(185, 197, 234, 0.14);
}

.auth-btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 4px 0;
  color: var(--auth-subtle);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: rgba(185, 197, 234, 0.16);
}

.auth-card-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--auth-muted);
  font-size: 14px;
}

.auth-card-footer strong {
  color: #dbe6ff;
}

.auth-data-note {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--auth-subtle);
  font-size: 13px;
}

.auth-compact-shell {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  margin: 0 auto;
}

.auth-compact-card {
  max-width: 520px;
  margin: 0 auto;
}

.auth-status-card {
  text-align: center;
}

.auth-status-loader {
  width: 68px;
  height: 68px;
  margin: 26px auto;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top-color: #7c5cff;
  border-right-color: #29b7ff;
  animation: auth-spin 1.1s linear infinite;
}

.auth-status-meta {
  display: inline-grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--auth-subtle);
  font-size: 13px;
}

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

@media (max-width: 1180px) {
  .auth-shell {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }

  .auth-showcase {
    padding-right: 0;
  }

  .auth-feature-grid,
  .auth-preview-stats,
  .auth-preview-panels {
    grid-template-columns: 1fr 1fr;
  }

  .auth-card {
    max-width: 620px;
    margin: 0 auto;
  }

  .auth-shell > .auth-card {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .auth-topbar,
  .auth-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .auth-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-showcase h1 {
    font-size: 40px;
  }

  .auth-showcase p {
    font-size: 16px;
  }

  .auth-dashboard-preview {
    transform: none;
  }

  .auth-dashboard-preview-inner {
    transform: none;
  }

  .auth-feature-grid,
  .auth-preview-stats,
  .auth-preview-panels {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 24px 18px 22px;
    border-radius: 24px;
  }

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

  .auth-form-row {
    flex-direction: column;
    align-items: stretch;
  }
}
