/*
 * blog.css — Blog UI styles for CampuServe4U
 * Covers: Public blog (index/show), Admin blog manager, Teacher blog list.
 * Loaded via layouts/header.php (home section), layouts/admin.php, layouts/teacher.php.
 * Palette: --cs-* vars from app.css (accent #0ea5e9, primary #0f172a, indigo #1e1b4b).
 */

:root {
  --blog-accent: #0ea5e9;
  --blog-accent-dark: #0284c7;
  --blog-ink: #0f172a;
  --blog-muted: #64748b;
  --blog-line: #e2e8f0;
  --blog-bg: #f8fafc;
  --blog-violet: #6d28d9;
  --blog-amber: #f59e0b;
  --blog-green: #10b981;
  --blog-rose: #f43f5e;
  --blog-radius: 18px;
}

/* ═══════════════════════════════════════════════════════════
   1 · PUBLIC BLOG — HERO
   ═══════════════════════════════════════════════════════════ */

.blog-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blog-ink) 0%, var(--blog-violet) 55%, var(--blog-accent) 130%);
  color: #fff;
  border: 0;
  box-shadow: 0 18px 40px -18px rgba(15, 23, 42, .55);
}
.blog-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, .55), transparent 65%);
  pointer-events: none;
}
.blog-hero::before {
  content: "";
  position: absolute;
  left: -50px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 40, 217, .5), transparent 65%);
  pointer-events: none;
}
.blog-hero > * { position: relative; z-index: 1; }
.blog-hero h1 {
  font-weight: 800;
  letter-spacing: -.5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.blog-hero p { color: rgba(255, 255, 255, .85); }
.blog-hero .badge {
  background: rgba(255, 255, 255, .16) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(6px);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   2 · PUBLIC BLOG — LISTING CARDS
   ═══════════════════════════════════════════════════════════ */

.blog-card {
  background: #fff;
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 34px -18px rgba(15, 23, 42, .35);
  border-color: rgba(14, 165, 233, .45);
}
.blog-card .blog-thumb {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 165, 233, .18), rgba(109, 40, 217, .14));
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-card .blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.blog-card:hover .blog-thumb img { transform: scale(1.06); }
.blog-card .blog-thumb .thumb-fallback {
  font-size: 3rem;
  color: var(--blog-accent);
  opacity: .75;
}
.blog-card .blog-thumb .blog-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, .94);
  color: var(--blog-ink);
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .18);
  z-index: 1;
}
.blog-card .blog-thumb .blog-chip i { color: var(--blog-accent); }
.blog-card .card-body { padding: 22px; }
.blog-card .blog-title {
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--blog-ink);
  line-height: 1.4;
  margin: 0 0 .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card .blog-title a { color: inherit; text-decoration: none; }
.blog-card .blog-title a:hover { color: var(--blog-accent-dark); }
.blog-card .blog-excerpt {
  color: var(--blog-muted);
  font-size: .86rem;
  line-height: 1.55;
  flex-grow: 1;
}
.blog-card .blog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--blog-line);
  font-size: .78rem;
  color: var(--blog-muted);
}

