/* ═══════════════════════════════════════
   DASHBOARD — Content Creator Hub
   ═══════════════════════════════════════ */

/* ─── Hero Section ──────────────────── */
.hero-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  padding: 36px 40px;
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 35%, #6366F1 100%);
  color: #fff;
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.22);
  min-height: 210px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 10%, rgba(255, 255, 255, 0.12), transparent 50%),
    radial-gradient(ellipse at 15% 80%, rgba(99, 102, 241, 0.2), transparent 40%);
}

.hero-card::after {
  content: "";
  position: absolute;
  right: 60px;
  top: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

/* ─── Hero Content ──────────────────── */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #93C5FD;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero-eyebrow i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
  display: inline-block;
}

.hero-content h2 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.hero-content h2 span {
  font-size: 26px;
}

.hero-content p {
  max-width: 560px;
  margin: 0;
  color: #BFDBFE;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* ─── Hero Stat Panel (right side) ──── */
.hero-stats-panel {
  position: relative;
  z-index: 2;
  width: 340px;
  flex: 0 0 340px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-stats-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.hero-stats-panel .panel-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #BFDBFE;
}

.hero-stats-panel .panel-date {
  font-size: 11px;
  font-weight: 600;
  color: #DBEAFE;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.hero-stat-item {
  padding: 14px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
  transition: background var(--duration-fast) var(--ease-out);
}

.hero-stat-item:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero-stat-item strong,
.hero-stat-item span {
  display: block;
}

.hero-stat-item strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-stat-item span {
  font-size: 10px;
  color: #BFDBFE;
  margin-top: 4px;
  font-weight: 500;
}

.hero-stats-panel .panel-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 10px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transition: padding var(--duration-fast) var(--ease-out);
}

.hero-stats-panel .panel-link:hover {
  padding-left: 6px;
}

.hero-stats-panel .panel-link span {
  font-size: 14px;
}

/* ─── Section Block ─────────────────── */
.section-block {
  margin-top: 32px;
}

/* ─── Quick Create Grid ─────────────── */
.quick-create-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.quick-create-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  box-shadow: var(--shadow-xs);
}

.quick-create-tile:hover {
  transform: translateY(-4px);
  border-color: #C7D4F0;
  box-shadow: var(--shadow-lg);
}

.quick-create-tile .qc-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 24px;
  transition: transform var(--duration-fast) var(--ease-out);
}

.quick-create-tile:hover .qc-icon {
  transform: scale(1.08);
}

.quick-create-tile strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.quick-create-tile small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.4;
}

