/* IdeaMint App Styles — matches landing page design language */

:root {
  --bg: #0b1829;
  --fg: #f5f3ef;
  --fg-muted: #94a3b8;
  --accent: #00e5a0;
  --accent-dim: rgba(0, 229, 160, 0.12);
  --gold: #f5c542;
  --surface: #111f31;
  --surface-2: #162336;
  --surface-3: #1c2d40;
  --border: rgba(255, 255, 255, 0.07);
  --header-bg: rgba(11, 24, 41, 0.92);
  --danger: #ff6b6b;
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::selection { background: var(--accent); color: var(--bg); }

/* ─── HEADER ─── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--fg);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.logo:hover { opacity: 0.85; }
.header-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.header-nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--fg); }
.header-nav a.btn-primary {
  background: var(--accent);
  color: var(--bg);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: opacity 0.2s;
}
.header-nav a.btn-primary:hover { opacity: 0.85; color: var(--bg); }

/* ─── PAGE WRAPPER ─── */
.page-wrapper { padding-top: 64px; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* ─── HERO BANNER ─── */
.page-hero {
  padding: 4rem 2rem 2rem;
  text-align: center;
}
.page-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.page-hero p {
  color: var(--fg-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ─── FILTERS BAR ─── */
.filters-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.sort-select {
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}

/* ─── IDEA GRID ─── */
.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.idea-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, transform 0.2s;
}
.idea-card:hover {
  border-color: rgba(0, 229, 160, 0.4);
  transform: translateY(-2px);
}
.idea-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.idea-card-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  flex: 1;
}
.idea-price {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}
.idea-card-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.badge {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-verified {
  background: rgba(0, 229, 160, 0.15);
  color: var(--accent);
}
.badge-category {
  background: var(--surface-3);
  color: var(--fg-muted);
}
.idea-card-desc {
  color: var(--fg-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.idea-card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* ─── IDEA DETAIL ─── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.idea-detail-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.idea-detail-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.idea-detail-desc {
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.7;
  white-space: pre-wrap;
}
.idea-detail-section { margin-bottom: 2rem; }
.idea-detail-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 0.75rem;
}

/* ─── PURCHASE SIDEBAR ─── */
.purchase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: sticky;
  top: 88px;
}
.purchase-price {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.purchase-price-note {
  color: var(--fg-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
.btn-buy {
  display: block;
  width: 100%;
  padding: 0.875rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s;
  font-family: inherit;
}
.btn-buy:hover { opacity: 0.85; color: var(--bg); }
.btn-buy:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: var(--surface-3);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
  font-family: inherit;
  margin-top: 0.5rem;
}
.btn-secondary:hover { border-color: var(--fg-muted); color: var(--fg); }
.purchase-includes {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.purchase-includes h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 0.75rem;
}
.purchase-includes ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.purchase-includes li {
  font-size: 0.875rem;
  color: var(--fg-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.purchase-includes li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
}

/* ─── CONFIRM PURCHASE ─── */
.confirm-box {
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.confirm-box h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.confirm-box p {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.btn-confirm {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}
.btn-confirm:hover { opacity: 0.85; }
.btn-cancel {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  margin-left: 0.75rem;
  text-decoration: none;
}
.btn-cancel:hover { border-color: var(--fg-muted); color: var(--fg); }

/* ─── SUCCESS PAGE ─── */
.success-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
}
.success-icon {
  width: 72px;
  height: 72px;
  background: var(--accent-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}
.success-page h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}
.success-page p {
  color: var(--fg-muted);
  margin-bottom: 2rem;
}
.success-idea-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: left;
  margin-bottom: 2rem;
}
.success-idea-box h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.success-idea-box p {
  color: var(--fg-muted);
  font-size: 0.9rem;
  white-space: pre-wrap;
  margin-bottom: 1rem;
}
.success-idea-box .meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ─── SUBMIT FORM ─── */
.form-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.form-page h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.form-page > p {
  color: var(--fg-muted);
  margin-bottom: 2.5rem;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--fg);
}
.form-group label span {
  color: var(--fg-muted);
  font-weight: 400;
}
.form-control {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--fg);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
}
.form-control::placeholder { color: var(--fg-muted); }
textarea.form-control {
  resize: vertical;
  min-height: 160px;
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.price-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.price-input-wrap span {
  font-size: 1.25rem;
  color: var(--fg-muted);
  font-weight: 600;
}
.price-input-wrap .form-control {
  max-width: 160px;
}
.price-hint {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-top: 0.4rem;
}
.btn-submit {
  padding: 0.875rem 2rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-submit:hover { opacity: 0.85; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── DASHBOARD ─── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.stat-card .stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 0.5rem;
}
.stat-card .stat-value {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
}
.stat-card .stat-sub {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-top: 0.25rem;
}
.dashboard-section h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.listings-table {
  width: 100%;
  border-collapse: collapse;
}
.listings-table th {
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.listings-table td {
  padding: 0.875rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.9rem;
  vertical-align: middle;
}
.listings-table tr:hover { background: rgba(255,255,255,0.02); }
.status-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-badge.approved { background: var(--accent-dim); color: var(--accent); }
.status-badge.pending { background: rgba(245,197,66,0.15); color: var(--gold); }
.status-badge.purchased { background: var(--surface-3); color: var(--fg-muted); }
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--fg-muted);
}
.empty-state p { margin-bottom: 1.25rem; }

/* ─── ALERTS ─── */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.alert-success { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,229,160,0.3); }
.alert-error { background: rgba(255,107,107,0.12); color: var(--danger); border: 1px solid rgba(255,107,107,0.3); }

/* ─── EMPTY GRID STATE ─── */
.ideas-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--fg-muted);
}
.ideas-grid-empty p { margin-bottom: 1.25rem; }

/* ─── BACK LINK ─── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--fg); }

/* ─── PURCHASE ROW STATUS ─── */
.purchases-list { display: flex; flex-direction: column; gap: 1rem; }
.purchase-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.purchase-row-info h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.purchase-row-info p { font-size: 0.8rem; color: var(--fg-muted); }
.purchase-row-right { text-align: right; }
.purchase-row-right .amount { font-weight: 700; color: var(--accent); font-size: 1rem; }

/* ─── MOBILE RESPONSIVE ─── */
@media (max-width: 768px) {
  .header-nav a:not(.btn-primary) { display: none; }
  .detail-layout { grid-template-columns: 1fr; }
  .purchase-card { position: static; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-page { padding: 2rem 1.25rem; }
  .container { padding: 2rem 1.25rem; }
  .page-hero { padding: 3rem 1.25rem 1.5rem; }
  .page-hero h1 { font-size: 1.75rem; }
}