:root {
  --bg: #07111f;
  --bg-soft: #0d1b2d;
  --surface: rgba(255, 255, 255, 0.075);
  --surface-hover: rgba(255, 255, 255, 0.115);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f5f8fc;
  --muted: #a8b5c7;
  --accent: #28a9e0;
  --accent-soft: rgba(40, 169, 224, 0.18);
  --success: #46d39a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(40, 169, 224, 0.22), transparent 34rem),
    radial-gradient(circle at 95% 20%, rgba(60, 89, 170, 0.18), transparent 30rem),
    linear-gradient(145deg, var(--bg), #081624 55%, #06101d);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
}

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

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(40,169,224,.34), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7px;
}

.logo-fallback {
  font-weight: 800;
  font-size: 1.25rem;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  letter-spacing: .09em;
}

.brand-copy small {
  color: var(--muted);
}

.session {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 310px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #dce6f2;
  background: rgba(255,255,255,.045);
  font-size: .88rem;
}

.user-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(70,211,154,.12);
}

.logout {
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: .88rem;
}

.logout:hover {
  color: white;
  background: rgba(255,255,255,.06);
}

main {
  flex: 1;
  padding: 72px 0 48px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 38px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #7ed8ff;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .76rem;
  font-weight: 700;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 4.7rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.hero-text {
  max-width: 690px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.65;
}

.security-badge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 215px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.shield {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #04130e;
  font-weight: 800;
  background: var(--success);
}

.security-badge div {
  display: grid;
  gap: 3px;
}

.security-badge small {
  color: var(--muted);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.app-card {
  min-height: 158px;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 24px;
  overflow: hidden;
  text-decoration: none;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  backdrop-filter: blur(16px);
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.app-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -90px;
  bottom: -105px;
  border-radius: 50%;
  background: var(--accent-soft);
  filter: blur(4px);
  transition: transform .25s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(126,216,255,.38);
  background: var(--surface-hover);
}

.app-card:hover::before {
  transform: scale(1.25);
}

.app-card.featured {
  grid-column: 1 / -1;
}

.app-number {
  position: absolute;
  top: 18px;
  right: 20px;
  color: rgba(255,255,255,.23);
  font-weight: 700;
  letter-spacing: .12em;
  font-size: .74rem;
}

.app-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 1.45rem;
  color: #aee8ff;
  background: linear-gradient(145deg, rgba(40,169,224,.24), rgba(255,255,255,.06));
  border: 1px solid rgba(126,216,255,.16);
}

.app-content {
  display: grid;
  gap: 8px;
  padding-right: 24px;
}

.app-content strong {
  font-size: 1.07rem;
}

.app-content small {
  color: var(--muted);
  line-height: 1.45;
}

.arrow {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #07111f;
  background: #e9f8ff;
  font-size: 1.1rem;
  transition: transform .22s ease;
}

.app-card:hover .arrow {
  transform: translateX(4px);
}

footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #75869c;
  font-size: .82rem;
  border-top: 1px solid var(--border);
}

.placeholder {
  max-width: 760px;
  margin: 90px auto;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.placeholder a {
  display: inline-flex;
  margin-top: 18px;
  padding: 11px 15px;
  border-radius: 12px;
  text-decoration: none;
  background: #e9f8ff;
  color: #07111f;
  font-weight: 700;
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 24px, 1220px);
  }

  .topbar {
    align-items: flex-start;
    padding: 18px 0;
    flex-direction: column;
  }

  .session {
    width: 100%;
    justify-content: space-between;
  }

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

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

  .app-card.featured {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .brand-copy small {
    display: none;
  }

  .user-chip {
    max-width: 220px;
  }

  main {
    padding-top: 48px;
  }

  .app-card {
    grid-template-columns: auto 1fr;
    padding: 20px;
  }

  .arrow {
    display: none;
  }

  footer {
    flex-wrap: wrap;
    text-align: center;
  }
}
