/* Fivesense — premium landing theme */

:root {
  --bg: #0a0a0a;
  --bg-elevated: #101010;
  --bg-card: rgba(14, 14, 14, 0.88);
  --bg-group: #0c0c0c;
  --bg-input: #111111;
  --border-outer: #000000;
  --border-mid: #444444;
  --border-inner: #1a1a1a;
  --border-soft: #2a2a2a;
  --text: #ececec;
  --text-muted: #8a8a8a;
  --text-dim: #5c5c5c;
  --accent: #8bc34a;
  --accent-bright: #a4d65a;
  --accent-dim: #6d9c38;
  --accent-glow: rgba(139, 195, 74, 0.22);
  --btn: #161616;
  --btn-hover: #202020;
  --btn-active: #2a2a2a;
  --danger: #e91e63;
  --rainbow: linear-gradient(
    90deg,
    #00e5ff 0%,
    #9c27b0 20%,
    #e91e63 40%,
    #ff9800 60%,
    #ffeb3b 80%,
    #8bc34a 100%
  );
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "Consolas", "JetBrains Mono", monospace;
  --shadow: 0 32px 100px rgba(0, 0, 0, 0.65);
  --shadow-green: 0 24px 80px rgba(139, 195, 74, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }

.carbon-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, rgba(22, 22, 22, 0.65) 1px, transparent 0);
  background-size: 4px 4px;
}

.carbon-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% -5%, rgba(139, 195, 74, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(139, 195, 74, 0.04), transparent 50%);
}

.carbon-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.35) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.rainbow-bar {
  height: 2px;
  background: var(--rainbow);
  flex-shrink: 0;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(140%);
  background: rgba(8, 8, 8, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 12px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: none;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.nav-actions { display: flex; gap: 8px; align-items: center; }

.nav-username {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent-bright);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s, border-color 0.2s;
}

.nav-username:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--accent-bright);
}

.nav-guest[hidden],
.nav-username[hidden] {
  display: none !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--border-soft);
  background: var(--btn);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  user-select: none;
}

.btn:hover {
  background: var(--btn-hover);
  border-color: #3a3a3a;
}

.btn:active { transform: translateY(1px); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-lg { height: 40px; padding: 0 22px; font-size: 14px; }

.btn-primary {
  border-color: rgba(139, 195, 74, 0.45);
  background: linear-gradient(180deg, rgba(139, 195, 74, 0.18) 0%, rgba(139, 195, 74, 0.08) 100%);
  color: #dff5b8;
}

.btn-primary:hover {
  border-color: rgba(139, 195, 74, 0.65);
  background: linear-gradient(180deg, rgba(139, 195, 74, 0.26) 0%, rgba(139, 195, 74, 0.12) 100%);
  box-shadow: 0 0 24px rgba(139, 195, 74, 0.15);
}

.btn-block { width: 100%; }

/* Hero */
.hero {
  padding: 56px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: center;
}

.hero-copy { max-width: 520px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border-inner);
  background: rgba(12, 12, 12, 0.8);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.badge-logo {
  object-fit: cover;
  border: none;
}

.hero h1 {
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.text-green {
  color: var(--accent-bright);
}

.hero-copy > p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-inner);
}

.hero-stat strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-bright);
  line-height: 1.2;
}

.hero-stat span {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-visual {
  position: relative;
}

.hero-stack {
  position: relative;
  z-index: 1;
}

.screenshot-float {
  position: absolute;
  left: -8%;
  bottom: -6%;
  width: 46%;
  z-index: 3;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(139, 195, 74, 0.1);
  transform: rotate(-2deg);
  transition: transform 0.4s ease;
}

.hero-stack:hover .screenshot-float {
  transform: rotate(0deg) translateY(-4px);
}

.hero-glow {
  position: absolute;
  inset: 10% 5% -5%;
  background: radial-gradient(ellipse at center, var(--accent-glow), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Screenshot frames */
.screenshot-frame {
  position: relative;
  z-index: 1;
  background: #0f0f0f;
  border: 1px solid #000;
  box-shadow: var(--shadow), var(--shadow-green);
  overflow: hidden;
}

.screenshot-frame::before,
.screenshot-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 1px;
  border: 1px solid var(--border-mid);
  z-index: 2;
}

.screenshot-frame::after {
  inset: 2px;
  border-color: var(--border-inner);
}

.screenshot-frame .rainbow-bar {
  position: relative;
  z-index: 3;
  margin: 3px 3px 0;
}

.screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.screenshot-frame-hero img {
  transform: scale(1.001);
}

.screenshot-frame-large {
  max-width: 920px;
  margin: 0 auto;
}

/* Features */
.features {
  padding: 20px 0 72px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.feature-item {
  padding: 22px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-inner);
  transition: border-color 0.25s, transform 0.25s;
}

.feature-item:hover {
  border-color: var(--border-mid);
  transform: translateY(-3px);
}

.feature-icon-img {
  display: block;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  object-fit: contain;
  image-rendering: pixelated;
  opacity: 0.9;
}

.feature-item h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-item p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Section heads */
.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 520px;
  margin: 0 auto;
}

/* Gallery */
.gallery {
  padding: 24px 0 80px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
}

.gallery-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px;
}

