:root {
  color-scheme: light;
  --matcha: #c2d8c4;
  --matcha-soft: #eef5ef;
  --matcha-strong: #9fbba2;
  --matcha-deep: #7f9d83;
  --coal: #222222;
  --coal-soft: #454545;
  --white: #ffffff;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(238, 245, 239, 0.78);
  --border: rgba(34, 34, 34, 0.11);
  --border-strong: rgba(34, 34, 34, 0.18);
  --text: #222222;
  --muted: #566359;
  --primary: #222222;
  --primary-contrast: #ffffff;
  --secondary: #c2d8c4;
  --secondary-contrast: #222222;
  --danger: #b84a4a;
  --warning: #a96d00;
  --info: #425b49;
  --success: #2f7d51;
  --shadow-soft: 0 18px 40px rgba(67, 81, 70, 0.08);
  --shadow-strong: 0 24px 60px rgba(67, 81, 70, 0.16);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --grid-line: rgba(34, 34, 34, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(194, 216, 196, 0.88), transparent 34%),
    radial-gradient(circle at top right, rgba(159, 187, 162, 0.18), transparent 28%),
    linear-gradient(180deg, #f6faf6 0%, #eef5ef 48%, #e8f0e9 100%);
  overflow-x: hidden;
}

body.centered,
body.dashboard-page {
  position: relative;
  isolation: isolate;
}

body.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
}

body::before {
  background:
    radial-gradient(circle at 16% 18%, rgba(194, 216, 196, 0.78), transparent 22%),
    radial-gradient(circle at 82% 12%, rgba(159, 187, 162, 0.36), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(194, 216, 196, 0.46), transparent 34%);
  filter: blur(12px);
  animation: ambientFloat 18s ease-in-out infinite alternate;
}

body::after {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.78), transparent 88%);
  opacity: 0.35;
  animation: gridShift 28s linear infinite;
}

.page-ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.page-noise,
.page-wave,
.ambient-blob {
  position: absolute;
  pointer-events: none;
}

.page-noise {
  inset: -30%;
  opacity: 0.15;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(34, 34, 34, 0.05) 0.7px, transparent 0.9px),
    radial-gradient(circle at 80% 60%, rgba(34, 34, 34, 0.04) 0.7px, transparent 0.9px),
    radial-gradient(circle at 50% 50%, rgba(34, 34, 34, 0.05) 0.6px, transparent 0.85px);
  background-size: 28px 28px, 24px 24px, 34px 34px;
  animation: grainShift 12s steps(10) infinite;
}

.page-wave {
  inset: auto -8% -4% -8%;
  height: 48vh;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(34, 34, 34, 0.02) 0px,
      rgba(34, 34, 34, 0.02) 3px,
      transparent 4px,
      transparent 12px
    ),
    linear-gradient(180deg, rgba(194, 216, 196, 0.58), rgba(194, 216, 196, 0));
  mask-image: radial-gradient(120% 95% at 50% 100%, #000 32%, transparent 76%);
  opacity: 0.9;
  filter: blur(0.25px);
  transform-origin: 50% 100%;
  animation: waveDrift 14s ease-in-out infinite alternate;
}

.ambient-blob {
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.42;
}

.ambient-blob.blob-a {
  top: 6%;
  left: -4%;
  width: 260px;
  height: 260px;
  background: rgba(194, 216, 196, 0.9);
  animation: orbFloat 16s ease-in-out infinite;
}

.ambient-blob.blob-b {
  right: 6%;
  top: 20%;
  width: 180px;
  height: 180px;
  background: rgba(159, 187, 162, 0.36);
  animation: orbFloat 20s ease-in-out infinite reverse;
}

