﻿@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Manrope:wght@300;400;500;600;700;800&family=Unbounded:wght@400;500;700&display=swap');

:root {
  --font-body: 'Manrope', 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  --text: #e7f5ff;
  --muted: #a2bfd0;
  --line: rgba(189, 225, 241, 0.22);
  --panel: rgba(9, 25, 39, 0.72);
  --panel-strong: rgba(7, 21, 34, 0.9);
  --accent: #1cc8ff;
  --good: #42d88f;
  --warn: #ffd16a;
  --danger: #ff7a8a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(circle at 5% -10%, #1f455e 0%, transparent 48%),
    radial-gradient(circle at 90% 10%, #113648 0%, transparent 34%),
    radial-gradient(circle at 30% 110%, #15384a 0%, transparent 40%),
    linear-gradient(140deg, #071019 0%, #0b1928 40%, #102335 100%);
  overflow-x: hidden;
}

.background-shape {
  position: fixed;
  z-index: 0;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.shape-a {
  top: -10rem;
  left: -10rem;
  background: rgba(42, 186, 219, 0.24);
}

.shape-b {
  right: -12rem;
  bottom: -12rem;
  background: rgba(86, 180, 121, 0.2);
}

.noise-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: radial-gradient(circle, #ffffff 0.4px, transparent 0.4px);
  background-size: 6px 6px;
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(7, 16, 25, 0.62);
  backdrop-filter: blur(10px);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.intro-screen.hide {
  opacity: 0;
  visibility: hidden;
}

.intro-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 4rem);
  letter-spacing: 0.09em;
  color: #dcf6ff;
  text-shadow: 0 0 16px rgba(61, 193, 255, 0.6), 0 0 38px rgba(61, 193, 255, 0.4);
  animation: introPulse 2.2s ease forwards;
}

@keyframes introPulse {
  0% {
    opacity: 0;
    filter: blur(16px);
    transform: scale(1.12);
  }

  30% {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
  }

  80% {
    opacity: 1;
    filter: blur(0px);
  }

  100% {
    opacity: 0;
    filter: blur(8px);
    transform: scale(0.98);
  }
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 2rem));
  margin: 1.2rem auto 2.2rem;
  padding: 1rem;
  transition: filter 0.9s ease, opacity 0.9s ease, transform 0.9s ease;
}

body.is-loading .site-shell {
  opacity: 0.62;
  filter: blur(14px);
  transform: scale(1.02);
}

body.loaded .site-shell {
  opacity: 1;
  filter: blur(0px);
  transform: scale(1);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(13, 31, 46, 0.85), rgba(8, 22, 34, 0.7));
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0.9rem;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  justify-self: start;
}

.brand-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(198, 234, 255, 0.5);
  overflow: hidden;
  background: linear-gradient(160deg, #0d9dc3, #6df0bf);
  display: grid;
  place-items: center;
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-center-badge {
  justify-self: center;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 228, 255, 0.3);
  background: rgba(18, 54, 76, 0.68);
  font: 600 0.8rem var(--font-mono);
  letter-spacing: 0.05em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-self: end;
}

.nav-btn {
  color: var(--text);
  text-decoration: none;
  padding: 0.52rem 0.96rem;
  border-radius: 999px;
  border: 1px solid rgba(187, 223, 242, 0.26);
  background: rgba(14, 33, 49, 0.65);
  font-size: 0.9rem;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.nav-btn:hover,
.nav-btn:focus-visible {
  background: rgba(65, 166, 202, 0.28);
  border-color: rgba(90, 216, 255, 0.6);
  transform: translateY(-2px);
}

.nav-btn.is-active {
  border-color: rgba(116, 227, 255, 0.65);
  background: rgba(39, 110, 144, 0.5);
}

.studio-layout,
.crm-layout {
  margin-top: 1.05rem;
  display: grid;
  gap: 1rem;
}

.hero-panel,
.catalog-panel,
.panel,
.login-panel {
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--panel);
  backdrop-filter: blur(16px);
  padding: clamp(1rem, 2vw, 1.35rem);
}

