:root {
  --surface: #faf8ff;
  --surface-bright: #ffffff;
  --surface-container: #eaedff;
  --surface-container-low: #f2f3ff;
  --surface-container-lowest: #ffffff;
  --surface-container-high: #e2e7ff;
  --surface-container-highest: #dae2fd;
  --text: #131b2e;
  --muted: #434654;
  --muted-soft: #6d7388;
  --primary: #003d9b;
  --primary-strong: #0052cc;
  --primary-fixed: #dae2ff;
  --success: #1b8a50;
  --warning: #a86800;
  --danger: #ba1a1a;
  --outline-ghost: rgba(195, 198, 214, 0.34);
  --shadow-soft: 0 20px 52px rgba(19, 27, 46, 0.06);
  --shadow-ambient: 0 32px 96px rgba(19, 27, 46, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(0, 82, 204, 0.1), transparent 28%),
    radial-gradient(circle at right 10% top 12%, rgba(218, 226, 253, 0.88), transparent 26%),
    radial-gradient(circle at bottom right, rgba(0, 61, 155, 0.08), transparent 24%),
    linear-gradient(180deg, #fbfbff 0%, #f2f3ff 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(90px);
}

body::before {
  inset: auto auto -8rem -6rem;
  width: 20rem;
  height: 20rem;
  background: rgba(0, 82, 204, 0.08);
}

body::after {
  inset: 4rem -8rem auto auto;
  width: 24rem;
  height: 24rem;
  background: rgba(178, 197, 255, 0.25);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 24px;
  background: rgba(250, 248, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.topbar form {
  margin: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.topbar-brand-copy {
  display: grid;
  gap: 0.1rem;
}

.topbar-brand strong,
.sidebar-brand strong,
.login-brand-title {
  margin: 0;
  font-family: "Manrope", "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.topbar-brand strong {
  font-size: 1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: white;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  box-shadow: 0 16px 28px rgba(0, 61, 155, 0.22);
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-strong);
}

.eyebrow-inline {
  margin-bottom: 0.45rem;
}

.topbar-status,
.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.topbar-status {
  justify-content: center;
}

.topbar-user {
  justify-content: flex-end;
}

.status-pill,
.login-trust-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.signed-in {
  color: var(--muted-soft);
  font-size: 0.92rem;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.sidebar-brand,
.toolbar,
.dashboard-section,
.metric-card,
.hero-card,
.login-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(242, 243, 255, 0.92) 100%);
  box-shadow: var(--shadow-soft);
}

.sidebar-brand {
  padding: 1.2rem;
  border-radius: 28px;
}

.sidebar-brand-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sidebar-brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
}

.sidebar-label {
  padding: 0 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  gap: 0.55rem;
}

.nav-link {
  display: grid;
  gap: 0.22rem;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
  box-shadow: inset 0 0 0 1px transparent;
}

.nav-link:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
}

.nav-link.is-active {
  color: white;
  background: linear-gradient(135deg, rgba(0, 61, 155, 0.98) 0%, rgba(0, 82, 204, 0.94) 100%);
  box-shadow: 0 18px 36px rgba(0, 61, 155, 0.18);
}

.nav-link-title {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-link-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.74;
}

.page-shell {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.page-intro {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.7rem 1.8rem;
  border-radius: 32px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 82, 204, 0.12) 0%, rgba(234, 237, 255, 0.92) 42%, rgba(255, 255, 255, 0.84) 100%);
  box-shadow: var(--shadow-ambient);
}

.page-intro::after {
  content: "";
  position: absolute;
  top: -4rem;
  right: -3rem;
  width: 15rem;
  height: 15rem;
  border-radius: 999px;
  background: rgba(0, 61, 155, 0.08);
  filter: blur(20px);
}

.page-intro-copy,
.header-actions {
  position: relative;
  z-index: 1;
}

.page-intro-copy {
  display: grid;
  gap: 0.1rem;
  max-width: 48rem;
}

.page-intro h1,
.hero-card h2,
.dashboard-section h2,
.login-panel h1 {
  margin: 0;
  font-family: "Manrope", "Inter", sans-serif;
  letter-spacing: -0.05em;
}

.page-intro h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(2.15rem, 3.2vw, 3.45rem);
  font-weight: 800;
}

.page-intro p,
.dashboard-section header p,
.login-panel p,
.hero-subtitle,
.toolbar-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button-link,
.selector-link,
.external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.75rem 1.1rem;
  border-radius: 16px;
  text-decoration: none;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease,
    color 140ms ease;
}

.button-link {
  border: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: white;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 18px 32px rgba(0, 82, 204, 0.2);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(195, 198, 214, 0.45);
}

.button-link:hover,
.selector-link:hover,
.external-link:hover {
  transform: translateY(-1px);
}

.topbar-user .button-link {
  min-height: 2.4rem;
  padding: 0.65rem 0.95rem;
  box-shadow: none;
}

.toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 24px;
}

.toolbar,
.dashboard-grid {
  display: grid;
}

.selector-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.selector-group-tabs {
  padding: 0.35rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.selector-group-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-width: thin;
}

.selector-link {
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(195, 198, 214, 0.35);
  white-space: nowrap;
}

.selector-link.is-active {
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 14px 28px rgba(0, 61, 155, 0.16);
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 0.9rem;
}

.metrics-row-tight {
  margin-top: -0.1rem;
}

.metric-card {
  position: relative;
  padding: 1.2rem 1.25rem;
  border-radius: 24px;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(0, 61, 155, 0.95), rgba(0, 82, 204, 0.45));
  opacity: 0.7;
}