.gallery-caption strong {
  font-size: 14px;
  font-weight: 600;
}

.gallery-caption span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Products */
.products { padding: 24px 0 80px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.product-logo {
  object-fit: contain;
  image-rendering: pixelated;
  opacity: 0.95;
}

.product-card .tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(139, 195, 74, 0.35);
  color: var(--accent-bright);
}

.product-card.external .tag {
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}

.product-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-inner);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.product-card:hover {
  border-color: rgba(139, 195, 74, 0.25);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
}

.product-card h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.product-card > p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.feature-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
  flex: 1;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #bdbdbd;
}

.feature-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--accent);
  flex-shrink: 0;
}

/* Showcase */
.showcase {
  padding: 24px 0 88px;
  background: linear-gradient(180deg, transparent, rgba(139, 195, 74, 0.02) 50%, transparent);
}

.showcase-stage {
  position: relative;
  margin-bottom: 32px;
}

.showcase-glow {
  position: absolute;
  inset: 5% 10%;
  background: radial-gradient(ellipse at center, rgba(139, 195, 74, 0.14), transparent 65%);
  pointer-events: none;
}

.showcase-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.pill {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border-inner);
  background: rgba(12, 12, 12, 0.8);
}

.showcase-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.detail-card {
  padding: 20px;
  border: 1px solid var(--border-inner);
  background: rgba(12, 12, 12, 0.65);
}

.detail-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.detail-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}

.detail-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* CTA */
.cta { padding: 0 0 88px; }

.cta-box {
  position: relative;
  border: 1px solid var(--border-inner);
  background: linear-gradient(135deg, rgba(139, 195, 74, 0.08), rgba(12, 12, 12, 0.95));
  overflow: hidden;
}

.cta-box .rainbow-bar { margin: 0; }

.cta-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 36px;
}

.cta-logo {
  flex-shrink: 0;
  border: none;
}

.cta-copy {
  flex: 1;
}

.cta-inner h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.cta-inner p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 480px;
}

.cta-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Osiris windows (auth / dashboard) */
.osiris-window {
  position: relative;
  background: rgba(15, 15, 15, 0.99);
  border: 1px solid var(--border-outer);
  box-shadow: var(--shadow);
}

.osiris-window::before,
.osiris-window::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 1px;
  border: 1px solid var(--border-mid);
}

.osiris-window::after {
  inset: 2px;
  border-color: var(--border-inner);
}

.osiris-window > .rainbow-bar {
  position: relative;
  z-index: 2;
  margin: 3px 3px 0;
}

.osiris-window > .window-body {
  position: relative;
  z-index: 1;
  padding: 16px 18px 18px;
}

.osiris-window > .window-title {
  position: relative;
  z-index: 2;
  padding: 12px 16px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.groupbox {
  position: relative;
  background: var(--bg-group);
  border: 1px solid var(--border-outer);
  padding: 20px 14px 14px;
  margin-bottom: 12px;
}

.groupbox::before {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid var(--border-mid);
  pointer-events: none;
}

.groupbox-title {
  position: absolute;
  top: -7px;
  left: 10px;
  padding: 0 6px;
  background: var(--bg-group);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Auth */
.page-center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

.auth-window { width: min(400px, 100%); }
.auth-window .window-body { padding-top: 10px; }

.auth-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-logo-row img {
  width: 40px;
  height: 40px;
  border: none;
}

.auth-logo-row span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

.field { margin-bottom: 14px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus {
  border-color: rgba(139, 195, 74, 0.5);
  box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.08);
}

.field input::placeholder { color: var(--text-dim); }

.auth-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-footer a { color: var(--accent-bright); }
.auth-footer a:hover { text-decoration: underline; }

.alert {
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid;
  font-size: 13px;
  display: none;
}

.alert.show { display: block; }

.alert-error {
  border-color: rgba(233, 30, 99, 0.4);
  background: rgba(233, 30, 99, 0.08);
  color: #ff8fab;
}

.alert-success {
  border-color: rgba(139, 195, 74, 0.4);
  background: rgba(139, 195, 74, 0.08);
  color: #b5e07a;
}

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  padding: 36px 0 72px;
}

.dash-sidebar .groupbox { margin-bottom: 12px; }

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 8, 0.92);
}

