:root {
  --ink-950: #0f1a28;
  --ink-700: #33465d;
  --ink-500: #617086;
  --paper: #f6f0e7;
  --paper-strong: rgba(255, 251, 245, 0.9);
  --paper-soft: rgba(255, 255, 255, 0.72);
  --teal: #146b67;
  --teal-deep: #0e4e4c;
  --amber: #c68637;
  --line: rgba(15, 26, 40, 0.1);
  --shadow: 0 28px 70px rgba(15, 26, 40, 0.16);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-sans: "Manrope", sans-serif;
  --font-serif: "Fraunces", serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink-950);
  background:
    radial-gradient(circle at top left, rgba(20, 107, 103, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(198, 134, 55, 0.14), transparent 28%),
    linear-gradient(180deg, #fbf5ed 0%, #f3ede3 52%, #faf7f1 100%);
}

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

.page-aura {
  position: fixed;
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  filter: blur(26px);
  opacity: 0.44;
  pointer-events: none;
  z-index: 0;
}

.page-aura-one {
  top: -12rem;
  left: -8rem;
  background: rgba(20, 107, 103, 0.16);
}

.page-aura-two {
  right: -10rem;
  bottom: -12rem;
  background: rgba(198, 134, 55, 0.18);
}

.main-shell,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

.main-shell {
  padding-bottom: 5rem;
}

.premium-nav {
  margin: 1.25rem auto 0;
  padding: 0.85rem 0;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.site-header.is-scrolled .premium-nav {
  transform: translateY(-2px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--ink-950);
}

.brand-lockup strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}

.brand-lockup small {
  display: block;
  color: var(--ink-500);
  font-size: 0.78rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, var(--teal), var(--teal-deep));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 28px rgba(20, 107, 103, 0.22);
}

.nav-links {
  gap: 0.35rem;
}

.nav-links .nav-link {
  color: var(--ink-700);
  font-weight: 600;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
}

.nav-links .nav-link:hover,
.nav-links .nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-950);
}

.nav-actions,
.auth-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  border-radius: 999px;
  padding: 0.78rem 1.25rem;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid rgba(15, 26, 40, 0.12);
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink-950);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 26, 40, 0.18);
}

.btn-primary-soft {
  border: 1px solid transparent;
  background: linear-gradient(145deg, rgba(20, 107, 103, 0.12), rgba(20, 107, 103, 0.2));
  color: var(--teal-deep);
}

.btn-primary-cta {
  border: none;
  background: linear-gradient(145deg, var(--teal), var(--teal-deep));
  color: #fff;
  box-shadow: 0 18px 30px rgba(14, 78, 76, 0.24);
}

.btn-outline-cta {
  border: 1px solid rgba(15, 26, 40, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-950);
}

.user-pill {
  padding: 0.78rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(15, 26, 40, 0.1);
  color: var(--ink-700);
  font-weight: 700;
}

.status-host {
  margin-top: 1rem;
}

.portal-alert {
  border: 1px solid rgba(20, 107, 103, 0.2);
  border-radius: var(--radius-md);
  background: rgba(20, 107, 103, 0.12);
  color: var(--teal-deep);
  box-shadow: 0 18px 30px rgba(20, 107, 103, 0.08);
}

.hero-section,
.section-block,
.auth-wrapper,
.dashboard-shell,
.crud-shell {
  padding-top: 2.75rem;
}

.hero-title,
.section-heading h1,
.section-heading h2,
.showcase-card h2,
.download-banner h2,
.auth-copy h1,
.dashboard-headline h1,
.page-title {
  font-family: var(--font-serif);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero-title {
  max-width: 12ch;
  font-size: clamp(3rem, 6vw, 5.2rem);
  margin-top: 1rem;
}

.hero-description,
.section-heading p,
.showcase-card p,
.download-banner p,
.feature-card p,
.flow-card p,
.auth-copy p,
.dashboard-headline p,
.muted-copy {
  color: var(--ink-700);
  font-size: 1.06rem;
  line-height: 1.75;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--teal);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2.2rem;
  height: 1px;
  background: rgba(20, 107, 103, 0.45);
}

.hero-actions,
.page-actions,
.inline-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-stats,
.stats-grid,
.feature-grid,
.flow-grid,
.summary-grid {
  display: grid;
  gap: 1.1rem;
}

.hero-stats,
.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

.stat-card,
.kpi-card,
.feature-card,
.flow-card,
.summary-card,
.list-card,
.form-card,
.glass-panel,
.table-shell,
.empty-state {
  background: var(--paper-soft);
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stat-card,
.kpi-card,
.summary-card {
  padding: 1.35rem;
  border-radius: 1.5rem;
}

.stat-card span,
.kpi-card span,
.summary-card span,
.metric-row span,
.mini-dashboard span,
.list-row span,
.device-row span {
  display: block;
  color: var(--ink-500);
  font-size: 0.9rem;
}

.stat-card strong,
.kpi-card strong,
.summary-card strong,
.metric-row strong,
.mini-dashboard strong,
.list-row strong,
.device-row strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink-950);
}

