* {
  box-sizing: border-box;
}

:root {
  --bg-main: #f7f7fb;
  --text-main: #151515;
  --text-soft: #5f6472;
  --line: #dde1ec;
  --accent-1: #6f73ff;
  --accent-2: #885dff;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(226, 220, 255, 0.92) 0%, transparent 35%),
    radial-gradient(circle at bottom right, rgba(222, 244, 255, 0.96) 0%, transparent 35%),
    var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background */
.auth-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(42px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  animation: authOrbFloat 12s ease-in-out infinite;
}

.auth-orb--one {
  width: 320px;
  height: 320px;
  top: 7%;
  left: 8%;
  background: rgba(142, 116, 255, 0.2);
}

.auth-orb--two {
  width: 360px;
  height: 360px;
  right: 6%;
  bottom: 8%;
  background: rgba(93, 198, 255, 0.16);
  animation-delay: 1.8s;
}

.auth-floating {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.auth-floating__item {
  position: absolute;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(24, 27, 39, 0.06);
}

.auth-floating__item--qr {
  width: 110px;
  height: 110px;
  opacity: 0.25;
  background:
    linear-gradient(90deg, transparent 42%, rgba(0, 0, 0, 0.08) 42%, rgba(0, 0, 0, 0.08) 58%, transparent 58%),
    linear-gradient(transparent 42%, rgba(0, 0, 0, 0.08) 42%, rgba(0, 0, 0, 0.08) 58%, transparent 58%),
    linear-gradient(45deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.01)),
    #ffffff;
  background-size: 18px 18px, 18px 18px, cover, cover;
}

.auth-floating__item--qr::before,
.auth-floating__item--qr::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 6px solid rgba(0, 0, 0, 0.12);
}

.auth-floating__item--qr::before {
  top: 10px;
  left: 10px;
}

.auth-floating__item--qr::after {
  right: 10px;
  bottom: 10px;
}

.auth-floating__item--code {
  padding: 14px 18px;
  min-width: 170px;
  color: rgba(25, 29, 39, 0.45);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  font-family: "SFMono-Regular", Consolas, monospace;
  opacity: 0.55;
}

.auth-floating__item--1 {
  top: 12%;
  left: 6%;
  animation: authFloatA 14s ease-in-out infinite;
}

.auth-floating__item--2 {
  top: 20%;
  right: 10%;
  animation: authFloatB 16s ease-in-out infinite;
}

.auth-floating__item--3 {
  bottom: 16%;
  left: 12%;
  animation: authFloatC 18s ease-in-out infinite;
}

.auth-floating__item--4 {
  bottom: 22%;
  right: 14%;
  animation: authFloatA 15s ease-in-out infinite;
}

.auth-floating__item--5 {
  top: 50%;
  left: 48%;
  animation: authFloatB 17s ease-in-out infinite;
}

.auth-page,
.dashboard-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(31, 35, 53, 0.08);
  padding: 32px;
  animation: authCardIn 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-card--wide {
  max-width: 760px;
}

.auth-brand {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a8fa3;
  font-weight: 500;
}

