:root {
  color-scheme: dark;
  --bg: #04070d;
  --panel: rgba(13, 20, 34, 0.74);
  --panel-strong: rgba(12, 18, 30, 0.93);
  --line: rgba(202, 218, 255, 0.16);
  --line-strong: rgba(202, 218, 255, 0.28);
  --text: #eef4ff;
  --muted: #a8b4c8;
  --blue: #2c8dff;
  --cyan: #19d5ff;
  --red: #f03446;
  --silver: #dce7f5;
  --green: #28d987;
  --amber: #ffc857;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(240, 52, 70, 0.24), transparent 28rem),
    radial-gradient(circle at 88% 3%, rgba(44, 141, 255, 0.32), transparent 32rem),
    linear-gradient(135deg, #020305 0%, #07101f 45%, #03050a 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

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

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

button,
a.primary,
a.secondary,
.file-label {
  cursor: pointer;
}

.aurora {
  position: fixed;
  inset: auto -20% -35% -20%;
  height: 70vh;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 48%, rgba(240, 52, 70, 0.2), transparent 24rem),
    radial-gradient(circle at 82% 45%, rgba(25, 213, 255, 0.17), transparent 26rem);
  filter: blur(18px);
  animation: drift 11s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to { transform: translate3d(2%, -3%, 0) scale(1.05); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(3, 7, 14, 0.78);
  backdrop-filter: blur(22px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-lockup img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 0 32px rgba(44, 141, 255, 0.22);
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
  white-space: nowrap;
}

.brand-lockup strong {
  font-size: 14px;
  letter-spacing: 0;
}

.brand-lockup span {
  color: var(--muted);
  font-size: 12px;
}

.brand-lockup.compact img {
  width: 58px;
  height: 58px;
}

nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

nav a,
.ghost,
.secondary,
.primary,
.danger,
.file-label,
.icon-btn {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
}

.primary,
.secondary,
.ghost,
.danger,
.file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary {
  border-color: rgba(25, 213, 255, 0.5);
  background: linear-gradient(135deg, rgba(44, 141, 255, 0.95), rgba(240, 52, 70, 0.88));
  box-shadow: 0 16px 44px rgba(44, 141, 255, 0.2);
}

.secondary {
  background: rgba(10, 24, 44, 0.74);
}

.danger {
  border-color: rgba(240, 52, 70, 0.45);
  background: rgba(240, 52, 70, 0.13);
}

.large {
  min-height: 48px;
  width: fit-content;
}

.primary:hover,
.secondary:hover,
.ghost:hover,
.danger:hover,
.file-label:hover,
nav a:hover {
  transform: translateY(-1px);
  border-color: rgba(25, 213, 255, 0.68);
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 77px);
  padding: clamp(42px, 7vw, 92px) clamp(18px, 5vw, 76px) 36px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  max-width: 940px;
  margin-bottom: 18px;
  font-size: clamp(48px, 8vw, 112px);
  line-height: 0.92;
}

.hero-subtitle {
  max-width: 840px;
  color: #cfdaea;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}

.hero-actions,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 480px;
  isolation: isolate;
}

.hero-visual::before {
  position: absolute;
  inset: 10% 0 8%;
  z-index: -1;
  content: "";
  border: 1px solid rgba(220, 231, 245, 0.18);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 28% 34%, rgba(240, 52, 70, 0.27), transparent 16rem),
    radial-gradient(circle at 75% 58%, rgba(44, 141, 255, 0.33), transparent 18rem);
  box-shadow: var(--shadow);
  transform: perspective(800px) rotateY(-7deg) rotateX(4deg);
}

.hero-visual img {
  width: min(82vw, 430px);
  max-height: 64vh;
  object-fit: contain;
  border-radius: 20px;
  filter: drop-shadow(0 34px 42px rgba(0, 0, 0, 0.42));
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 900px;
  margin-top: 28px;
}

.metric-card,
.solution-card,
.command-strip,
.filters,
.editor-panel,
.admin-table-wrap,
.intel-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.metric-card {
  padding: 14px;
}

.metric-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 21px;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.command-strip,
.filters,
.market-section,
.control-room {
  width: min(1450px, calc(100% - 36px));
  margin: 0 auto 18px;
}

.command-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
}

.search-wrap {
  display: grid;
  grid-template-columns: auto minmax(220px, 720px);
  align-items: center;
  gap: 12px;
  flex: 1;
}

.search-wrap span,
label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: rgba(2, 5, 11, 0.72);
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(25, 213, 255, 0.66);
  box-shadow: 0 0 0 4px rgba(25, 213, 255, 0.1);
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: fit-content;
}

