:root {
  color-scheme: dark;
  --bg: #07101c;
  --panel: rgba(18, 28, 43, 0.86);
  --panel-strong: rgba(24, 35, 52, 0.96);
  --line: rgba(184, 197, 217, 0.16);
  --text: #f6f8ff;
  --muted: #9ba9bf;
  --orange: #ff6b35;
  --amber: #ffb13d;
  --blue: #4ca3ff;
  --green: #20d49b;
  --violet: #8b6dff;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top right, rgba(255, 107, 53, 0.18), transparent 34%),
    radial-gradient(circle at 14% 24%, rgba(76, 163, 255, 0.14), transparent 26%),
    linear-gradient(135deg, #050b14 0%, var(--bg) 48%, #0d1322 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.2));
}

body.auth-checking .dashboard {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.dashboard {
  width: min(1320px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 108px 0 104px;
}

.dashboard-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  width: min(1320px, calc(100% - 48px));
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 auto;
  padding-right: 300px;
  pointer-events: none;
}

.dashboard-topbar::before {
  position: fixed;
  inset: 0 0 auto;
  height: 88px;
  z-index: -1;
  content: "";
  background: linear-gradient(180deg, rgba(5, 11, 20, 0.92), rgba(5, 11, 20, 0));
}

.brand-link,
.dashboard-topbar nav {
  pointer-events: auto;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.brand-link > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--orange), #ff8b4a);
  font-weight: 900;
}

.brand-link strong {
  font-size: 20px;
  line-height: 1;
}

.brand-link strong span {
  color: var(--orange);
}

.dashboard-topbar nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(184, 197, 217, 0.14);
  border-radius: 999px;
  background: rgba(9, 17, 29, 0.68);
  backdrop-filter: blur(16px);
}

.dashboard-topbar nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  color: #aebbd0;
  font-size: 13px;
  font-weight: 900;
}

.dashboard-topbar nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-copy,
.account-card,
.panel,
.metric-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.hero-copy {
  min-height: 320px;
  padding: 46px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 107, 53, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ff8a58;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 2px;
  content: "";
  background: var(--orange);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  margin-top: 22px;
  color: #fff;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

h1 span {
  color: #ff7a45;
}

.hero-copy p {
  max-width: 690px;
  margin-top: 22px;
  color: #c4d0e4;
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn,
.logout-btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.btn {
  padding: 0 22px;
}

.btn:hover,
.logout-btn:hover,
.metric-card:hover,
.action-list a:hover,
.service-list a:hover {
  transform: translateY(-2px);
}

.btn:focus-visible,
.brand-link:focus-visible,
.logout-btn:focus-visible,
.metric-card:focus-visible,
.text-link:focus-visible,
.dashboard-topbar nav a:focus-visible,
.action-list a:focus-visible,
.service-list a:focus-visible {
  outline: 3px solid rgba(255, 177, 61, 0.42);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), #ff8b4a);
  color: #fff;
  box-shadow: 0 18px 46px rgba(255, 107, 53, 0.27);
}

.btn-secondary {
  border: 1px solid rgba(184, 197, 217, 0.2);
  background: rgba(255, 255, 255, 0.045);
  color: #edf3ff;
}

.account-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  border-radius: 8px;
  background:
    radial-gradient(circle at top right, rgba(32, 212, 155, 0.16), transparent 42%),
    var(--panel-strong);
}

.account-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 11px;
  border: 1px solid rgba(32, 212, 155, 0.24);
  border-radius: 999px;
  color: #bff6e2;
  font-size: 12px;
  font-weight: 900;
  background: rgba(32, 212, 155, 0.08);
}

.account-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(32, 212, 155, 0.13);
}

.account-card strong {
  display: block;
  margin-top: 22px;
  color: #fff;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.account-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.logout-btn {
  width: 100%;
  margin-top: 26px;
  color: #06101c;
  background: linear-gradient(135deg, #ffb13d, #ff8f1f);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.metric-card {
  min-height: 136px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 8px;
  background: rgba(16, 25, 39, 0.88);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.metric-card:hover {
  border-color: rgba(255, 107, 53, 0.26);
  background: rgba(21, 33, 50, 0.95);
}

.metric-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
}

.accent-orange .metric-icon {
  background: rgba(255, 107, 53, 0.16);
  color: #ff8a58;
}

.accent-blue .metric-icon {
  background: rgba(76, 163, 255, 0.14);
  color: #70b7ff;
}

.accent-green .metric-icon {
  background: rgba(32, 212, 155, 0.13);
  color: #42e6b0;
}

.accent-violet .metric-icon {
  background: rgba(139, 109, 255, 0.14);
  color: #a996ff;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 7px;
  color: #73839c;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 16px;
  margin-bottom: 16px;
}

.bottom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.panel {
  padding: 24px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(18, 28, 43, 0.9);
}

.panel-large {
  min-height: 378px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel-head.compact {
  margin-bottom: 18px;
}

h2 {
  margin-top: 7px;
  color: #fff;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 107, 53, 0.28);
  border-radius: 8px;
  color: #ff9b6e;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(255, 107, 53, 0.08);
}

.roadmap-list {
  display: grid;
  gap: 15px;
}

.roadmap-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(184, 197, 217, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.roadmap-dot {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #8fa1bb;
  background: rgba(255, 255, 255, 0.06);
}

.roadmap-item.complete .roadmap-dot {
  color: #03150f;
  background: var(--green);
}

.roadmap-item.active {
  border-color: rgba(255, 107, 53, 0.34);
  background: rgba(255, 107, 53, 0.08);
}

.roadmap-item.active .roadmap-dot {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ff9d5f);
}

.roadmap-item strong {
  display: block;
  color: #fff;
  font-size: 16px;
}

.roadmap-item p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.action-list,
.service-list {
  display: grid;
  gap: 10px;
}

.action-list a {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(184, 197, 217, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #edf3ff;
  font-weight: 900;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.action-list i {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ff9b6e;
  background: rgba(255, 107, 53, 0.1);
}

.service-list a {
  display: block;
  padding: 15px;
  border: 1px solid rgba(184, 197, 217, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.service-list strong {
  display: block;
  color: #fff;
  font-size: 15px;
}

.service-list span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.activity-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: #c6d2e6;
  line-height: 1.55;
}

.activity-list span {
  width: 9px;
  height: 9px;
  min-width: 9px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(76, 163, 255, 0.1);
}

@media (max-width: 1040px) {
  .dashboard-topbar {
    padding-right: 86px;
  }

  .dashboard-topbar nav {
    display: none;
  }

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

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-topbar {
    width: min(100% - 28px, 1320px);
    min-height: 72px;
    padding-right: 68px;
  }

  .dashboard {
    width: min(100% - 28px, 1320px);
    padding: 88px 0 96px;
  }

  .hero-copy {
    min-height: auto;
    padding: 30px 20px;
  }

  h1 {
    font-size: 40px;
    line-height: 1.05;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-actions,
  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .text-link {
    width: 100%;
  }

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

  .panel,
  .account-card {
    padding: 20px;
  }
}

@media (max-width: 430px) {
  .dashboard {
    width: min(100% - 20px, 1320px);
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 21px;
  }

  .roadmap-item {
    grid-template-columns: 1fr;
  }
}