.glass-panel,
.form-card,
.table-shell,
.empty-state,
.feature-card,
.flow-card,
.list-card {
  border-radius: var(--radius-xl);
  padding: 1.75rem;
}

.showcase-card {
  position: relative;
  overflow: hidden;
}

.showcase-card::after {
  content: "";
  position: absolute;
  inset: auto -5rem -7rem auto;
  width: 15rem;
  height: 15rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(198, 134, 55, 0.18), transparent 65%);
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink-700);
  font-weight: 700;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 0.32rem rgba(20, 107, 103, 0.12);
}

.metric-list,
.mini-dashboard,
.list-stack,
.device-stack {
  display: grid;
  gap: 0.85rem;
}

.metric-row,
.mini-dashboard > div,
.list-row,
.device-row {
  padding: 1rem 1.1rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(15, 26, 40, 0.06);
}

.section-block,
.compact-section {
  margin-top: 3.4rem;
}

.section-heading {
  max-width: 46rem;
  margin-bottom: 1.6rem;
}

.section-heading h1,
.section-heading h2,
.dashboard-headline h1,
.page-title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin-top: 0.8rem;
}

.feature-card h3,
.flow-card h3,
.auth-form-panel h2,
.list-card h3,
.table-shell h2,
.form-card h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
}

.flow-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: rgba(20, 107, 103, 0.12);
  color: var(--teal-deep);
  font-weight: 800;
}

.download-banner {
  margin-top: 3.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.dashboard-headline,
.crud-headline {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.dashboard-grid,
.detail-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1.35fr 1fr;
}

.list-card header,
.table-shell header,
.form-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.list-card h3,
.table-shell h2,
.form-card h2 {
  margin-bottom: 0;
}

.list-stack,
.device-stack {
  margin-top: 1rem;
}

.table-shell table {
  margin-bottom: 0;
}

.table-shell thead th {
  color: var(--ink-500);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom-color: rgba(15, 26, 40, 0.08);
}

.table-shell tbody td {
  vertical-align: middle;
  border-bottom-color: rgba(15, 26, 40, 0.06);
}

.table-shell tbody tr:last-child td {
  border-bottom: none;
}

.table-company {
  font-weight: 800;
  color: var(--ink-950);
}

.table-muted,
.helper-text {
  color: var(--ink-500);
  font-size: 0.92rem;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(20, 107, 103, 0.1);
  color: var(--teal-deep);
  font-size: 0.85rem;
  font-weight: 700;
}

.badge-amber {
  background: rgba(198, 134, 55, 0.12);
  color: #9f6222;
}

.badge-pending {
  background: rgba(159, 98, 34, 0.14);
  color: #9f6222;
}

.portal-form .form-label,
.search-box .form-label {
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.portal-form .form-control,
.portal-form .form-select,
.search-box .form-control {
  min-height: 3.35rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(15, 26, 40, 0.12);
  background: rgba(255, 255, 255, 0.82);
}

.portal-form .form-control:focus,
.portal-form .form-select:focus,
.search-box .form-control:focus,
.btn:focus-visible,
.nav-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(20, 107, 103, 0.16);
  border-color: rgba(20, 107, 103, 0.34);
}

.validation-summary-errors ul,
.field-validation-error {
  color: #a33a2d;
}

.search-box {
  margin-bottom: 1.2rem;
}

.search-box form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
}

.detail-header h1 {
  margin-bottom: 0.35rem;
}

.detail-meta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.meta-chip {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-700);
  border: 1px solid rgba(15, 26, 40, 0.08);
  font-weight: 700;
}

.empty-state {
  text-align: center;
}

.config-link {
  word-break: break-all;
  color: var(--teal-deep);
}

.auth-copy,
.auth-form-panel {
  height: 100%;
}

.auth-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.auth-list {
  display: grid;
  gap: 0.9rem;
}

.auth-list li {
  list-style: none;
  padding: 1rem 1.1rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(15, 26, 40, 0.06);
}

.site-footer {
  padding: 2.5rem 0 3.25rem;
  border-top: 1px solid rgba(15, 26, 40, 0.08);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: start;
}

.footer-brand {
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.footer-copy,
.footer-links a {
  color: var(--ink-700);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 420ms ease, transform 420ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1199.98px) {
  .feature-grid,
  .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 991.98px) {
  .premium-nav {
    padding: 0.75rem 0;
  }

  .nav-actions,
  .auth-actions,
  .dashboard-headline,
  .crud-headline,
  .detail-header,
  .download-banner,
  .footer-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links {
    margin: 1rem 0;
  }

  .dashboard-grid,
  .detail-grid,
  .search-box form {
    grid-template-columns: 1fr;
  }

  .download-banner {
    align-items: flex-start;
  }
}

@media (max-width: 767.98px) {
  .hero-title {
    max-width: none;
  }

  .hero-stats,
  .stats-grid,
  .summary-grid,
  .feature-grid,
  .flow-grid {
    grid-template-columns: 1fr;
  }

  .main-shell {
    padding-bottom: 4rem;
  }

  .glass-panel,
  .form-card,
  .table-shell,
  .empty-state,
  .feature-card,
  .flow-card,
  .list-card {
    padding: 1.35rem;
    border-radius: 1.6rem;
  }
}