/* ============================================================
   OnPoint SMM Audit Portal — portal.css
   Light/Dark Theme, Sidebar Layout, Full Component Library
   ============================================================ */

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --brand:        #1A56DB;
  --brand-dark:   #1D4ED8;
  --brand-light:  #DBEAFE;
  --accent:       #0EA5E9;
  --sidebar-bg:   #0F172A;
  --sidebar-text: #CBD5E1;
  --sidebar-active-bg: rgba(26,86,219,0.25);
  --sidebar-active-text: #60A5FA;
  --sidebar-hover-bg: rgba(255,255,255,0.06);
  --topbar-bg:    #ffffff;
  --topbar-border:#E2E8F0;
  --page-bg:      #F1F5F9;
  --card-bg:      #ffffff;
  --card-border:  #E2E8F0;
  --text:         #1E293B;
  --text-muted:   #64748B;
  --text-light:   #94A3B8;
  --border:       #E2E8F0;
  --input-bg:     #ffffff;
  --input-border: #CBD5E1;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.07);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
  --sidebar-width: 260px;
  --topbar-height: 60px;
  --radius:       10px;
  --radius-sm:    6px;
}

.dark {
  --topbar-bg:    #1E293B;
  --topbar-border:#334155;
  --page-bg:      #0F172A;
  --card-bg:      #1E293B;
  --card-border:  #334155;
  --text:         #F1F5F9;
  --text-muted:   #94A3B8;
  --text-light:   #64748B;
  --border:       #334155;
  --input-bg:     #0F172A;
  --input-border: #475569;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.4);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.inline { display: inline; }

/* ── Layout ─────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  z-index: 300;
  transition: transform 0.25s ease, width 0.25s ease;
  overflow: hidden;
}
.main-wrap {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left 0.25s ease;
}

/* ── Sidebar Header ─────────────────────────────────────── */
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  height: 68px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.logo-link { display: block; }
.logo { height: 36px; width: auto; display: block; }
.logo-dark { display: none; }
.dark .logo-light { display: none; }
.dark .logo-dark { display: block; }
.sidebar-toggle {
  background: none; border: none; color: var(--sidebar-text);
  cursor: pointer; font-size: 1rem; padding: 6px;
  border-radius: var(--radius-sm); transition: background 0.15s;
}
.sidebar-toggle:hover { background: var(--sidebar-hover-bg); }

/* ── Sidebar Nav ────────────────────────────────────────── */
.sidebar-nav {
  flex: 1; overflow-y: auto; padding: 12px 0;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.nav-section-label {
  padding: 12px 20px 4px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  color: #64748B; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 20px; color: var(--sidebar-text);
  font-size: 0.88rem; font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s; cursor: pointer;
}
.nav-item:hover { background: var(--sidebar-hover-bg); color: #ffffff; text-decoration: none; }
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  border-left-color: var(--brand);
}
.nav-item i { width: 18px; text-align: center; font-size: 0.95rem; }

/* ── Sidebar Footer ─────────────────────────────────────── */
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 14px 16px;
  flex-shrink: 0;
}
.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff; font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-meta { min-width: 0; }
.user-name { font-size: 0.85rem; font-weight: 600; color: #F1F5F9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.72rem; color: #64748B; text-transform: capitalize; }
.sidebar-footer-actions { display: flex; gap: 6px; }

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 200;
  box-shadow: var(--shadow-sm);
}
.topbar-title { font-size: 1.1rem; font-weight: 700; color: var(--text); flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 1.1rem; cursor: pointer; }

/* ── Page Content ───────────────────────────────────────── */
.page-content { padding: 28px; flex: 1; }
.page-footer { padding: 16px 28px; font-size: 0.78rem; color: var(--text-light); border-top: 1px solid var(--border); }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 0.95rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--brand); }
.card-body { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border); font-size: 0.85rem; }

