/* ============================================================
   ADMINBANNOK.COM — Design System v2
   Professional dark theme · IBM Plex Sans Thai
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Backgrounds — layered dark navy */
  --bg-0:   #07090F;   /* sidebar rail */
  --bg-1:   #0C1120;   /* page canvas */
  --bg-2:   #111827;   /* card surface */
  --bg-3:   #182338;   /* hover / elevated */

  /* Borders */
  --br-0: rgba(255,255,255,.04);
  --br-1: rgba(255,255,255,.08);
  --br-2: rgba(255,255,255,.14);

  /* Text */
  --t-1: #EAF0FF;      /* headings */
  --t-2: #8B9DC3;      /* body muted */
  --t-3: #3D5070;      /* placeholders */

  /* Accent */
  --orange:     #38BDF8;
  --orange-dim: rgba(56,189,248,.08);
  --orange-br:  rgba(56,189,248,.22);
  --blue:       #38BDF8;
  --green:      #34D399;
  --red:        #F87171;

  /* Admin (light) */
  --a-bg:      #F4F6FB;
  --a-surface: #FFFFFF;
  --a-border:  #E0E5EE;
  --a-text:    #111827;
  --a-muted:   #6B7591;

  /* Layout */
  --sidebar-w: 256px;
  --header-h:  52px;
  --content-w: 920px;
  --radius:    10px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'IBM Plex Sans Thai', 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   PUBLIC SITE — Dark theme
   ============================================================ */

body.site { background: var(--bg-1); color: var(--t-1); }

/* ── Shell ───────────────────────────────────────────────── */
.site-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────── */
.site-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg-0);
  border-right: 1px solid var(--br-0);
  position: fixed; top: 0; left: 0; height: 100vh;
  overflow-y: auto; overflow-x: hidden;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-3) transparent;
}
.site-sidebar::-webkit-scrollbar { width: 3px; }
.site-sidebar::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
.site-sidebar-inner { padding: 0 0 32px; }

/* Brand */
.site-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--br-0);
  margin-bottom: 8px;
  color: var(--t-1); font-weight: 700; font-size: 14px;
  letter-spacing: -.01em;
}
.site-brand:hover { color: var(--t-1); }
.site-brand-icon {
  width: 28px; height: 28px; border-radius: 7px;
  object-fit: cover; flex-shrink: 0;
  background: var(--bg-3);
}

/* Top nav */
.site-sidebar-links {
  display: flex; flex-direction: column;
  padding: 4px 10px 8px;
  border-bottom: 1px solid var(--br-0);
  margin-bottom: 8px;
}
.site-sidebar-links a {
  display: flex; align-items: center; gap: 8px;
  color: var(--t-2); font-size: 13px; font-weight: 450;
  padding: 7px 10px; border-radius: 7px;
  transition: color .15s, background .15s;
}
.site-sidebar-links a:hover { color: var(--t-1); background: var(--bg-3); }

/* Category tree */
.cat-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--t-2);
  padding: 12px 20px 4px; opacity: .5;
}
.cat-tree, .cat-children { list-style: none; }
.cat-item { position: relative; }
.cat-row { display: flex; align-items: center; }
.cat-link {
  flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0;
  color: var(--t-2); font-size: 13px; font-weight: 400;
  padding: 6px 10px 6px 20px; border-radius: 0;
  border-left: 2px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}
.cat-link:hover { color: var(--t-1); background: rgba(255,255,255,.03); border-color: var(--br-2); }
.cat-link.active {
  color: var(--orange); background: var(--orange-dim);
  border-left-color: var(--orange); font-weight: 500;
}
.cat-icon {
  width: 16px; height: 16px; border-radius: 3px;
  object-fit: cover; flex-shrink: 0; opacity: .85;
}
.cat-toggle {
  background: none; border: none; color: var(--t-3);
  width: 28px; height: 28px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; margin-right: 8px;
  border-radius: 5px; font-size: 11px;
  transition: color .15s, transform .2s ease, background .15s;
}
.cat-toggle:hover { color: var(--t-1); background: var(--bg-3); }
.cat-item.open > .cat-row .cat-toggle { transform: rotate(90deg); color: var(--t-2); }