.ambient-blob.blob-c {
  left: 22%;
  bottom: 8%;
  width: 240px;
  height: 240px;
  background: rgba(255, 255, 255, 0.55);
  animation: orbFloat 22s ease-in-out infinite;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
strong {
  color: var(--coal);
}

h1,
h2,
h3,
.card h2,
.panel h2,
.auth-card h1,
.auth-showcase h1 {
  margin-top: 0;
}

p {
  line-height: 1.65;
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.auth-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 24px;
  align-items: stretch;
}

.hero-panel,
.card,
.panel,
.auth-card,
.auth-showcase,
.metric-chip,
.version-row {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.hero-panel,
.panel,
.card,
.auth-showcase,
.auth-card {
  overflow: hidden;
}

.hero-panel::before,
.card::before,
.panel::before,
.auth-card::before,
.auth-showcase::before,
.version-row::before,
.metric-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 46%, rgba(194, 216, 196, 0.24));
  opacity: 0.8;
  pointer-events: none;
}

.hero-panel,
.auth-showcase {
  padding: 32px;
}

.auth-showcase {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  min-height: 520px;
}

.auth-showcase h1 {
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
  margin-bottom: 18px;
}

.auth-showcase .hero-copy {
  max-width: 40rem;
  font-size: 1.03rem;
}

.auth-card {
  width: min(480px, 100%);
  margin-left: auto;
  padding: 30px;
}

.auth-card .auth-form-header {
  margin-bottom: 22px;
}

.auth-form-footer {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.dashboard-page .container {
  padding-top: 28px;
}

.hero-panel {
  margin-bottom: 20px;
}

.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.title-stack h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-copy {
  margin: 0;
  max-width: 56rem;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--info);
}

.hero-metrics,
.stat-grid,
.chip-list,
.badges,
.footer-links,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-metrics {
  margin-top: 22px;
}

.metric-chip,
.feature-chip {
  min-width: 168px;
  padding: 14px 16px;
}

.metric-label,
.feature-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.metric-chip strong,
.feature-chip strong {
  display: block;
  font-size: 1rem;
}

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

.feature-chip {
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(34, 34, 34, 0.08);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

header.app-header {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.card,
.panel {
  padding: 24px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.stack-sm {
  display: grid;
  gap: 8px;
}

.muted {
  color: var(--muted);
}

nav a,
.text-link {
  color: var(--coal);
  text-decoration: none;
  font-weight: 600;
  position: relative;
}

nav a::after,
.text-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

nav a:hover::after,
.text-link:hover::after {
  transform: scaleX(1);
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--coal);
}

input,
textarea,
select,
button {
  font: inherit;
}

input:not([type='checkbox']):not([type='file']),
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(34, 34, 34, 0.12);
  border-radius: 14px;
  color: var(--coal);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

input:not([type='checkbox']):not([type='file']):focus,
textarea:focus,
select:focus,
input[type='file']:focus-visible {
  border-color: rgba(34, 34, 34, 0.28);
  box-shadow: 0 0 0 5px rgba(194, 216, 196, 0.46);
  transform: translateY(-1px);
}

input[type='file'] {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(34, 34, 34, 0.18);
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
}

input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--coal);
  margin-right: 8px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--primary);
  color: var(--primary-contrast);
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(34, 34, 34, 0.14);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

button:hover,
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(34, 34, 34, 0.18);
}

button.secondary,
.button.secondary {
  background: rgba(255, 255, 255, 0.58);
  color: var(--secondary-contrast);
  border-color: rgba(34, 34, 34, 0.12);
  box-shadow: none;
}

button.warning {
  background: #b88214;
  color: #fff;
}

button.danger {
  background: var(--danger);
  color: #fff;
}

