:root {
  color-scheme: dark;
  --bg: #07090b;
  --panel: #11161c;
  --panel-soft: #17202a;
  --line: #27323e;
  --text: #f8fafc;
  --muted: #9fb0c3;
  --accent: #22d3ee;
  --accent-2: #34d399;
  --warn: #f59e0b;
  --danger: #fb7185;
  --radius: 8px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 8%, rgba(34, 211, 238, .16), transparent 28rem), var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 32px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(6, 9, 12, .82);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #061012;
}
.topnav, .top-actions, .footer-links { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 14px; }
.topnav a.active, .side-nav a.active { color: white; }
.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #15191e;
  color: white;
  padding: 0 18px;
  font-weight: 800;
}
.btn-primary { border-color: var(--accent); background: var(--accent); color: #061012; }
.btn-danger { border-color: rgba(251,113,133,.4); color: #fecdd3; }
.full { width: 100%; }

.hero, .section, .page-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 32px;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 72px);
}
.hero h1, .page-hero h1 { margin: 16px 0; font-size: clamp(42px, 6vw, 76px); line-height: 1.03; }
.hero p, .page-hero p, .section p { color: #c4cad6; line-height: 1.75; font-size: 18px; }
.eyebrow { display: inline-flex; border: 1px solid rgba(34,211,238,.45); border-radius: 999px; padding: 7px 12px; color: #a5f3fc; font-size: 13px; font-weight: 900; }
.hero-actions, .stats-strip { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.stats-strip span { border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 8px 12px; color: var(--muted); font-size: 13px; }
.hero-preview { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.preview-main, .preview-grid img, .card, .panel, .asset-card {
  border: 1px solid rgba(255,255,255,.11);
  border-radius: var(--radius);
  background: rgba(17, 22, 28, .88);
}
.preview-main { min-height: 520px; overflow: hidden; }
.preview-main img, .preview-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-grid { display: grid; gap: 18px; }
.cards-grid, .price-grid, .metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; margin-top: 28px; }
.card, .panel { padding: 24px; }
.muted, .empty { color: var(--muted); line-height: 1.7; }
.price { color: var(--accent-2); font-size: 40px; font-weight: 900; margin: 14px 0; }
.footer { border-top: 1px solid rgba(255,255,255,.08); color: var(--muted); }

.auth-shell { display: grid; min-height: calc(100vh - 72px); place-items: center; padding: 48px 20px; }
.auth-card { display: grid; gap: 16px; width: min(440px, 100%); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(17,22,28,.94); padding: 30px; }
label { display: grid; gap: 8px; color: #d6dae3; font-size: 14px; font-weight: 800; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #171b21;
  color: white;
  padding: 12px 13px;
  outline: none;
}
textarea { resize: vertical; }
.alert, .notice { border-radius: var(--radius); padding: 12px 14px; background: rgba(245,158,11,.14); color: #fde68a; }
.alert.error { background: rgba(251,113,133,.14); color: #fecdd3; }

.app-body { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; border-right: 1px solid var(--line); background: #0d1116; padding: 18px 14px; }
.side-nav { display: grid; gap: 8px; margin-top: 22px; }
.side-nav span { margin: 18px 10px 4px; color: #657084; font-size: 12px; }
.side-nav a { border: 1px solid transparent; border-radius: var(--radius); padding: 12px 14px; color: #d2d7e1; font-weight: 800; }
.side-nav a.active, .side-nav a:hover { border-color: rgba(34,211,238,.5); background: rgba(34,211,238,.12); }
.user-box { display: flex; gap: 12px; align-items: center; margin-top: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: #262d35; }
.user-box small { display: block; color: var(--muted); }
.app-main { min-width: 0; }
.app-topbar { display: flex; height: 58px; align-items: center; justify-content: flex-end; gap: 14px; border-bottom: 1px solid var(--line); padding: 0 28px; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: #a5f3fc; }
.app-content { padding: 28px; }
.app-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.app-heading h1 { margin: 0; font-size: 34px; }
.metric-grid { margin-top: 0; }
.metric-grid strong { display: block; margin-top: 10px; font-size: 38px; }
.panel-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; margin-top: 24px; }
.row-item { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 15px 0; }
.row-item span { display: block; margin-top: 6px; color: var(--muted); }
.row-item em { color: var(--accent-2); font-style: normal; }
.workspace { display: grid; grid-template-columns: 420px minmax(0,1fr); gap: 28px; }
.stack-form { display: grid; gap: 16px; }
.upload-box { min-height: 140px; border: 1px dashed #555b66; border-radius: var(--radius); background: #14191f; padding: 18px; text-align: center; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.asset-card { overflow: hidden; }
.asset-card img { width: 100%; height: 180px; object-fit: cover; background: white; }
.asset-card div { padding: 16px; }
.asset-card span { display: block; margin-top: 8px; color: var(--muted); }

@media (max-width: 980px) {
  .topnav { display: none; }
  .hero, .panel-grid, .workspace { grid-template-columns: 1fr; }
  .cards-grid, .price-grid, .metric-grid { grid-template-columns: 1fr; }
  .app-body { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
}
@media (max-width: 640px) {
  .topbar, .footer, .hero, .section, .page-hero { padding-left: 18px; padding-right: 18px; }
  .hero-preview, .form-grid { grid-template-columns: 1fr; }
  .app-content { padding: 18px; }
  .app-heading { align-items: flex-start; flex-direction: column; }
}