.cat-children {
  overflow: hidden; max-height: 0;
  transition: max-height .25s ease;
  padding-left: 12px;
}
.cat-item.open .cat-children { max-height: 800px; }
.cat-children a {
  display: block; font-size: 12.5px; color: var(--t-3);
  padding: 5px 10px 5px 20px;
  border-left: 2px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.cat-children a:hover { color: var(--t-2); border-color: var(--br-2); background: rgba(255,255,255,.02); }
.cat-children a.active { color: var(--orange); border-color: var(--orange); background: var(--orange-dim); }

/* Sidebar overlay + toggle */
.site-sidebar-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px; padding: 8px;
  background: none; border: none; flex-shrink: 0;
}
.site-sidebar-toggle span {
  display: block; width: 18px; height: 1.5px;
  background: var(--t-2); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.site-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 90; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; backdrop-filter: blur(2px); }
.site-sidebar-overlay.visible { opacity: 1; visibility: visible; }

/* Header brand (mobile only) */
.header-brand {
  display: none; align-items: center; gap: 8px;
  color: var(--t-1); font-weight: 700; font-size: 13px;
  flex: 1; min-width: 0; letter-spacing: -.01em;
}
.header-brand-icon { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.header-brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Content column ──────────────────────────────────────── */
.site-content { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  height: var(--header-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 24px;
  background: rgba(7,9,15,.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--br-1);
  position: sticky; top: 0; z-index: 50;
}

/* Search */
.site-search { display: flex; align-items: center; gap: 0; margin-left: auto; flex-shrink: 0; }
.site-search input {
  width: 200px; background: rgba(255,255,255,.05);
  border: 1px solid var(--br-1); border-right: none;
  color: var(--t-1); border-radius: 7px 0 0 7px;
  padding: 6px 12px; font-size: 13px; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.site-search input:focus { outline: none; border-color: var(--br-2); background: rgba(255,255,255,.07); }
.site-search input::placeholder { color: var(--t-3); }
.site-search button {
  background: rgba(255,255,255,.05); border: 1px solid var(--br-1);
  color: var(--t-2); padding: 6px 10px; border-radius: 0 7px 7px 0;
  display: flex; align-items: center; transition: background .15s, color .15s;
}
.site-search button:hover { background: rgba(255,255,255,.09); color: var(--t-1); }

/* ── Main ────────────────────────────────────────────────── */
.site-main { flex: 1; max-width: var(--content-w); width: 100%; margin: 0 auto; padding: 28px 28px 56px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  text-align: center; padding: 18px 24px;
  color: var(--t-3); font-size: 12px;
  border-top: 1px solid var(--br-0);
  margin-top: auto;
}
.site-footer p { margin: 0; }

/* Back to top */
.back-to-top {
  position: fixed; right: 20px; bottom: 20px;
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--bg-3); color: var(--t-2); border: 1px solid var(--br-1);
  font-size: 16px; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, visibility .2s, transform .2s, background .15s;
  z-index: 40;
}
.back-to-top:hover { background: var(--bg-3); color: var(--t-1); border-color: var(--br-2); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ============================================================
   HOME PAGE
   ============================================================ */

/* Filter pills */
.home-filter {
  display: flex; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; padding-bottom: 4px; margin-bottom: 24px;
  scrollbar-width: none;
}
.home-filter::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 13px; border-radius: 6px;
  border: 1px solid var(--br-1); color: var(--t-2);
  font-size: 12.5px; font-weight: 450; white-space: nowrap;
  transition: color .15s, background .15s, border-color .15s;
}
.pill:hover { color: var(--t-1); background: var(--bg-3); border-color: var(--br-2); }
.pill-active { background: var(--orange); color: #fff !important; border-color: transparent; font-weight: 500; }

/* Shared label */
.card-cat {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--orange); background: var(--orange-dim); border-radius: 4px;
  padding: 2px 7px;
}
.card-time { font-size: 11.5px; color: var(--t-3); }

/* ── Featured card ───────────────────────────────────────── */
.card-featured {
  display: grid; grid-template-columns: 5fr 7fr;
  border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--br-1);
  color: inherit; margin-bottom: 2px;
  transition: border-color .2s, box-shadow .25s;
  min-height: 240px;
}
.card-featured:hover {
  border-color: var(--orange-br);
  box-shadow: 0 0 0 1px var(--orange-br), 0 8px 32px rgba(0,0,0,.35);
}

.card-featured-img {
  background-size: cover; background-position: center;
  position: relative;
}
.card-featured-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, transparent 70%, var(--bg-2));
}
.card-img-placeholder {
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
}
.card-img-placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(247,127,58,.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(93,170,255,.04) 0%, transparent 50%);
}
.card-img-placeholder::after { display: none; }

