/* App pages — Sourcing Radar & Listing Generator */

/* ── PAGE LAYOUT ── */
.app-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px 80px;
}
.app-header {
  padding: 60px 40px 40px;
  border-bottom: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}
.app-header .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}
.app-header h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--fg);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.app-header p {
  color: var(--fg-muted);
  font-size: 1rem;
  max-width: 540px;
  line-height: 1.6;
}

/* ── RADAR PAGE ── */
.radar-section {
  padding: 56px 40px;
  max-width: 1100px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.radar-section:last-child { border-bottom: none; }
.radar-cat-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.radar-cat-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.8rem;
  color: var(--fg);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.radar-cat-desc {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
  max-width: 600px;
}
.radar-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.radar-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.radar-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--fg);
  margin-bottom: 6px;
}
.radar-item-bench {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}
.radar-item-metrics {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.radar-item-margin {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}
.radar-item-where {
  font-size: 0.78rem;
  color: var(--fg-muted);
}
.radar-tips {
  background: var(--accent-warm);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--ink);
}
.radar-tips strong { font-weight: 600; }

/* ── LISTING GENERATOR ── */
.lg-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px 80px;
}
.lg-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding-top: 48px;
}
.lg-form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
.lg-form-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.3rem;
  color: var(--fg);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.lg-field {
  margin-bottom: 20px;
}
.lg-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.lg-field input,
.lg-field textarea,
.lg-field select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.95rem;
  color: var(--fg);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.lg-field input:focus,
.lg-field textarea:focus,
.lg-field select:focus {
  border-color: var(--accent);
}
.lg-field textarea {
  resize: vertical;
  min-height: 80px;
}
.lg-photo-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.lg-photo-zone:hover {
  border-color: var(--accent);
  background: var(--accent-warm);
}
.lg-photo-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-warm);
}
.lg-photo-zone input[type="file"] {
  display: none;
}
.lg-photo-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 12px;
}
.lg-photo-placeholder {
  font-size: 0.85rem;
  color: var(--fg-muted);
}
.lg-photo-placeholder span {
  color: var(--accent);
  font-weight: 600;
}
.lg-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lg-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.lg-btn:hover { opacity: 0.85; }
.lg-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.lg-result {
  display: none;
  flex-direction: column;
  gap: 20px;
}
.lg-result.visible { display: flex; }
.lg-result-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.lg-result-card h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.2rem;
  color: var(--fg);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.lg-result-card p {
  font-size: 0.92rem;
  color: var(--fg-muted);
  line-height: 1.65;
  white-space: pre-wrap;
}
.lg-listing-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.lg-profit-bar {
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 20px;
  margin-top: 8px;
}
.lg-profit-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.lg-profit-amount {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.lg-profit-detail {
  font-size: 0.82rem;
  color: var(--fg-muted);
}
.lg-resale-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.lg-resale-key {
  font-size: 0.82rem;
  color: var(--fg-muted);
}
.lg-resale-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
}
.lg-error {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.88rem;
  color: #991B1B;
}
.lg-copy-btn {
  padding: 8px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--fg);
  font-weight: 500;
  transition: background 0.15s;
}
.lg-copy-btn:hover { background: var(--border); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .radar-items { grid-template-columns: 1fr; }
  .lg-layout { grid-template-columns: 1fr; }
  .app-header, .radar-section, .lg-page { padding-left: 20px; padding-right: 20px; }
}