/* ============================================
   LuMED - Flashcards CSS
   Tema: Azul e Violeta (identidade LuMED)
   ============================================ */

/* ── Layout ── */
.fc-app {
  min-height: 100vh;
  padding-top: 80px;
  padding-bottom: 40px;
  background: var(--bg-page, #faf5ff);
}

.fc-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ── Page Header ── */
.fc-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fc-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fc-header-left h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fc-header-left h1 i {
  color: var(--accent, #8b5cf6);
}

.fc-subtitle {
  color: #64748b;
  font-size: 0.85rem;
  margin: 0.2rem 0 0;
}

.fc-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ── Buttons ── */
.fc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.fc-btn-primary {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}

.fc-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.4);
}

.fc-btn-ghost {
  background: #fff;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.fc-btn-ghost:hover {
  background: #f8fafc;
  color: var(--text-dark, #0f172a);
  border-color: #cbd5e1;
}

.fc-btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.fc-btn-danger:hover {
  transform: translateY(-1px);
}

.fc-btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 14px;
}

.fc-btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: #fff;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: var(--shadow-card, 0 2px 12px rgba(71,85,105,0.08));
}

.fc-btn-back:hover {
  background: #f1f5f9;
  color: var(--text-dark, #0f172a);
}

.fc-btn-ghost.fc-btn-danger {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}

.fc-btn-ghost.fc-btn-danger:hover {
  background: #fee2e2;
}

/* ── Stats Bar ── */
.fc-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.fc-stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg, #fefbff);
  border: 1px solid rgba(139,92,246,0.08);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-card, 0 2px 12px rgba(71,85,105,0.08));
}

.fc-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.fc-stat-icon.novos { background: #eff6ff; color: #3b82f6; }
.fc-stat-icon.aprendendo { background: #fffbeb; color: #f59e0b; }
.fc-stat-icon.revisao { background: #f0fdf4; color: #22c55e; }
.fc-stat-icon.tempo { background: #f5f3ff; color: #8b5cf6; }

.fc-stat-info {
  display: flex;
  flex-direction: column;
}

.fc-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
}

.fc-stat-label {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* ── Deck Grid ── */
.fc-decks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.fc-deck-card {
  background: var(--card-bg, #fefbff);
  border: 1px solid rgba(139,92,246,0.08);
  border-radius: 20px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card, 0 2px 12px rgba(71,85,105,0.08));
}

.fc-deck-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--deck-color, #8b5cf6);
}

.fc-deck-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(71,85,105,0.15);
}

.fc-deck-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.fc-deck-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--deck-color-bg, rgba(139,92,246,0.1));
  color: var(--deck-color, #8b5cf6);
  flex-shrink: 0;
}

.fc-deck-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
  line-height: 1.3;
}

.fc-deck-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 1rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fc-deck-badges {
  display: flex;
  gap: 0.4rem;
}

.fc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
}