.card-featured-body {
  padding: 32px 28px; display: flex; flex-direction: column;
  justify-content: center; gap: 14px;
}
.card-featured-title {
  font-size: 21px; font-weight: 700; line-height: 1.4;
  color: var(--t-1); letter-spacing: -.02em;
}
.card-featured-excerpt {
  font-size: 13.5px; color: var(--t-2); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-featured-footer {
  display: flex; align-items: center; justify-content: space-between; margin-top: 4px;
}
.card-read-more {
  font-size: 12px; color: var(--orange); font-weight: 500;
  display: flex; align-items: center; gap: 4px;
  transition: gap .15s;
}
.card-featured:hover .card-read-more { gap: 7px; }

/* ── Article list rows ───────────────────────────────────── */
.article-list { display: flex; flex-direction: column; margin-top: 4px; }
.card-row {
  display: grid; grid-template-columns: 88px 1fr; gap: 16px;
  padding: 16px 12px; margin: 0 -12px;
  border-top: 1px solid var(--br-0);
  color: inherit; align-items: start;
  border-radius: 8px;
  transition: background .15s;
}
.card-row:last-child { border-bottom: 1px solid var(--br-0); }
.card-row:hover { background: var(--bg-2); }
.card-row:hover .card-row-title { color: var(--orange); }

.card-row-img {
  width: 88px; height: 64px; border-radius: 7px;
  background-size: cover; background-position: center;
  flex-shrink: 0; background-color: var(--bg-3);
}
.card-row-body {
  display: flex; flex-direction: column; gap: 5px;
  min-width: 0; padding-top: 1px;
}
.card-row-title {
  font-size: 14px; font-weight: 500; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .15s;
}
.card-row-excerpt {
  font-size: 12.5px; color: var(--t-2); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Tags ────────────────────────────────────────────────── */
.article-tags { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag-badge {
  font-size: 12px; color: var(--blue); border: 1px solid var(--br-1);
  border-radius: 5px; padding: 3px 10px;
  transition: background .15s, border-color .15s;
}
.tag-badge:hover { background: rgba(93,170,255,.08); border-color: rgba(93,170,255,.25); }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--t-3); margin-bottom: 18px;
}
.breadcrumb a { color: var(--t-3); transition: color .15s; }
.breadcrumb a:hover { color: var(--t-1); }
.breadcrumb svg { flex-shrink: 0; }

/* ── Category page ───────────────────────────────────────── */
.cat-header {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 20px; margin-bottom: 8px;
  border-bottom: 1px solid var(--br-0);
}
.cat-header-img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.cat-header-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 3px; }
.cat-header-desc { font-size: 13px; color: var(--t-2); line-height: 1.6; }