/* Author mini-row (avatar + name + stats) */
.blog-author-mini { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.blog-author-mini img,
.blog-avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .22);
  flex-shrink: 0;
}
.blog-avatar-fallback {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blog-accent), var(--blog-violet));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .22);
}
.blog-author-mini .name {
  font-weight: 700;
  color: var(--blog-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.blog-card .btn-read {
  border-radius: 999px;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .2px;
  border-color: var(--blog-line);
  color: var(--blog-accent-dark);
  background: #fff;
  transition: all .2s ease;
}
.blog-card .btn-read:hover {
  background: var(--blog-accent);
  border-color: var(--blog-accent);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(14, 165, 233, .8);
}
.blog-card .btn-read i { transition: transform .2s ease; }
.blog-card .btn-read:hover i { transform: translateX(3px); }

/* Count pills (views / date) */
.blog-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--blog-bg);
  border: 1px solid var(--blog-line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: .72rem;
  color: var(--blog-muted);
  font-weight: 600;
}
.blog-meta-pill i { color: var(--blog-accent); }

/* ═══════════════════════════════════════════════════════════
   3 · PUBLIC BLOG — ARTICLE PAGE
   ═══════════════════════════════════════════════════════════ */

.blog-article {
  background: #fff;
  border: 1px solid var(--blog-line);
  border-radius: 22px;
  box-shadow: 0 24px 48px -30px rgba(15, 23, 42, .4);
  padding: clamp(24px, 4vw, 46px);
}
.blog-article h1.blog-h1 {
  font-weight: 800;
  letter-spacing: -.6px;
  line-height: 1.22;
  color: var(--blog-ink);
  font-size: clamp(1.55rem, 3.2vw, 2.3rem);
}
.blog-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 2px solid var(--blog-line);
}
.blog-byline .blog-avatar-fallback { width: 52px; height: 52px; font-size: 1.3rem; }
.blog-byline img.blog-avatar { width: 52px; height: 52px; }
.blog-byline .who { font-weight: 800; color: var(--blog-ink); }
.blog-byline .meta { font-size: .8rem; color: var(--blog-muted); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.blog-byline .meta i { color: var(--blog-accent); }
.blog-cover {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 16px 34px -20px rgba(15, 23, 42, .55);
  margin-top: 22px;
}
.blog-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 165, 233, .12);
  color: var(--blog-accent-dark);
  font-weight: 700;
  font-size: .76rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(14, 165, 233, .35);
}

/* Article body typography */
.blog-content {
  font-size: 1.03rem;
  line-height: 1.78;
  color: #1e293b;
  margin-top: 26px;
}
.blog-content > * + * { margin-top: 1.1rem; }
.blog-content h1, .blog-content h2, .blog-content h3,
.blog-content h4, .blog-content h5, .blog-content h6 {
  color: var(--blog-ink);
  font-weight: 800;
  letter-spacing: -.3px;
  margin-top: 2rem;
}
.blog-content h2 { font-size: 1.5rem; border-left: 5px solid var(--blog-accent); padding-left: 14px; }
.blog-content h3 { font-size: 1.25rem; }
.blog-content a { color: var(--blog-accent-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.blog-content img { max-width: 100%; height: auto; border-radius: 14px; margin: .6rem 0; box-shadow: 0 14px 30px -22px rgba(15, 23, 42, .6); }
.blog-content ul, .blog-content ol { padding-left: 1.35rem; }
.blog-content li { margin-top: .4rem; }
.blog-content li::marker { color: var(--blog-accent); font-weight: 700; }
.blog-content blockquote {
  border-left: 5px solid var(--blog-violet);
  background: linear-gradient(135deg, rgba(109, 40, 217, .07), rgba(14, 165, 233, .07));
  padding: 16px 20px;
  border-radius: 0 14px 14px 0;
  color: #334155;
  font-style: italic;
}
.blog-content pre {
  background: var(--blog-ink);
  color: #e2e8f0;
  padding: 18px 20px;
  border-radius: 14px;
  overflow-x: auto;
  font-size: .88rem;
  line-height: 1.6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.blog-content code { background: rgba(14, 165, 233, .12); color: var(--blog-accent-dark); padding: 2px 7px; border-radius: 6px; font-size: .9em; }
.blog-content pre code { background: transparent; color: inherit; padding: 0; }
.blog-content table { width: 100%; border-collapse: collapse; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--blog-line); }
.blog-content th { background: var(--blog-ink); color: #fff; padding: 10px 14px; text-align: left; font-size: .86rem; }
.blog-content td { padding: 10px 14px; border-top: 1px solid var(--blog-line); font-size: .92rem; }
.blog-content hr { border: 0; border-top: 1px solid var(--blog-line); margin: 2rem 0; }

/* Share + related */
.blog-share-bar {
  background: var(--blog-bg);
  border: 1px solid var(--blog-line);
  border-radius: 16px;
  padding: 16px 20px;
}
.blog-share-bar .btn { border-radius: 999px; font-weight: 700; font-size: .82rem; }
.blog-related-card {
  background: #fff;
  border: 1px solid var(--blog-line);
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}
.blog-related-card:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -20px rgba(15, 23, 42, .4); }

/* ═══════════════════════════════════════════════════════════
   4 · ADMIN & TEACHER — PAGE HEADER + STATS
   ═══════════════════════════════════════════════════════════ */

.blog-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  padding: 20px 24px;
  box-shadow: 0 10px 26px -22px rgba(15, 23, 42, .5);
  margin-bottom: 22px;
}
.blog-page-head h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--blog-ink);
  margin: 0;
  letter-spacing: -.4px;
}
.blog-page-head .sub { color: var(--blog-muted); font-size: .84rem; margin-top: 3px; }
.blog-page-head .sub a { color: var(--blog-accent-dark); font-weight: 600; text-decoration: none; }
.blog-page-head .head-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blog-accent), var(--blog-violet));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 10px 20px -10px rgba(14, 165, 233, .9);
  flex-shrink: 0;
}
.blog-page-head .btn-create {
  background: linear-gradient(135deg, var(--blog-accent), var(--blog-accent-dark));
  border: 0;
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 22px;
  box-shadow: 0 12px 24px -12px rgba(14, 165, 233, .95);
  transition: transform .15s ease, box-shadow .15s ease;
}
.blog-page-head .btn-create:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -12px rgba(14, 165, 233, 1);
  color: #fff;
}

