/* 3amGallery — shared design system */
:root {
  --bg: #0d1117;
  --bg-surface: #161b22;
  --bg-card: #1c2128;
  --fg: #e6edf3;
  --fg-muted: #8b949e;
  --accent: #f0a500;
  --accent-dim: rgba(240, 165, 0, 0.12);
  --accent-hover: #f5b82a;
  --border: rgba(240, 165, 0, 0.18);
  --border-hover: rgba(240, 165, 0, 0.35);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --radius: 8px;
  --radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Navigation ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8vw;
  height: 68px;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a.btn-primary {
  background: var(--accent);
  color: #0d1117;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s;
}
.nav-links a.btn-primary:hover { background: var(--accent-hover); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #0d1117;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--border-hover); background: var(--accent-dim); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-danger { background: #da3633; color: #fff; }
.btn-danger:hover { background: #f85149; }

/* ─── Hero ─── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 8vw 80px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(240,165,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
  pointer-events: none;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(48px, 6.5vw, 88px);
  font-weight: 900;
  line-height: 1.05;
  color: var(--fg);
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}
.hero-lede {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 540px;
  margin-bottom: 48px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-stat-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.hero-stat { padding: 0 40px 0 0; }
.hero-stat:first-child { padding-left: 0; }
.hero-stat .stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.hero-stat .stat-label {
  display: block;
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  margin-right: 40px;
}

/* ─── Cards / Surfaces ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card-sm { padding: 18px; }

/* ─── Section spacing ─── */
.section {
  padding: 100px 8vw;
}
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.section-lede {
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Features grid ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 22px;
}
.feature-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}
.feature-desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ─── CTA Section ─── */
.cta-section {
  padding: 100px 8vw;
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, var(--accent-dim) 100%);
}
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.1;
}
.cta-lede {
  font-size: 18px;
  color: var(--fg-muted);
  margin-bottom: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Footer ─── */
.footer {
  padding: 40px 8vw;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}
.footer-copy {
  font-size: 13px;
  color: var(--fg-muted);
}

/* ─── Dashboard specific ─── */
.dashboard-wrap {
  min-height: 100vh;
  padding: 100px 4vw 60px;
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
}
.dashboard-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.dashboard-subtitle {
  font-size: 14px;
  color: var(--fg-muted);
}
.dashboard-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Filters bar */
.filters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-select, .filter-input {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 14px;
  outline: none;
  transition: border-color 0.2s;
}
.filter-select:focus, .filter-input:focus { border-color: var(--accent); }
.filter-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 4px;
  display: block;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-card .stat-change {
  font-size: 12px;
  margin-top: 6px;
}
.stat-card .stat-change.up { color: #3fb950; }
.stat-card .stat-change.neutral { color: var(--fg-muted); }

/* Table */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table-toolbar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--fg-muted);
}
.table-count { font-weight: 500; }
.table-sort-hint { font-size: 12px; }

table.listing-table {
  width: 100%;
  border-collapse: collapse;
}
table.listing-table thead {
  background: var(--bg-surface);
}
table.listing-table th {
  padding: 12px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.listing-table th a {
  color: var(--fg-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
table.listing-table th a:hover { color: var(--accent); }
table.listing-table th a.active { color: var(--accent); }
table.listing-table td {
  padding: 14px 20px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
table.listing-table tr:last-child td { border-bottom: none; }
table.listing-table tbody tr:hover { background: rgba(240,165,0,0.04); }
.listing-title-cell { max-width: 260px; }
.listing-title-cell .title-text {
  font-weight: 500;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listing-title-cell .title-sub {
  font-size: 12px;
  color: var(--fg-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.platform-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--bg-surface);
  border: 1px solid var(--border);
}
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.status-active { background: rgba(63,185,80,0.15); color: #3fb950; }
.status-sold { background: rgba(248,81,73,0.15); color: #f85149; }
.status-draft { background: rgba(139,148,158,0.15); color: var(--fg-muted); }
.status-archived { background: var(--accent-dim); color: var(--accent); }
.price-cell {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.actions-cell { text-align: right; }
.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.action-btn:hover { color: var(--fg); background: var(--bg-surface); }
.action-btn.danger:hover { color: #f85149; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  color: var(--fg-muted);
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--fg);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 14px;
  margin-bottom: 24px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 32px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--fg); }

/* Form */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 14px;
  z-index: 300;
  box-shadow: var(--shadow);
  max-width: 360px;
}
.toast.success { border-color: rgba(63,185,80,0.4); }
.toast.error { border-color: rgba(248,81,73,0.4); }

/* Sort indicator */
.sort-arrow { opacity: 0.4; font-size: 10px; }
.sort-arrow.active { opacity: 1; color: var(--accent); }

/* Responsive */
@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-links { gap: 16px; }
  .hero { padding: 100px 6vw 60px; }
  .section { padding: 60px 6vw; }
  .hero-stat-row { flex-wrap: wrap; gap: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .table-wrap { overflow-x: auto; }
}