@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&family=Sora:wght@400;500;600;700&display=swap");

:root {
  --accent: #4db8d9;
  --accent-hover: #6bc9e4;
  --accent-muted: rgba(77, 184, 217, 0.14);
  --accent-border: rgba(77, 184, 217, 0.35);
  --gold: #d4a84b;
  --gold-muted: rgba(212, 168, 75, 0.15);
  --success: #4caf82;
  --danger: #e07070;
  --bg: #0a0e12;
  --bg-elevated: #0f1419;
  --surface: #141a21;
  --surface-2: #1a222c;
  --surface-3: #222b36;
  --border: #243040;
  --border-strong: #334155;
  --text: #e6edf4;
  --text-secondary: #9aabbc;
  --text-muted: #6b7c8f;
  --text-inverse: #0a0e12;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 10px;
  --radius-lg: 14px;
  --header-h: 64px;
  --container: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(77,184,217,0.12), transparent 60%);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul { list-style: none; }
h1,h2,h3,h4 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.2; }
code { font-family: var(--font-mono); font-size: 0.875em; background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; border: 1px solid var(--border); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1rem; }
.container-wide { max-width: 1280px; }
.section { padding-block: 4rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
}

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-gold { color: var(--gold); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-center { text-align: center; }
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.w-full { width: 100%; }
.stack > * + * { margin-top: 1rem; }
.min-h-screen { min-height: 100vh; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.125rem; font-family: var(--font-display); font-size: 0.875rem; font-weight: 500;
  border-radius: var(--radius); border: 1px solid transparent; transition: 0.15s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: linear-gradient(135deg, #3aa8c9, #4db8d9 50%, #6bc9e4); color: var(--text-inverse); }
.btn--primary:hover { box-shadow: 0 0 24px rgba(77,184,217,0.18); color: var(--text-inverse); }
.btn--secondary { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn--secondary:hover { background: #1e2732; }
.btn--ghost { color: var(--text-secondary); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--gold { background: linear-gradient(135deg, #b8923a, #d4a84b); color: var(--text-inverse); }
.btn--outline { border-color: var(--accent-border); color: var(--accent); }
.btn--sm { padding: 0.4rem 0.75rem; font-size: 0.75rem; }
.btn--lg { padding: 0.875rem 1.5rem; }
.btn--icon { width: 2.5rem; height: 2.5rem; padding: 0; }

.badge {
  display: inline-flex; align-items: center; gap: 0.3em; padding: 0.2em 0.55em;
  font-size: 0.75rem; font-family: var(--font-display); font-weight: 500;
  border-radius: 6px; background: var(--surface-3); color: var(--text-secondary);
}
.badge--accent { background: var(--accent-muted); color: var(--accent); }
.badge--gold { background: var(--gold-muted); color: var(--gold); }
.badge--success { background: rgba(76,175,130,0.15); color: var(--success); }
.badge--danger { background: rgba(224,112,112,0.15); color: var(--danger); }
.badge--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem;
}
.card--hover:hover { border-color: var(--border-strong); background: var(--surface-2); }
.card--interactive { cursor: pointer; }
.card__title { font-size: 1.125rem; font-weight: 600; }
.card__body { font-size: 0.875rem; color: var(--text-secondary); }
.card--gold { border-color: rgba(212,168,75,0.35); background: linear-gradient(180deg, var(--gold-muted), var(--surface) 60%); }
.card--accent { border-color: var(--accent-border); background: linear-gradient(180deg, var(--accent-muted), var(--surface) 60%); }

.navbar {
  position: sticky; top: 0; z-index: 200; height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(10,14,18,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.navbar__inner {
  display: flex; align-items: center; gap: 1.5rem; width: 100%;
  max-width: 1280px; margin-inline: auto; padding-inline: 1rem;
}
.navbar__brand {
  display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-display);
  font-weight: 700; color: var(--text);
}
.navbar__logo {
  width: 32px; height: 32px; border-radius: 6px;
  background: linear-gradient(135deg, #3aa8c9, #6bc9e4);
  display: flex; align-items: center; justify-content: center; color: var(--text-inverse); font-size: 0.9rem; font-weight: 700;
}
.navbar__nav { display: flex; gap: 0.25rem; }
.navbar__link {
  padding: 0.45rem 0.75rem; font-size: 0.875rem; font-weight: 500;
  color: var(--text-secondary); border-radius: var(--radius);
}
.navbar__link:hover, .navbar__link.is-active { color: var(--text); background: var(--surface-2); }
.navbar__actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.navbar__toggle { display: none; }
@media (max-width: 768px) {
  .navbar__nav { display: none; }
  .navbar__nav.is-open {
    display: flex; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 0.75rem;
  }
  .navbar__toggle { display: inline-flex; }
}

.hero {
  position: relative; min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; padding: 4rem 0; overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background: linear-gradient(165deg, #0c1520, #0a1018 40%, #081018);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 70% 40%, rgba(77,184,217,0.15), transparent 55%);
}
.hero__content { position: relative; z-index: 1; max-width: 640px; }
.hero__brand {
  font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700; letter-spacing: -0.04em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__headline { font-size: 1.25rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.hero__sub { color: var(--text-muted); max-width: 42ch; margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.feature-tile {
  display: flex; flex-direction: column; gap: 0.75rem; padding: 1.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: 0.2s var(--ease); height: 100%;
}
.feature-tile:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.feature-tile__icon {
  width: 42px; height: 42px; border-radius: var(--radius); background: var(--accent-muted);
  display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 1.25rem;
}
.feature-tile__title { font-family: var(--font-display); font-weight: 600; }
.feature-tile__desc { font-size: 0.875rem; color: var(--text-muted); flex: 1; }
.feature-tile__link { font-size: 0.875rem; font-weight: 500; color: var(--accent); }

.page-header { margin-bottom: 2rem; }
.page-header__title { font-size: 1.875rem; margin-bottom: 0.5rem; }
.page-header__desc { color: var(--text-muted); max-width: 56ch; }

.form-group { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.form-label { font-size: 0.875rem; font-family: var(--font-display); font-weight: 500; color: var(--text-secondary); }
.input, .select, .textarea {
  width: 100%; padding: 0.65rem 0.875rem; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(77,184,217,0.35);
}
.textarea { min-height: 100px; resize: vertical; }

.table-wrap {
  overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
}
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
  text-align: left; padding: 0.75rem 1rem; font-family: var(--font-display); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid #1a2330; color: var(--text-secondary); }
.table tbody tr:hover { background: var(--surface-2); }

.stat {
  padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.stat__label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-display); }
.stat__value { font-family: var(--font-display); font-size: 1.875rem; font-weight: 700; margin-top: 0.25rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }

.alert {
  display: flex; gap: 0.75rem; padding: 1rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); font-size: 0.875rem; color: var(--text-secondary);
}
.alert--info { border-color: var(--accent-border); background: var(--accent-muted); color: var(--accent); }
.alert--success { border-color: rgba(76,175,130,0.35); background: rgba(76,175,130,0.12); color: var(--success); }
.alert--warning { border-color: rgba(212,168,75,0.35); background: var(--gold-muted); color: var(--gold); }

.live-dot {
  display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--success); font-weight: 500;
}
.live-dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success);
  animation: pulse 1.6s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(76,175,130,0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(76,175,130,0); }
}

.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
}
.product-card:hover { border-color: var(--accent-border); }
.product-card__media {
  aspect-ratio: 4/3; background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  font-size: 2rem; border-bottom: 1px solid #1a2330;
}
.product-card__body { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.product-card__cat { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.product-card__title { font-family: var(--font-display); font-weight: 600; }
.product-card__footer {
  display: flex; align-items: center; justify-content: space-between; margin-top: auto;
  padding-top: 0.75rem; border-top: 1px solid #1a2330;
}
.product-card__price { font-family: var(--font-display); font-weight: 700; color: var(--gold); }

.footer {
  border-top: 1px solid var(--border); padding: 3rem 0 2rem; margin-top: 4rem; background: var(--bg-elevated);
}
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem;
  padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.75rem; color: var(--text-muted);
}

.feed-item {
  display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 1rem;
  padding: 0.875rem 0; border-bottom: 1px solid #1a2330;
  animation: fadeUp 0.4s var(--ease);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.auth-panel { width: 100%; max-width: 400px; }
.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 500; display: flex; flex-direction: column; gap: 0.5rem;
}
.toast {
  padding: 1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.875rem; box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.item-icon {
  width: 32px; height: 32px; object-fit: contain; border-radius: 6px;
  background: #121820; border: 1px solid #1a2330;
}
.item-icon--lg { width: 48px; height: 48px; }
.grid-4 { display: grid; gap: 1.25rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

.premium-banner {
  background: linear-gradient(90deg, rgba(201,162,39,0.12), rgba(36,48,64,0.6));
  border-bottom: 1px solid rgba(201,162,39,0.35);
  padding: 0.65rem 0;
  font-size: 0.875rem;
}
.premium-banner__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.premium-banner__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.input {
  width: 100%; padding: 0.65rem 0.85rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.product-card__media img.item-icon--lg {
  width: 72px; height: 72px; border: 0; background: transparent;
}