/* Stat cards */
.blog-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.blog-stat {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--blog-line);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 10px 26px -24px rgba(15, 23, 42, .6);
  transition: transform .18s ease, box-shadow .18s ease;
}
.blog-stat:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -22px rgba(15, 23, 42, .5); }
.blog-stat .stat-ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.blog-stat .stat-num { font-size: 1.55rem; font-weight: 800; color: var(--blog-ink); line-height: 1; }
.blog-stat .stat-label { font-size: .74rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--blog-muted); margin-top: 4px; }

.blog-stat.is-total   .stat-ico { background: rgba(14, 165, 233, .14); color: var(--blog-accent-dark); }
.blog-stat.is-published .stat-ico { background: rgba(16, 185, 129, .15); color: var(--blog-green); }
.blog-stat.is-pending  .stat-ico { background: rgba(245, 158, 11, .16); color: var(--blog-amber); }
.blog-stat.is-draft    .stat-ico { background: rgba(100, 116, 139, .16); color: #475569; }

/* ═══════════════════════════════════════════════════════════
   5 · ADMIN & TEACHER — TABLE CARD
   ═══════════════════════════════════════════════════════════ */

.blog-table-card {
  background: #fff;
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  box-shadow: 0 14px 34px -28px rgba(15, 23, 42, .6);
  overflow: hidden;
}
.blog-table-card .table-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--blog-line);
  background: linear-gradient(180deg, #fff, var(--blog-bg));
}
.blog-table-card .table-card-head .ttl {
  font-weight: 800;
  color: var(--blog-ink);
  font-size: .98rem;
  margin: 0;
  letter-spacing: -.2px;
}
.blog-table-card .table-card-head .ttl i { color: var(--blog-accent); margin-right: 8px; }

.blog-table {
  margin-bottom: 0;
  --bs-table-bg: transparent;
}
.blog-table thead th {
  background: var(--blog-bg);
  color: var(--blog-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 13px 18px;
  border-bottom: 2px solid var(--blog-line);
  white-space: nowrap;
}
.blog-table tbody td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--blog-line);
  vertical-align: middle;
  color: #334155;
  font-size: .88rem;
}
.blog-table tbody tr { transition: background .15s ease; }
.blog-table tbody tr:hover { background: rgba(14, 165, 233, .05); }
.blog-table tbody tr:last-child td { border-bottom: 0; }

.blog-post-title {
  font-weight: 700;
  color: var(--blog-ink);
  text-decoration: none;
  line-height: 1.4;
  display: inline-block;
}
.blog-post-title:hover { color: var(--blog-accent-dark); }
.blog-post-slug { font-size: .72rem; color: #94a3b8; font-family: ui-monospace, monospace; }
.blog-id-chip {
  background: var(--blog-bg);
  border: 1px solid var(--blog-line);
  color: var(--blog-muted);
  font-weight: 700;
  font-size: .74rem;
  padding: 3px 9px;
  border-radius: 8px;
}

/* Category chip */
.blog-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(109, 40, 217, .1);
  color: var(--blog-violet);
  border: 1px solid rgba(109, 40, 217, .28);
  font-size: .74rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Status pill with dot */
.blog-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .74rem;
  font-weight: 800;
  padding: 5px 13px;
  border-radius: 999px;
  letter-spacing: .3px;
  white-space: nowrap;
}
.blog-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .6);
}
.blog-status.s-published { background: rgba(16, 185, 129, .14); color: #047857; }
.blog-status.s-pending   { background: rgba(245, 158, 11, .16); color: #b45309; animation: blogPulse 1.8s ease-in-out infinite; }
.blog-status.s-draft     { background: rgba(100, 116, 139, .16); color: #475569; }
.blog-status.s-archived  { background: rgba(15, 23, 42, .14); color: var(--blog-ink); }

@keyframes blogPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .5); }
  50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0); }
}