.metric-card p {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(1.6rem, 2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

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

.dashboard-section {
  min-width: 0;
  padding: 1.3rem;
  border-radius: 28px;
}

.dashboard-section header {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.dashboard-section h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

.hero-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.65rem;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(178, 197, 255, 0.4) 0%, rgba(242, 243, 255, 0.96) 52%, rgba(255, 255, 255, 0.9) 100%);
  box-shadow: var(--shadow-ambient);
}

.hero-main {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  min-width: 0;
}

.hero-copy {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.hero-copy h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(195, 198, 214, 0.28);
}

.badge-muted {
  background: rgba(234, 237, 255, 0.95);
  color: var(--muted);
}

.badge-positive {
  background: rgba(27, 138, 80, 0.14);
  color: var(--success);
}

.badge-warning {
  background: rgba(168, 104, 0, 0.14);
  color: var(--warning);
}

.badge-negative,
.badge-alert {
  background: rgba(186, 26, 26, 0.14);
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
  padding: 0.15rem;
  border-radius: 22px;
  background: rgba(250, 248, 255, 0.62);
}

.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.data-table th {
  padding: 0.1rem 0.75rem 0.4rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: left;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.data-table td {
  padding: 0.82rem 0.75rem;
  text-align: left;
  vertical-align: top;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(195, 198, 214, 0.22);
}

.data-table tbody tr:hover td {
  background: rgba(218, 226, 253, 0.82);
}

.data-table td:first-child {
  border-radius: 18px 0 0 18px;
}

.data-table td:last-child {
  border-radius: 0 18px 18px 0;
}

.app-cell {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 240px;
}

.app-cell-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.app-cell-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.app-link {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  line-height: 1.25;
}

.app-link:hover,
.app-link.is-active {
  color: var(--primary-strong);
}

.app-id {
  color: var(--muted-soft);
  font-size: 0.8rem;
}

.external-link {
  min-height: 1.9rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(234, 237, 255, 0.9);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(195, 198, 214, 0.34);
}

.app-avatar,
.hero-app-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: 24%;
  background: linear-gradient(180deg, rgba(218, 226, 255, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(195, 198, 214, 0.4),
    0 12px 24px rgba(19, 27, 46, 0.08);
}

.app-avatar {
  width: 3.2rem;
  height: 3.2rem;
}

.hero-app-avatar {
  width: 6rem;
  height: 6rem;
}

.app-avatar-fallback {
  color: var(--primary);
  font-family: "Manrope", "Inter", sans-serif;
  font-weight: 800;
}

.review-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 3px 0 0 rgba(0, 61, 155, 0.82),
    inset 0 0 0 1px rgba(195, 198, 214, 0.2);
}

.review-card + .review-card {
  margin-top: 0.75rem;
}

.review-card h4,
.review-card p {
  margin: 0;
}

.review-meta {
  font-size: 0.86rem;
}

.toolbar-note {
  max-width: 36rem;
}

.compact-list-row {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(195, 198, 214, 0.2);
}

.compact-list-row + .compact-list-row {
  margin-top: 0.75rem;
}

.empty-state {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted-soft);
}

.empty-cell {
  color: var(--muted-soft);
  text-align: center;
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.login-body::before {
  inset: -4rem auto auto -6rem;
  width: 24rem;
  height: 24rem;
  background: rgba(0, 61, 155, 0.08);
}

.login-body::after {
  inset: auto -5rem -7rem auto;
  width: 22rem;
  height: 22rem;
  background: rgba(178, 197, 255, 0.3);
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.login-brand .brand-mark {
  width: 3.6rem;
  height: 3.6rem;
  margin-bottom: 0.35rem;
  font-size: 1.35rem;
}

.login-brand-title {
  font-size: 2rem;
}

.login-panel {
  padding: 2rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-ambient);
}

.login-panel h1 {
  margin-bottom: 0.25rem;
  font-size: 2rem;
  font-weight: 800;
}

.login-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.35rem;
}

.login-form .button-link {
  width: 100%;
  margin-top: 0.1rem;
}

.login-form label {
  display: grid;
  gap: 0.45rem;
}

.login-form label span {
  padding-left: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.95rem 1rem;
  border: 0;
  border-radius: 16px;
  background: var(--surface-container-low);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(195, 198, 214, 0.24);
  transition:
    background-color 120ms ease,
    box-shadow 120ms ease;
}

.login-form input:focus {
  outline: none;
  background: white;
  box-shadow:
    0 0 0 4px rgba(0, 61, 155, 0.12),
    inset 0 0 0 1px rgba(0, 82, 204, 0.18);
}

.form-error {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 218, 214, 0.94);
  color: #93000a;
  box-shadow: inset 0 0 0 1px rgba(186, 26, 26, 0.12);
}

.login-trust {
  display: flex;
  justify-content: center;
  margin-top: 1.4rem;
  padding-top: 0.2rem;
}

@media (max-width: 1120px) {
  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .page-intro,
  .hero-card,
  .toolbar {
    align-items: flex-start;
  }

  .page-intro,
  .hero-card {
    flex-direction: column;
  }

  .header-actions,
  .hero-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 760px) {
  .app-shell {
    padding: 0.75rem;
  }

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

  .topbar-status,
  .topbar-user {
    justify-content: flex-start;
  }

  .page-intro,
  .toolbar,
  .dashboard-section,
  .hero-card,
  .login-panel {
    padding: 1.15rem;
  }

  .page-intro h1,
  .hero-copy h2,
  .login-panel h1 {
    font-size: 1.85rem;
  }

  .data-table {
    min-width: 620px;
  }

  .hero-app-avatar {
    width: 4.9rem;
    height: 4.9rem;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }
}