.auth-gate[hidden] {
  display: none !important;
}

#dashboard-content[hidden] {
  display: none !important;
}

.auth-gate-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.pricing-card {
  padding: 16px;
  border: 1px solid var(--border-inner);
  background: rgba(10, 10, 10, 0.8);
}

.pricing-card.featured {
  border-color: rgba(139, 195, 74, 0.35);
  background: rgba(139, 195, 74, 0.04);
}

.pricing-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pricing-price {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.pricing-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.sub-meta {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.sub-meta strong,
.sub-meta code {
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
}

.redeem-form {
  margin-top: 8px;
}

.field-hint,
.download-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.field-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-dim);
}

.download-row.muted {
  opacity: 0.65;
}

@media (max-width: 560px) {
  .pricing-cards { grid-template-columns: 1fr; }
  .admin-inline-form { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.admin-stat {
  padding: 14px;
  border: 1px solid var(--border-inner);
  background: rgba(10, 10, 10, 0.8);
  text-align: center;
}

.admin-stat strong {
  display: block;
  font-size: 22px;
  margin-bottom: 4px;
}

.admin-stat span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-inline-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-field-grow {
  grid-column: span 2;
}

.admin-key-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-key {
  display: inline-block;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid var(--border-inner);
  background: rgba(12, 12, 12, 0.9);
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

.admin-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.admin-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 11px;
  min-height: 28px;
}

.field select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  color: var(--text);
}

#admin-nav-btn {
  color: var(--accent-bright);
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.avatar {
  width: 40px;
  height: 40px;
  background: rgba(139, 195, 74, 0.1);
  border: 1px solid rgba(139, 195, 74, 0.25);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-bright);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.avatar.has-image {
  color: transparent;
  background-color: rgba(10, 10, 10, 0.9);
}

.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 24px;
}

.avatar-clickable {
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}

.avatar-clickable:hover {
  border-color: rgba(139, 195, 74, 0.55);
  transform: scale(1.04);
}

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-upload-actions {
  display: grid;
  gap: 8px;
}

.avatar-file-btn {
  cursor: pointer;
  margin: 0;
}

.avatar-file-btn input {
  display: none;
}

.user-row .name { font-weight: 600; font-size: 14px; }
.user-row .sub { font-size: 12px; color: var(--text-muted); }

.dash-nav { display: grid; gap: 4px; }

.dash-nav button {
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  transition: all 0.15s;
}

.dash-nav button:hover,
.dash-nav button.active {
  background: rgba(139, 195, 74, 0.06);
  border-color: rgba(139, 195, 74, 0.15);
  color: var(--text);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}

.check-box {
  width: 12px;
  height: 12px;
  border: 1px solid var(--border-soft);
  background: #0a0a0a;
  flex-shrink: 0;
}

.check-box.on {
  background: rgba(139, 195, 74, 0.25);
  border-color: rgba(139, 195, 74, 0.55);
}

.dash-panel { display: none; }
.dash-panel.active { display: block; }

.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border-inner);
  background: rgba(12, 12, 12, 0.5);
  margin-bottom: 10px;
}

.download-row .meta h4 {
  font-size: 14px;
  margin-bottom: 3px;
}

.download-row .meta p {
  font-size: 12px;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.badge.live {
  border-color: rgba(139, 195, 74, 0.4);
  color: var(--accent-bright);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-inner);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.brand-footer { opacity: 0.85; }

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-copy { max-width: none; text-align: center; }
  .hero-actions, .hero-stats { justify-content: center; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }
  .product-grid, .showcase-details, .dashboard-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; text-align: center; }
  .cta-actions { justify-content: center; flex-wrap: wrap; }
  .nav-links { display: none; }
  .screenshot-float {
    width: 52%;
    left: -4%;
    bottom: -4%;
  }
}

@media (max-width: 560px) {
  .hero { padding-top: 32px; }
  .feature-strip { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 16px; align-items: center; }
  .screenshot-float { display: none; }
  .chat-body { height: 420px; }
  .config-form-row { grid-template-columns: 1fr; }
}

/* Live chat */
.chat-window .window-body {
  padding: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-online {
  font-size: 11px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7cfc6a;
  box-shadow: 0 0 8px rgba(124, 252, 106, 0.8);
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.chat-body {
  display: flex;
  flex-direction: column;
  height: 520px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.35), rgba(4, 4, 4, 0.15)),
    repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(255,255,255,0.015) 24px);
}

.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 88%;
}