/* Quick create color variants */
.qc-blue .qc-icon { background: #EFF3FF; color: #2563EB; }
.qc-violet .qc-icon { background: #F5F3FF; color: #7C3AED; }
.qc-green .qc-icon { background: #ECFDF5; color: #059669; }
.qc-amber .qc-icon { background: #FFFBEB; color: #D97706; }
.qc-rose .qc-icon { background: #FFF1F2; color: #E11D48; }

/* ─── Dashboard Layout ──────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 20px;
  margin-top: 20px;
}

.dashboard-layout.lower-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
}

/* ─── Recent Content List ───────────── */
.recent-list {
  display: grid;
  gap: 6px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
}

.recent-item:hover {
  background: var(--bg-alt);
}

.recent-item .ri-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.ri-lesson { background: #EFF3FF; color: #2563EB; }
.ri-game { background: #F5F3FF; color: #7C3AED; }
.ri-worksheet { background: #FFF7ED; color: #EA580C; }
.ri-activity { background: #ECFDF5; color: #059669; }

.recent-item .ri-info {
  flex: 1;
  min-width: 0;
}

.recent-item .ri-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.recent-item .ri-info span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}

.recent-item .ri-time {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}

/* ─── Analytics Mini Chart ──────────── */
.analytics-list {
  display: grid;
  gap: 6px;
}

.analytics-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  transition: background var(--duration-fast) var(--ease-out);
}

.analytics-item:hover {
  background: var(--bg-alt);
}

.analytics-item .ai-rank {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.analytics-item:nth-child(1) .ai-rank {
  background: #FEF3C7;
  color: #D97706;
}

.analytics-item:nth-child(2) .ai-rank {
  background: #E5E7EB;
  color: #6B7280;
}

.analytics-item:nth-child(3) .ai-rank {
  background: #FDE8D0;
  color: #B45309;
}

.analytics-item .ai-info {
  flex: 1;
  min-width: 0;
}

.analytics-item .ai-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.analytics-item .ai-info .ai-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
}

.analytics-item .ai-meta span {
  font-size: 10px;
  color: var(--muted);
}

.analytics-item .ai-meta .ai-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
  max-width: 120px;
}

.analytics-item .ai-bar-wrap .ai-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}

.analytics-item .ai-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
}

/* ─── 6‑Column Stats Grid ───────────── */
.stats-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

/* ─── Quick Create 6‑Column ─────────── */
.quick-create-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

/* Quick Create orange variant */
.qc-orange .qc-icon {
  background: #FFF7ED;
  color: #EA580C;
}

/* ─── AI Assistant Card ─────────────── */
.ai-assistant-card {
  border-color: #E0E7FF;
}

.ai-assistant-desc {
  color: var(--muted);
  font-size: 12px;
  margin: -8px 0 18px;
  line-height: 1.5;
}

.ai-shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ai-shortcut-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
}

.ai-shortcut-tile:hover {
  transform: translateY(-2px);
  border-color: #C7D4F0;
  box-shadow: var(--shadow-md);
  background: var(--surface);
}

.ai-shortcut-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  transition: transform var(--duration-fast) var(--ease-out);
}

.ai-shortcut-tile:hover .ai-shortcut-icon {
  transform: scale(1.06);
}

.ai-shortcut-icon svg {
  width: 19px;
  height: 19px;
}

.ai-si-lesson {
  background: #EFF3FF;
  color: #2563EB;
}

.ai-si-worksheet {
  background: #ECFDF5;
  color: #059669;
}

.ai-si-vocab {
  background: #FFFBEB;
  color: #D97706;
}

.ai-si-quiz {
  background: #F5F3FF;
  color: #7C3AED;
}

.ai-shortcut-info {
  flex: 1;
  min-width: 0;
}

.ai-shortcut-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.ai-shortcut-info small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.ai-shortcut-arrow {
  font-size: 14px;
  color: #B0BCCC;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-out);
}

.ai-shortcut-tile:hover .ai-shortcut-arrow {
  transform: translateX(2px);
  color: var(--brand);
}

/* ─── Responsive ────────────────────── */
@media (max-width: 1440px) {
  .stats-grid-6,
  .quick-create-grid-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .quick-create-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1180px) {
  .dashboard-layout,
  .dashboard-layout.lower-layout {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 28px;
  }

  .hero-stats-panel {
    width: 260px;
    flex-basis: 260px;
  }
}

@media (max-width: 1024px) {
  .stats-grid-6,
  .quick-create-grid-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero-card {
    flex-direction: column;
    min-height: auto;
  }

  .hero-stats-panel {
    width: 100%;
    flex-basis: auto;
  }

  .hero-content h2 {
    font-size: 25px;
  }

  .hero-content p {
    font-size: 13px;
  }

  .ai-shortcuts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .hero-card {
    padding: 22px 20px;
    gap: 24px;
  }

  .hero-content h2 {
    font-size: 22px;
  }

  .hero-content p {
    font-size: 12px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .stats-grid-6 {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .quick-create-grid,
  .quick-create-grid-6 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .quick-create-tile {
    padding: 20px 12px;
  }

  .quick-create-tile .qc-icon {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .quick-create-grid,
  .quick-create-grid-6 {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stats-grid-6,
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .quick-create-tile strong {
    font-size: 12px;
  }

  .ai-shortcut-tile {
    padding: 12px;
  }
}
