:root {
  color-scheme: dark;
  --page-bg: #020a1c;
  --panel-bg: rgba(17, 30, 55, 0.9);
  --panel-strong: rgba(30, 45, 75, 0.92);
  --border: rgba(166, 190, 255, 0.16);
  --border-strong: rgba(174, 199, 255, 0.28);
  --text: #f6f8ff;
  --muted: #aab6ce;
  --muted-strong: #d2dbef;
  --accent: #6d97ff;
  --accent-strong: #85a7ff;
  --success: #6ee7b7;
  --warning: #f7d67a;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(72, 112, 204, 0.24), transparent 34rem),
    radial-gradient(circle at 82% 8%, rgba(28, 103, 180, 0.18), transparent 30rem),
    linear-gradient(135deg, #020817 0%, #031844 44%, #020817 100%);
}

a {
  color: inherit;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(4, 12, 30, 0.86);
  backdrop-filter: blur(18px);
}

.portal-nav {
  min-height: 62px;
  padding: 0;
}

.portal-nav-inner {
  max-width: 1480px;
  padding: 0 32px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 1.22rem;
  font-weight: 500;
  letter-spacing: 0;
}

.portal-brand:hover,
.portal-brand:focus {
  color: var(--text);
}

.portal-brand img {
  max-width: 132px;
  max-height: 30px;
  object-fit: contain;
}

.portal-brand img.is-hidden {
  display: none;
}

.console-title {
  margin-left: auto;
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 600;
}

.portal-toggler {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.08);
}

.portal-toggler .navbar-toggler-icon {
  filter: invert(1);
}

.portal-page {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 38px;
}

.dashboard-shell {
  display: grid;
  gap: 18px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  min-height: 220px;
  padding: clamp(22px, 3.5vw, 38px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(24, 42, 78, 0.94), rgba(11, 19, 39, 0.96)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -16% -36% 30%;
  height: 260px;
  background: linear-gradient(90deg, transparent, rgba(109, 151, 255, 0.24), transparent);
  transform: rotate(-8deg);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 830px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  max-width: 920px;
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-description {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted-strong);
  font-size: clamp(0.96rem, 1.5vw, 1.08rem);
  line-height: 1.5;
}

.system-card {
  position: relative;
  z-index: 1;
  align-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: rgba(39, 55, 86, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.system-pulse {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 10px rgba(110, 231, 183, 0.12), 0 0 32px rgba(110, 231, 183, 0.9);
  flex: 0 0 auto;
}

.system-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 3px;
}

.system-card strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.dashboard-section-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.tool-count {
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  font-size: 0.84rem;
}

.tool-count.muted {
  opacity: 0.72;
}

.tool-grid,
.upcoming-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.tool-card {
  min-height: 232px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(39, 56, 91, 0.88), rgba(15, 25, 49, 0.9)),
    rgba(15, 25, 49, 0.86);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.28);
}

.tool-card:hover {
  border-color: rgba(133, 167, 255, 0.45);
  transform: translateY(-2px);
  transition: border-color 180ms ease, transform 180ms ease;
}

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.tool-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(133, 167, 255, 0.75), rgba(110, 231, 183, 0.18)),
    rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 16px 36px rgba(16, 31, 68, 0.28);
  position: relative;
  flex: 0 0 auto;
}

.tool-icon::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.72);
}

.tool-icon-browser::after,
.tool-icon-analytics::after {
  border-radius: 7px;
}

.tool-icon-upload::after {
  inset: 12px 16px 16px;
  border-width: 0 2px 2px 0;
  border-radius: 0;
  transform: rotate(45deg);
}

.tool-icon-profile::after {
  inset: 10px 15px 20px;
}

.status-badge {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-badge.active {
  color: #062b22;
  background: linear-gradient(135deg, #7df3c5, #bff9df);
}

.status-badge.coming-soon {
  color: #2f2500;
  background: linear-gradient(135deg, #f7d67a, #fff0bc);
}

.tool-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 760;
}

.tool-card p {
  margin: 9px 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.launch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin-top: auto;
  border: 0;
  border-radius: 13px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  background: linear-gradient(135deg, #7da2ff, #5f8df7);
  box-shadow: 0 16px 36px rgba(95, 141, 247, 0.28);
}

.launch-button:hover,
.launch-button:focus {
  color: #fff;
  background: linear-gradient(135deg, #8eb0ff, #6d97ff);
}

.launch-button.disabled {
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  cursor: not-allowed;
}

.portal-footer {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.text-center {
  color: var(--text);
}

.privacy-panel {
  max-width: 860px;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

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

  .system-card {
    align-self: start;
    max-width: 420px;
  }

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

@media (max-width: 767px) {
  .portal-nav-inner {
    padding: 0 18px;
  }

  .portal-brand img {
    max-width: 116px;
  }

  .console-title {
    display: block;
    margin: 10px 0 6px;
    font-size: 0.82rem;
  }

  .portal-page {
    width: min(100% - 24px, 1480px);
    padding: 18px 0 30px;
  }

  .hero-panel {
    min-height: 0;
    border-radius: 20px;
  }

  .dashboard-section-header {
    flex-wrap: wrap;
  }

  .tool-grid,
  .upcoming-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: 205px;
  }
}
