/* ── Variables ──────────────────────────────────────────────────────── */
:root {
  --brand-purple: #6C63FF;
  --brand-pink: #FF6584;
  --brand-dark: #1a1a2e;
  --text-muted-custom: #6b7280;
  --bg-soft: #f8f7ff;
}

/* ── Global ─────────────────────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #2d3748;
  background-color: #f9fafb;
}

a { color: var(--brand-purple); }
a:hover { color: #5851db; }

.py-6 { padding-top: 5rem !important; padding-bottom: 5rem !important; }

/* ── Navbar ─────────────────────────────────────────────────────────── */
.navbar { padding: 0.75rem 0; }

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--brand-purple);
  color: white;
  border-radius: 10px;
  font-size: 1.1rem;
}

.brand-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--brand-dark);
}

.avatar-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-purple);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn-primary {
  background-color: var(--brand-purple);
  border-color: var(--brand-purple);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #5851db;
  border-color: #5851db;
}

.btn-outline-primary {
  color: var(--brand-purple);
  border-color: var(--brand-purple);
}
.btn-outline-primary:hover {
  background-color: var(--brand-purple);
  border-color: var(--brand-purple);
}

/* ── Hero Section ───────────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #f0efff 0%, #fff5f7 100%);
  padding: 4rem 0;
}

.text-gradient {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-font-preview { position: relative; }

.preview-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  display: inline-block;
  max-width: 480px;
  width: 100%;
}

.preview-header {
  background: #f1f1f1;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.preview-dot.red    { background: #ff5f57; }
.preview-dot.yellow { background: #febc2e; }
.preview-dot.green  { background: #28c840; }

.preview-title {
  font-size: 0.75rem;
  color: #888;
  margin-left: auto;
}

.preview-body {
  padding: 24px 28px;
  min-height: 200px;
}

/* ── Step cards ─────────────────────────────────────────────────────── */
.step-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(108,99,255,0.12);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-purple);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0 auto 1rem;
}

/* ── CTA Section ────────────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--brand-purple), #9c6fff);
}

/* ── Status Badges ──────────────────────────────────────────────────── */
.status-badge-draft          { background: #e5e7eb; color: #6b7280; }
.status-badge-template_ready { background: #dbeafe; color: #1d4ed8; }
.status-badge-processing     { background: #fef3c7; color: #b45309; }
.status-badge-ready          { background: #d1fae5; color: #065f46; }
.status-badge-error          { background: #fee2e2; color: #991b1b; }

/* ── Font Cards ─────────────────────────────────────────────────────── */
.font-card {
  transition: transform 0.15s, box-shadow 0.15s;
}
.font-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10) !important;
}

.font-preview-circle {
  width: 56px;
  height: 56px;
  background: var(--bg-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-purple);
}

.font-code {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* ── Glyph Grid ─────────────────────────────────────────────────────── */
.glyph-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.glyph-cell {
  width: 44px;
  height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: #f9fafb;
  transition: background 0.15s;
}

.glyph-cell.has-glyph {
  background: #f0efff;
  border-color: var(--brand-purple);
}

.glyph-char { line-height: 1; }

/* ── Upload Dropzone ────────────────────────────────────────────────── */
.upload-dropzone {
  border: 2px dashed #c7c3ff;
  background: #f8f7ff;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.upload-dropzone.drag-over {
  background: #ebe9ff;
  border-color: var(--brand-purple);
}

/* ── Dashboard stat icons ───────────────────────────────────────────── */
.bg-primary-soft  { background: #ebe9ff; }
.bg-success-soft  { background: #d1fae5; }
.bg-warning-soft  { background: #fef3c7; }
.bg-info-soft     { background: #cffafe; }

/* ── Letter paper ───────────────────────────────────────────────────── */
.letter-paper {
  border-radius: 8px;
  overflow: hidden;
}

/* ── Feature list ───────────────────────────────────────────────────── */
.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: #f0efff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Empty state ────────────────────────────────────────────────────── */
.empty-state { padding: 3rem 1rem; }

/* ── Print styles ───────────────────────────────────────────────────── */
@media print {
  nav, footer, .btn, .breadcrumb, .alert { display: none !important; }
  body { background: white !important; }
  .letter-body { font-size: 20pt !important; line-height: 2 !important; }
}

/* ── Responsive tweaks ──────────────────────────────────────────────── */
@media (max-width: 576px) {
  .hero-section { padding: 2rem 0; }
  h1.display-4  { font-size: 2rem; }
}
