/* Estilo do app de Conteúdos Teóricos — alinhado ao Netflix do projeto */
:root {
  --ct-primary: #667eea;
  --ct-secondary: #764ba2;
  --ct-grad: linear-gradient(135deg, #667eea, #764ba2);
  --ct-grad-soft: linear-gradient(135deg, rgba(102,126,234,.08), rgba(118,75,162,.08));
  --ct-border: #e5e7eb;
  --ct-text-muted: #6b7280;
  --ct-bg: #f9fafb;
}

.ct-hero {
  background: var(--ct-grad);
  color: #fff;
  border-radius: 18px;
  padding: 36px 40px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.ct-hero h1 { margin: 0 0 8px; font-size: 2rem; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.ct-hero p { margin: 0; opacity: .95; }
.ct-hero .stats { display:flex; gap:18px; margin-top:18px; flex-wrap:wrap; }
.ct-hero .stat { background: rgba(255,255,255,.15); padding: 8px 16px; border-radius: 999px; font-size: .85rem; backdrop-filter: blur(4px); }
.ct-hero .actions { margin-top: 18px; display:flex; gap:10px; flex-wrap:wrap; }

.ct-toolbar {
  display: flex; gap: 12px; flex-wrap: wrap;
  background: #fff; padding: 16px;
  border-radius: 12px; border: 1px solid var(--ct-border);
  margin-bottom: 24px;
}
.ct-toolbar input[type="text"] { flex: 1; min-width: 240px; padding: 8px 14px; border: 1px solid var(--ct-border); border-radius: 8px; }
.ct-toolbar select { padding: 8px 14px; border: 1px solid var(--ct-border); border-radius: 8px; background:#fff; }

.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.ct-card {
  background: #fff; border-radius: 14px;
  border: 1px solid var(--ct-border);
  overflow: hidden; transition: all .25s;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.ct-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.08); color: inherit; }
.ct-card-cover {
  height: 140px;
  background: var(--ct-grad);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 2.4rem;
  background-size: cover; background-position: center;
}
.ct-card-cover.alt2 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.ct-card-cover.alt3 { background: linear-gradient(135deg, #10b981, #059669); }
.ct-card-cover.alt4 { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.ct-card-cover.alt5 { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.ct-card-cover.alt6 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.ct-badge { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: .7rem; padding: 4px 9px; border-radius: 999px; font-weight: 700; backdrop-filter: blur(4px); }
.ct-badge.free { background: #10b981; }
.ct-badge.paid { background: rgba(245,158,11,.95); }
.ct-badge.private { background: rgba(0,0,0,.6); }
.ct-card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.ct-card-title { font-size: 1rem; font-weight: 700; margin: 0 0 6px; line-height: 1.3; }
.ct-card-summary { font-size: .82rem; color: var(--ct-text-muted); margin: 0 0 10px; flex: 1; }
.ct-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: .76rem; color: var(--ct-text-muted); border-top: 1px solid var(--ct-border); padding-top: 10px; }
.ct-card-meta .author { display: flex; align-items: center; gap: 6px; }
.ct-card-meta .avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--ct-grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; }
.ct-card-meta .price { color: #f59e0b; font-weight: 700; }
.ct-card-meta .free-tag { color: #10b981; font-weight: 700; }

/* Article */
.ct-article { background: #fff; border: 1px solid var(--ct-border); border-radius: 14px; overflow: hidden; }
.ct-article-header { background: linear-gradient(135deg,#1e3a8a,#6366f1); color: #fff; padding: 36px 40px; }
.ct-article-header h1 { margin: 0 0 12px; font-size: 2rem; font-weight: 800; }
.ct-article-header .meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: .85rem; opacity: .95; }
.ct-article-body { padding: 40px 48px; font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; line-height: 1.75; color: #1f2937; }
.ct-article-body h1, .ct-article-body h2, .ct-article-body h3, .ct-article-body h4 { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; }
.ct-article-body h2 { font-size: 1.4rem; margin: 28px 0 12px; border-left: 4px solid var(--ct-primary); padding-left: 12px; }
.ct-article-body table { border-collapse: collapse; width: 100%; margin: 18px 0; font-family: -apple-system, sans-serif; font-size: .95rem; }
.ct-article-body th, .ct-article-body td { border: 1px solid #d1d5db; padding: 10px 14px; }
.ct-article-body th { background: #f3f4f6; }
.ct-article-body img { max-width: 100%; height: auto; border-radius: 8px; }
.ct-article-body pre { background: #1e293b; color: #f1f5f9; padding: 14px 18px; border-radius: 8px; overflow-x: auto; }
.ct-article-body blockquote { border-left: 4px solid #f59e0b; background: #fef3c7; padding: 12px 16px; margin: 14px 0; border-radius: 6px; }

/* Paywall */
.ct-paywall-wrap { position: relative; }
.ct-paywall-blur { filter: blur(4px); pointer-events: none; user-select: none; max-height: 220px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%); mask-image: linear-gradient(to bottom, #000 30%, transparent 100%); }
.ct-paywall-overlay {
  position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
  width: 92%; max-width: 560px;
  background: #fff; border: 1px solid var(--ct-border);
  border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.18);
  padding: 28px; text-align: center;
}
.ct-paywall-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  background: linear-gradient(135deg,#f59e0b,#ef4444); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; box-shadow: 0 8px 20px rgba(245,158,11,.4);
}

/* Form / editor */
.ct-form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 980px) { .ct-form-grid { grid-template-columns: 1fr; } }
.ct-side-panel { background: #fff; border: 1px solid var(--ct-border); border-radius: 14px; padding: 18px; margin-bottom: 18px; }
.ct-side-panel h4 { margin: 0 0 12px; font-size: .95rem; }

/* Painel "meus" */
.ct-table { width: 100%; background: #fff; border: 1px solid var(--ct-border); border-radius: 12px; overflow: hidden; }
.ct-table th, .ct-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #f3f4f6; font-size: .9rem; }
.ct-table th { background: #f9fafb; font-weight: 700; }
.ct-status-pill { padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.ct-status-pill.rascunho { background: #f3f4f6; color: #4b5563; }
.ct-status-pill.publicado { background: #d1fae5; color: #065f46; }
.ct-status-pill.arquivado { background: #fee2e2; color: #991b1b; }

/* ======================================================
   Card compacto de conteúdo (.ctc-*) — usado em listar e perfil
   Espelha o estilo de simulado_card.html
   ====================================================== */
.ctc-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.ctc-card:hover {
  border-color: #667eea;
  box-shadow: 0 6px 18px rgba(102,126,234,.15);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}
.ctc-top { display: flex; align-items: center; gap: .55rem; overflow: hidden; }
.ctc-emoji {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; flex-shrink: 0;
}
.ctc-info { flex: 1; min-width: 0; }
.ctc-title {
  font-size: .88rem; font-weight: 700; color: #1f2937;
  margin: 0; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere; word-break: break-word;
}
.ctc-cat {
  font-size: .7rem; color: #667eea; font-weight: 600; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctc-author {
  font-size: .7rem; color: #6b7280; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctc-summary {
  font-size: .78rem; color: #4b5563; margin: 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ctc-badges { display: flex; gap: .3rem; flex-wrap: wrap; }
.ctc-badge {
  font-size: .67rem; font-weight: 700;
  padding: .18rem .5rem; border-radius: 8px;
  display: inline-flex; align-items: center; gap: .25rem;
}
.ctc-badge-free  { background: rgba(16,185,129,.12); color: #059669; }
.ctc-badge-paid  { background: rgba(245,158,11,.15); color: #b45309; }
.ctc-badge-priv  { background: rgba(107,114,128,.15); color: #374151; }
.ctc-badge-tempo { background: #f3f4f6; color: #6b7280; }
.ctc-stats {
  display: flex; gap: .7rem;
  font-size: .72rem; color: #6b7280;
  margin-top: auto; padding-top: .4rem;
  border-top: 1px solid #f3f4f6;
}
.ctc-stats span { display: flex; align-items: center; gap: .25rem; }
.ctc-stats .fa-eye { color: #667eea; }
.ctc-stats .fa-shopping-cart { color: #f59e0b; }
.ctc-stats .fa-link { color: #10b981; }