/* Author cell */
.blog-author-cell { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.blog-author-cell img, .blog-author-cell .blog-avatar-fallback { width: 30px; height: 30px; font-size: .78rem; }
.blog-author-cell .n { font-weight: 600; color: var(--blog-ink); white-space: nowrap; }

/* Action buttons */
.blog-actions { display: inline-flex; gap: 6px; flex-wrap: nowrap; }
.blog-actions .btn {
  border-radius: 9px;
  font-weight: 700;
  font-size: .76rem;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s ease;
}
.blog-actions .btn:hover { transform: translateY(-1px); box-shadow: 0 8px 16px -10px rgba(15, 23, 42, .7); }
.blog-actions .btn i { font-size: .74rem; }
.blog-actions .btn-approve { background: var(--blog-green); border-color: var(--blog-green); color: #fff; }
.blog-actions .btn-approve:hover { background: #059669; border-color: #059669; color: #fff; }
.blog-actions .btn-unpublish { background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .5); color: #b45309; }
.blog-actions .btn-unpublish:hover { background: var(--blog-amber); color: #fff; }
.blog-actions .btn-edit { background: rgba(14, 165, 233, .12); border-color: rgba(14, 165, 233, .45); color: var(--blog-accent-dark); }
.blog-actions .btn-edit:hover { background: var(--blog-accent); color: #fff; }
.blog-actions .btn-delete { background: rgba(244, 63, 94, .1); border-color: rgba(244, 63, 94, .4); color: var(--blog-rose); }
.blog-actions .btn-delete:hover { background: var(--blog-rose); color: #fff; }
.blog-actions .btn-view { background: rgba(109, 40, 217, .1); border-color: rgba(109, 40, 217, .4); color: var(--blog-violet); }
.blog-actions .btn-view:hover { background: var(--blog-violet); color: #fff; }

/* Pending-review banner (admin + form notices) */
.blog-pending-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, .14), rgba(245, 158, 11, .05));
  border: 1px solid rgba(245, 158, 11, .45);
  border-radius: 16px;
  padding: 14px 20px;
  margin-bottom: 22px;
  color: #92400e;
  font-size: .88rem;
  font-weight: 600;
}
.blog-pending-banner .ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--blog-amber);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  animation: blogPulse 2s infinite;
}
.blog-pending-banner .num { font-weight: 900; font-size: 1.1rem; color: #78350f; }
  .blog-pending-banner .banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--blog-amber);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: filter .15s ease, transform .15s ease;
  }
  .blog-pending-banner .banner-cta:hover,
  .blog-pending-banner .banner-cta:focus-visible {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-1px);
  }
  .blog-pending-banner .banner-cta:focus-visible {
    outline: 3px solid rgba(245, 158, 11, .45);
    outline-offset: 2px;
  }
  /* Briefly highlight the Pending Review tile after jumping to it. */
  .blog-stat.is-flash {
    animation: blogPendingFlash 1.6s ease;
  }
  .blog-stat.is-pending:focus { outline: none; }
  @keyframes blogPendingFlash {
    0%, 100% { box-shadow: none; }
    25%      { box-shadow: 0 0 0 4px rgba(245, 158, 11, .45); }
  }
  @media (max-width: 575.98px) {
    .blog-pending-banner { flex-wrap: wrap; }
    .blog-pending-banner .banner-cta { width: 100%; justify-content: center; }
  }