/* ── Home stats bar ──────────────────────────────────────── */
.home-stats {
  display: flex; gap: 0; margin-bottom: 28px;
  background: var(--bg-1); border: 1px solid var(--br-1); border-radius: 12px;
  overflow: hidden;
}
.home-stat {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 16px 12px; border-right: 1px solid var(--br-1);
}
.home-stat:last-child { border-right: none; }
.home-stat-num { font-size: 1.6rem; font-weight: 700; color: var(--orange); line-height: 1; }
.home-stat-label { font-size: .72rem; color: var(--t-2); margin-top: 4px; text-align: center; }

/* ── Tag cloud ───────────────────────────────────────────── */
.tag-cloud-section { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--br-1); }
.tag-cloud-title { font-size: .9rem; font-weight: 600; color: var(--t-2); margin-bottom: 14px; letter-spacing: .04em; text-transform: uppercase; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px 12px; line-height: 1.8; }
.tag-cloud-item {
  color: var(--orange); text-decoration: none; font-weight: 500;
  transition: opacity .15s;
}
.tag-cloud-item:hover { opacity: 1 !important; text-decoration: underline; }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 72px 24px 40px; gap: 12px; text-align: center;
}
.empty-state svg { color: var(--t-3); }
.empty-state h2 { font-size: 16px; font-weight: 600; color: var(--t-1); }
.empty-state p { font-size: 13px; color: var(--t-2); line-height: 1.65; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 36px 0 8px; }
.page-btn {
  font-size: 13px; color: var(--t-2);
  padding: 7px 16px; border: 1px solid var(--br-1); border-radius: 7px;
  transition: color .15s, background .15s, border-color .15s;
}
.page-btn:hover { color: var(--t-1); background: var(--bg-3); border-color: var(--br-2); }
.page-info { font-size: 12px; color: var(--t-3); }

/* ── Article detail ──────────────────────────────────────── */
.article-detail { max-width: 740px; }
.article-detail-header { margin-bottom: 28px; }
.article-detail h1 {
  font-size: 28px; font-weight: 700; line-height: 1.35;
  letter-spacing: -.025em; color: var(--t-1); margin: 12px 0 14px;
}
.article-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.article-featured-img { width: 100%; border-radius: 12px; margin: 20px 0; }

.article-body {
  font-size: 15px; line-height: 1.85; color: #C5D0E8;
}
.article-body > * + * { margin-top: 16px; }
.article-body h2 {
  font-size: 19px; font-weight: 700; color: var(--t-1);
  margin: 36px 0 12px; letter-spacing: -.015em;
  padding-top: 8px; border-top: 1px solid var(--br-0);
}
.article-body h3 { font-size: 16px; font-weight: 600; color: var(--t-1); margin: 24px 0 8px; }
.article-body p { margin: 0 0 16px; }
.article-body ul, .article-body ol { padding-left: 20px; margin: 0 0 16px; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--blue); text-decoration: underline; text-decoration-color: rgba(93,170,255,.3); text-underline-offset: 3px; }
.article-body a:hover { color: #90C3FF; }
.article-body blockquote {
  border-left: 3px solid var(--orange); margin: 20px 0;
  padding: 12px 18px; background: var(--orange-dim); border-radius: 0 7px 7px 0;
  color: var(--t-2);
}
.article-body pre {
  background: #060B14; border: 1px solid var(--br-1);
  border-radius: 9px; padding: 36px 18px 18px; margin: 20px 0;
  overflow-x: auto; position: relative;
}
.article-body :not(pre) > code {
  background: rgba(93,170,255,.1); color: #90C3FF;
  border-radius: 4px; padding: 1.5px 6px; font-size: 13.5px;
  font-family: 'IBM Plex Mono', monospace;
  border: 1px solid rgba(93,170,255,.15);
}
.article-body table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.article-body th { background: var(--bg-3); color: var(--t-1); font-weight: 600; text-align: left; padding: 9px 12px; border: 1px solid var(--br-1); }
.article-body td { padding: 9px 12px; border: 1px solid var(--br-0); color: var(--t-2); }
.article-body tr:hover td { background: var(--bg-2); }
.article-body img { border-radius: 8px; width: 100%; margin: 8px 0; }
.article-body hr { border: none; border-top: 1px solid var(--br-0); margin: 28px 0; }

/* Code copy button */
.code-copy-btn {
  position: absolute; top: 9px; right: 10px;
  background: rgba(255,255,255,.06); color: var(--t-2);
  border: 1px solid var(--br-1); border-radius: 6px; font-size: 11px;
  padding: 3px 9px; cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s;
}
.code-copy-btn:hover { background: rgba(255,255,255,.12); color: var(--t-1); }

/* Not found */
.not-found { text-align: center; padding: 80px 24px; }
.not-found h1 { font-size: 64px; font-weight: 800; color: var(--t-3); letter-spacing: -.04em; }
.not-found h2 { font-size: 20px; color: var(--t-1); margin: 8px 0 12px; }
.not-found p { color: var(--t-2); font-size: 14px; }

/* ============================================================
   ADMIN — Light theme
   ============================================================ */

body.admin { background: var(--a-bg); color: var(--a-text); }
.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 210px; flex-shrink: 0; background: var(--bg-0);
  padding: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--bg-3) transparent;
}
.admin-brand-link {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 14px 14px;
  border-bottom: 1px solid var(--br-0);
  margin-bottom: 8px;
}
.admin-brand-icon { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; flex-shrink: 0; background: var(--bg-3); }
.admin-brand-name { color: var(--t-1); font-weight: 700; font-size: 13px; line-height: 1.25; }
.admin-brand-sub { color: var(--t-3); font-size: 10.5px; margin-top: 1px; }