/* ── Dashboard Grid ─────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }

/* ── Stat Cards ─────────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff; flex-shrink: 0;
}
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid transparent; transition: all 0.15s;
  text-decoration: none; line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-light); }
.btn-danger { background: #DC2626; color: #fff; border-color: #DC2626; }
.btn-danger:hover { background: #B91C1C; }
.btn-secondary { background: var(--page-bg); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 5px 7px; border-radius: 5px;
  font-size: 0.9rem; transition: all 0.15s; display: inline-flex; align-items: center;
}
.btn-icon:hover { background: var(--border); color: var(--brand); }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 9px 14px;
  background: var(--input-bg); color: var(--text);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm); font-size: 0.88rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,86,219,0.15); }
.form-control.is-invalid { border-color: #DC2626; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748B'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; cursor: pointer; }
.form-check-row { margin-bottom: 18px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.input-icon-wrap { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.9rem; }
.input-icon-wrap .form-control { padding-left: 36px; }
.input-icon-right {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px;
}
.form-section { margin-bottom: 32px; }
.form-section-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.checkbox-item { display: flex; align-items: center; gap: 8px; font-size: 0.83rem; cursor: pointer; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card-bg); }
.checkbox-item input { accent-color: var(--brand); }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table thead th { background: var(--page-bg); color: var(--text-muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 14px; text-align: left; border-bottom: 2px solid var(--border); white-space: nowrap; }
.table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--page-bg); }
.table-actions { display: flex; align-items: center; gap: 4px; }

/* ── Badges ─────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; text-transform: capitalize; }
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-secondary { background: var(--border); color: var(--text-muted); }
.badge-dark { background: #1E293B; color: #94A3B8; }
.dark .badge-success { background: #065F46; color: #6EE7B7; }
.dark .badge-warning { background: #92400E; color: #FDE68A; }

/* ── Score Pills ────────────────────────────────────────── */
.score-pill { display: inline-flex; padding: 3px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 700; }
.score-green { background: #D1FAE5; color: #065F46; }
.score-yellow { background: #FEF3C7; color: #92400E; }
.score-orange { background: #FFEDD5; color: #9A3412; }
.score-red { background: #FEE2E2; color: #991B1B; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 20px; margin: 0 28px 16px;
  border-radius: var(--radius-sm); font-size: 0.85rem;
  border-left: 4px solid transparent;
}
.alert-success { background: #F0FDF4; border-color: #16A34A; color: #065F46; }
.alert-danger { background: #FEF2F2; border-color: #DC2626; color: #991B1B; }
.alert-close { margin-left: auto; background: none; border: none; cursor: pointer; opacity: 0.6; font-size: 0.85rem; color: inherit; }

/* ── Pagination ─────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; justify-content: center; padding: 16px; }
.page-link { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text); font-size: 0.83rem; transition: all 0.15s; text-decoration: none; }
.page-link:hover, .page-link.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── Client List ────────────────────────────────────────── */
.client-list { list-style: none; }
.client-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.client-item:last-child { border-bottom: none; }
.client-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; flex-shrink: 0; }
.client-info { flex: 1; min-width: 0; }
.client-name { font-weight: 600; font-size: 0.88rem; color: var(--text); }
.client-company { font-size: 0.75rem; color: var(--text-muted); }

/* ── Quick Actions ──────────────────────────────────────── */
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 20px; }
.quick-action { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; border: 1px solid var(--border); border-radius: var(--radius); text-align: center; font-size: 0.8rem; font-weight: 600; color: var(--text); transition: all 0.15s; }
.quick-action:hover { border-color: var(--brand); background: var(--brand-light); color: var(--brand); text-decoration: none; }
.quick-action i { font-size: 1.4rem; color: var(--brand); }

/* ── Login ──────────────────────────────────────────────── */
.login-body { margin: 0; min-height: 100vh; background: var(--page-bg); display: flex; }
.login-wrap { display: flex; width: 100%; min-height: 100vh; }
.login-card { width: 460px; flex-shrink: 0; background: var(--card-bg); padding: 52px 48px; display: flex; flex-direction: column; justify-content: center; }
.login-logo { margin-bottom: 32px; }
.login-title { font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.login-sub { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 28px; }
.login-form { margin-bottom: 24px; }
.login-footer { font-size: 0.8rem; color: var(--text-muted); }
.login-bg { flex: 1; background: linear-gradient(135deg, #1A56DB 0%, #0EA5E9 60%, #7C3AED 100%); padding: 60px; display: flex; align-items: center; justify-content: center; }
.login-bg-content { max-width: 420px; color: white; }
.login-bg-content h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 16px; }
.login-bg-content p { opacity: 0.85; font-size: 1rem; margin-bottom: 28px; line-height: 1.7; }
.login-features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.login-features li { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; opacity: 0.9; }
.login-features li i { color: #86EFAC; }

/* ── Audit Cards (Client Dashboard) ────────────────────── */
.client-welcome { margin-bottom: 24px; }
.client-welcome h2 { font-size: 1.5rem; font-weight: 800; }
.audits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.audit-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform 0.15s, box-shadow 0.15s; }
.audit-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.audit-card-header { display: flex; align-items: center; gap: 8px; padding: 14px 18px 0; }
.audit-card-body { flex: 1; padding: 14px 18px; }
.audit-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.audit-desc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; }
.score-display { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.score-circle { width: 64px; height: 64px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 4px solid; flex-shrink: 0; }
.score-circle.score-green { border-color: #16A34A; }
.score-circle.score-yellow { border-color: #D97706; }
.score-circle.score-orange { border-color: #EA580C; }
.score-circle.score-red { border-color: #DC2626; }
.score-number { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.score-unit { font-size: 0.65rem; color: var(--text-muted); }
.score-label-text { font-weight: 700; font-size: 0.88rem; }
.score-subtext { font-size: 0.75rem; color: var(--text-muted); }
.platform-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.platform-tag { background: var(--page-bg); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.audit-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; }
.audit-meta i { margin-right: 4px; }
.audit-card-footer { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); background: var(--page-bg); }
.audit-status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-completed { background: #16A34A; }
.status-in_progress { background: #D97706; }
.status-draft { background: #94A3B8; }
.status-archived { background: #475569; }

/* ── Empty State ────────────────────────────────────────── */
.empty-state { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 3rem; display: block; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { max-width: 400px; margin: 0 auto 20px; font-size: 0.88rem; }

/* ── Meta Labels ─────────────────────────────────────────── */
.meta-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 3px; }
.meta-value { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.recommendations-text { font-family: inherit; font-size: 0.88rem; white-space: pre-wrap; color: var(--text); line-height: 1.8; }

/* ── Utilities ──────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8rem; }
.link { color: var(--brand); font-weight: 500; }
.link:hover { text-decoration: underline; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 20px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h2 { font-size: 1.3rem; font-weight: 800; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .span-4 { grid-column: span 2; }
  .span-6 { grid-column: span 2; }
}
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .sidebar { transform: translateX(-260px); width: 260px; }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .mobile-menu-btn { display: block; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 16px; }
  .login-wrap { flex-direction: column; }
  .login-card { width: 100%; padding: 36px 24px; }
  .login-bg { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .span-2, .span-3, .span-4 { grid-column: span 1; }
  .form-row { grid-template-columns: 1fr; }
  .alert { margin: 0 16px 12px; }
}

@media print {
  .sidebar, .topbar, .page-footer, .audit-toolbar button, .btn { display: none !important; }
  .main-wrap { margin-left: 0; }
  .page-content { padding: 0; }
}

/* ── Checklist content styles (from original) ─────────── */
ul.checklist {
  list-style: none;
  padding: 0;
  margin: 8px 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
ul.checklist li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.15s;
}
ul.checklist li:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(26,86,219,0.1);
}
ul.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text);
}
ul.checklist input[type="checkbox"] {
  width: 16px; height: 16px; min-width: 16px;
  cursor: pointer; accent-color: var(--brand); margin-top: 1px;
}
ul.checklist li.checked {
  background: #F0FDF4; border-color: #86EFAC;
}
.dark ul.checklist li.checked {
  background: #052e16; border-color: #166534;
}
ul.checklist li.checked label span {
  text-decoration: line-through; color: var(--text-muted);
}
/* Tables */
.checklist-content .table-wrap {
  overflow-x: auto; margin: 12px 0 20px;
  border-radius: 8px; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.checklist-content table {
  width: 100%; border-collapse: collapse; font-size: 0.84rem;
}
.checklist-content th {
  background: linear-gradient(135deg, var(--brand), #2563EB);
  color: white; padding: 10px 14px; text-align: left;
  font-weight: 700; font-size: 0.8rem;
}
.checklist-content td {
  padding: 9px 14px; border-bottom: 1px solid var(--border);
  vertical-align: top; color: var(--text);
}
.checklist-content tr:last-child td { border-bottom: none; }
.checklist-content tr.even td { background: var(--page-bg); }
.checklist-content tr:not(.thead):hover td { background: rgba(26,86,219,0.04); }
.checklist-content td:first-child { font-weight: 500; }
/* Headings inside checklist */
.checklist-content h1 {
  font-size: 1.3rem; font-weight: 800;
  background: linear-gradient(135deg, var(--brand), #2563EB);
  color: white; padding: 14px 20px; border-radius: 8px;
  margin: 28px 0 16px;
}
.checklist-content h2 {
  font-size: 1rem; font-weight: 700; color: var(--brand);
  padding: 12px 16px; background: var(--light-bg, #EFF6FF);
  border-left: 4px solid var(--brand); border-radius: 0 6px 6px 0;
  margin: 20px 0 10px; scroll-margin-top: 80px;
}
.dark .checklist-content h2 { background: rgba(26,86,219,0.15); }
.checklist-content h3 {
  font-size: 0.9rem; font-weight: 700; color: var(--text);
  padding: 7px 14px; background: var(--page-bg);
  border-left: 3px solid var(--accent, #0EA5E9);
  border-radius: 0 5px 5px 0; margin: 16px 0 8px;
}
.checklist-content blockquote {
  background: var(--mid-bg, #DBEAFE); border-left: 4px solid var(--brand);
  padding: 10px 16px; border-radius: 0 6px 6px 0;
  font-size: 0.85rem; color: var(--text); margin: 10px 0;
}
.dark .checklist-content blockquote { background: rgba(26,86,219,0.15); }
.checklist-content hr {
  border: none; border-top: 2px solid var(--border); margin: 28px 0;
}
.checklist-content p { font-size: 0.88rem; color: var(--text); margin: 8px 0; }
/* Score key */
.score-key {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 16px 0;
}
.score-card { padding: 14px; border-radius: 10px; text-align: center; border: 2px solid transparent; }
.score-card.green { background: #F0FDF4; border-color: #86EFAC; }
.score-card.yellow { background: #FEFCE8; border-color: #FDE047; }
.score-card.orange { background: #FFF7ED; border-color: #FDBA74; }
.score-card.red { background: #FEF2F2; border-color: #FCA5A5; }
.dark .score-card.green { background: #052e16; border-color: #166534; }
.dark .score-card.yellow { background: #422006; border-color: #92400e; }
.dark .score-card.orange { background: #431407; border-color: #9a3412; }
.dark .score-card.red { background: #450a0a; border-color: #991b1b; }
.score-card .range { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.score-card .label { font-size: 0.78rem; font-weight: 600; margin-top: 4px; color: var(--text); }
.score-card .action { font-size: 0.7rem; color: var(--text-muted); margin-top: 5px; }
/* Checklist nav (mini TOC inside audit view) */
.checklist-toc {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 20px; margin-bottom: 20px;
}
.checklist-toc h4 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 10px; }
.checklist-toc-links { display: flex; flex-wrap: wrap; gap: 6px; }
.checklist-toc-links a {
  display: inline-block; padding: 3px 12px;
  background: var(--page-bg); border: 1px solid var(--border);
  border-radius: 20px; font-size: 0.75rem; color: var(--text);
  text-decoration: none; transition: all 0.15s;
}
.checklist-toc-links a:hover { background: var(--brand); color: white; border-color: var(--brand); }
@media (max-width: 768px) {
  ul.checklist { grid-template-columns: 1fr; }
  .score-key { grid-template-columns: 1fr 1fr; }
}
@media print {
  ul.checklist { grid-template-columns: 1fr 1fr; }
  .checklist-content h2 { break-before: auto; }
}