.chat-msg.mine {
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-bright);
  border: 1px solid rgba(139, 195, 74, 0.25);
  background: rgba(139, 195, 74, 0.08);
  background-size: cover;
  background-position: center;
}

.chat-avatar.has-image { color: transparent; padding: 0; object-fit: cover; }

.chat-empty {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px;
}

.chat-bubble {
  padding: 10px 12px;
  border: 1px solid var(--border-inner);
  background: rgba(12, 12, 12, 0.92);
  min-width: 0;
}

.chat-msg.mine .chat-bubble {
  border-color: rgba(139, 195, 74, 0.28);
  background: rgba(139, 195, 74, 0.06);
}

.chat-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 11px;
}

.chat-meta strong {
  font-size: 12px;
  color: var(--text);
}

.chat-meta time {
  color: var(--text-dim);
  margin-left: auto;
}

.chat-uid {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
}

.chat-badge {
  padding: 1px 6px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-bright);
  border: 1px solid rgba(139, 195, 74, 0.35);
  background: rgba(139, 195, 74, 0.08);
}

.chat-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  word-break: break-word;
}

.chat-compose {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-inner);
  background: rgba(8, 8, 8, 0.85);
}

.chat-compose input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  color: var(--text);
}

.chat-compose input:focus {
  outline: none;
  border-color: rgba(139, 195, 74, 0.5);
}

/* Config vault */
.config-form-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 10px;
}

.field textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

.field textarea:focus {
  outline: none;
  border-color: rgba(139, 195, 74, 0.5);
}

.config-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.config-card {
  border: 1px solid var(--border-inner);
  background: rgba(10, 10, 10, 0.85);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-card-head strong {
  display: block;
  font-size: 14px;
  margin-top: 4px;
}

.config-cat {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border: 1px solid var(--border-inner);
}

.config-cat-internal { color: #8bc34a; border-color: rgba(139,195,74,0.3); }
.config-cat-external { color: #64b5f6; border-color: rgba(100,181,246,0.3); }
.config-cat-visuals { color: #ffb74d; border-color: rgba(255,183,77,0.3); }
.config-cat-misc { color: var(--text-muted); }

.config-preview {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
  max-height: 72px;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}

.config-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.chat-profile-link {
  color: inherit;
  text-decoration: none;
}

.chat-profile-link:hover strong,
.chat-profile-link:hover .chat-avatar {
  color: var(--accent-bright);
  border-color: rgba(139, 195, 74, 0.45);
}

.check-row input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  accent-color: var(--accent);
}

.field input[type="color"] {
  padding: 2px;
  height: 38px;
  cursor: pointer;
}

#mypage-url {
  color: var(--accent-bright);
}

.mypage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

.mypage-editor {
  min-width: 0;
}

.mypage-preview-col {
  position: sticky;
  top: 72px;
  border: 1px solid var(--border-inner);
  background: rgba(8, 8, 8, 0.92);
  overflow: hidden;
}

.mypage-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-inner);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.mypage-preview-hint {
  color: var(--accent-bright);
  font-size: 10px;
}

#mypage-preview-frame {
  width: 100%;
  height: 520px;
  border: 0;
  background: #000;
  display: block;
}

.file-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.file-btn {
  cursor: pointer;
  margin: 0;
}

.file-btn input {
  display: none;
}

.file-url-fallback {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  color: var(--text);
  font-size: 12px;
}

.mp-social-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.mp-social-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr auto;
  gap: 6px;
  align-items: center;
}

.mp-social-row select,
.mp-social-row input {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-soft);
  background: var(--bg-input);
  color: var(--text);
  font-size: 12px;
}

.mp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.mp-gallery-item {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--border-inner);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
}

.mp-gallery-item img,
.mp-gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mp-gallery-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border: 0;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

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

  .mypage-preview-col {
    position: static;
    order: -1;
  }

  #mypage-preview-frame {
    height: 380px;
  }

  .mp-social-row {
    grid-template-columns: 1fr;
  }
}

.mp-font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 2px;
}

.mp-font-option {
  border: 1px solid var(--border-inner);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 6px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.mp-font-option:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.mp-font-option.active {
  border-color: var(--accent-bright);
  background: rgba(255, 255, 255, 0.08);
}

.mp-font-option .mp-font-sample {
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.mp-font-option .mp-font-label {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mp-gradient-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mp-gradient-preset {
  border: 1px solid var(--border-inner);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  transition: border-color 0.15s;
}

.mp-gradient-preset:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text);
}

.mp-color-row .field {
  min-width: 0;
}

.mp-name-preview-wrap {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--border-inner);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  text-align: center;
}

.mp-name-preview {
  font-size: 28px;
  line-height: 1.2;
  margin-top: 6px;
  word-break: break-word;
}