.auth-title {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

.auth-subtitle {
  margin: 0 0 24px;
  color: #5f6472;
  line-height: 1.6;
  font-size: 15px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field label {
  font-size: 14px;
  font-weight: 600;
  color: #2b2f3b;
}

.auth-field input {
  width: 100%;
  border: 1px solid #dde1ec;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  background: #fff;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.auth-field input:focus {
  border-color: #7a7cff;
  box-shadow: 0 0 0 4px rgba(122, 124, 255, 0.12);
  transform: translateY(-1px);
}

.auth-error {
  margin: 0;
  color: #d33b3b;
  font-size: 14px;
  line-height: 1.5;
}

.auth-error ul {
  margin: 0;
  padding-left: 20px;
}

.auth-button,
.dashboard-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 16px;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(135deg, #6f73ff 0%, #885dff 100%);
  box-shadow: 0 12px 28px rgba(111, 115, 255, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.auth-button:hover,
.dashboard-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(111, 115, 255, 0.34);
}

.auth-button--link {
  min-width: 220px;
}

.auth-button--dark,
.dashboard-button--dark {
  background: linear-gradient(135deg, #171b29 0%, #2d3550 100%);
  box-shadow: 0 12px 28px rgba(21, 25, 38, 0.2);
}

.auth-note {
  margin: 18px 0 0;
  font-size: 14px;
  color: #5f6472;
}

.auth-note a {
  color: #5f60ff;
  text-decoration: none;
  font-weight: 600;
}

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

/* Dashboard styles */
.dashboard-shell {
  width: 100%;
  max-width: 1240px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-hero,
.dashboard-panel,
.stat-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(31, 35, 53, 0.08);
}

.dashboard-hero {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  animation: authCardIn 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.dashboard-hero__main {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dashboard-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6f73ff 0%, #885dff 100%);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(111, 115, 255, 0.28);
  flex-shrink: 0;
}

.dashboard-brand {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a8fa3;
  font-weight: 500;
}

.dashboard-title {
  margin: 0 0 6px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.dashboard-subtitle {
  margin: 0 0 8px;
  font-size: 16px;
  color: #4b5266;
}

.dashboard-note {
  margin: 0;
  font-size: 14px;
  color: #7d8395;
}

.dashboard-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat-card {
  padding: 22px;
  animation: authCardIn 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.stat-card__label {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8fa3;
}

.stat-card__value {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
  font-weight: 700;
  color: #1e2437;
}

.stat-card__meta {
  margin: 0;
  font-size: 14px;
  color: #677084;
  line-height: 1.5;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.dashboard-grid--bottom {
  grid-template-columns: 1fr 1fr;
}

.dashboard-panel {
  padding: 24px;
  animation: authCardIn 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.panel-head {
  margin-bottom: 20px;
}

.panel-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8fa3;
}

.panel-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.chart-wrap {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.achievements-grid {
  display: grid;
  gap: 14px;
}

.achievement-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(250, 250, 255, 0.95), rgba(242, 244, 252, 0.95));
  border: 1px solid #e5e9f2;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.achievement-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(31, 35, 53, 0.08);
}

.achievement-card__icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6f73ff 0%, #885dff 100%);
  color: #fff;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 12px 24px rgba(111, 115, 255, 0.2);
}

.achievement-card__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #1e2437;
}

.achievement-card__desc {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #61697c;
}

.achievement-card__date {
  margin: 0;
  font-size: 12px;
  color: #8a8fa3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.info-item {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #e5e9f2;
  background: rgba(255, 255, 255, 0.72);
}

.info-item__label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8fa3;
}

.info-item__value {
  display: block;
  font-size: 16px;
  color: #1e2437;
  line-height: 1.5;
  word-break: break-word;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #edf0f6;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item__dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6f73ff 0%, #885dff 100%);
  box-shadow: 0 0 0 8px rgba(111, 115, 255, 0.08);
  flex-shrink: 0;
}

.activity-item__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: #1e2437;
}

.activity-item__date {
  margin: 0;
  font-size: 13px;
  color: #7d8395;
}

.empty-state {
  border: 1px dashed #d9dfeb;
  border-radius: 20px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.5);
}

.empty-state__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #1f2437;
}

.empty-state__text {
  margin: 0;
  color: #687184;
  line-height: 1.6;
  font-size: 14px;
}

/* Animations */
@keyframes authCardIn {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes authOrbFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

@keyframes authFloatA {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-24px) rotate(4deg);
  }
}

@keyframes authFloatB {
  0%, 100% {
    transform: translateX(0) rotate(0deg);
  }
  50% {
    transform: translateX(-24px) rotate(-4deg);
  }
}

@keyframes authFloatC {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-18px) rotate(8deg);
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid,
  .dashboard-grid--bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-hero__main {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .dashboard-hero__actions {
    width: 100%;
    flex-direction: column;
  }

  .dashboard-button {
    width: 100%;
  }

  .auth-floating {
    opacity: 0.72;
  }
}