button.small {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.92rem;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-group {
  margin-bottom: 14px;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.row > * {
  flex: 1 1 200px;
}

.license-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.badge.active,
.badge.online {
  background: rgba(47, 125, 81, 0.12);
  color: var(--success);
  border-color: rgba(47, 125, 81, 0.14);
}

.badge.offline,
.badge.suspended,
.badge.cancelled,
.badge.expired {
  background: rgba(184, 74, 74, 0.12);
  color: var(--danger);
  border-color: rgba(184, 74, 74, 0.15);
}

.badge.warning {
  background: rgba(169, 109, 0, 0.12);
  color: var(--warning);
  border-color: rgba(169, 109, 0, 0.18);
}

.badge.neutral {
  background: rgba(34, 34, 34, 0.07);
  color: var(--coal-soft);
  border-color: rgba(34, 34, 34, 0.08);
}

.version-list {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.version-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.62);
}

.table-shell {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(34, 34, 34, 0.08);
  background: rgba(255, 255, 255, 0.58);
}

.table-shell table {
  width: 100%;
  border-collapse: collapse;
}

th,
 td {
  text-align: left;
  padding: 13px 12px;
  border-bottom: 1px solid rgba(34, 34, 34, 0.08);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.notice,
.error {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}

.notice {
  background: rgba(194, 216, 196, 0.62);
  color: var(--coal);
  border-color: rgba(34, 34, 34, 0.08);
}

.error {
  background: rgba(184, 74, 74, 0.12);
  color: #8f2323;
  border-color: rgba(184, 74, 74, 0.16);
}

.footer-links {
  margin-top: 18px;
}

.code {
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(34, 34, 34, 0.06);
  border: 1px solid rgba(34, 34, 34, 0.06);
  color: var(--coal);
  padding: 4px 8px;
  border-radius: 10px;
}

.hidden {
  display: none !important;
}

.highlight-sweep {
  display: inline;
  background-image: linear-gradient(120deg, rgba(194, 216, 196, 0.2) 0%, rgba(194, 216, 196, 0.7) 48%, rgba(194, 216, 196, 0.18) 100%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  background-position: 0 100%;
  padding: 0 0.15em;
  border-radius: 0.35em;
  animation: highlightSweep 1.15s ease forwards;
  animation-delay: 0.45s;
}

.stagger-text {
  display: inline-flex;
  flex-wrap: wrap;
}

.stagger-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  filter: blur(8px);
}

.stagger-in .stagger-char {
  animation: staggerRise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--char-index) * 45ms);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(10px);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.interactive-card {
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --pointer-x: 50%;
  --pointer-y: 50%;
  transform: perspective(1200px) rotateX(var(--rotate-x)) rotateY(var(--rotate-y));
  transform-style: preserve-3d;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.interactive-card:hover {
  box-shadow: var(--shadow-strong);
  border-color: var(--border-strong);
}

.interactive-card::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(255, 255, 255, 0.42), transparent 36%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.interactive-card:hover::after {
  opacity: 1;
}

.auth-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.small-print {
  font-size: 0.9rem;
  color: var(--muted);
}

@keyframes ambientFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(1.5%, -1%, 0) scale(1.03);
  }
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(18px, -24px, 0) scale(1.06);
  }
}

@keyframes waveDrift {
  0% {
    transform: translate3d(0, 0, 0) scaleY(1) scaleX(1.02);
  }
  100% {
    transform: translate3d(0, -12px, 0) scaleY(1.08) scaleX(1.08);
  }
}

@keyframes grainShift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(1%, -1%, 0);
  }
  50% {
    transform: translate3d(-1%, 1%, 0);
  }
  75% {
    transform: translate3d(0.5%, 1.4%, 0);
  }
  100% {
    transform: translate3d(-0.8%, -0.8%, 0);
  }
}

@keyframes gridShift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(28px, 28px, 0);
  }
}

@keyframes staggerRise {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes highlightSweep {
  from {
    background-size: 0% 100%;
  }
  to {
    background-size: 100% 100%;
  }
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-card {
    margin-left: 0;
    width: 100%;
  }

  .auth-showcase {
    min-height: unset;
  }

  .hero-header {
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  body.centered {
    padding: 18px;
  }

  .hero-panel,
  .card,
  .panel,
  .auth-card,
  .auth-showcase {
    padding: 20px;
  }

  .container {
    width: min(100%, calc(100% - 24px));
  }

  .hero-metrics,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  td {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-on-scroll,
  .reveal-on-scroll.is-visible,
  .stagger-char,
  .interactive-card {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