.admin-sidebar nav { display: flex; flex-direction: column; padding: 0 8px; gap: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 8px;
  color: var(--t-2); font-size: 13px; font-weight: 400;
  padding: 8px 10px; border-radius: 7px;
  transition: color .15s, background .15s;
}
.nav-item:hover { color: var(--t-1); background: var(--bg-3); }
.nav-item.active { color: var(--orange); background: var(--orange-dim); }
.admin-logout { padding: 16px 16px 0; border-top: 1px solid var(--br-0); margin-top: 16px; }
.admin-logout button { background: none; border: none; color: var(--t-3); font-size: 12px; cursor: pointer; padding: 0; }
.admin-logout button:hover { color: var(--t-2); }

.admin-main { flex: 1; padding: 24px 28px; min-width: 0; }
.admin-sidebar-toggle { display: none; }

/* Admin toolbar */
.admin-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; flex-wrap: wrap; gap: 10px;
}
.admin-toolbar h1 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--a-text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--a-border); color: var(--a-muted);
  padding: 7px 14px; border-radius: 7px; font-size: 13px;
  background: var(--a-surface); cursor: pointer;
  font-family: inherit; font-weight: 450;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: #EEF0F8; border-color: #C5CAD8; color: var(--a-text); }
.btn-primary { background: var(--orange); color: #fff; border-color: transparent; font-weight: 500; }
.btn-primary:hover { background: #E8721E; color: #fff; }
.btn-danger { color: var(--red); border-color: rgba(248,113,113,.3); }
.btn-danger:hover { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.5); }

/* Table */
.admin-table {
  width: 100%; border-collapse: collapse; background: var(--a-surface);
  border: 1px solid var(--a-border); border-radius: var(--radius);
  overflow: hidden; font-size: 13.5px;
}
.admin-table th {
  background: #F0F3FA; color: var(--a-muted); font-size: 11px;
  font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--a-border);
}
.admin-table td {
  padding: 11px 14px; border-bottom: 1px solid #F0F2F8; vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #F7F9FF; }
.admin-table a { color: var(--orange); font-weight: 500; }

/* Metric cards */
.metric-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.metric-card {
  background: var(--a-surface); border: 1px solid var(--a-border);
  border-radius: var(--radius); padding: 18px 22px; min-width: 140px; flex: 1;
}
.metric-value { display: block; font-size: 28px; font-weight: 700; letter-spacing: -.03em; color: var(--a-text); }
.metric-label { color: var(--a-muted); font-size: 12px; margin-top: 2px; }

/* Forms */
form label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--a-muted); }
form input[type=text], form input[type=email], form input[type=password],
form input[type=url], form input[type=number], form select, form textarea {
  display: block; width: 100%; margin-top: 5px;
  padding: 9px 12px; font-size: 13.5px; font-family: inherit;
  border: 1px solid var(--a-border); border-radius: 7px;
  background: var(--a-surface); color: var(--a-text);
  transition: border-color .15s, box-shadow .15s;
}
form input:focus, form select:focus, form textarea:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(247,127,58,.12);
}
form textarea { resize: vertical; min-height: 80px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.form-hint { font-size: 12px; color: var(--a-muted); margin-top: -8px; margin-bottom: 14px; }

/* Tag checks */
.tag-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.tag-check { display: flex; align-items: center; gap: 6px; width: auto; margin: 0; font-size: 13px; color: var(--a-text); }
.tag-check input { width: auto; margin: 0; accent-color: var(--orange); }

/* Status badges */
.status-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px; letter-spacing: .03em;
}
.status-published { background: rgba(52,211,153,.12); color: #059669; }
.status-draft { background: rgba(139,157,195,.1); color: var(--a-muted); }

/* Login */
body.auth-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg-1); padding: 20px;
}
.admin-login {
  max-width: 380px; width: 100%; background: #fff;
  border-radius: 14px; padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.04);
}
.admin-login .login-brand { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--a-muted); margin-bottom: 6px; }
.admin-login h1 { font-size: 22px; font-weight: 700; color: var(--a-text); margin-bottom: 4px; letter-spacing: -.02em; }
.admin-login .login-sub { font-size: 13px; color: var(--a-muted); margin-bottom: 24px; }
.admin-login .error { background: #FEF2F2; color: #B91C1C; font-size: 13px; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid rgba(185,28,28,.12); }
.admin-login button { width: 100%; padding: 11px; font-size: 14px; margin-top: 6px; }

/* ============================================================
   RESPONSIVE — Mobile ≤ 768px
   ============================================================ */

@media (max-width: 768px) {

  /* Sidebar: off-canvas */
  .site-sidebar-toggle { display: flex; }
  .header-brand { display: flex; }
  .site-sidebar {
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    box-shadow: none; z-index: 110;
  }
  .site-sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0,0,0,.5);
  }
  .site-content { margin-left: 0; }
  .site-main { padding: 20px 16px 48px; }

  /* Search: compact */
  .site-search input { width: 120px; font-size: 12.5px; }

  /* Featured: stack */
  .card-featured { grid-template-columns: 1fr; min-height: unset; }
  .card-featured-img { min-height: 180px; }
  .card-featured-body { padding: 18px 18px 22px; gap: 10px; }
  .card-featured-title { font-size: 18px; }

  /* Rows */
  .card-row { grid-template-columns: 72px 1fr; gap: 12px; padding: 14px 8px; margin: 0 -8px; }
  .card-row-img { width: 72px; height: 54px; }

  /* Article */
  .article-detail h1 { font-size: 22px; }
  .article-body { font-size: 14.5px; }

  /* Admin */
  .admin-sidebar-toggle {
    display: block; position: fixed; top: 12px; left: 12px; z-index: 200;
    background: var(--bg-0); color: var(--t-1); border: 1px solid var(--br-1);
    border-radius: 8px; width: 36px; height: 36px; font-size: 15px;
  }
  .admin-sidebar {
    position: fixed; left: 0; top: 0; z-index: 150;
    transform: translateX(-100%); transition: transform .25s cubic-bezier(.4,0,.2,1);
    padding-top: 56px; box-shadow: 4px 0 20px rgba(0,0,0,.3);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { padding: 60px 16px 24px; }
  .metric-card { min-width: 120px; }
  .admin-table { font-size: 12.5px; }
  .admin-table th, .admin-table td { padding: 9px 10px; }
}