.toggle input,
.check-row input {
  width: auto;
  height: auto;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.filters label,
.editor-panel label {
  display: grid;
  gap: 8px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 42px 0 18px;
}

.section-heading h2 {
  max-width: 880px;
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

.result-count {
  min-width: fit-content;
  color: var(--muted);
}

.sector-tabs {
  display: flex;
  gap: 8px;
  padding-bottom: 16px;
  overflow-x: auto;
}

.tab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.tab.active {
  color: white;
  border-color: rgba(25, 213, 255, 0.55);
  background: rgba(25, 213, 255, 0.12);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 64px;
}

.solution-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 430px;
  padding: 18px;
  overflow: hidden;
}

.solution-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(135deg, rgba(44, 141, 255, 0.14), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(240, 52, 70, 0.14), transparent 9rem);
}

.solution-card > * {
  position: relative;
}

.card-top,
.card-actions,
.badges,
.score-row,
.check-row,
.form-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-top {
  justify-content: space-between;
  margin-bottom: 16px;
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(44, 141, 255, 0.2), rgba(240, 52, 70, 0.14));
  font-size: 22px;
}

.badges {
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d7e4f6;
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
}

.badge.ready,
.badge.production {
  border-color: rgba(40, 217, 135, 0.38);
  color: #bdfadd;
}

.badge.error,
.badge.internal {
  border-color: rgba(240, 52, 70, 0.45);
  color: #ffc3ca;
}

.badge.demo {
  border-color: rgba(255, 200, 87, 0.4);
  color: #ffe0a1;
}

.solution-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.summary {
  color: #bfcbdb;
  line-height: 1.55;
}

.capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 16px;
  padding-top: 16px;
}

.capabilities span {
  border: 1px solid rgba(220, 231, 245, 0.12);
  border-radius: 6px;
  padding: 6px 8px;
  color: #c8d6e8;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.score-row {
  gap: 14px;
  margin: 10px 0 16px;
}

.score {
  flex: 1;
}

.score label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--red));
}

.card-actions {
  flex-wrap: wrap;
}

.card-actions .secondary,
.card-actions .primary {
  min-height: 36px;
  padding: 0 11px;
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.intel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.intel-card {
  padding: 16px;
}

.intel-card strong {
  display: block;
  font-size: 27px;
}

.intel-card span {
  color: var(--muted);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.8fr) minmax(520px, 1.2fr);
  gap: 16px;
  align-items: start;
  padding-bottom: 60px;
}

.editor-panel,
.admin-table-wrap {
  padding: 16px;
}

.form-title {
  justify-content: space-between;
  margin-bottom: 14px;
}

.form-title h3 {
  margin: 0;
}

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

.editor-panel label {
  margin-bottom: 12px;
}

.check-row {
  flex-wrap: wrap;
  margin: 4px 0 14px;
}

.admin-table-wrap {
  overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

.row-actions button {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

.solution-modal {
  width: min(1050px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: rgba(5, 9, 16, 0.96);
  box-shadow: var(--shadow);
}

.solution-modal::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 9, 16, 0.98);
}

.modal-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  font-weight: 800;
}

.modal-body {
  display: grid;
  gap: 16px;
  padding: 20px 22px 24px;
}

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

.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.detail-panel.full {
  grid-column: 1 / -1;
}

.detail-panel h3 {
  margin-bottom: 10px;
}

.detail-panel p,
.detail-panel li {
  color: #c6d1df;
  line-height: 1.55;
}

.architecture {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.arch-node {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(25, 213, 255, 0.06);
}

.arch-node strong {
  display: block;
  margin-bottom: 5px;
}

.arch-node span {
  color: var(--muted);
  font-size: 12px;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 20% 18%, rgba(240, 52, 70, 0.24), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(44, 141, 255, 0.27), transparent 30rem),
    rgba(2, 4, 8, 0.92);
  backdrop-filter: blur(14px);
}

.splash-panel {
  width: min(820px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: clamp(22px, 4vw, 42px);
  background: rgba(6, 11, 20, 0.9);
  box-shadow: var(--shadow);
}

.splash-panel h1 {
  margin-bottom: 14px;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.94;
}

.splash-panel p {
  color: #cbd7e8;
  line-height: 1.6;
}

footer {
  position: relative;
  z-index: 1;
  padding: 26px clamp(18px, 5vw, 76px) 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

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

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

  .hero-visual {
    min-height: 400px;
  }

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

@media (max-width: 740px) {
  .topbar,
  .command-strip,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  nav {
    width: 100%;
    overflow-x: auto;
  }

  .hero {
    min-height: auto;
    padding-top: 36px;
  }

  .hero h1 {
    font-size: clamp(46px, 17vw, 70px);
  }

  .hero-visual {
    min-height: 330px;
  }

  .metrics,
  .cards-grid,
  .filters,
  .intel-grid,
  .form-grid,
  .detail-grid,
  .architecture,
  .search-wrap {
    grid-template-columns: 1fr;
  }

  .solution-card {
    min-height: auto;
  }
}