.hero-panel {
  background: linear-gradient(145deg, rgba(11, 31, 45, 0.9), rgba(7, 21, 34, 0.85));
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.title {
  margin: 0.72rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.8vw, 2.8rem);
  line-height: 1.08;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.title-avatar {
  width: clamp(2rem, 4.5vw, 2.6rem);
  height: clamp(2rem, 4.5vw, 2.6rem);
  border-radius: 0.62rem;
  object-fit: cover;
  border: 1px solid rgba(189, 225, 241, 0.3);
}

.subtitle {
  margin: 0.85rem 0 0;
  color: var(--muted);
  max-width: 56rem;
  line-height: 1.5;
}

.hero-stats,
.stats-inline {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.stat-card {
  border-radius: 0.9rem;
  border: 1px solid rgba(185, 221, 237, 0.2);
  background: rgba(15, 39, 57, 0.75);
  padding: 0.75rem;
  display: grid;
  gap: 0.2rem;
}

.stat-label {
  font-size: 0.72rem;
  color: #8cb3c5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font: 700 1.35rem/1.2 var(--font-display);
  color: #daf4ff;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
}

.subtle-link {
  color: #9fdfff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(151, 221, 250, 0.35);
  padding-bottom: 0.08rem;
}

.subtle-link:hover,
.subtle-link:focus-visible {
  color: #d6f4ff;
  border-bottom-color: rgba(151, 221, 250, 0.75);
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip-btn {
  border: 1px solid rgba(180, 222, 241, 0.3);
  border-radius: 999px;
  background: rgba(14, 33, 49, 0.72);
  color: var(--text);
  padding: 0.42rem 0.82rem;
  font: 500 0.82rem/1 var(--font-mono);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.chip-btn:hover,
.chip-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(116, 227, 255, 0.65);
}

.chip-btn.is-active {
  border-color: rgba(116, 227, 255, 0.7);
  background: rgba(42, 113, 147, 0.55);
}

.products-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.product-card {
  border-radius: 1rem;
  border: 1px solid rgba(184, 221, 238, 0.2);
  background: linear-gradient(145deg, rgba(10, 28, 42, 0.9), rgba(12, 35, 50, 0.75));
  padding: 0.85rem;
  display: grid;
  gap: 0.65rem;
}

.product-head {
  display: flex;
  gap: 0.7rem;
}

.product-image {
  width: 58px;
  height: 58px;
  border-radius: 0.78rem;
  border: 1px solid rgba(191, 228, 244, 0.26);
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(14, 39, 57, 0.85);
}

.product-meta {
  min-width: 0;
}

.product-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #e4f4fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-category {
  margin-top: 0.16rem;
  color: #8fb3c4;
  font-size: 0.78rem;
}

.product-description {
  margin: 0;
  color: #c4dfed;
  font-size: 0.86rem;
  line-height: 1.42;
  min-height: 2.45em;
}

.product-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.product-price {
  font: 600 1.04rem/1 var(--font-display);
  color: #d6f8ff;
}

.btn-primary,
.btn-ghost,
.buy-btn,
.pay-link {
  border-radius: 0.78rem;
  padding: 0.54rem 0.86rem;
  font-size: 0.84rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.buy-btn,
.btn-primary {
  background: linear-gradient(140deg, #1d8fbb, #2fa87c);
  color: #f0fdff;
  border-color: rgba(198, 247, 255, 0.32);
  font-weight: 600;
}

.buy-btn:hover,
.buy-btn:focus-visible,
.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(198, 247, 255, 0.52);
}

.btn-ghost {
  background: rgba(14, 33, 49, 0.72);
  color: var(--text);
  border-color: rgba(180, 222, 241, 0.3);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(116, 227, 255, 0.65);
}

.empty-state {
  border: 1px dashed rgba(166, 220, 243, 0.35);
  border-radius: 1rem;
  padding: 1rem;
  color: #a3c5d6;
  background: rgba(9, 26, 40, 0.5);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(5, 14, 22, 0.74);
  backdrop-filter: blur(8px);
  padding: 1rem;
}

.modal-card {
  width: min(540px, 100%);
  border-radius: 1rem;
  border: 1px solid rgba(182, 222, 241, 0.3);
  background: linear-gradient(145deg, rgba(12, 33, 48, 0.94), rgba(8, 24, 37, 0.95));
  padding: 1rem;
  position: relative;
}

.modal-close {
  position: absolute;
  right: 0.55rem;
  top: 0.55rem;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(180, 222, 241, 0.34);
  background: rgba(14, 33, 49, 0.72);
  color: #dff6ff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.modal-eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.modal-card h3 {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.modal-description {
  margin: 0.6rem 0 0;
  color: var(--muted);
}

.payment-list {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.55rem;
}

.pay-link {
  text-align: center;
  font-weight: 600;
  background: rgba(18, 47, 68, 0.82);
  color: #dbf6ff;
  border-color: rgba(154, 220, 246, 0.34);
}

.pay-link:hover,
.pay-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(154, 220, 246, 0.56);
}

.pay-link.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.modal-note {
  margin: 0.8rem 0 0;
  color: #9fc3d6;
  font-size: 0.78rem;
}

.login-panel {
  margin-top: 1.05rem;
}

.login-panel h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.form-grid {
  display: grid;
  gap: 0.72rem;
  margin-top: 0.82rem;
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #d7edf9;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(180, 222, 241, 0.3);
  border-radius: 0.72rem;
  background: rgba(10, 30, 45, 0.85);
  color: #e4f5ff;
  font: 500 0.9rem/1.3 var(--font-body);
  padding: 0.58rem 0.7rem;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: rgba(116, 227, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(44, 139, 179, 0.25);
}

textarea {
  resize: vertical;
}

.small-note {
  margin: 0.72rem 0 0;
  color: #9fc3d6;
  font-size: 0.8rem;
}

code {
  font-family: var(--font-mono);
}

.form-error {
  margin: 0.72rem 0 0;
  color: #ffd6de;
  background: rgba(125, 31, 47, 0.35);
  border: 1px solid rgba(248, 146, 167, 0.4);
  border-radius: 0.72rem;
  padding: 0.5rem 0.65rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.stack-list {
  display: grid;
  gap: 0.65rem;
}

.entity-card {
  border-radius: 0.9rem;
  border: 1px solid rgba(185, 221, 237, 0.2);
  background: rgba(15, 39, 57, 0.7);
  padding: 0.74rem;
}

.entity-head {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: flex-start;
}

.entity-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 600;
}

.entity-meta {
  margin: 0.22rem 0 0;
  color: #8fb3c4;
  font-size: 0.78rem;
}

.entity-actions {
  display: flex;
  gap: 0.45rem;
}

.tag {
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  font: 600 0.7rem/1 var(--font-mono);
  border: 1px solid rgba(186, 223, 241, 0.3);
}

.tag.ok {
  background: rgba(44, 168, 124, 0.22);
  color: #9bf2cb;
}

.tag.off {
  background: rgba(150, 165, 176, 0.2);
  color: #c0cdd4;
}

[hidden] {
  display: none !important;
}

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

  .two-col {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .site-shell {
    width: min(1160px, calc(100% - 1rem));
    padding: 0.4rem;
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 0.75rem;
    border-radius: 1rem;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-stats,
  .stats-inline,
  .grid-two {
    grid-template-columns: 1fr;
  }

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