/* Teacher hint card (profile avatar nudge) */
.blog-profile-nudge {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(14, 165, 233, .12), rgba(109, 40, 217, .08));
  border: 1px solid rgba(14, 165, 233, .35);
  border-radius: 16px;
  padding: 14px 20px;
  margin-bottom: 22px;
}
.blog-profile-nudge img, .blog-profile-nudge .blog-avatar-fallback { width: 46px; height: 46px; font-size: 1.1rem; }
.blog-profile-nudge .who { font-weight: 800; color: var(--blog-ink); font-size: .95rem; }
.blog-profile-nudge .msg { font-size: .8rem; color: var(--blog-muted); }
.blog-profile-nudge .btn {
  border-radius: 999px;
  font-weight: 700;
  font-size: .78rem;
  border-color: var(--blog-accent);
  color: var(--blog-accent-dark);
  margin-left: auto;
  white-space: nowrap;
}
.blog-profile-nudge .btn:hover { background: var(--blog-accent); color: #fff; }

/* Empty state */
.blog-empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--blog-muted);
}
.blog-empty .ico {
  width: 78px;
  height: 78px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(14, 165, 233, .16), rgba(109, 40, 217, .12));
  color: var(--blog-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
}
.blog-empty h5 { font-weight: 800; color: var(--blog-ink); margin-bottom: 6px; }
.blog-empty p { font-size: .88rem; margin-bottom: 16px; }
.blog-empty .btn {
  border-radius: 999px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--blog-accent), var(--blog-accent-dark));
  border: 0;
  color: #fff;
  padding: 9px 24px;
  box-shadow: 0 12px 22px -12px rgba(14, 165, 233, .95);
}

/* Views counter chip inside tables */
.blog-views-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .74rem;
  font-weight: 700;
  color: var(--blog-muted);
  background: var(--blog-bg);
  border: 1px solid var(--blog-line);
  border-radius: 999px;
  padding: 3px 10px;
}
.blog-views-chip i { color: var(--blog-accent); }

/* ═══════════════════════════════════════════════════════════
   6 · ADMIN & TEACHER — CREATE / EDIT FORM CARD
   ═══════════════════════════════════════════════════════════ */

.blog-form-card {
  background: #fff;
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  padding: clamp(20px, 3vw, 34px);
  box-shadow: 0 16px 36px -30px rgba(15, 23, 42, .6);
}
.blog-form-card .form-label {
  font-weight: 700;
  color: var(--blog-ink);
  font-size: .84rem;
  letter-spacing: .2px;
}
.blog-form-card .form-control,
.blog-form-card .form-select {
  border-radius: 10px;
  border-color: var(--blog-line);
  font-size: .94rem;
}
.blog-form-card .form-control:focus,
.blog-form-card .form-select:focus {
  border-color: var(--blog-accent);
  box-shadow: 0 0 0 .18rem rgba(14, 165, 233, .18);
}
.blog-form-card textarea.form-control { line-height: 1.6; }
.blog-form-card .form-text { color: var(--blog-muted); font-size: .76rem; }
.blog-form-card .btn-primary {
  background: linear-gradient(135deg, var(--blog-accent), var(--blog-accent-dark));
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  padding: 10px 26px;
  box-shadow: 0 12px 24px -14px rgba(14, 165, 233, .95);
  transition: transform .15s ease, box-shadow .15s ease;
}
.blog-form-card .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -14px rgba(14, 165, 233, 1); }
.blog-form-card .btn-outline-secondary { border-radius: 999px; font-weight: 600; padding: 10px 22px; }
.blog-form-card .alert { border-radius: 12px; font-size: .88rem; }
.blog-form-card .tox-tinymce { border-radius: 12px !important; border: 1px solid var(--blog-line) !important; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 767.98px) {
  .blog-page-head { padding: 16px 18px; }
  .blog-page-head .head-icon { display: none; }
  .blog-stats { grid-template-columns: repeat(2, 1fr); }
  .blog-table thead { display: none; }
  .blog-table, .blog-table tbody, .blog-table tr, .blog-table td { display: block; width: 100%; }
  .blog-table tbody tr { border-bottom: 4px solid var(--blog-bg); padding: 8px 0; }
  .blog-table tbody td { border-bottom: 0; padding: 8px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .blog-table tbody td::before {
    content: attr(data-label);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: var(--blog-muted);
  }
  .blog-table tbody td:first-child::before { display: none; }
  .blog-actions { flex-wrap: wrap; justify-content: flex-end; }
  .blog-byline { flex-wrap: wrap; }
}