.fc-badge.novos { background: #eff6ff; color: #3b82f6; }
.fc-badge.aprendendo { background: #fffbeb; color: #d97706; }
.fc-badge.revisao { background: #f0fdf4; color: #16a34a; }

/* ── Empty State ── */
.fc-empty {
  text-align: center;
  padding: 3rem 1rem;
}

.fc-empty-icon {
  font-size: 3rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.fc-empty h3 {
  color: var(--text-dark, #0f172a);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.fc-empty p {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

/* ── Deck Detail: Counters ── */
.fc-deck-counters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.fc-counter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.fc-counter.novos { background: #eff6ff; color: #3b82f6; }
.fc-counter.aprendendo { background: #fffbeb; color: #d97706; }
.fc-counter.revisao { background: #f0fdf4; color: #16a34a; }

.fc-counter-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.fc-counter-label {
  font-size: 0.75rem;
  opacity: 0.7;
}

.fc-review-start {
  margin-bottom: 1.5rem;
}

/* ── Cards List ── */
.fc-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fc-card-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg, #fefbff);
  border: 1px solid rgba(139,92,246,0.08);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  transition: all 0.2s;
  box-shadow: var(--shadow-card, 0 2px 12px rgba(71,85,105,0.08));
}

.fc-card-item:hover {
  background: #f8fafc;
}

.fc-card-tipo-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.fc-card-tipo-badge.basico { background: #f5f3ff; color: #7c3aed; }
.fc-card-tipo-badge.cloze { background: #fdf2f8; color: #db2777; }
.fc-card-tipo-badge.imagem { background: #ecfeff; color: #0891b2; }

.fc-card-item-content {
  flex: 1;
  min-width: 0;
}

.fc-card-item-front {
  font-size: 0.85rem;
  color: var(--text-dark, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-card-item-meta {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.fc-card-item-actions {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.fc-card-item-actions button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fc-card-item-actions button:hover {
  background: #e2e8f0;
  color: var(--text-dark, #0f172a);
}

.fc-card-item-actions button.delete:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* ══════════════════════════════════════ */
/* REVIEW VIEW                           */
/* ══════════════════════════════════════ */

.fc-review-container {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 120px);
  max-width: 700px;
}

.fc-review-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fc-progress-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.fc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 3px;
  transition: width 0.3s;
  width: 0%;
}

.fc-progress-text {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
}

.fc-review-timer {
  font-size: 0.8rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

/* ── Card Flip 3D ── */
.fc-review-card-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  margin-bottom: 1.5rem;
}

.fc-review-card {
  width: 100%;
  min-height: 280px;
  position: relative;
  cursor: pointer;
}

.fc-card-inner {
  position: relative;
  width: 100%;
  min-height: 280px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.fc-card-inner.flipped {
  transform: rotateX(180deg);
}

.fc-card-face {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: 280px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.fc-card-front {
  background: linear-gradient(145deg, #f3e8ff, #ede9fe);
  border: 1px solid rgba(139,92,246,0.15);
  box-shadow: 0 4px 20px rgba(139,92,246,0.1);
}

.fc-card-back {
  background: linear-gradient(145deg, #f0fdf4, #ecfdf5);
  border: 1px solid rgba(34,197,94,0.15);
  box-shadow: 0 4px 20px rgba(34,197,94,0.1);
  transform: rotateX(180deg);
}

.fc-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
}

.fc-card-content {
  font-size: 1.15rem;
  color: var(--text-dark, #0f172a);
  line-height: 1.6;
  word-wrap: break-word;
  max-width: 100%;
}

.fc-card-image {
  margin-top: 1rem;
  width: 100%;
}

.fc-card-image img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 12px;
  object-fit: contain;
}

/* ── Erro de imagem (review) ── */
.fc-img-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.08);
  border: 1.5px dashed rgba(139, 92, 246, 0.25);
  color: #94a3b8;
  font-size: 0.8rem;
}

.fc-img-error i {
  font-size: 1.5rem;
  color: #a78bfa;
}

/* ── Preview de imagem (modal) ── */
.fc-img-preview {
  margin-top: 0.5rem;
  text-align: center;
  min-height: 40px;
}

.fc-img-preview img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 10px;
  object-fit: contain;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.fc-img-loading {
  padding: 0.75rem;
  color: #94a3b8;
  font-size: 0.8rem;
}

.fc-img-preview .fc-img-error {
  padding: 0.75rem;
  font-size: 0.75rem;
}

/* ── Tabs origem da imagem (upload/url) ── */
.fc-img-source-tabs {
  display: flex;
  gap: 0.5rem;
}

.fc-img-source-tab {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.fc-img-source-tab:hover {
  border-color: #a78bfa;
  color: #7c3aed;
}

.fc-img-source-tab.active {
  background: linear-gradient(135deg, #ede9fe, #e0e7ff);
  border-color: #a78bfa;
  color: #7c3aed;
}

/* ── File drop zone ── */
.fc-file-drop {
  position: relative;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
}

.fc-file-drop:hover,
.fc-file-drop.dragover {
  border-color: #a78bfa;
  background: #f5f3ff;
}

.fc-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.fc-file-drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: #94a3b8;
  font-size: 0.85rem;
  pointer-events: none;
}

.fc-file-drop-content i {
  font-size: 1.75rem;
  color: #a78bfa;
}

/* ── Breadcrumb ── */
.fc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
}

.fc-breadcrumb-link {
  color: #8b5cf6;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.fc-breadcrumb-link:hover {
  color: #6d28d9;
}

.fc-breadcrumb-sep {
  color: #cbd5e1;
  font-size: 0.7rem;
}

.fc-breadcrumb-current {
  color: #64748b;
  font-weight: 500;
}

/* ── Folder indicator on parent decks ── */
.fc-folder-indicator {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  color: #94a3b8;
  font-size: 0.85rem;
  opacity: 0.6;
  transition: all 0.2s;
}

.fc-deck-card:hover .fc-folder-indicator {
  opacity: 1;
  color: var(--deck-color, #8b5cf6);
}

/* ── Subdeck count on parent ── */
.fc-subdeck-count {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}

/* ── Select (deck parent) ── */
.fc-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fafafa;
  color: var(--text-dark, #0f172a);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  cursor: pointer;
  appearance: auto;
}

.fc-select:focus {
  outline: none;
  border-color: #8b5cf6;
  background: #faf5ff;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}

.fc-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Review all count badge ── */
.fc-review-all-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 8px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 0.3rem;
}

/* ── Cloze Blanks ── */
.cloze-blank {
  display: inline-block;
  padding: 0.15rem 0.75rem;
  background: linear-gradient(135deg, #ede9fe, #e0e7ff);
  border: 1.5px dashed #a78bfa;
  border-radius: 8px;
  color: #7c3aed;
  font-weight: 600;
  min-width: 60px;
  text-align: center;
}

.cloze-resposta {
  display: inline-block;
  padding: 0.15rem 0.75rem;
  background: linear-gradient(135deg, #dcfce7, #d1fae5);
  border: 1.5px solid #4ade80;
  border-radius: 8px;
  color: #16a34a;
  font-weight: 700;
}

/* ── Reveal Button ── */
.fc-review-actions {
  text-align: center;
}

.fc-btn-reveal {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2.5rem;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}

.fc-btn-reveal:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59,130,246,0.4);
}

.fc-shortcut {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
  margin-left: 0.25rem;
}

/* ── Rating Buttons ── */
.fc-rating-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.fc-btn-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.75rem 1.2rem;
  border-radius: 14px;
  border: 2px solid transparent;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}

.fc-rating-label {
  font-size: 0.85rem;
  font-weight: 700;
}

.fc-rating-time {
  font-size: 0.7rem;
  opacity: 0.7;
}

.fc-btn-rating .fc-shortcut {
  background: rgba(0,0,0,0.06);
  color: inherit;
}

.fc-btn-rating.denovo {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}
.fc-btn-rating.denovo:hover {
  background: #fee2e2;
  border-color: #ef4444;
}

.fc-btn-rating.dificil {
  background: #fffbeb;
  border-color: #fed7aa;
  color: #d97706;
}
.fc-btn-rating.dificil:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

.fc-btn-rating.bom {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}
.fc-btn-rating.bom:hover {
  background: #dcfce7;
  border-color: #22c55e;
}

.fc-btn-rating.facil {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2563eb;
}
.fc-btn-rating.facil:hover {
  background: #dbeafe;
  border-color: #3b82f6;
}

/* ── Review Done ── */
.fc-review-done {
  text-align: center;
  padding: 3rem 1rem;
}

.fc-done-icon {
  font-size: 3.5rem;
  color: #f59e0b;
  margin-bottom: 1rem;
}

.fc-review-done h2 {
  color: var(--text-dark, #0f172a);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.fc-done-stats {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.fc-done-stat {
  text-align: center;
}

.fc-done-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
}

.fc-done-stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ══════════════════════════════════════ */
/* STATS VIEW                            */
/* ══════════════════════════════════════ */

.fc-stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.fc-stats-card {
  background: var(--card-bg, #fefbff);
  border: 1px solid rgba(139,92,246,0.08);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-card, 0 2px 12px rgba(71,85,105,0.08));
}

.fc-stats-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f3ff;
  color: #8b5cf6;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.fc-stats-card-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark, #0f172a);
}

.fc-stats-card-label {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* ── Charts ── */
.fc-chart-section {
  background: var(--card-bg, #fefbff);
  border: 1px solid rgba(139,92,246,0.08);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card, 0 2px 12px rgba(71,85,105,0.08));
}

.fc-chart-section h3 {
  color: var(--text-dark, #0f172a);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fc-chart-section h3 i {
  color: var(--accent, #8b5cf6);
}

.fc-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 140px;
  padding-bottom: 1.5rem;
  position: relative;
}

.fc-chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}

.fc-bar-stack {
  width: 100%;
  max-width: 20px;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
  min-height: 2px;
}

.fc-bar-acertos {
  background: linear-gradient(180deg, #4ade80, #22c55e);
}

.fc-bar-erros {
  background: linear-gradient(180deg, #f87171, #ef4444);
}

.fc-bar-label {
  position: absolute;
  bottom: -1.2rem;
  font-size: 0.6rem;
  color: #94a3b8;
}

.fc-chart-forecast .fc-bar-stack {
  background: transparent;
}

.fc-bar-forecast {
  background: linear-gradient(180deg, #a78bfa, #8b5cf6);
  border-radius: 4px 4px 0 0;
}

.fc-chart-legend {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.75rem;
}

.fc-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #64748b;
}

.fc-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.fc-legend-dot.acertos { background: #22c55e; }
.fc-legend-dot.erros { background: #ef4444; }
.fc-legend-dot.new { background: #3b82f6; }
.fc-legend-dot.learning { background: #f59e0b; }
.fc-legend-dot.review { background: #22c55e; }

/* ── Phases Bar ── */
.fc-phases-bar {
  display: flex;
  height: 24px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
}

.fc-phase-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: #fff;
  transition: width 0.4s;
  min-width: 0;
}

.fc-phase-segment.new { background: #3b82f6; }
.fc-phase-segment.learning { background: #f59e0b; }
.fc-phase-segment.review { background: #22c55e; }

/* ══════════════════════════════════════ */
/* MODALS                                */
/* ══════════════════════════════════════ */

.fc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.fc-modal {
  background: #fff;
  border: 1px solid rgba(139,92,246,0.1);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(15,23,42,0.2);
}

.fc-modal-card {
  max-width: 560px;
}

.fc-modal-confirm {
  max-width: 380px;
}

.fc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.fc-modal-header h3 {
  color: var(--text-dark, #0f172a);
  font-size: 1.1rem;
  margin: 0;
}

.fc-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.fc-modal-close:hover {
  background: #e2e8f0;
  color: var(--text-dark, #0f172a);
}

.fc-modal-body {
  padding: 1.5rem;
}

.fc-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #f1f5f9;
}

.fc-confirm-icon {
  font-size: 2.5rem;
  color: #f59e0b;
  margin-bottom: 0.75rem;
}

.fc-modal-body h3 {
  color: var(--text-dark, #0f172a);
  margin-bottom: 0.5rem;
}

.fc-modal-body p {
  color: #64748b;
  font-size: 0.85rem;
}

/* ── Form Groups ── */
.fc-form-group {
  margin-bottom: 1.25rem;
}

.fc-form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.4rem;
}

.fc-form-group input,
.fc-form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fafafa;
  color: var(--text-dark, #0f172a);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.fc-form-group input:focus,
.fc-form-group textarea:focus {
  outline: none;
  border-color: #8b5cf6;
  background: #faf5ff;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}

.fc-form-group input::placeholder,
.fc-form-group textarea::placeholder {
  color: #94a3b8;
}

.fc-form-hint {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.35rem;
}

/* ── Color Picker ── */
.fc-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fc-color-option {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.fc-color-option:hover {
  transform: scale(1.1);
}

.fc-color-option.selected {
  border-color: var(--text-dark, #0f172a);
  box-shadow: 0 0 0 2px rgba(15,23,42,0.15);
}

/* ── Icon Picker ── */
.fc-icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.fc-icon-option {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s;
}

.fc-icon-option:hover {
  background: #e2e8f0;
  color: var(--text-dark, #0f172a);
}

.fc-icon-option.selected {
  border-color: #8b5cf6;
  background: #f5f3ff;
  color: #7c3aed;
}

/* ── Tipo Tabs ── */
.fc-tipo-tabs {
  display: flex;
  gap: 0.4rem;
}

.fc-tipo-tab {
  flex: 1;
  padding: 0.55rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fafafa;
  color: #64748b;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.fc-tipo-tab:hover {
  background: #f1f5f9;
  color: #475569;
}

.fc-tipo-tab.active {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #7c3aed;
}

/* ══════════════════════════════════════ */
/* RESPONSIVE                            */
/* ══════════════════════════════════════ */

@media (max-width: 1024px) {
  .fc-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .fc-stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .fc-app {
    padding-top: 70px;
  }

  .fc-container {
    padding: 1rem;
  }

  .fc-page-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .fc-header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .fc-header-left h1 {
    font-size: 1.3rem;
  }

  .fc-decks-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fc-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .fc-deck-counters {
    flex-wrap: wrap;
  }

  .fc-rating-actions {
    flex-wrap: wrap;
  }

  .fc-btn-rating {
    min-width: 70px;
    padding: 0.65rem 0.8rem;
  }

  .fc-card-face {
    min-height: 240px;
    padding: 1.5rem;
  }

  .fc-card-inner {
    min-height: 240px;
  }

  .fc-card-content {
    font-size: 1rem;
  }

  .fc-modal {
    border-radius: 20px;
    max-height: 85vh;
  }
}

@media (max-width: 480px) {
  .fc-container {
    padding: 0.75rem;
  }

  .fc-header-left h1 {
    font-size: 1.15rem;
  }

  .fc-decks-grid {
    grid-template-columns: 1fr;
  }

  .fc-stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .fc-stat-item {
    padding: 0.65rem 0.75rem;
  }

  .fc-stats-cards {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .fc-btn span {
    display: none;
  }

  .fc-btn i {
    font-size: 1.1rem;
  }

  .fc-btn-lg span {
    display: inline;
  }

  .fc-rating-actions {
    gap: 0.35rem;
  }

  .fc-btn-rating {
    min-width: 60px;
    padding: 0.5rem 0.6rem;
  }

  .fc-rating-label {
    font-size: 0.75rem;
  }

  .fc-shortcut {
    display: none;
  }

  .fc-card-face {
    min-height: 200px;
    padding: 1.25rem;
  }

  .fc-card-inner {
    min-height: 200px;
  }

  .fc-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .fc-modal {
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
  }
}

@media (max-width: 360px) {
  .fc-header-left h1 {
    font-size: 1.05rem;
  }

  .fc-stat-value {
    font-size: 1rem;
  }

  .fc-btn-rating {
    min-width: 55px;
    padding: 0.45rem 0.5rem;
  }

  .fc-rating-label {
    font-size: 0.7rem;
  }

  .fc-rating-time {
    font-size: 0.6rem;
  }
}
